{"openapi":"3.2.0","info":{"title":"Lensing Public API","version":"v1","description":"`v1` is published, and its contract is frozen: an endpoint in this version will not change incompatibly. An incompatible change ships in a successor version instead, and `v1` stays reachable alongside it, so an integration moves only when it changes its `Api-Version` header.\n\nEvery request carries `Api-Version: v1` and an `Authorization: Bearer <access token>` header."},"paths":{"/base/approval-policies/{id}":{"patch":{"operationId":"updateApprovalPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateApprovalPolicyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, MISSING_ENTITY_SCOPE, ENTITY_NOT_FOUND, UNKNOWN_LINE, UNKNOWN_APPROVER, UNKNOWN_EXCLUSION_LINE, NO_LINES, LINE_WITHOUT_APPROVERS, MISSING_LINE_VALUE, INVALID_NUMBER_VALUE, INVALID_COMPOSITE_EXPRESSION, CONFLICTING_ACTIVE_POLICY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_ENTITY_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that matched nothing on this policy."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"approverId":{"type":"string","description":"The approver id that matched nothing on that line."}},"additionalProperties":false,"required":["approverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXCLUSION_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exclusionLineId":{"type":"string","description":"The exclusion line id that matched nothing on this policy."}},"additionalProperties":false,"required":["exclusionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_APPROVERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the line without approvers."},"step":{"type":"number","description":"The step of the line without approvers."}},"additionalProperties":false,"required":["criteria","step"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_LINE_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_NUMBER_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COMPOSITE_EXPRESSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_ACTIVE_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The business object both policies govern."},"conflictingPolicyNumber":{"type":"string","description":"The policyHeaderNumber of the active policy that blocks this change."},"coverage":{"type":"string","description":"What the blocking policy covers: 'all entities' or a single named legal entity."}},"additionalProperties":false,"required":["businessObject","coverage"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_ENTITY_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that matched nothing on this policy."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"approverId":{"type":"string","description":"The approver id that matched nothing on that line."}},"additionalProperties":false,"required":["approverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXCLUSION_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exclusionLineId":{"type":"string","description":"The exclusion line id that matched nothing on this policy."}},"additionalProperties":false,"required":["exclusionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_APPROVERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the line without approvers."},"step":{"type":"number","description":"The step of the line without approvers."}},"additionalProperties":false,"required":["criteria","step"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_LINE_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_NUMBER_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COMPOSITE_EXPRESSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_ACTIVE_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The business object both policies govern."},"conflictingPolicyNumber":{"type":"string","description":"The policyHeaderNumber of the active policy that blocks this change."},"coverage":{"type":"string","description":"What the blocking policy covers: 'all entities' or a single named legal entity."}},"additionalProperties":false,"required":["businessObject","coverage"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_ENTITY_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that matched nothing on this policy."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"approverId":{"type":"string","description":"The approver id that matched nothing on that line."}},"additionalProperties":false,"required":["approverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXCLUSION_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exclusionLineId":{"type":"string","description":"The exclusion line id that matched nothing on this policy."}},"additionalProperties":false,"required":["exclusionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_APPROVERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the line without approvers."},"step":{"type":"number","description":"The step of the line without approvers."}},"additionalProperties":false,"required":["criteria","step"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_LINE_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_NUMBER_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COMPOSITE_EXPRESSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_ACTIVE_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The business object both policies govern."},"conflictingPolicyNumber":{"type":"string","description":"The policyHeaderNumber of the active policy that blocks this change."},"coverage":{"type":"string","description":"What the blocking policy covers: 'all entities' or a single named legal entity."}},"additionalProperties":false,"required":["businessObject","coverage"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the approval policy to update.","example":"9c1f4b62-7d38-4a05-b1e7-2f6a8c093d54"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateApprovalPolicyInput"}}}},"summary":"Update an approval policy","description":"Updates an approval policy with the fields you send. The response is empty. Read the stored state back with GET base/approval-policies/:id. Omitting a field leaves it unchanged, at every level: the header's own fields, a line's fields and an approver's fields. Child collections are edited with three arrays, never by re-sending the collection. createLines adds lines, updateLines changes lines matched by id, and deleteLines removes lines by id, taking their approvers with them. The same split applies to exclusionLines and to each line's approvers. A line you do not mention survives. businessObject cannot be changed. A policy for a different document type is a different policy, so create one and delete this. Setting status to 'active', or moving the policy onto entity coverage that another active policy already covers, fails with CONFLICTING_ACTIVE_POLICY. Editing a policy that already overlaps another is allowed, so a tenant that acquired overlapping policies can still correct them. After your operations the policy must still have at least one rule line, and every surviving line at least one approver, otherwise NO_LINES or LINE_WITHOUT_APPROVERS.","tags":["baseApprovalPolicies"]},"delete":{"operationId":"deleteApprovalPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteApprovalPolicyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, POLICY_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POLICY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the policy that is still in use."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POLICY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the policy that is still in use."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POLICY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the policy that is still in use."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the approval policy to delete.","example":"9c1f4b62-7d38-4a05-b1e7-2f6a8c093d54"}],"summary":"Delete an approval policy","description":"Deletes an approval policy and everything on it. The response is empty. Capture the policyHeaderNumber from a GET first if you need it for a record. Deactivating is almost always the better choice: set the policy to status 'inActive' with PATCH base/approval-policies/:id, and documents already in the workflow keep approving against it while the audit trail stays intact. Delete is for a policy created in error. A policy that documents still reference cannot be deleted. If any approve or reject decision was recorded under it, or any document froze a snapshot of it when it entered approval, the call fails with POLICY_IN_USE. Deleting an id that does not exist fails with NOT_FOUND.","tags":["baseApprovalPolicies"]},"get":{"operationId":"getApprovalPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getApprovalPolicyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the approval policy to return.","example":"9c1f4b62-7d38-4a05-b1e7-2f6a8c093d54"}],"summary":"Retrieve an approval policy","description":"Retrieves an approval policy in full: the header, every rule line with its criteria and approvers, the exclusion lines and the notification settings. The output mirrors what create and update take, so you can read a policy, change one line and send it back. A document picks up the approvers of every rule line it matches. Approver names are resolved for readability and are absent when the referenced employee or manager no longer exists. approverId stays authoritative.","tags":["baseApprovalPolicies"]}},"/base/permissions/search":{"post":{"operationId":"searchPermissionItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPermissionItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_LIMIT, QUERY_STRING_TOO_SHORT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUERY_STRING_TOO_SHORT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUERY_STRING_TOO_SHORT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPermissionItemsInput"}}}},"summary":"Searches the permission roles or tasks that are available to default users. The results are ordered by how well they match the query.","tags":["basePermissions"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/base/approval-policies":{"post":{"operationId":"createApprovalPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createApprovalPolicyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: MISSING_ENTITY_SCOPE, ENTITY_NOT_FOUND, UNKNOWN_BUSINESS_OBJECT, NO_LINES, LINE_WITHOUT_APPROVERS, MISSING_LINE_VALUE, INVALID_NUMBER_VALUE, INVALID_COMPOSITE_EXPRESSION, CONFLICTING_ACTIVE_POLICY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MISSING_ENTITY_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BUSINESS_OBJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The code you sent."},"knownCodes":{"type":"array","items":{"type":"string"},"description":"Every business object code registered in your tenant."}},"additionalProperties":false,"required":["businessObject","knownCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_APPROVERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the line without approvers."},"step":{"type":"number","description":"The step of the line without approvers."}},"additionalProperties":false,"required":["criteria","step"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_LINE_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_NUMBER_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COMPOSITE_EXPRESSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_ACTIVE_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The business object both policies govern."},"conflictingPolicyNumber":{"type":"string","description":"The policyHeaderNumber of the active policy that blocks this one."},"coverage":{"type":"string","description":"What the blocking policy covers: 'all entities' or a single named legal entity."}},"additionalProperties":false,"required":["businessObject","coverage"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MISSING_ENTITY_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BUSINESS_OBJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The code you sent."},"knownCodes":{"type":"array","items":{"type":"string"},"description":"Every business object code registered in your tenant."}},"additionalProperties":false,"required":["businessObject","knownCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_APPROVERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the line without approvers."},"step":{"type":"number","description":"The step of the line without approvers."}},"additionalProperties":false,"required":["criteria","step"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_LINE_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_NUMBER_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COMPOSITE_EXPRESSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_ACTIVE_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The business object both policies govern."},"conflictingPolicyNumber":{"type":"string","description":"The policyHeaderNumber of the active policy that blocks this one."},"coverage":{"type":"string","description":"What the blocking policy covers: 'all entities' or a single named legal entity."}},"additionalProperties":false,"required":["businessObject","coverage"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MISSING_ENTITY_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BUSINESS_OBJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The code you sent."},"knownCodes":{"type":"array","items":{"type":"string"},"description":"Every business object code registered in your tenant."}},"additionalProperties":false,"required":["businessObject","knownCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_APPROVERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the line without approvers."},"step":{"type":"number","description":"The step of the line without approvers."}},"additionalProperties":false,"required":["criteria","step"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_LINE_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_NUMBER_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COMPOSITE_EXPRESSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"criteria":{"type":"string","description":"The criteria of the offending line."}},"additionalProperties":false,"required":["criteria"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_ACTIVE_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessObject":{"type":"string","description":"The business object both policies govern."},"conflictingPolicyNumber":{"type":"string","description":"The policyHeaderNumber of the active policy that blocks this one."},"coverage":{"type":"string","description":"What the blocking policy covers: 'all entities' or a single named legal entity."}},"additionalProperties":false,"required":["businessObject","coverage"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createApprovalPolicyInput"}}}},"summary":"Create an approval policy","description":"Creates an approval policy with its rule lines, approvers, exclusion lines, and notification settings. The response contains only the new policy's id. Read the record back with GET base/approval-policies/:id for its stored state, including the assigned policyHeaderNumber. Scope the policy to exactly one thing: name an entityId or set isAllEntities. Naming neither fails with MISSING_ENTITY_SCOPE. Rule lines are evaluated independently. A document picks up the approvers of every line it matches, so two plain lines mean either condition brings in its own approvers, not that both must hold. To require several conditions together, send one line with criteria __COMPOSITE__ whose single value is a JSON AND or OR expression. Every rule line needs at least one approver, or the create fails with LINE_WITHOUT_APPROVERS. An active policy whose business object and entity coverage overlap an existing active policy fails with CONFLICTING_ACTIVE_POLICY. Create it with status 'inActive', or deactivate the other first. Send every value as a string, for example [\"10000\"], not [10000]. Only a line with valueType 'noValue' may omit the value.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["baseApprovalPolicies"]},"get":{"operationId":"approvalPolicies","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[policyHeaderNumber]","in":"query","required":false,"description":"Filter policyHeaderNumber (equality)","schema":{"type":"string"}},{"name":"filter[policyHeaderNumber][ne]","in":"query","required":false,"description":"Filter policyHeaderNumber (ne)","schema":{"type":"string"}},{"name":"filter[policyHeaderNumber][gt]","in":"query","required":false,"description":"Filter policyHeaderNumber (gt)","schema":{"type":"string"}},{"name":"filter[policyHeaderNumber][gte]","in":"query","required":false,"description":"Filter policyHeaderNumber (gte)","schema":{"type":"string"}},{"name":"filter[policyHeaderNumber][lt]","in":"query","required":false,"description":"Filter policyHeaderNumber (lt)","schema":{"type":"string"}},{"name":"filter[policyHeaderNumber][lte]","in":"query","required":false,"description":"Filter policyHeaderNumber (lte)","schema":{"type":"string"}},{"name":"filter[policyHeaderNumber][in]","in":"query","required":false,"description":"Filter policyHeaderNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[policyHeaderNumber][notIn]","in":"query","required":false,"description":"Filter policyHeaderNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[policyHeaderNumber][between]","in":"query","required":false,"description":"Filter policyHeaderNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[policyHeaderNumber][like]","in":"query","required":false,"description":"Filter policyHeaderNumber (like)","schema":{"type":"string"}},{"name":"filter[businessObject]","in":"query","required":false,"description":"Filter businessObject (equality)","schema":{"type":"string"}},{"name":"filter[businessObject][ne]","in":"query","required":false,"description":"Filter businessObject (ne)","schema":{"type":"string"}},{"name":"filter[businessObject][gt]","in":"query","required":false,"description":"Filter businessObject (gt)","schema":{"type":"string"}},{"name":"filter[businessObject][gte]","in":"query","required":false,"description":"Filter businessObject (gte)","schema":{"type":"string"}},{"name":"filter[businessObject][lt]","in":"query","required":false,"description":"Filter businessObject (lt)","schema":{"type":"string"}},{"name":"filter[businessObject][lte]","in":"query","required":false,"description":"Filter businessObject (lte)","schema":{"type":"string"}},{"name":"filter[businessObject][in]","in":"query","required":false,"description":"Filter businessObject (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[businessObject][notIn]","in":"query","required":false,"description":"Filter businessObject (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[businessObject][between]","in":"query","required":false,"description":"Filter businessObject (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[businessObject][like]","in":"query","required":false,"description":"Filter businessObject (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[isAllEntities]","in":"query","required":false,"description":"Filter isAllEntities (equality)","schema":{"type":"boolean"}},{"name":"filter[isAllEntities][ne]","in":"query","required":false,"description":"Filter isAllEntities (ne)","schema":{"type":"boolean"}},{"name":"filter[isAllEntities][gt]","in":"query","required":false,"description":"Filter isAllEntities (gt)","schema":{"type":"boolean"}},{"name":"filter[isAllEntities][gte]","in":"query","required":false,"description":"Filter isAllEntities (gte)","schema":{"type":"boolean"}},{"name":"filter[isAllEntities][lt]","in":"query","required":false,"description":"Filter isAllEntities (lt)","schema":{"type":"boolean"}},{"name":"filter[isAllEntities][lte]","in":"query","required":false,"description":"Filter isAllEntities (lte)","schema":{"type":"boolean"}},{"name":"filter[isAllEntities][in]","in":"query","required":false,"description":"Filter isAllEntities (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isAllEntities][notIn]","in":"query","required":false,"description":"Filter isAllEntities (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isAllEntities][between]","in":"query","required":false,"description":"Filter isAllEntities (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","policyHeaderNumber","-policyHeaderNumber","businessObject","-businessObject","status","-status","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","policyHeaderNumber","businessObject","status","isAllEntities","entityName","startDate","endDate","submitterCannotApprove","useSubstitute","approverCommentEnabled","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/approvalPoliciesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List approval policies","description":"Lists approval policies, each as its header only. For the rule lines, approvers, and notification settings, use GET base/approval-policies/:id or POST base/approval-policies/search.","tags":["baseApprovalPolicies"]}},"/base/entities":{"get":{"operationId":"entities","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[timeZone]","in":"query","required":false,"description":"Filter timeZone (equality)","schema":{"type":"string"}},{"name":"filter[timeZone][ne]","in":"query","required":false,"description":"Filter timeZone (ne)","schema":{"type":"string"}},{"name":"filter[timeZone][gt]","in":"query","required":false,"description":"Filter timeZone (gt)","schema":{"type":"string"}},{"name":"filter[timeZone][gte]","in":"query","required":false,"description":"Filter timeZone (gte)","schema":{"type":"string"}},{"name":"filter[timeZone][lt]","in":"query","required":false,"description":"Filter timeZone (lt)","schema":{"type":"string"}},{"name":"filter[timeZone][lte]","in":"query","required":false,"description":"Filter timeZone (lte)","schema":{"type":"string"}},{"name":"filter[timeZone][in]","in":"query","required":false,"description":"Filter timeZone (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[timeZone][notIn]","in":"query","required":false,"description":"Filter timeZone (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[timeZone][between]","in":"query","required":false,"description":"Filter timeZone (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[timeZone][like]","in":"query","required":false,"description":"Filter timeZone (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[entityType]","in":"query","required":false,"description":"Filter entityType (equality)","schema":{"type":"string"}},{"name":"filter[entityType][ne]","in":"query","required":false,"description":"Filter entityType (ne)","schema":{"type":"string"}},{"name":"filter[entityType][gt]","in":"query","required":false,"description":"Filter entityType (gt)","schema":{"type":"string"}},{"name":"filter[entityType][gte]","in":"query","required":false,"description":"Filter entityType (gte)","schema":{"type":"string"}},{"name":"filter[entityType][lt]","in":"query","required":false,"description":"Filter entityType (lt)","schema":{"type":"string"}},{"name":"filter[entityType][lte]","in":"query","required":false,"description":"Filter entityType (lte)","schema":{"type":"string"}},{"name":"filter[entityType][in]","in":"query","required":false,"description":"Filter entityType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityType][notIn]","in":"query","required":false,"description":"Filter entityType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityType][between]","in":"query","required":false,"description":"Filter entityType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityType][like]","in":"query","required":false,"description":"Filter entityType (like)","schema":{"type":"string"}},{"name":"filter[country]","in":"query","required":false,"description":"Filter country (equality)","schema":{"type":"string"}},{"name":"filter[country][ne]","in":"query","required":false,"description":"Filter country (ne)","schema":{"type":"string"}},{"name":"filter[country][gt]","in":"query","required":false,"description":"Filter country (gt)","schema":{"type":"string"}},{"name":"filter[country][gte]","in":"query","required":false,"description":"Filter country (gte)","schema":{"type":"string"}},{"name":"filter[country][lt]","in":"query","required":false,"description":"Filter country (lt)","schema":{"type":"string"}},{"name":"filter[country][lte]","in":"query","required":false,"description":"Filter country (lte)","schema":{"type":"string"}},{"name":"filter[country][in]","in":"query","required":false,"description":"Filter country (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[country][notIn]","in":"query","required":false,"description":"Filter country (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[country][between]","in":"query","required":false,"description":"Filter country (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[country][like]","in":"query","required":false,"description":"Filter country (like)","schema":{"type":"string"}},{"name":"filter[entityCode]","in":"query","required":false,"description":"Filter entityCode (equality)","schema":{"type":"string"}},{"name":"filter[entityCode][ne]","in":"query","required":false,"description":"Filter entityCode (ne)","schema":{"type":"string"}},{"name":"filter[entityCode][gt]","in":"query","required":false,"description":"Filter entityCode (gt)","schema":{"type":"string"}},{"name":"filter[entityCode][gte]","in":"query","required":false,"description":"Filter entityCode (gte)","schema":{"type":"string"}},{"name":"filter[entityCode][lt]","in":"query","required":false,"description":"Filter entityCode (lt)","schema":{"type":"string"}},{"name":"filter[entityCode][lte]","in":"query","required":false,"description":"Filter entityCode (lte)","schema":{"type":"string"}},{"name":"filter[entityCode][in]","in":"query","required":false,"description":"Filter entityCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityCode][notIn]","in":"query","required":false,"description":"Filter entityCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityCode][between]","in":"query","required":false,"description":"Filter entityCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityCode][like]","in":"query","required":false,"description":"Filter entityCode (like)","schema":{"type":"string"}},{"name":"filter[parentEntityId]","in":"query","required":false,"description":"Filter parentEntityId (equality)","schema":{"type":"string"}},{"name":"filter[parentEntityId][ne]","in":"query","required":false,"description":"Filter parentEntityId (ne)","schema":{"type":"string"}},{"name":"filter[parentEntityId][gt]","in":"query","required":false,"description":"Filter parentEntityId (gt)","schema":{"type":"string"}},{"name":"filter[parentEntityId][gte]","in":"query","required":false,"description":"Filter parentEntityId (gte)","schema":{"type":"string"}},{"name":"filter[parentEntityId][lt]","in":"query","required":false,"description":"Filter parentEntityId (lt)","schema":{"type":"string"}},{"name":"filter[parentEntityId][lte]","in":"query","required":false,"description":"Filter parentEntityId (lte)","schema":{"type":"string"}},{"name":"filter[parentEntityId][in]","in":"query","required":false,"description":"Filter parentEntityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentEntityId][notIn]","in":"query","required":false,"description":"Filter parentEntityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentEntityId][between]","in":"query","required":false,"description":"Filter parentEntityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentEntityId][like]","in":"query","required":false,"description":"Filter parentEntityId (like)","schema":{"type":"string"}},{"name":"filter[localeCode]","in":"query","required":false,"description":"Filter localeCode (equality)","schema":{"type":"string"}},{"name":"filter[localeCode][ne]","in":"query","required":false,"description":"Filter localeCode (ne)","schema":{"type":"string"}},{"name":"filter[localeCode][gt]","in":"query","required":false,"description":"Filter localeCode (gt)","schema":{"type":"string"}},{"name":"filter[localeCode][gte]","in":"query","required":false,"description":"Filter localeCode (gte)","schema":{"type":"string"}},{"name":"filter[localeCode][lt]","in":"query","required":false,"description":"Filter localeCode (lt)","schema":{"type":"string"}},{"name":"filter[localeCode][lte]","in":"query","required":false,"description":"Filter localeCode (lte)","schema":{"type":"string"}},{"name":"filter[localeCode][in]","in":"query","required":false,"description":"Filter localeCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[localeCode][notIn]","in":"query","required":false,"description":"Filter localeCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[localeCode][between]","in":"query","required":false,"description":"Filter localeCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[localeCode][like]","in":"query","required":false,"description":"Filter localeCode (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","parentEntityId","-parentEntityId","currency","-currency","timeZone","-timeZone","status","-status","entityType","-entityType","country","-country","entityCode","-entityCode","localeCode","-localeCode","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","entityName","entityNumber","currency","timeZone","status","entityType","country","entityCode","parentId","parentEntityId","localeCode","startDate","endDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entitiesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List legal entities and their establishments","description":"Lists legal entities and their establishments. Filter on entityType=LegalEntity for legal entities only. Their id values are the entityId that most other resources reference.","tags":["baseEntities"]},"post":{"operationId":"createEntity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createEntityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PARENT_ENTITY_NOT_FOUND, FIELD_REQUIRED, FIELD_NOT_ALLOWED, FIELD_TOO_LONG, INVALID_FIELD_VALUE, DUPLICATE_ENTITY_NAME, DATE_CONFLICT, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentEntityId":{"type":"string","description":"The parentEntityId you sent."}},"additionalProperties":false,"required":["parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing field, for example 'entityName' or 'externalIdentifiers[0].value'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent: 'parentEntityId'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'entityName'."},"maxLength":{"type":"number","description":"The most characters the field accepts."}},"additionalProperties":false,"required":["field","maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'currency' or 'externalIdentifiers[0].externalUrl'."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values. Empty for externalUrl, which takes a format rather than a list."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ENTITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityName":{"type":"string","description":"The name you sent."},"existingId":{"type":"string","description":"The id of the entity that already has the name."}},"additionalProperties":false,"required":["entityName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The date field in conflict: 'startDate'."},"reason":{"type":"string","description":"Why: 'beforeParentStartDate'."}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The repeated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentEntityId":{"type":"string","description":"The parentEntityId you sent."}},"additionalProperties":false,"required":["parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing field, for example 'entityName' or 'externalIdentifiers[0].value'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent: 'parentEntityId'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'entityName'."},"maxLength":{"type":"number","description":"The most characters the field accepts."}},"additionalProperties":false,"required":["field","maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'currency' or 'externalIdentifiers[0].externalUrl'."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values. Empty for externalUrl, which takes a format rather than a list."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ENTITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityName":{"type":"string","description":"The name you sent."},"existingId":{"type":"string","description":"The id of the entity that already has the name."}},"additionalProperties":false,"required":["entityName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The date field in conflict: 'startDate'."},"reason":{"type":"string","description":"Why: 'beforeParentStartDate'."}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The repeated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentEntityId":{"type":"string","description":"The parentEntityId you sent."}},"additionalProperties":false,"required":["parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing field, for example 'entityName' or 'externalIdentifiers[0].value'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent: 'parentEntityId'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'entityName'."},"maxLength":{"type":"number","description":"The most characters the field accepts."}},"additionalProperties":false,"required":["field","maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'currency' or 'externalIdentifiers[0].externalUrl'."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values. Empty for externalUrl, which takes a format rather than a list."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ENTITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityName":{"type":"string","description":"The name you sent."},"existingId":{"type":"string","description":"The id of the entity that already has the name."}},"additionalProperties":false,"required":["entityName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The date field in conflict: 'startDate'."},"reason":{"type":"string","description":"Why: 'beforeParentStartDate'."}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The repeated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createEntityInput"}}}},"summary":"Create an entity","description":"Creates an entity. A new entity always starts with status 'created' and in no accounting book. To use it, assign it to at least one book on POST accounting/books/entity-assignments, complete each assignment, then activate it with PATCH base/entities/:id { status: 'active', startDate }.\n\nHierarchy: once any entity exists, every new legal entity needs parentEntityId, so the legal hierarchy has exactly one top-level entity. A non-legal reporting entity is always top-level: it is created without a parent, also while other entities exist, and parentEntityId sent with it fails with FIELD_NOT_ALLOWED. A legal entity may name a non-legal reporting entity as its parent. A child cannot start before its parent.\n\nThe response is the new entity's id. Read the stored record, including its system-assigned entityNumber, with GET base/entities/:id.\n\nOptional text fields sent as an empty string are treated as omitted. Every call sends the Api-Version header: a missing or empty header, or an unknown version, answers 400; a route the requested version does not contain answers 404.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingEntities"]}},"/base/slack-workspaces/{id}":{"delete":{"operationId":"deleteSlackWorkspace","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteSlackWorkspaceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the connection to delete, as returned when the workspace was connected.","example":"9c1f4b62-7d38-4a05-b1e7-2f6a8c093d54"}],"summary":"Disconnects a Slack workspace from the tenant.","description":"Disconnects a Slack workspace from the tenant, so the Lensing Slack gateway stops answering its members. The Lensing Slack gateway calls this when a tenant admin confirms Uninstall from Settings and Policies, with that admin's own token, and uninstalls the Lensing Slack app from the workspace only after this succeeds.\n\nThe response is empty. Deleting the same id twice is not a no-op: the second call fails with NOT_FOUND, which a caller that only wants the workspace disconnected can treat as success. Works whether or not the Slack integration is enabled, so a tenant that switched it off can still disconnect what it connected.","tags":["baseSlackWorkspaces"]}},"/base/slack-workspaces":{"post":{"operationId":"createSlackWorkspace","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSlackWorkspaceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INTEGRATION_DISABLED, INVALID_TEAM_ID, WORKSPACE_ALREADY_CONNECTED, ANOTHER_WORKSPACE_CONNECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INTEGRATION_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TEAM_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"}},"additionalProperties":false,"required":["teamId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WORKSPACE_ALREADY_CONNECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["teamId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANOTHER_WORKSPACE_CONNECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["teamId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INTEGRATION_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TEAM_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"}},"additionalProperties":false,"required":["teamId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WORKSPACE_ALREADY_CONNECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["teamId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANOTHER_WORKSPACE_CONNECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["teamId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INTEGRATION_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TEAM_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"}},"additionalProperties":false,"required":["teamId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WORKSPACE_ALREADY_CONNECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["teamId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANOTHER_WORKSPACE_CONNECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"teamId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["teamId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSlackWorkspaceInput"}}}},"summary":"Connect a Slack workspace","description":"Connects a Slack workspace to the tenant, so the Lensing Slack gateway answers its members. The Lensing Slack gateway calls this right after a tenant admin installs the Lensing Slack app from Settings and Policies, with that admin's own token, so only someone allowed to connect workspaces can bind one.\n\nA tenant connects at most one Slack workspace. If teamId is already connected, the request fails with WORKSPACE_ALREADY_CONNECTED, which gives the existing record's id; a caller that only wants the workspace connected can treat that as success. If a different workspace is connected, it fails with ANOTHER_WORKSPACE_CONNECTED, which names that workspace; it has to be uninstalled from Settings and Policies before another one can connect.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["baseSlackWorkspaces"]}},"/base/approval-policies/search":{"post":{"operationId":"searchApprovalPolicies","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchApprovalPoliciesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchApprovalPoliciesInput"}}}},"summary":"Search approval policies","description":"Searches approval policies and returns each match in full, the same record GET base/approval-policies/:id returns. Use this endpoint rather than the collection when you match on a legal entity: entityId and entityName are accepted only in the request body, and the collection returns entityName but will not filter or sort on it. Every filter is optional and they are combined with AND. Omitting all of them matches every policy. An entityId that matches no entity returns an empty page, not an error.","tags":["baseApprovalPolicies"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/crm/opportunities/{id}":{"patch":{"operationId":"updateOpportunity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateOpportunityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTITY_NOT_FOUND, OPPORTUNITIES_MANAGED_BY_INTEGRATION, INVALID_OPPORTUNITY_NAME, CUSTOMER_NOT_FOUND, CUSTOMER_IS_END_CUSTOMER, INVALID_AMOUNT, END_CUSTOMER_REQUIRED, INVALID_END_CUSTOMER, INVALID_CURRENCY, PRICE_BOOK_NOT_FOUND, STAGE_NOT_FOUND, OPPORTUNITY_CLOSED, FIELD_LOCKED_BY_QUOTES, PRIMARY_QUOTE_REQUIRED, PRIMARY_QUOTE_NOT_SIGNED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITIES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that is managed by the integration."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_OPPORTUNITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_IS_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The end customer you sent as customerId."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount you sent, returned unchanged."}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The partner customer."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endCustomerId":{"type":"string","description":"The end customer that does not fit."}},"additionalProperties":false,"required":["endCustomerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent, returned unchanged."}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["priceBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The stage that does not fit."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The closed stage the opportunity is in."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_LOCKED_BY_QUOTES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field you tried to change, for example 'currency'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_QUOTE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The Closed Won stage you sent."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_QUOTE_NOT_SIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"quoteId":{"type":"string","description":"The primary quote. See id on GET crm/quotes/:id."},"status":{"type":"string","description":"The primary quote's current status, for example 'Approved'."}},"additionalProperties":false,"required":["quoteId","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITIES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that is managed by the integration."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_OPPORTUNITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_IS_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The end customer you sent as customerId."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount you sent, returned unchanged."}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The partner customer."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endCustomerId":{"type":"string","description":"The end customer that does not fit."}},"additionalProperties":false,"required":["endCustomerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent, returned unchanged."}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["priceBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The stage that does not fit."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The closed stage the opportunity is in."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_LOCKED_BY_QUOTES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field you tried to change, for example 'currency'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_QUOTE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The Closed Won stage you sent."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_QUOTE_NOT_SIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"quoteId":{"type":"string","description":"The primary quote. See id on GET crm/quotes/:id."},"status":{"type":"string","description":"The primary quote's current status, for example 'Approved'."}},"additionalProperties":false,"required":["quoteId","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITIES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that is managed by the integration."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_OPPORTUNITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_IS_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The end customer you sent as customerId."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount you sent, returned unchanged."}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The partner customer."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endCustomerId":{"type":"string","description":"The end customer that does not fit."}},"additionalProperties":false,"required":["endCustomerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent, returned unchanged."}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["priceBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The stage that does not fit."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The closed stage the opportunity is in."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_LOCKED_BY_QUOTES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field you tried to change, for example 'currency'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_QUOTE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The Closed Won stage you sent."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_QUOTE_NOT_SIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"quoteId":{"type":"string","description":"The primary quote. See id on GET crm/quotes/:id."},"status":{"type":"string","description":"The primary quote's current status, for example 'Approved'."}},"additionalProperties":false,"required":["quoteId","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The opportunity to change.","example":"7d1c2b3a-9e8f-4a6b-b5c4-3d2e1f0a9b87"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateOpportunityInput"}}}},"summary":"Update an opportunity","description":"Updates an opportunity. Every field is optional and an omitted field keeps its value; send null to clear endCustomerId, closeDate, amount or crmId. The rules apply to the opportunity as it will be afterward: a new customer must not be an end customer (CUSTOMER_IS_END_CUSTOMER), a partner customer needs one of its end customers, amount must not be negative (INVALID_AMOUNT), and the stage must be a stage of the entity; a stage the opportunity moves into must also be active (re-sending the current stage is accepted even if it has since been deactivated). Picking another customer drops the stored end customer unless you send a new one, and moving to another entity needs a stageId of that entity. Once a quote is linked, only opportunityName, stageId, closeDate and crmId can change (FIELD_LOCKED_BY_QUOTES); sending a locked field's current value is accepted. An opportunity in a Closed Won or Closed Lost stage cannot be changed (OPPORTUNITY_CLOSED); moving an open one into a closed stage is how it is closed. To switch stage only, send just stageId. Moving into a Closed Won stage needs a primary quote (PRIMARY_QUOTE_REQUIRED) that is Signed or Completed (PRIMARY_QUOTE_NOT_SIGNED), and creates the sales order from that quote. Opportunities of an entity kept in sync by a CRM integration cannot be changed here (OPPORTUNITIES_MANAGED_BY_INTEGRATION).","tags":["crmOpportunities"]},"get":{"operationId":"getOpportunity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getOpportunityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the opportunity you want to retrieve."}],"summary":"Retrieve an opportunity","description":"Retrieves an opportunity.","tags":["crmOpportunities"]}},"/crm/opportunity-stages":{"post":{"operationId":"createOpportunityStages","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createOpportunityStagesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ENTITY_NOT_FOUND, STAGES_ALREADY_EXIST, STAGES_MANAGED_BY_INTEGRATION, INVALID_STAGE_NAME, INVALID_PROBABILITY, DUPLICATE_ORDER_INDEX, INCOMPLETE_STAGES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_ALREADY_EXIST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STAGE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The zero-based position of the stage in stages."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROBABILITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The zero-based position of the stage in stages."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ORDER_INDEX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"orderIndex":{"type":"number","description":"The orderIndex that occurs more than once."}},"additionalProperties":false,"required":["orderIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingStageTypes":{"type":"array","items":{"type":"string"},"description":"The stage types without an active stage."}},"additionalProperties":false,"required":["missingStageTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_ALREADY_EXIST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STAGE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The zero-based position of the stage in stages."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROBABILITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The zero-based position of the stage in stages."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ORDER_INDEX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"orderIndex":{"type":"number","description":"The orderIndex that occurs more than once."}},"additionalProperties":false,"required":["orderIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingStageTypes":{"type":"array","items":{"type":"string"},"description":"The stage types without an active stage."}},"additionalProperties":false,"required":["missingStageTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_ALREADY_EXIST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STAGE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The zero-based position of the stage in stages."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROBABILITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The zero-based position of the stage in stages."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ORDER_INDEX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"orderIndex":{"type":"number","description":"The orderIndex that occurs more than once."}},"additionalProperties":false,"required":["orderIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingStageTypes":{"type":"array","items":{"type":"string"},"description":"The stage types without an active stage."}},"additionalProperties":false,"required":["missingStageTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createOpportunityStagesInput"}}}},"summary":"Create an entity's opportunity stages","description":"Creates the first opportunity stages of a legal entity that has none yet, in one request. The stages must include at least one active stage of each type, 'open', 'closedWon' and 'closedLost', or the call fails with INCOMPLETE_STAGES. Stages are ordered by orderIndex; a stage without one goes after every stage that has one, in the order you sent them. To change an entity's existing stages, use PATCH crm/opportunity-stages/:id. The response contains only the id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["crmOpportunityStages"]},"get":{"operationId":"opportunityStages","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[stageType]","in":"query","required":false,"description":"Filter stageType (equality)","schema":{"type":"string"}},{"name":"filter[stageType][ne]","in":"query","required":false,"description":"Filter stageType (ne)","schema":{"type":"string"}},{"name":"filter[stageType][gt]","in":"query","required":false,"description":"Filter stageType (gt)","schema":{"type":"string"}},{"name":"filter[stageType][gte]","in":"query","required":false,"description":"Filter stageType (gte)","schema":{"type":"string"}},{"name":"filter[stageType][lt]","in":"query","required":false,"description":"Filter stageType (lt)","schema":{"type":"string"}},{"name":"filter[stageType][lte]","in":"query","required":false,"description":"Filter stageType (lte)","schema":{"type":"string"}},{"name":"filter[stageType][in]","in":"query","required":false,"description":"Filter stageType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[stageType][notIn]","in":"query","required":false,"description":"Filter stageType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[stageType][between]","in":"query","required":false,"description":"Filter stageType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[stageType][like]","in":"query","required":false,"description":"Filter stageType (like)","schema":{"type":"string"}},{"name":"filter[isDeactivated]","in":"query","required":false,"description":"Filter isDeactivated (equality)","schema":{"type":"boolean"}},{"name":"filter[isDeactivated][ne]","in":"query","required":false,"description":"Filter isDeactivated (ne)","schema":{"type":"boolean"}},{"name":"filter[isDeactivated][gt]","in":"query","required":false,"description":"Filter isDeactivated (gt)","schema":{"type":"boolean"}},{"name":"filter[isDeactivated][gte]","in":"query","required":false,"description":"Filter isDeactivated (gte)","schema":{"type":"boolean"}},{"name":"filter[isDeactivated][lt]","in":"query","required":false,"description":"Filter isDeactivated (lt)","schema":{"type":"boolean"}},{"name":"filter[isDeactivated][lte]","in":"query","required":false,"description":"Filter isDeactivated (lte)","schema":{"type":"boolean"}},{"name":"filter[isDeactivated][in]","in":"query","required":false,"description":"Filter isDeactivated (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isDeactivated][notIn]","in":"query","required":false,"description":"Filter isDeactivated (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isDeactivated][between]","in":"query","required":false,"description":"Filter isDeactivated (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["entityId","-entityId","orderIndex","-orderIndex","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","entityId","stageName","stageType","probability","orderIndex","isDeactivated","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/opportunityStagesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"5b0e7c3a-2f6d-4a8b-9c1e-7d4f3a2b1c09","entityId":"ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3","stageName":"Qualification","stageType":"open","probability":"20","orderIndex":0,"isDeactivated":false,"lastModifiedDate":"2026-08-14T09:12:44.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List opportunity stages","description":"Lists opportunity stages. Each legal entity has its own ordered stages; to read one entity's stages in order, filter with filter[entityId][eq]=<entity id> and sort=orderIndex. To match on stageName, use POST crm/opportunity-stages/search.","tags":["crmOpportunityStages"]}},"/crm/quotes":{"post":{"operationId":"createQuote","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createQuoteOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_PRODUCT_LINE, PRICE_REQUIRED, QUOTE_TYPE_MISMATCH, CHANGE_ORDER_SOURCE_INCOMPLETE, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the product line."},"productLineId":{"type":"string","description":"The product line you sent."}},"additionalProperties":false,"required":["path","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that is missing, for example 'nonRecurringProducts[0].quoteProductLines[0].unitPrice'."}},"additionalProperties":false,"required":["path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field."},"quoteType":{"type":"string","description":"The quote type the request asked for."},"requirement":{"enum":["required","notAccepted"],"description":"'required' when the field is missing, 'notAccepted' when it was sent but the quote type derives or forbids it."}},"additionalProperties":false,"required":["field","quoteType","requirement"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_ORDER_SOURCE_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string","description":"What the sales arrangement lacks: 'billToAddress', 'soldToAddress', 'priceBook' or 'opportunityStage'."}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string","description":"The identifier of the broken rule, for example 'ERROR_012'."},"path":{"type":"string","description":"The part of the quote the rule checked, for example 'QuoteProduct'. It names the record type, not an input field."},"field":{"type":"string","description":"The field the rule checks, when it names one."}},"additionalProperties":false,"required":["rule","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the product line."},"productLineId":{"type":"string","description":"The product line you sent."}},"additionalProperties":false,"required":["path","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that is missing, for example 'nonRecurringProducts[0].quoteProductLines[0].unitPrice'."}},"additionalProperties":false,"required":["path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field."},"quoteType":{"type":"string","description":"The quote type the request asked for."},"requirement":{"enum":["required","notAccepted"],"description":"'required' when the field is missing, 'notAccepted' when it was sent but the quote type derives or forbids it."}},"additionalProperties":false,"required":["field","quoteType","requirement"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_ORDER_SOURCE_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string","description":"What the sales arrangement lacks: 'billToAddress', 'soldToAddress', 'priceBook' or 'opportunityStage'."}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string","description":"The identifier of the broken rule, for example 'ERROR_012'."},"path":{"type":"string","description":"The part of the quote the rule checked, for example 'QuoteProduct'. It names the record type, not an input field."},"field":{"type":"string","description":"The field the rule checks, when it names one."}},"additionalProperties":false,"required":["rule","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the product line."},"productLineId":{"type":"string","description":"The product line you sent."}},"additionalProperties":false,"required":["path","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that is missing, for example 'nonRecurringProducts[0].quoteProductLines[0].unitPrice'."}},"additionalProperties":false,"required":["path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field."},"quoteType":{"type":"string","description":"The quote type the request asked for."},"requirement":{"enum":["required","notAccepted"],"description":"'required' when the field is missing, 'notAccepted' when it was sent but the quote type derives or forbids it."}},"additionalProperties":false,"required":["field","quoteType","requirement"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_ORDER_SOURCE_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string","description":"What the sales arrangement lacks: 'billToAddress', 'soldToAddress', 'priceBook' or 'opportunityStage'."}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string","description":"The identifier of the broken rule, for example 'ERROR_012'."},"path":{"type":"string","description":"The part of the quote the rule checked, for example 'QuoteProduct'. It names the record type, not an input field."},"field":{"type":"string","description":"The field the rule checks, when it names one."}},"additionalProperties":false,"required":["rule","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createQuoteInput"}}}},"summary":"Create a quote","description":"Creates a quote on an opportunity, with its subscriptions and products. The body has the shape GET crm/quotes/:id returns, minus what the server owns: ids, numbers, names, status, approvalStatus, currency and every computed total. Each quote product line names a catalog productLineId, and its line type comes from that catalog line. The quote starts in status 'created' with approvalStatus 'pendingSubmission', exactly as one created on the quote page, and every amount is in the opportunity's currency. The quote is validated as the quote page validates it: dates, prices against the opportunity's price book, and the allowed line-type, price-model and invoice-frequency combinations. A failure of those rules returns VALIDATION_FAILED naming the rule. Sending isPrimary true makes this the opportunity's primary quote and unsets the previous one. A quote of type 'changeOrder' names a salesArrangementId instead of opportunityId, billToAddressId and soldToAddressId, and the server derives those three as QuoteApiV7 does: the customer's default bill-to and sold-to addresses, and the arrangement's open change-order opportunity, or a new one named 'Change Order - <arrangement number>' on the price book of the arrangement's sales order when none is open. A line's pricing is reconciled as the sales order endpoints reconcile it: unitPrice wins over discountAmount, which wins over discountPercentage, and the other two are derived against listPrice (tiered, volume, stairstep and rateCard lines excepted). discountPercentage is sent on a 0-100 scale, as the sales order endpoints take it, and stored and returned by GET crm/quotes/:id as a 0-1 fraction. The response contains only the id; read the stored quote with GET crm/quotes/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["crm-quotes"]},"get":{"operationId":"listQuotes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listQuotesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"quoteId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to the quote with this id."},{"name":"quoteType","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to quotes of this kind. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'. Omit for every kind."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to quotes in this business state. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Omit for every state."},{"name":"approvalStatus","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to quotes in this approval state. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Omit for every state.","example":"approved"},{"name":"isPrimary","in":"query","required":false,"schema":{"type":"boolean"},"description":"Limits results to primary quotes when true, or non-primary quotes when false. Pair with opportunityId to find an opportunity's primary quote. Omit for both."},{"name":"opportunityId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to quotes of this opportunity. Omit for every opportunity.","example":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"},{"name":"quoteDateFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to quotes drawn up on or after this date. Format YYYY-MM-DD. Inclusive."},{"name":"quoteDateTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to quotes drawn up on or before this date. Format YYYY-MM-DD. Inclusive."},{"name":"modifiedFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to quotes changed at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Inclusive."},{"name":"modifiedTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to quotes changed at or before this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Inclusive."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of quotes per page. Defaults to 50, and a value above 200 is treated as 200, not rejected.","example":50}],"summary":"List quotes","description":"Lists quotes, most recently created first. Only ids, enums, booleans and dates filter this endpoint. To filter by the memo text, quoteNumber or salesArrangementId, or to pass more than one value of a field, use POST crm/quotes/search. An unrecognized quoteType, status, or approvalStatus value, or an id that is not a UUID, matches nothing rather than failing. The item schema here has the quote's main fields only. GET crm/quotes/:id and POST crm/quotes/search also return the quote's priced lines.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200, minimum 1) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- Filter with the plain query parameters listed below, such as `status`, not `filter[field][op]`.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["crm-quotes"]}},"/crm/prospects/bulk":{"patch":{"operationId":"bulkUpdateProspects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkUpdateProspectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_PROSPECTS, DUPLICATE_PROSPECT, NOT_FOUND, PROSPECT_CONVERTED, ENTITY_NOT_FOUND, INVALID_PROSPECT_NAME, INVALID_BILLING_EMAIL, CURRENCY_NOT_FOUND, INVALID_ADDRESS, UNEXPECTED_SOLD_TO_ADDRESS, CONTACT_NOT_FOUND, INVALID_CONTACT, CONTACT_DETAILS_WITH_ID, DUPLICATE_CONTACT, CONTACT_ALREADY_LINKED, DUPLICATE_CONTACT_EMAIL, DUPLICATE_DEFAULT_CONTACT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_PROSPECTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"limit":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["limit","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PROSPECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROSPECT_CONVERTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"},"customerId":{"type":"string"}},"additionalProperties":false,"required":["index","id","customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"entityId":{"type":"string"}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"prospectName":{"type":"string"}},"additionalProperties":false,"required":["index","prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["index","billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["index","contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"emailAddress":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","emailAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"role":{"type":"string"}},"additionalProperties":false,"required":["index","role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_PROSPECTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"limit":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["limit","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PROSPECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROSPECT_CONVERTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"},"customerId":{"type":"string"}},"additionalProperties":false,"required":["index","id","customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"entityId":{"type":"string"}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"prospectName":{"type":"string"}},"additionalProperties":false,"required":["index","prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["index","billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["index","contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"emailAddress":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","emailAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"role":{"type":"string"}},"additionalProperties":false,"required":["index","role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_PROSPECTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"limit":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["limit","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PROSPECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROSPECT_CONVERTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"},"customerId":{"type":"string"}},"additionalProperties":false,"required":["index","id","customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"entityId":{"type":"string"}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"prospectName":{"type":"string"}},"additionalProperties":false,"required":["index","prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["index","billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["index","contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"emailAddress":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","emailAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"role":{"type":"string"}},"additionalProperties":false,"required":["index","role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkUpdateProspectsInput"}}}},"summary":"Bulk update prospects","description":"Updates multiple prospects in one request, up to 100. Each entry takes exactly the input of PATCH crm/prospects/:id, with id naming the prospect, and is checked by the same rules. A prospect may appear only once. All-or-nothing: if any entry is invalid, the call fails with that entry's error, 'index' set to its zero-based position in prospects, and nothing is changed. The response is empty.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["crm-prospects"]},"post":{"operationId":"bulkCreateProspects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateProspectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_PROSPECTS, ENTITY_NOT_FOUND, INVALID_PROSPECT_NAME, INVALID_BILLING_EMAIL, CURRENCY_NOT_FOUND, INVALID_ADDRESS, MISSING_SOLD_TO_ADDRESS, UNEXPECTED_SOLD_TO_ADDRESS, CONTACT_NOT_FOUND, INVALID_CONTACT, CONTACT_DETAILS_WITH_ID, DUPLICATE_CONTACT, CONTACT_ALREADY_LINKED, DUPLICATE_DEFAULT_CONTACT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_PROSPECTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"limit":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["limit","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"entityId":{"type":"string"}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"prospectName":{"type":"string"}},"additionalProperties":false,"required":["index","prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["index","billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["index","contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"role":{"type":"string"}},"additionalProperties":false,"required":["index","role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_PROSPECTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"limit":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["limit","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"entityId":{"type":"string"}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"prospectName":{"type":"string"}},"additionalProperties":false,"required":["index","prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["index","billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["index","contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"role":{"type":"string"}},"additionalProperties":false,"required":["index","role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_PROSPECTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"limit":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["limit","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"entityId":{"type":"string"}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"prospectName":{"type":"string"}},"additionalProperties":false,"required":["index","prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["index","billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["index","sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["index","contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"role":{"type":"string"}},"additionalProperties":false,"required":["index","role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateProspectsInput"}}}},"summary":"Bulk create prospects","description":"Creates multiple prospects in one request, up to 100. Each entry takes exactly the input of POST crm/prospects and is checked by the same rules. All-or-nothing: if any entry is invalid, the call fails with that entry's error, 'index' set to its zero-based position in prospects, and nothing is created. The response lists the new ids in input order; read a prospect with GET crm/prospects/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["crm-prospects"]}},"/crm/quotes/search":{"post":{"operationId":"searchQuotes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchQuotesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchQuotesInput"}}}},"summary":"Search quotes","description":"Searches quotes. Use this endpoint for criteria a query string cannot carry: text matches the quote memo, each multi-valued criterion lets you pass several values of one field, and quoteNumber and salesArrangementId are kept out of the URL. Criteria combine with AND, and a list within one criterion is an OR. For example, approvalStatus ['pendingApproval', 'approved'] matches either. A match comes back in full, with subscriptions[] and nonRecurringProducts[], the same as GET crm/quotes/:id. GET crm/quotes returns the header alone.","tags":["crm-quotes"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/crm/quotes/{id}/submit-for-approval":{"post":{"operationId":"submitQuoteForApproval","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/submitQuoteForApprovalOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, OPPORTUNITY_CLOSED, STATUS_CONFLICT, PRODUCT_REQUIRED, PSA_PRODUCT_REQUIRED, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'underApproval'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'pendingApproval'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PSA_PRODUCT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'underApproval'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'pendingApproval'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PSA_PRODUCT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'underApproval'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'pendingApproval'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PSA_PRODUCT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The quote to submit. See id on GET crm/quotes/:id.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitQuoteForApprovalInput"}}}},"summary":"Submit a quote for approval","description":"Submits a quote to its approval process, as Submit for approval on the quote page does. Only a quote in status 'created' can be submitted (STATUS_CONFLICT), it needs at least one product (PRODUCT_REQUIRED), and a quote that needs a PSA calculation needs a PSA product (PSA_PRODUCT_REQUIRED). No approval step can change once the quote's opportunity is Closed Won or Closed Lost (OPPORTUNITY_CLOSED). The tenant's approval policy decides what happens next: with no matching policy the quote is approved at once; otherwise its approvers are notified and it waits in 'underApproval'. If you are an approver of the quote yourself, submitting also records your approval. The response is the quote's status afterward.","tags":["crm-quotes"]}},"/crm/quotes/{id}":{"get":{"operationId":"getQuote","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getQuoteOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the quote you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a quote","description":"Retrieves a quote. Both this endpoint and POST crm/quotes/search return the whole quote. The header comes with subscriptions[], the subscriptions on the quote, and nonRecurringProducts[], the products that belong to no subscription. The products under a subscription are in subscriptions[].quoteProducts[], and both product sets share the same schema. GET crm/quotes returns the header alone. Every amount in the response is in the quote's currency.","tags":["crm-quotes"]},"patch":{"operationId":"updateQuote","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateQuoteOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, QUOTE_LOCKED, PRIMARY_REQUIRED, REFERENCE_NOT_FOUND, UNKNOWN_CHILD, CONFLICTING_OPERATIONS, INVALID_PRODUCT_LINE, PRICE_REQUIRED, QUOTE_TYPE_MISMATCH, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status: 'underSigning', 'signed' or 'completed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the quote."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CHILD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_OPERATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that appears in both."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the product line."},"productLineId":{"type":"string","description":"The product line you sent."}},"additionalProperties":false,"required":["path","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that is missing."}},"additionalProperties":false,"required":["path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field."},"quoteType":{"type":"string","description":"The quote's type."}},"additionalProperties":false,"required":["field","quoteType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string","description":"The identifier of the broken rule, for example 'ERROR_012'."},"path":{"type":"string","description":"The part of the quote the rule checked, for example 'QuoteProduct'. It names the record type, not an input field."},"field":{"type":"string","description":"The field the rule checks, when it names one."}},"additionalProperties":false,"required":["rule","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status: 'underSigning', 'signed' or 'completed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the quote."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CHILD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_OPERATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that appears in both."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the product line."},"productLineId":{"type":"string","description":"The product line you sent."}},"additionalProperties":false,"required":["path","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that is missing."}},"additionalProperties":false,"required":["path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field."},"quoteType":{"type":"string","description":"The quote's type."}},"additionalProperties":false,"required":["field","quoteType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string","description":"The identifier of the broken rule, for example 'ERROR_012'."},"path":{"type":"string","description":"The part of the quote the rule checked, for example 'QuoteProduct'. It names the record type, not an input field."},"field":{"type":"string","description":"The field the rule checks, when it names one."}},"additionalProperties":false,"required":["rule","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status: 'underSigning', 'signed' or 'completed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRIMARY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the quote."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CHILD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the identifier."},"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["path","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_OPERATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that appears in both."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that holds the product line."},"productLineId":{"type":"string","description":"The product line you sent."}},"additionalProperties":false,"required":["path","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"path":{"type":"string","description":"The input field that is missing."}},"additionalProperties":false,"required":["path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input field."},"quoteType":{"type":"string","description":"The quote's type."}},"additionalProperties":false,"required":["field","quoteType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string","description":"The identifier of the broken rule, for example 'ERROR_012'."},"path":{"type":"string","description":"The part of the quote the rule checked, for example 'QuoteProduct'. It names the record type, not an input field."},"field":{"type":"string","description":"The field the rule checks, when it names one."}},"additionalProperties":false,"required":["rule","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The identifier of the quote to change.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateQuoteInput"}}}},"summary":"Update a quote","description":"Updates a quote. Every field is optional and an omitted one stays as it is. The quote's children are changed through create, update and delete arrays: createSubscriptions, updateSubscriptions and deleteSubscriptions for subscriptions, createNonRecurringProducts, updateNonRecurringProducts and deleteNonRecurringProducts for the products outside a subscription, and the same three arrays one level down for the products of a subscription (createQuoteProducts ...) and the lines of a product (createQuoteProductLines ...). Items in an update array are matched by their id from GET crm/quotes/:id; deleting a subscription or product removes everything under it. A line's lineTiers and invoiceMilestones are replaced wholesale when sent and kept when omitted, as the sales order update endpoint does with tiers. Its rateCardEntries are matched as the sales order endpoint matches them: an entry with an id updates that entry, one without is added, and a current entry left out is deleted. A changed line's pricing is reconciled as the sales order endpoints reconcile it: unitPrice wins over discountAmount, which wins over discountPercentage, the other two are derived against the line's listPrice, and a listPrice sent alone keeps the line's discount amount (tiered, volume, stairstep and rateCard lines excepted). discountPercentage is sent on a 0-100 scale, as the sales order endpoints take it, and stored and returned as a 0-1 fraction. On a 'changeOrder' quote the addresses are those derived at creation and cannot be changed (QUOTE_TYPE_MISMATCH). The quote is validated as a whole afterward, as the quote page validates it, and a failure of those rules returns VALIDATION_FAILED naming the rule. A quote that is under signing, signed or completed cannot be changed (QUOTE_LOCKED). Changing a quote whose approval process has started sends it back to approval, as an edit on the quote page does. The quote type, opportunity and sales arrangement cannot be changed. The response is empty.","tags":["crm-quotes"]}},"/crm/opportunities":{"get":{"operationId":"listOpportunities","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listOpportunitiesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"entityId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to opportunities owned by this legal entity. Omit for every entity."},{"name":"customerId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to opportunities for this customer or prospect, matched against either. Omit for every customer."},{"name":"currency","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to opportunities in this currency. Format ISO 4217, for example 'USD'. Omit for every currency."},{"name":"createdFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to opportunities created at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Inclusive."},{"name":"createdTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to opportunities created at or before this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Inclusive."},{"name":"modifiedFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to opportunities changed at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Inclusive."},{"name":"modifiedTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to opportunities changed at or before this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Inclusive."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of opportunities per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}],"summary":"List opportunities","description":"Lists opportunities, most recently created first. Only ids, dates and an exact currency filter this endpoint. To filter by opportunityName, opportunityNumber or crmId, or to pass more than one value of a field, use POST crm/opportunities/search. The item schema is the same here, on GET crm/opportunities/:id and on POST crm/opportunities/search.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200, minimum 1) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- Filter with the plain query parameters listed below, such as `currency`, not `filter[field][op]`.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["crmOpportunities"]},"post":{"operationId":"createOpportunity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createOpportunityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ENTITY_NOT_FOUND, OPPORTUNITIES_MANAGED_BY_INTEGRATION, INVALID_OPPORTUNITY_NAME, CUSTOMER_NOT_FOUND, CUSTOMER_IS_END_CUSTOMER, INVALID_AMOUNT, END_CUSTOMER_REQUIRED, INVALID_END_CUSTOMER, INVALID_CURRENCY, PRICE_BOOK_NOT_FOUND, STAGE_NOT_FOUND, STAGE_CLOSED, ENTITY_HAS_NO_STAGES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITIES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_OPPORTUNITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_IS_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The end customer: the one you sent, or the customer your prospect was converted to."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount you sent, returned unchanged."}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The partner customer: the one you sent, or the customer your prospect was converted to."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endCustomerId":{"type":"string","description":"The end customer you sent."}},"additionalProperties":false,"required":["endCustomerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent, returned unchanged."}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["priceBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_NO_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITIES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_OPPORTUNITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_IS_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The end customer: the one you sent, or the customer your prospect was converted to."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount you sent, returned unchanged."}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The partner customer: the one you sent, or the customer your prospect was converted to."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endCustomerId":{"type":"string","description":"The end customer you sent."}},"additionalProperties":false,"required":["endCustomerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent, returned unchanged."}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["priceBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_NO_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITIES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_OPPORTUNITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_IS_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The end customer: the one you sent, or the customer your prospect was converted to."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount you sent, returned unchanged."}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string","description":"The partner customer: the one you sent, or the customer your prospect was converted to."}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_END_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endCustomerId":{"type":"string","description":"The end customer you sent."}},"additionalProperties":false,"required":["endCustomerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent, returned unchanged."}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["priceBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"stageId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["stageId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_NO_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createOpportunityInput"}}}},"summary":"Create an opportunity","description":"Creates an opportunity for a customer or a prospect of a legal entity. customerId may name either; which one it is follows from the id. A prospect that has already been converted to a customer is replaced by that customer: the opportunity is created for the customer, and every customer rule then applies to it. The customer must not be an end customer (CUSTOMER_IS_END_CUSTOMER), and a partner customer also needs an endCustomerId, one of that partner's end customers (END_CUSTOMER_REQUIRED, INVALID_END_CUSTOMER). amount must not be negative (INVALID_AMOUNT). Without a stageId the opportunity starts in the entity's first active open stage (ENTITY_HAS_NO_STAGES when there is none); a stageId must be an open stage (STAGE_CLOSED). An entity whose opportunities are kept in sync by a CRM integration accepts no creates here (OPPORTUNITIES_MANAGED_BY_INTEGRATION). The response contains only the id; read the stored opportunity, including its opportunityNumber, with GET crm/opportunities/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["crmOpportunities"]}},"/crm/quotes/{id}/cancel-signing":{"post":{"operationId":"cancelQuoteSigning","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/cancelQuoteSigningOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, OPPORTUNITY_CLOSED, STATUS_CONFLICT, SIGNING_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'signed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'signed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'signed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The quote whose signing process to cancel. See id on GET crm/quotes/:id.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cancelQuoteSigningInput"}}}},"summary":"Cancel a quote's signing process","description":"Cancels a quote's signing process that is out with the e-signature provider, as cancelling the signing on the quote page does. The provider withdraws the document from its recipients, and the quote returns to 'approved', so it can be sent again. Only a quote in status 'underSigning' has a signing process to cancel (STATUS_CONFLICT); a quote marked as signed without a provider cannot be un-signed. No signing step can change once the quote's opportunity is Closed Won or Closed Lost (OPPORTUNITY_CLOSED). The response is the quote's status afterward.","tags":["crm-quotes"]}},"/crm/quotes/{id}/send-for-signature":{"post":{"operationId":"sendQuoteForSignature","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/sendQuoteForSignatureOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, OPPORTUNITY_CLOSED, STATUS_CONFLICT, NO_SIGNATURE_PROVIDER, PROVIDER_NOT_FOUND, FILE_REQUIRED, INVALID_FILE_CONTENT, FILE_NOT_PDF, FILE_TOO_LARGE, RECIPIENT_REQUIRED, QUOTE_TEMPLATE_NOT_FOUND, QUOTE_DOCUMENT_FAILED, SIGNING_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'underApproval'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_SIGNATURE_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROVIDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"providerInstanceId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["providerInstanceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."},"reason":{"type":"string","description":"What is wrong with it."}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_NOT_PDF"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECIPIENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TEMPLATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_DOCUMENT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The template error, for example 'TemplateNotFilledCorrect'."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'underApproval'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_SIGNATURE_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROVIDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"providerInstanceId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["providerInstanceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."},"reason":{"type":"string","description":"What is wrong with it."}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_NOT_PDF"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECIPIENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TEMPLATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_DOCUMENT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The template error, for example 'TemplateNotFilledCorrect'."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'underApproval'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_SIGNATURE_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROVIDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"providerInstanceId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["providerInstanceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."},"reason":{"type":"string","description":"What is wrong with it."}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_NOT_PDF"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECIPIENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TEMPLATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_DOCUMENT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The template error, for example 'TemplateNotFilledCorrect'."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The quote to send. See id on GET crm/quotes/:id.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendQuoteForSignatureInput"}}}},"summary":"Send a quote for signature","description":"Sends an approved quote to the e-signature provider configured for its entity, as the quote page's send-to-signing dialog does. The quote moves to 'underSigning', and the provider moves it on to 'signed' once every recipient has signed. Only a quote in status 'approved' can be sent (STATUS_CONFLICT). When no provider is configured, record the signed quote with POST crm/quotes/:id/mark-as-signed instead (NO_SIGNATURE_PROVIDER).\n\nThe documents to sign are PDFs you send base64-encoded in files, the quote document generated from the active quote template (includeQuoteDocument), or both; at least one is required (FILE_REQUIRED). Each PDF can be at most 10 MB. The documents are attached to the quote. Base64 makes a file about a third larger, and the request as a whole is bound by the platform's request size limit.\n\nRecipients: when you send recipients, exactly those receive the document and no one else is added. When you omit recipients, the quote's default signers receive it, as the quote page preselects them: the default Sold-To contacts of a prospect, or the main contact of a customer. If the quote has no default signer, send recipients (RECIPIENT_REQUIRED).\n\nNo signing step can change once the quote's opportunity is Closed Won or Closed Lost (OPPORTUNITY_CLOSED). The response is the quote's status afterward.","tags":["crm-quotes"]}},"/crm/opportunity-stages/{id}":{"get":{"operationId":"getOpportunityStages","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getOpportunityStagesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The legal entity whose stages to return. See id on GET base/entities."}],"summary":"Retrieve an entity's opportunity stages","description":"Retrieves a legal entity's opportunity stages, in order. The :id in the path is the legal entity's id, not a stage id. An entity without stages returns NOT_FOUND. For the stages an opportunity's stageId belongs to, use the opportunity's entityId as the :id.","tags":["crmOpportunityStages"]},"patch":{"operationId":"updateOpportunityStages","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateOpportunityStagesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STAGES_MANAGED_BY_INTEGRATION, UNKNOWN_STAGE, CONFLICTING_STAGE_OPERATIONS, INVALID_STAGE_NAME, INVALID_PROBABILITY, DUPLICATE_ORDER_INDEX, STAGE_IN_USE, INCOMPLETE_STAGES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_STAGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The stage id you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_STAGE_OPERATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The stage id that occurs more than once."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STAGE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing stage, when the stage already exists."},"index":{"type":"number","description":"The zero-based position in createStages, when the stage is new."}},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROBABILITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing stage, when the stage already exists."},"index":{"type":"number","description":"The zero-based position in createStages, when the stage is new."}},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ORDER_INDEX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"orderIndex":{"type":"number","description":"The orderIndex that occurs more than once."}},"additionalProperties":false,"required":["orderIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the stage."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingStageTypes":{"type":"array","items":{"type":"string"},"description":"The stage types without an active stage."}},"additionalProperties":false,"required":["missingStageTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_STAGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The stage id you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_STAGE_OPERATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The stage id that occurs more than once."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STAGE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing stage, when the stage already exists."},"index":{"type":"number","description":"The zero-based position in createStages, when the stage is new."}},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROBABILITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing stage, when the stage already exists."},"index":{"type":"number","description":"The zero-based position in createStages, when the stage is new."}},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ORDER_INDEX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"orderIndex":{"type":"number","description":"The orderIndex that occurs more than once."}},"additionalProperties":false,"required":["orderIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the stage."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingStageTypes":{"type":"array","items":{"type":"string"},"description":"The stage types without an active stage."}},"additionalProperties":false,"required":["missingStageTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGES_MANAGED_BY_INTEGRATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_STAGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The stage id you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFLICTING_STAGE_OPERATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The stage id that occurs more than once."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STAGE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing stage, when the stage already exists."},"index":{"type":"number","description":"The zero-based position in createStages, when the stage is new."}},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROBABILITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing stage, when the stage already exists."},"index":{"type":"number","description":"The zero-based position in createStages, when the stage is new."}},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ORDER_INDEX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"orderIndex":{"type":"number","description":"The orderIndex that occurs more than once."}},"additionalProperties":false,"required":["orderIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STAGE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the stage."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_STAGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingStageTypes":{"type":"array","items":{"type":"string"},"description":"The stage types without an active stage."}},"additionalProperties":false,"required":["missingStageTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The legal entity whose stages to change. See id on GET base/entities.","example":"ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateOpportunityStagesInput"}}}},"summary":"Update an entity's opportunity stages","description":"Updates a legal entity's opportunity stages in one all-or-nothing request. The :id in the path is the legal entity's id. createStages adds stages, updateStages changes stages by id, and deleteStages removes stages by id. The rules apply to the stages as they will be afterward: there must be an active stage of each type, 'open', 'closedWon' and 'closedLost' (INCOMPLETE_STAGES), and no two stages may share an orderIndex (DUPLICATE_ORDER_INDEX). Stages are ordered by orderIndex, and the stored positions are rewritten to 0, 1, 2 … after every call, so sending back the values you read changes nothing. To reorder, send the new orderIndex of every stage that moves in the same call. For example, to swap the stages at 1 and 2, send updateStages [{ id: A, orderIndex: 2 }, { id: B, orderIndex: 1 }]. A stage that has opportunities cannot be deleted or deactivated (STAGE_IN_USE).","tags":["crmOpportunityStages"]}},"/crm/prospects/{id}":{"patch":{"operationId":"updateProspect","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateProspectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PROSPECT_CONVERTED, ENTITY_NOT_FOUND, INVALID_PROSPECT_NAME, INVALID_BILLING_EMAIL, CURRENCY_NOT_FOUND, INVALID_ADDRESS, UNEXPECTED_SOLD_TO_ADDRESS, CONTACT_NOT_FOUND, INVALID_CONTACT, CONTACT_DETAILS_WITH_ID, DUPLICATE_CONTACT, CONTACT_ALREADY_LINKED, DUPLICATE_CONTACT_EMAIL, DUPLICATE_DEFAULT_CONTACT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROSPECT_CONVERTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"}},"additionalProperties":false,"required":["id","customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"prospectName":{"type":"string"}},"additionalProperties":false,"required":["prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"emailAddress":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","emailAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"role":{"type":"string"}},"additionalProperties":false,"required":["role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROSPECT_CONVERTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"}},"additionalProperties":false,"required":["id","customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"prospectName":{"type":"string"}},"additionalProperties":false,"required":["prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"emailAddress":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","emailAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"role":{"type":"string"}},"additionalProperties":false,"required":["role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROSPECT_CONVERTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string"}},"additionalProperties":false,"required":["id","customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"prospectName":{"type":"string"}},"additionalProperties":false,"required":["prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"collection":{"type":"string"},"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["collection","contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"emailAddress":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","emailAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"role":{"type":"string"}},"additionalProperties":false,"required":["role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the prospect to change.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateProspectInput"}}}},"summary":"Update a prospect","description":"Updates a prospect, its addresses and its contacts, applying the rules of the prospect form in the app. Every field is optional and an omitted field is left unchanged. An address takes only the fields you send; the required address fields (line1, city, country, zipCode) cannot be emptied. While sameAsBillToAddress is true the sold-to address is kept a copy of the bill-to address, so soldToAddress must be omitted. Contacts are changed with three arrays: createContacts adds new or existing contacts, updateContacts changes which contact is the default for each role, and deleteContacts removes contacts from the prospect (the contact records themselves are kept). A prospect that has been converted to a customer can no longer be changed and fails with PROSPECT_CONVERTED. The response is empty.","tags":["crm-prospects"]},"get":{"operationId":"getProspect","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getProspectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the prospect you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a prospect","description":"Retrieves a prospect. To look a prospect up by its number, use POST crm/prospects/search with prospectNumber. This endpoint and POST crm/prospects/search return contacts[], every contact recorded against the prospect. GET crm/prospects omits it.","tags":["crm-prospects"]}},"/crm/prospects":{"post":{"operationId":"createProspect","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createProspectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ENTITY_NOT_FOUND, INVALID_PROSPECT_NAME, INVALID_BILLING_EMAIL, CURRENCY_NOT_FOUND, INVALID_ADDRESS, MISSING_SOLD_TO_ADDRESS, UNEXPECTED_SOLD_TO_ADDRESS, CONTACT_NOT_FOUND, INVALID_CONTACT, CONTACT_DETAILS_WITH_ID, DUPLICATE_CONTACT, CONTACT_ALREADY_LINKED, DUPLICATE_DEFAULT_CONTACT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"prospectName":{"type":"string"}},"additionalProperties":false,"required":["prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"role":{"type":"string"}},"additionalProperties":false,"required":["role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"prospectName":{"type":"string"}},"additionalProperties":false,"required":["prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"role":{"type":"string"}},"additionalProperties":false,"required":["role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PROSPECT_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"prospectName":{"type":"string"}},"additionalProperties":false,"required":["prospectName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BILLING_EMAIL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingEmail":{"type":"string"}},"additionalProperties":false,"required":["billingEmail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"defaultCurrency":{"type":"string"}},"additionalProperties":false,"required":["defaultCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"address":{"type":"string"},"field":{"type":"string"}},"additionalProperties":false,"required":["address","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_SOLD_TO_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sameAsBillToAddress":{"type":"boolean"}},"additionalProperties":false,"required":["sameAsBillToAddress"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_DETAILS_WITH_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"}},"additionalProperties":false,"required":["contactIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTACT_ALREADY_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"contactIndex":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["contactIndex","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEFAULT_CONTACT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"role":{"type":"string"}},"additionalProperties":false,"required":["role"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createProspectInput"}}}},"summary":"Create a prospect","description":"Creates a prospect with its bill-to and sold-to addresses and its contacts, applying the rules of the prospect form in the app. Both addresses need line1, city, country and zipCode. Set sameAsBillToAddress to true and omit soldToAddress to use the bill-to address for both. A contact is either a new one, with displayName and emailAddress, or an existing contact linked by its id and nothing else; a contact can belong to one prospect only. At most one contact may be the default bill-to contact, and at most one the default sold-to contact. The response contains only the id; read the stored prospect, including its prospectNumber, with GET crm/prospects/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["crm-prospects"]},"get":{"operationId":"listProspects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listProspectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"prospectId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to the prospect with this id."},{"name":"customerType","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to prospects of this commercial relationship. Possible values: 'default', 'partner', 'endCustomer'. Any other value matches no prospect. Omit for every type.","example":"partner"},{"name":"dataSource","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to prospects from this system, for example 'Salesforce' or 'HubSpot'. Use 'Everest' for prospects created in Lensing. A value that matches no system returns no prospects. Omit it to include every system."},{"name":"defaultCurrency","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to prospects whose default currency is this code. Format ISO 4217, for example 'USD'. Omit for every currency."},{"name":"entityId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to prospects owned by this legal entity. Omit for every entity.","example":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"},{"name":"customerId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to prospects converted to this customer. Omit for every customer."},{"name":"converted","in":"query","required":false,"schema":{"type":"boolean"},"description":"Limits results to prospects already converted to a customer when true, and to those not yet converted when false. Omit for both."},{"name":"sameAsBillToAddress","in":"query","required":false,"schema":{"type":"boolean"},"description":"Limits results to prospects whose sold-to address repeats their bill-to address when true, and to the rest when false. Omit for both."},{"name":"modifiedFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to prospects changed at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Inclusive."},{"name":"modifiedTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to prospects changed at or before this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Inclusive."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of prospects per page. Defaults to 50, and a value above 200 is treated as 200, not rejected.","example":50}],"summary":"List prospects","description":"Lists prospects, most recently created first. Only ids, dates, customerType, dataSource, defaultCurrency and booleans filter this endpoint. To filter by prospectName, billingEmail, crmId or prospectNumber, use POST crm/prospects/search. converted true returns the prospects already turned into customers, false those not yet converted. An unrecognized customerType or dataSource returns an empty page, not an error. GET crm/prospects omits contacts[], which GET crm/prospects/:id and POST crm/prospects/search return.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200, minimum 1) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- Filter with the plain query parameters listed below, such as `customerType`, not `filter[field][op]`.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["crm-prospects"]}},"/crm/quotes/{id}/approve":{"post":{"operationId":"approveQuote","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveQuoteOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, OPPORTUNITY_CLOSED, NOT_PENDING_APPROVAL, NO_EMPLOYEE_RECORD, ALREADY_DECIDED, NOT_AN_APPROVER, NOT_NEXT_APPROVER, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'created'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'pendingSubmission'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_EMPLOYEE_RECORD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_AN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_NEXT_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'created'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'pendingSubmission'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_EMPLOYEE_RECORD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_AN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_NEXT_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'created'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'pendingSubmission'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_EMPLOYEE_RECORD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_AN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_NEXT_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The quote to approve. See id on GET crm/quotes/:id.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveQuoteInput"}}}},"summary":"Approve a quote","description":"Approves a quote as the calling user, as Approve on the quote page does. The approver is always the user the request authenticates as; there is no input to approve on someone else's behalf. That user needs an active employee record (NO_EMPLOYEE_RECORD), must be an approver of the quote under its approval policy (NOT_AN_APPROVER), and must be at the current step of that policy (NOT_NEXT_APPROVER). A quote can be approved while its approval status is 'pendingApproval' or 'rejected' (NOT_PENDING_APPROVAL), and each approver decides once (ALREADY_DECIDED). No approval step can change once the quote's opportunity is Closed Won or Closed Lost (OPPORTUNITY_CLOSED). One approval may complete the quote or only move it on to the next approver, so the response is the quote's status afterward.","tags":["crm-quotes"]}},"/crm/opportunities/search":{"post":{"operationId":"searchOpportunities","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchOpportunitiesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchOpportunitiesInput"}}}},"summary":"Search opportunities","description":"Searches opportunities. Use this endpoint for criteria a query string cannot carry: opportunityName is free text, and every criterion is a list, so you can pass several values of one field at once. Criteria combine with AND, and a list within one criterion is an OR. For example, currencies ['USD', 'EUR'] matches either. The item schema is the same here, on GET crm/opportunities and on GET crm/opportunities/:id.","tags":["crmOpportunities"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/crm/opportunity-stages/search":{"post":{"operationId":"searchOpportunityStages","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchOpportunityStagesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchOpportunityStagesInput"}}}},"summary":"Search opportunity stages","description":"Searches opportunity stages. Use it to match on stageName, which GET crm/opportunity-stages does not filter on. Results come in id order, not in each entity's stage order; sort by entityId and orderIndex yourself, or use GET crm/opportunity-stages with sort=orderIndex.","tags":["crmOpportunityStages"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/crm/prospects/search":{"post":{"operationId":"searchProspects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchProspectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchProspectsInput"}}}},"summary":"Search prospects","description":"Searches prospects. Use this endpoint for criteria a query string cannot carry: text matches the prospect name and billingEmail an email, each of customerType, dataSource and defaultCurrency takes several values at once, and crmId and prospectNumber are kept out of the URL. Criteria combine with AND, and a list within one criterion is an OR. A match returns the prospect in full, including contacts[], which GET crm/prospects omits.","tags":["crm-prospects"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/crm/quotes/{id}/mark-as-signed":{"post":{"operationId":"markQuoteAsSigned","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/markQuoteAsSignedOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, OPPORTUNITY_CLOSED, STATUS_CONFLICT, SIGNATURE_PROVIDER_CONFIGURED, FILE_REQUIRED, ONE_DOCUMENT_ONLY, INVALID_FILE_CONTENT, FILE_NOT_PDF, FILE_TOO_LARGE, QUOTE_TEMPLATE_NOT_FOUND, QUOTE_DOCUMENT_FAILED, SIGNING_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'signed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNATURE_PROVIDER_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_DOCUMENT_ONLY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."},"reason":{"type":"string","description":"What is wrong with it."}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_NOT_PDF"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TEMPLATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_DOCUMENT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The template error, for example 'TemplateNotFilledCorrect'."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'signed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNATURE_PROVIDER_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_DOCUMENT_ONLY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."},"reason":{"type":"string","description":"What is wrong with it."}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_NOT_PDF"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TEMPLATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_DOCUMENT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The template error, for example 'TemplateNotFilledCorrect'."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'signed'."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNATURE_PROVIDER_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_DOCUMENT_ONLY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."},"reason":{"type":"string","description":"What is wrong with it."}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_NOT_PDF"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string","description":"The fileName of the file."}},"additionalProperties":false,"required":["fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_TEMPLATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUOTE_DOCUMENT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The template error, for example 'TemplateNotFilledCorrect'."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SIGNING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason given for the failure."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The quote to mark as signed. See id on GET crm/quotes/:id.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/markQuoteAsSignedInput"}}}},"summary":"Mark a quote as signed","description":"Records an approved quote as signed, with the signed document, as the quote page's signing dialog does when no e-signature provider is configured. Nothing is sent to anyone; the quote moves to 'signed' at once and its sign date is set to today. A signed primary quote is what lets its opportunity be closed won.\n\nOnly a quote in status 'approved' can be marked as signed (STATUS_CONFLICT). When an e-signature provider is configured for the quote's entity, the quote must go through that provider instead, with POST crm/quotes/:id/send-for-signature (SIGNATURE_PROVIDER_CONFIGURED).\n\nThe signed document is exactly one: either a PDF you send base64-encoded in file, at most 10 MB, or the quote document generated from the active quote template (includeQuoteDocument). Sending neither returns FILE_REQUIRED, sending both ONE_DOCUMENT_ONLY. The document is attached to the quote.\n\nNo signing step can change once the quote's opportunity is Closed Won or Closed Lost (OPPORTUNITY_CLOSED). The response is the quote's status afterward.","tags":["crm-quotes"]}},"/crm/quotes/{id}/reject":{"post":{"operationId":"rejectQuote","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectQuoteOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, OPPORTUNITY_CLOSED, NOT_PENDING_APPROVAL, NO_EMPLOYEE_RECORD, ALREADY_DECIDED, NOT_AN_APPROVER, NOT_NEXT_APPROVER, NO_APPROVAL_POLICY, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'created'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'rejected'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_EMPLOYEE_RECORD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_AN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_NEXT_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'created'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'rejected'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_EMPLOYEE_RECORD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_AN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_NEXT_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OPPORTUNITY_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"opportunityId":{"type":"string","description":"The quote's opportunity. See id on GET crm/opportunities/:id."}},"additionalProperties":false,"required":["opportunityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status, for example 'created'."},"approvalStatus":{"type":"string","description":"The quote's approval status, for example 'rejected'."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_EMPLOYEE_RECORD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_AN_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_NEXT_APPROVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status."},"approvalStatus":{"type":"string","description":"The quote's approval status."}},"additionalProperties":false,"required":["status","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The quote to reject. See id on GET crm/quotes/:id.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectQuoteInput"}}}},"summary":"Reject a quote","description":"Rejects a quote as the calling user, as Reject on the quote page does. You can send an optional reviewMessage, which is recorded with the rejection. The approver is always the user the request authenticates as; there is no input to reject on someone else's behalf. That user needs an active employee record (NO_EMPLOYEE_RECORD), must be an approver of the quote under its approval policy (NOT_AN_APPROVER), and must be at the current step of that policy (NOT_NEXT_APPROVER). A quote can be rejected while its approval status is 'pendingApproval' (NOT_PENDING_APPROVAL) and an approval policy applies to it (NO_APPROVAL_POLICY), and each approver decides once (ALREADY_DECIDED). No approval step can change once the quote's opportunity is Closed Won or Closed Lost (OPPORTUNITY_CLOSED). Rejecting doesn't delete the quote: it stays in 'underApproval' with approval status 'rejected', and an approver can still approve it later. The response is the quote's status afterward.","tags":["crm-quotes"]}},"/accounting/payments/{id}/apply":{"post":{"operationId":"applyPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/applyPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_AMOUNT, INVOICE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payment you want to apply."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyPaymentInput"}}}},"summary":"Apply a payment to invoices","description":"Applies a payment to invoices. Each item in invoices applies an amount from the payment to one invoice. To reverse an application, use POST accounting/payments/:id/unapply.","tags":["accountingPayments"]}},"/accounting/period-status/{id}":{"get":{"operationId":"getAccountingPeriodStatus","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountingPeriodStatusOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the entity-book period status record you want to retrieve. This is the id of a record from GET accounting/period-status, not the shared accountingPeriodId."}],"summary":"Retrieve an accounting period status","description":"Retrieves an accounting period status. The status is for one period, one legal entity and one accounting book. The response includes whether the period accepts new journal entries for that entity and book (postable), and the period-close checklist (closeTasks).","tags":["accountingAccountingPeriodStatuses"]}},"/accounting/invoice-milestones/{id}":{"patch":{"operationId":"updateInvoiceMilestone","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateInvoiceMilestoneOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, MILESTONE_LOCKED, SALES_ORDER_NOT_EDITABLE, MILESTONES_NOT_FULLY_ALLOCATED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not changed."},"status":{"type":"string","description":"The milestone's status, 'released' or 'invoiced'."}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order of the milestone."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not changed."},"status":{"type":"string","description":"The milestone's status, 'released' or 'invoiced'."}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order of the milestone."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not changed."},"status":{"type":"string","description":"The milestone's status, 'released' or 'invoiced'."}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order of the milestone."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice milestone you want to update.","example":"4b8f2d61-0c3e-4f7a-9a15-6e2d8c90b7a4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateInvoiceMilestoneInput"}}}},"summary":"Update an invoice milestone","description":"Changes the description, order sequence, percentage or projected date of an open invoice milestone. Omit a field to leave it unchanged.\n\nA milestone's amount and product lines are changed with PATCH accounting/invoice-milestones/bulk, which takes all the milestones of an order at once: together they must keep covering the full amount of each product line.\n\nA released or invoiced milestone can't be changed. Unrelease a released one first with POST accounting/invoice-milestones/:id/unrelease.","tags":["accountingInvoiceMilestones"]},"get":{"operationId":"getInvoiceMilestone","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInvoiceMilestoneOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice milestone you want to retrieve.","example":"4b8f2d61-0c3e-4f7a-9a15-6e2d8c90b7a4"}],"summary":"Retrieve an invoice milestone","description":"Retrieves an invoice milestone with the sales order product lines it bills and the share of its amount each line carries.\n\nA milestone is 'open' until it is released for invoicing, 'released' while its invoice is planned on invoiceDate but not created yet, and 'invoiced' once the invoice exists. Released and invoiced milestones cannot be changed; unrelease a released one with POST accounting/invoice-milestones/:id/unrelease to change it again.","tags":["accountingInvoiceMilestones"]}},"/accounting/sales-returns":{"post":{"operationId":"createAccountingSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAccountingSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: SALES_ORDER_NOT_FOUND, SALES_ORDER_PRODUCT_LINE_NOT_FOUND, LINES_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAccountingSalesReturnInput"}}}},"summary":"Create a sales return","description":"Creates a sales return against a sales order. The sales return is created with the status 'draft', together with a matching sales return in inventory. The response contains only the new sales return's id. Read the sales return with GET accounting/sales-returns/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingSalesReturns"]},"get":{"operationId":"listAccountingSalesReturns","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[returnType]","in":"query","required":false,"description":"Filter returnType (equality)","schema":{"type":"string"}},{"name":"filter[returnType][ne]","in":"query","required":false,"description":"Filter returnType (ne)","schema":{"type":"string"}},{"name":"filter[returnType][gt]","in":"query","required":false,"description":"Filter returnType (gt)","schema":{"type":"string"}},{"name":"filter[returnType][gte]","in":"query","required":false,"description":"Filter returnType (gte)","schema":{"type":"string"}},{"name":"filter[returnType][lt]","in":"query","required":false,"description":"Filter returnType (lt)","schema":{"type":"string"}},{"name":"filter[returnType][lte]","in":"query","required":false,"description":"Filter returnType (lte)","schema":{"type":"string"}},{"name":"filter[returnType][in]","in":"query","required":false,"description":"Filter returnType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][notIn]","in":"query","required":false,"description":"Filter returnType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][between]","in":"query","required":false,"description":"Filter returnType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnType][like]","in":"query","required":false,"description":"Filter returnType (like)","schema":{"type":"string"}},{"name":"filter[salesOrderId]","in":"query","required":false,"description":"Filter salesOrderId (equality)","schema":{"type":"string"}},{"name":"filter[salesOrderId][ne]","in":"query","required":false,"description":"Filter salesOrderId (ne)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gt]","in":"query","required":false,"description":"Filter salesOrderId (gt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gte]","in":"query","required":false,"description":"Filter salesOrderId (gte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lt]","in":"query","required":false,"description":"Filter salesOrderId (lt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lte]","in":"query","required":false,"description":"Filter salesOrderId (lte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][in]","in":"query","required":false,"description":"Filter salesOrderId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][notIn]","in":"query","required":false,"description":"Filter salesOrderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][between]","in":"query","required":false,"description":"Filter salesOrderId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[salesOrderId][like]","in":"query","required":false,"description":"Filter salesOrderId (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","status","-status","returnType","-returnType","returnDate","-returnDate","salesOrderId","-salesOrderId","currency","-currency","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","salesReturnNumber","status","returnType","returnDate","salesOrderId","currency","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/listAccountingSalesReturnsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List sales returns","description":"Lists sales returns. Each sales return is returned with only some of its fields, and without its lines. For the lines, use GET accounting/sales-returns/:id or POST accounting/sales-returns/search.","tags":["accountingSalesReturns"]}},"/accounting/books/{bookId}/entity-assignments":{"get":{"operationId":"listBookEntityAssignments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listBookEntityAssignmentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: BOOK_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"bookId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the accounting book whose assignments to return."},{"name":"page","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit for the first page."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"string"},"description":"The number of assignments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}],"summary":"List an accounting book's legal entities","description":"Lists an accounting book's legal entities. Each legal entity comes with the chart of accounts, fiscal calendar, and currency it uses in this book.\n\nThis endpoint doesn't follow the standard collection rules in Pagination and querying:\n\n- Page with `pageSize` and `page`, not `page[size]` and `page[cursor]`.\n- The assignments are in `data.items`, and the next page's cursor is in `data.pagination.nextCursor`.\n- There are no filters.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it doesn't declare, and returns no error. A request that follows the standard rules gets the first page, unfiltered, every time.","tags":["accountingBooks"]}},"/accounting/invoices/{id}":{"get":{"operationId":"getInvoice","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInvoiceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice you want to retrieve."}],"summary":"Retrieve an invoice","description":"Retrieves an invoice. Use the invoice's id, not its invoiceNumber.\n\n`pdf` holds a short-lived file handle for the invoice PDF: exchange it at `GET /public/files/{handle}` for the file, or at `GET /public/files/{handle}/metadata` for its name, type and size. The PDF always reflects the invoice as it is now, payments and credits included; it is generated on this call when the invoice changed since the last one. Read the invoice again for a fresh handle once it has expired.","tags":["accountingInvoices"]},"patch":{"operationId":"updateInvoice","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateInvoiceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"clearPurchaseOrder":{"value":{"data":{"id":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"}},"summary":"Clear the PO override so the sales order's own references apply again"},"description":{"value":{"data":{"id":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"}},"summary":"Retitle one line, leaving its duties untouched"},"duties":{"value":{"data":{"id":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"}},"summary":"Set duties on two lines in one transaction"},"header":{"value":{"data":{"id":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"}},"summary":"Header-only edit — no updateLines, so the lines are untouched"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVOICE_NOT_FOUND, LINE_NOT_ON_INVOICE, DUPLICATE_LINE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_ON_INVOICE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"lineId":{"type":"string"}},"additionalProperties":false,"required":["id","lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"lineId":{"type":"string"}},"additionalProperties":false,"required":["id","lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_ON_INVOICE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"lineId":{"type":"string"}},"additionalProperties":false,"required":["id","lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"lineId":{"type":"string"}},"additionalProperties":false,"required":["id","lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_ON_INVOICE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"lineId":{"type":"string"}},"additionalProperties":false,"required":["id","lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"lineId":{"type":"string"}},"additionalProperties":false,"required":["id","lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice you want to update.","examples":{"clearPurchaseOrder":{"value":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"},"description":{"value":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"},"duties":{"value":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"},"header":{"value":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateInvoiceInput"},"examples":{"clearPurchaseOrder":{"value":{"purchaseOrderOverride":""},"summary":"Clear the PO override so the sales order's own references apply again"},"description":{"value":{"updateLines":[{"id":"5e2a7c81-9d34-4b06-8f19-2c7e4a0d3b58","description":"Platform subscription — September 2026"}]},"summary":"Retitle one line, leaving its duties untouched"},"duties":{"value":{"updateLines":[{"id":"5e2a7c81-9d34-4b06-8f19-2c7e4a0d3b58","dutiesAndCustomsAmount":"45.00"},{"id":"c08b3f66-1a92-4d75-b3e0-8f5c9d2a6417","dutiesAndCustomsAmount":"12.50"}]},"summary":"Set duties on two lines in one transaction"},"header":{"value":{"invoiceDate":"2026-09-05","paymentTerm":"net30","customerMessage":"Thank you for your business."},"summary":"Header-only edit — no updateLines, so the lines are untouched"}}}}},"summary":"Update an invoice","description":"Updates an invoice with the fields you send. A field you leave out keeps its current value.\n\nUse the invoice's id, not its invoiceNumber.\n\nYou can change invoiceDate, paymentTerm, customerMessage, and purchaseOrderOverride on the invoice, and description and dutiesAndCustomsAmount on each line. Amounts, tax, the set of lines, deliveryStatus, the addresses and invoiceEmail can't be changed.\n\nTo clear purchaseOrderOverride, send an empty string, and the sales order's PO references apply again. An empty paymentTerm, customerMessage, or invoiceDate is ignored, so customerMessage can't be cleared.\n\nEach item in updateLines changes one existing line of this invoice, identified by its id. Lines you leave out don't change, and you can't add or remove lines.\n\nThe response contains only the invoice's id. To see the recalculated totals, use GET accounting/invoices/:id.","tags":["accountingInvoices"]}},"/banking/credit-card-entries/{id}":{"get":{"operationId":"getCreditCardEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getCreditCardEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the credit card entry you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a credit card entry","description":"Retrieves a credit card entry. Use the credit card entry's id, not its creditCardEntryNumber.\n\nA credit card entry records a charge or credit on a credit card account. The response includes the entry's lines, each with a general ledger account and an amount in the entry currency.","tags":["bankingCreditCardEntries"]},"patch":{"operationId":"updateCreditCardEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateCreditCardEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, LINE_NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, REPORTING_TAG_CONFLICT, TAG_VALIDATION_FAILED, TAGS_DISABLED, POSTING_PERIOD_NOT_OPEN, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, GROUPING_ACCOUNT_NOT_ALLOWED, BUSINESS_PARTNER_REQUIRED_FOR_VAT, CROSS_CHARGE_INVALID, TAX_CODE_NOT_FOUND, TAX_CODE_AMBIGUOUS, TAX_CODE_ACCOUNT_NOT_CONFIGURED, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this entry."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this entry."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this entry."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the credit card entry you want to update.","example":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCreditCardEntryInput"}}}},"summary":"Update a credit card entry","description":"Updates a credit card entry with the fields you send. A field you leave out keeps its current value.\n\nUse the credit card entry's id, not its creditCardEntryNumber.\n\nLines change through three arrays: createLines, updateLines, and deleteLines. A line you don't name keeps its current values. deleteLines are applied first, then updateLines, then createLines.\n\nAfter the changes, the entry must still have at least one line, no line of zero, and a total that isn't zero.\n\nThe response is empty. Read the result with GET banking/credit-card-entries/:id.","tags":["bankingCreditCardEntries"]}},"/accounting/subscriptions":{"get":{"operationId":"subscriptions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[autoRenew]","in":"query","required":false,"description":"Filter autoRenew (equality)","schema":{"type":"boolean"}},{"name":"filter[autoRenew][ne]","in":"query","required":false,"description":"Filter autoRenew (ne)","schema":{"type":"boolean"}},{"name":"filter[autoRenew][gt]","in":"query","required":false,"description":"Filter autoRenew (gt)","schema":{"type":"boolean"}},{"name":"filter[autoRenew][gte]","in":"query","required":false,"description":"Filter autoRenew (gte)","schema":{"type":"boolean"}},{"name":"filter[autoRenew][lt]","in":"query","required":false,"description":"Filter autoRenew (lt)","schema":{"type":"boolean"}},{"name":"filter[autoRenew][lte]","in":"query","required":false,"description":"Filter autoRenew (lte)","schema":{"type":"boolean"}},{"name":"filter[autoRenew][in]","in":"query","required":false,"description":"Filter autoRenew (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[autoRenew][notIn]","in":"query","required":false,"description":"Filter autoRenew (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[autoRenew][between]","in":"query","required":false,"description":"Filter autoRenew (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[renewalTerm]","in":"query","required":false,"description":"Filter renewalTerm (equality)","schema":{"type":"number"}},{"name":"filter[renewalTerm][ne]","in":"query","required":false,"description":"Filter renewalTerm (ne)","schema":{"type":"number"}},{"name":"filter[renewalTerm][gt]","in":"query","required":false,"description":"Filter renewalTerm (gt)","schema":{"type":"number"}},{"name":"filter[renewalTerm][gte]","in":"query","required":false,"description":"Filter renewalTerm (gte)","schema":{"type":"number"}},{"name":"filter[renewalTerm][lt]","in":"query","required":false,"description":"Filter renewalTerm (lt)","schema":{"type":"number"}},{"name":"filter[renewalTerm][lte]","in":"query","required":false,"description":"Filter renewalTerm (lte)","schema":{"type":"number"}},{"name":"filter[renewalTerm][in]","in":"query","required":false,"description":"Filter renewalTerm (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[renewalTerm][notIn]","in":"query","required":false,"description":"Filter renewalTerm (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[renewalTerm][between]","in":"query","required":false,"description":"Filter renewalTerm (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[renewalPriceChangePercentage]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[renewalPriceChangePercentage][ne]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[renewalPriceChangePercentage][gt]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[renewalPriceChangePercentage][gte]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[renewalPriceChangePercentage][lt]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[renewalPriceChangePercentage][lte]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[renewalPriceChangePercentage][in]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[renewalPriceChangePercentage][notIn]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[renewalPriceChangePercentage][between]","in":"query","required":false,"description":"Filter renewalPriceChangePercentage (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[termType]","in":"query","required":false,"description":"Filter termType (equality)","schema":{"type":"string"}},{"name":"filter[termType][ne]","in":"query","required":false,"description":"Filter termType (ne)","schema":{"type":"string"}},{"name":"filter[termType][gt]","in":"query","required":false,"description":"Filter termType (gt)","schema":{"type":"string"}},{"name":"filter[termType][gte]","in":"query","required":false,"description":"Filter termType (gte)","schema":{"type":"string"}},{"name":"filter[termType][lt]","in":"query","required":false,"description":"Filter termType (lt)","schema":{"type":"string"}},{"name":"filter[termType][lte]","in":"query","required":false,"description":"Filter termType (lte)","schema":{"type":"string"}},{"name":"filter[termType][in]","in":"query","required":false,"description":"Filter termType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[termType][notIn]","in":"query","required":false,"description":"Filter termType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[termType][between]","in":"query","required":false,"description":"Filter termType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[termType][like]","in":"query","required":false,"description":"Filter termType (like)","schema":{"type":"string"}},{"name":"filter[subscriptionStatus]","in":"query","required":false,"description":"Filter subscriptionStatus (equality)","schema":{"type":"string"}},{"name":"filter[subscriptionStatus][ne]","in":"query","required":false,"description":"Filter subscriptionStatus (ne)","schema":{"type":"string"}},{"name":"filter[subscriptionStatus][gt]","in":"query","required":false,"description":"Filter subscriptionStatus (gt)","schema":{"type":"string"}},{"name":"filter[subscriptionStatus][gte]","in":"query","required":false,"description":"Filter subscriptionStatus (gte)","schema":{"type":"string"}},{"name":"filter[subscriptionStatus][lt]","in":"query","required":false,"description":"Filter subscriptionStatus (lt)","schema":{"type":"string"}},{"name":"filter[subscriptionStatus][lte]","in":"query","required":false,"description":"Filter subscriptionStatus (lte)","schema":{"type":"string"}},{"name":"filter[subscriptionStatus][in]","in":"query","required":false,"description":"Filter subscriptionStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[subscriptionStatus][notIn]","in":"query","required":false,"description":"Filter subscriptionStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[subscriptionStatus][between]","in":"query","required":false,"description":"Filter subscriptionStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[subscriptionStatus][like]","in":"query","required":false,"description":"Filter subscriptionStatus (like)","schema":{"type":"string"}},{"name":"filter[serviceStartDateBasis]","in":"query","required":false,"description":"Filter serviceStartDateBasis (equality)","schema":{"type":"string"}},{"name":"filter[serviceStartDateBasis][ne]","in":"query","required":false,"description":"Filter serviceStartDateBasis (ne)","schema":{"type":"string"}},{"name":"filter[serviceStartDateBasis][gt]","in":"query","required":false,"description":"Filter serviceStartDateBasis (gt)","schema":{"type":"string"}},{"name":"filter[serviceStartDateBasis][gte]","in":"query","required":false,"description":"Filter serviceStartDateBasis (gte)","schema":{"type":"string"}},{"name":"filter[serviceStartDateBasis][lt]","in":"query","required":false,"description":"Filter serviceStartDateBasis (lt)","schema":{"type":"string"}},{"name":"filter[serviceStartDateBasis][lte]","in":"query","required":false,"description":"Filter serviceStartDateBasis (lte)","schema":{"type":"string"}},{"name":"filter[serviceStartDateBasis][in]","in":"query","required":false,"description":"Filter serviceStartDateBasis (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceStartDateBasis][notIn]","in":"query","required":false,"description":"Filter serviceStartDateBasis (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceStartDateBasis][between]","in":"query","required":false,"description":"Filter serviceStartDateBasis (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceStartDateBasis][like]","in":"query","required":false,"description":"Filter serviceStartDateBasis (like)","schema":{"type":"string"}},{"name":"filter[serviceActivationDate]","in":"query","required":false,"description":"Filter serviceActivationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceActivationDate][ne]","in":"query","required":false,"description":"Filter serviceActivationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceActivationDate][gt]","in":"query","required":false,"description":"Filter serviceActivationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceActivationDate][gte]","in":"query","required":false,"description":"Filter serviceActivationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceActivationDate][lt]","in":"query","required":false,"description":"Filter serviceActivationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceActivationDate][lte]","in":"query","required":false,"description":"Filter serviceActivationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceActivationDate][in]","in":"query","required":false,"description":"Filter serviceActivationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceActivationDate][notIn]","in":"query","required":false,"description":"Filter serviceActivationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceActivationDate][between]","in":"query","required":false,"description":"Filter serviceActivationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceStartDate]","in":"query","required":false,"description":"Filter serviceStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][ne]","in":"query","required":false,"description":"Filter serviceStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][gt]","in":"query","required":false,"description":"Filter serviceStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][gte]","in":"query","required":false,"description":"Filter serviceStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][lt]","in":"query","required":false,"description":"Filter serviceStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][lte]","in":"query","required":false,"description":"Filter serviceStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][in]","in":"query","required":false,"description":"Filter serviceStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceStartDate][notIn]","in":"query","required":false,"description":"Filter serviceStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceStartDate][between]","in":"query","required":false,"description":"Filter serviceStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceEndDate]","in":"query","required":false,"description":"Filter serviceEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][ne]","in":"query","required":false,"description":"Filter serviceEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][gt]","in":"query","required":false,"description":"Filter serviceEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][gte]","in":"query","required":false,"description":"Filter serviceEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][lt]","in":"query","required":false,"description":"Filter serviceEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][lte]","in":"query","required":false,"description":"Filter serviceEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][in]","in":"query","required":false,"description":"Filter serviceEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceEndDate][notIn]","in":"query","required":false,"description":"Filter serviceEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceEndDate][between]","in":"query","required":false,"description":"Filter serviceEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[submissionDate]","in":"query","required":false,"description":"Filter submissionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][ne]","in":"query","required":false,"description":"Filter submissionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][gt]","in":"query","required":false,"description":"Filter submissionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][gte]","in":"query","required":false,"description":"Filter submissionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][lt]","in":"query","required":false,"description":"Filter submissionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][lte]","in":"query","required":false,"description":"Filter submissionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][in]","in":"query","required":false,"description":"Filter submissionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionDate][notIn]","in":"query","required":false,"description":"Filter submissionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionDate][between]","in":"query","required":false,"description":"Filter submissionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[cancellationDate]","in":"query","required":false,"description":"Filter cancellationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[cancellationDate][ne]","in":"query","required":false,"description":"Filter cancellationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[cancellationDate][gt]","in":"query","required":false,"description":"Filter cancellationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[cancellationDate][gte]","in":"query","required":false,"description":"Filter cancellationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[cancellationDate][lt]","in":"query","required":false,"description":"Filter cancellationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[cancellationDate][lte]","in":"query","required":false,"description":"Filter cancellationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[cancellationDate][in]","in":"query","required":false,"description":"Filter cancellationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[cancellationDate][notIn]","in":"query","required":false,"description":"Filter cancellationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[cancellationDate][between]","in":"query","required":false,"description":"Filter cancellationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[cancellationReason]","in":"query","required":false,"description":"Filter cancellationReason (equality)","schema":{"type":"string"}},{"name":"filter[cancellationReason][ne]","in":"query","required":false,"description":"Filter cancellationReason (ne)","schema":{"type":"string"}},{"name":"filter[cancellationReason][gt]","in":"query","required":false,"description":"Filter cancellationReason (gt)","schema":{"type":"string"}},{"name":"filter[cancellationReason][gte]","in":"query","required":false,"description":"Filter cancellationReason (gte)","schema":{"type":"string"}},{"name":"filter[cancellationReason][lt]","in":"query","required":false,"description":"Filter cancellationReason (lt)","schema":{"type":"string"}},{"name":"filter[cancellationReason][lte]","in":"query","required":false,"description":"Filter cancellationReason (lte)","schema":{"type":"string"}},{"name":"filter[cancellationReason][in]","in":"query","required":false,"description":"Filter cancellationReason (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[cancellationReason][notIn]","in":"query","required":false,"description":"Filter cancellationReason (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[cancellationReason][between]","in":"query","required":false,"description":"Filter cancellationReason (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[cancellationReason][like]","in":"query","required":false,"description":"Filter cancellationReason (like)","schema":{"type":"string"}},{"name":"filter[isCancellationEnabled]","in":"query","required":false,"description":"Filter isCancellationEnabled (equality)","schema":{"type":"boolean"}},{"name":"filter[isCancellationEnabled][ne]","in":"query","required":false,"description":"Filter isCancellationEnabled (ne)","schema":{"type":"boolean"}},{"name":"filter[isCancellationEnabled][gt]","in":"query","required":false,"description":"Filter isCancellationEnabled (gt)","schema":{"type":"boolean"}},{"name":"filter[isCancellationEnabled][gte]","in":"query","required":false,"description":"Filter isCancellationEnabled (gte)","schema":{"type":"boolean"}},{"name":"filter[isCancellationEnabled][lt]","in":"query","required":false,"description":"Filter isCancellationEnabled (lt)","schema":{"type":"boolean"}},{"name":"filter[isCancellationEnabled][lte]","in":"query","required":false,"description":"Filter isCancellationEnabled (lte)","schema":{"type":"boolean"}},{"name":"filter[isCancellationEnabled][in]","in":"query","required":false,"description":"Filter isCancellationEnabled (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isCancellationEnabled][notIn]","in":"query","required":false,"description":"Filter isCancellationEnabled (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isCancellationEnabled][between]","in":"query","required":false,"description":"Filter isCancellationEnabled (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[suspensionDate]","in":"query","required":false,"description":"Filter suspensionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[suspensionDate][ne]","in":"query","required":false,"description":"Filter suspensionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[suspensionDate][gt]","in":"query","required":false,"description":"Filter suspensionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[suspensionDate][gte]","in":"query","required":false,"description":"Filter suspensionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[suspensionDate][lt]","in":"query","required":false,"description":"Filter suspensionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[suspensionDate][lte]","in":"query","required":false,"description":"Filter suspensionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[suspensionDate][in]","in":"query","required":false,"description":"Filter suspensionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[suspensionDate][notIn]","in":"query","required":false,"description":"Filter suspensionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[suspensionDate][between]","in":"query","required":false,"description":"Filter suspensionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[suspensionReason]","in":"query","required":false,"description":"Filter suspensionReason (equality)","schema":{"type":"string"}},{"name":"filter[suspensionReason][ne]","in":"query","required":false,"description":"Filter suspensionReason (ne)","schema":{"type":"string"}},{"name":"filter[suspensionReason][gt]","in":"query","required":false,"description":"Filter suspensionReason (gt)","schema":{"type":"string"}},{"name":"filter[suspensionReason][gte]","in":"query","required":false,"description":"Filter suspensionReason (gte)","schema":{"type":"string"}},{"name":"filter[suspensionReason][lt]","in":"query","required":false,"description":"Filter suspensionReason (lt)","schema":{"type":"string"}},{"name":"filter[suspensionReason][lte]","in":"query","required":false,"description":"Filter suspensionReason (lte)","schema":{"type":"string"}},{"name":"filter[suspensionReason][in]","in":"query","required":false,"description":"Filter suspensionReason (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[suspensionReason][notIn]","in":"query","required":false,"description":"Filter suspensionReason (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[suspensionReason][between]","in":"query","required":false,"description":"Filter suspensionReason (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[suspensionReason][like]","in":"query","required":false,"description":"Filter suspensionReason (like)","schema":{"type":"string"}},{"name":"filter[isSuspensionEnabled]","in":"query","required":false,"description":"Filter isSuspensionEnabled (equality)","schema":{"type":"boolean"}},{"name":"filter[isSuspensionEnabled][ne]","in":"query","required":false,"description":"Filter isSuspensionEnabled (ne)","schema":{"type":"boolean"}},{"name":"filter[isSuspensionEnabled][gt]","in":"query","required":false,"description":"Filter isSuspensionEnabled (gt)","schema":{"type":"boolean"}},{"name":"filter[isSuspensionEnabled][gte]","in":"query","required":false,"description":"Filter isSuspensionEnabled (gte)","schema":{"type":"boolean"}},{"name":"filter[isSuspensionEnabled][lt]","in":"query","required":false,"description":"Filter isSuspensionEnabled (lt)","schema":{"type":"boolean"}},{"name":"filter[isSuspensionEnabled][lte]","in":"query","required":false,"description":"Filter isSuspensionEnabled (lte)","schema":{"type":"boolean"}},{"name":"filter[isSuspensionEnabled][in]","in":"query","required":false,"description":"Filter isSuspensionEnabled (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSuspensionEnabled][notIn]","in":"query","required":false,"description":"Filter isSuspensionEnabled (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSuspensionEnabled][between]","in":"query","required":false,"description":"Filter isSuspensionEnabled (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","currency","-currency","autoRenew","-autoRenew","renewalTerm","-renewalTerm","renewalPriceChangePercentage","-renewalPriceChangePercentage","termType","-termType","subscriptionStatus","-subscriptionStatus","serviceStartDateBasis","-serviceStartDateBasis","serviceActivationDate","-serviceActivationDate","serviceStartDate","-serviceStartDate","serviceEndDate","-serviceEndDate","submissionDate","-submissionDate","cancellationDate","-cancellationDate","cancellationReason","-cancellationReason","isCancellationEnabled","-isCancellationEnabled","suspensionDate","-suspensionDate","suspensionReason","-suspensionReason","isSuspensionEnabled","-isSuspensionEnabled","annualRecurringRevenue","-annualRecurringRevenue","monthlyRecurringRevenue","-monthlyRecurringRevenue","totalUserCount","-totalUserCount","prepaidBalance","-prepaidBalance","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","subscriptionNumber","customerName","currency","autoRenew","renewalTerm","renewalPriceChangePercentage","termType","subscriptionStatus","serviceStartDateBasis","serviceActivationDate","serviceStartDate","serviceEndDate","submissionDate","cancellationDate","cancellationReason","isCancellationEnabled","suspensionDate","suspensionReason","isSuspensionEnabled","externalSubscriptionId","annualRecurringRevenue","monthlyRecurringRevenue","totalUserCount","prepaidBalance","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/subscriptionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List subscriptions, one row per subscription. A row carries customerName but no customerId or entityId: reach them through subscriptionId on sales order products and the order's customerId and entityId, or through getSubscription.","description":"Lists subscriptions. Each subscription in the list has no customerId, entityId, or lines. For the full record, including the customer and legal entity, use GET accounting/subscriptions/:id or POST accounting/subscriptions/search.","tags":["accountingSubscriptions"]}},"/accounting/price-books/{id}":{"get":{"operationId":"getPriceBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPriceBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the price book you want to retrieve."}],"summary":"Retrieve a price book","description":"Retrieves a price book. Use the price book's id, not its priceBookNumber.\n\nTo find a price book by name or number, use POST accounting/price-books/search.","tags":["accountingPriceBooks"]},"patch":{"operationId":"updatePriceBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePriceBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the price book you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePriceBookInput"}}}},"summary":"Update a price book","description":"Updates a price book with the fields you send. A field you leave out keeps its current value.\n\nUse the price book's id, not its priceBookNumber.\n\nYou can't change isStandard or priceBookNumber with this endpoint. The response contains only the price book's id. Read the updated record with GET accounting/price-books/:id.","tags":["accountingPriceBooks"]}},"/accounting/sales-order-shipments/{id}":{"delete":{"operationId":"deleteSalesOrderShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteSalesOrderShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales order shipment you want to delete.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Delete a sales order shipment","description":"Deletes a sales order shipment. The shipment's lines are deleted too, and the shipped quantities on the sales order products those lines belonged to are recalculated.\n\nOnly the sales order shipment is deleted. The shipment in inventory isn't changed, so a shipment that still exists there is left without a matching sales order shipment.\n\nTo remove a real shipment, delete it in inventory instead. That cancels the sales order shipment: its status becomes 'cancelled', and the shipment and its lines are kept for fulfillment history. Use this endpoint only for sales order shipments that should never have existed.","tags":["accountingSalesOrderShipments"]},"patch":{"operationId":"updateSalesOrderShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSalesOrderShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WAREHOUSE_NOT_FOUND, SHIPMENT_ITEMS_NOT_FOUND, SALES_ORDER_PRODUCT_ITEMS_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseId":{"type":"string"}},"additionalProperties":false,"required":["warehouseId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_ITEMS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_ITEMS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductItemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["salesOrderProductItemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseId":{"type":"string"}},"additionalProperties":false,"required":["warehouseId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_ITEMS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_ITEMS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductItemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["salesOrderProductItemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseId":{"type":"string"}},"additionalProperties":false,"required":["warehouseId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_ITEMS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_ITEMS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductItemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["salesOrderProductItemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales order shipment you want to update.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSalesOrderShipmentInput"}}}},"summary":"Update a sales order shipment","description":"Updates a sales order shipment with the fields you send. A field you leave out keeps its current value.\n\nUse the sales order shipment's id, not its shipmentNumber. The lines change through createItems, updateItems, and deleteItems, and leaving out all three leaves the lines as they are.\n\nupdateItems and deleteItems name lines by the line's own id, and each line must belong to this shipment. If any part of the update can't be made, the shipment is left as it was. After the update, the shipped quantities on the related sales order products are recalculated.\n\nInventory can also write carrier, trackingId, shipDate, and the shipped quantities when the shipment is committed there, so a value set here can be replaced. Setting status to 'cancelled' cancels only this sales order shipment, not the shipment in inventory.\n\nThe response is empty. Read the result with GET accounting/sales-order-shipments/:id.","tags":["accountingSalesOrderShipments"]},"get":{"operationId":"getSalesOrderShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSalesOrderShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales order shipment you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a sales order shipment","description":"Retrieves a sales order shipment. Use the sales order shipment's id, not its shipmentNumber.\n\nThe response includes the shipment's lines. A shipment created with POST accounting/sales-order-shipments starts with shippedQty 0 on every line. Inventory fills in the quantities when the shipment is committed there.","tags":["accountingSalesOrderShipments"]}},"/banking/fund-transfers/search":{"post":{"operationId":"searchFundTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchFundTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchFundTransferInput"}}}},"summary":"Search fund transfers","description":"Searches fund transfers. Each fund transfer is returned with its lines.\n\nTo find transfers out of an account, filter by fromAccountId. To find transfers into an account, filter by toAccountId. Send both to find transfers from one account to another.","tags":["bankingFundTransfers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/products/search":{"post":{"operationId":"searchAccountingProducts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAccountingProductsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAccountingProductsInput"}}}},"summary":"Search products","description":"Searches products.","tags":["accounting/products"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/refunds":{"get":{"operationId":"listRefunds","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listRefundsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to refunds in this approval state. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Omit to return every state.","example":"approved"},{"name":"paymentId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to refunds against this source payment. Omit to return every payment. See id on GET accounting/payments/:id."},{"name":"customerId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to refunds for this customer. Omit to return every customer. See id on GET accounting/customers/:id.","example":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"},{"name":"refundDateFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to refunds issued on or after this date, inclusive. Format YYYY-MM-DD."},{"name":"refundDateTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to refunds issued on or before this date, inclusive. Format YYYY-MM-DD."},{"name":"modifiedFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to refunds changed at or after this time, inclusive. In UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},{"name":"modifiedTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to refunds changed at or before this time, inclusive. In UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit for the first page."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of refunds per page. Defaults to 50. A value above 200 is treated as 200, not rejected.","example":50}],"summary":"List refunds","description":"Lists refunds. Each refund has the same fields as on GET accounting/refunds/:id.\n\nThis endpoint doesn't follow the standard rules in Pagination and querying. Page with `pageSize` and `cursor`, not `page[size]` and `page[cursor]`. The records are in `data.items`, and the next page's cursor is in `data.pagination.nextCursor`.\n\nFilter with the plain query parameters listed below, such as `status`, not `filter[field][op]`. There is no `sort` or `fields`. Any query parameter the endpoint doesn't declare is ignored without an error, so a request that follows the standard rules gets the first page, unfiltered, every time.\n\nTo filter by several approval statuses at once, or by the refund's id, use POST accounting/refunds/search.","tags":["accountingRefunds"]},"post":{"operationId":"createRefund","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createRefundOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"withUnapply":{"value":{"data":{"id":"8e70b13a-45f6-4d80-9c6d-2e8f70b13a45","refundNumber":"REF-1043","refundDate":"2026-08-01","approvalStatus":"approved","refundType":"creditCard","currency":"USD","amount":"500.00","customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","entityId":"1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45","paymentId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","lastModifiedDate":"2026-08-01T09:12:44.000Z"}},"summary":"Unapplying the payment from an invoice before the refund is created"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PAYMENT_NOT_FOUND, INVOICE_NOT_FOUND, INVALID_AMOUNT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["invoiceIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["invoiceIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["invoiceIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createRefundInput"},"examples":{"withUnapply":{"value":{"paymentId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","refundDate":"2026-08-01","refundType":"creditCard","amount":"500.00","unapply":[{"invoiceId":"7d34c8e9-b21f-4a5c-9f3e-6d81b7d0aec3","amount":"500.00"}]},"summary":"Unapplying the payment from an invoice before the refund is created"}}}}},"summary":"Create a refund","description":"Creates a refund against a source payment. The refund is created with approvalStatus 'approved', which sends it to the payment provider. There is no separate approval step.\n\ncustomerId, entityId, and currency come from the source payment and aren't inputs.\n\nWhen the payment doesn't have enough unapplied balance, list invoices in unapply. The payment is unapplied from those invoices before the refund is created, in the same request.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingRefunds"]}},"/banking/bank-entries/{id}":{"get":{"operationId":"getBankEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBankEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank entry you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a bank entry","description":"Retrieves a bank entry. Use the bank entry's id, not its bankEntryNumber.\n\nA bank entry records money moving in or out of a bank account. The response includes the bank entry's lines, with amounts in the entry currency.","tags":["bankingBankEntries"]},"patch":{"operationId":"updateBankEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBankEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, LINE_NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, REPORTING_TAG_CONFLICT, TAG_VALIDATION_FAILED, TAGS_DISABLED, POSTING_PERIOD_NOT_OPEN, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, GROUPING_ACCOUNT_NOT_ALLOWED, BUSINESS_PARTNER_REQUIRED_FOR_VAT, CROSS_CHARGE_INVALID, TAX_CODE_NOT_FOUND, TAX_CODE_AMBIGUOUS, TAX_CODE_ACCOUNT_NOT_CONFIGURED, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this entry."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this entry."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this entry."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position within createLines or updateLines of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line, counting from zero within the array that carried it."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank entry you want to update.","example":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBankEntryInput"}}}},"summary":"Update a bank entry","description":"Updates a bank entry with the fields you send. A field you leave out keeps its current value.\n\nUse the bank entry's id, not its bankEntryNumber.\n\nTo change lines, use deleteLines to remove lines, updateLines to change them, and createLines to add new ones. The arrays are applied in that order: deletes first, then updates, then creates. Lines you don't name in any of the three arrays stay as they are. After the changes, the bank entry must still have at least one line, no line of zero, and a total that isn't zero.\n\nThe response is empty. Read the result with GET banking/bank-entries/:id.","tags":["bankingBankEntries"]}},"/accounting/journal-entries/{id}/void":{"post":{"operationId":"voidJournalEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidJournalEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ALREADY_VOIDED, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the journal entry to void."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidJournalEntryInput"}}}},"summary":"Void a journal entry","description":"Voids a journal entry. Voiding sets the journal entry's status to 'voided' and doesn't create a new journal entry. If the journal entry was reversed, its reversal journal entry is voided too.\n\nVoiding also removes the journal entry's link to its source document and makes the journal entry a manual one. Voiding a journal entry that is already voided fails with ALREADY_VOIDED. The request fails with VALIDATION_FAILED, with the rule's message in reason, if its accounting period is closed.","tags":["accountingJournalEntries"]}},"/banking/bank-accounts":{"post":{"operationId":"createBankAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBankAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, INVALID_QR_IBAN, DUPLICATE_EXTERNAL_ACCOUNT_ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account or financialInstitution."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QR_IBAN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string","description":"The reference that failed the QR-IBAN check."}},"additionalProperties":false,"required":["reference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ACCOUNT_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The externalAccountId that is already taken."},"existingId":{"type":"string","description":"The identifier of the account that already has it."}},"additionalProperties":false,"required":["externalAccountId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account or financialInstitution."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QR_IBAN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string","description":"The reference that failed the QR-IBAN check."}},"additionalProperties":false,"required":["reference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ACCOUNT_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The externalAccountId that is already taken."},"existingId":{"type":"string","description":"The identifier of the account that already has it."}},"additionalProperties":false,"required":["externalAccountId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account or financialInstitution."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QR_IBAN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string","description":"The reference that failed the QR-IBAN check."}},"additionalProperties":false,"required":["reference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ACCOUNT_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The externalAccountId that is already taken."},"existingId":{"type":"string","description":"The identifier of the account that already has it."}},"additionalProperties":false,"required":["externalAccountId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBankAccountInput"}}}},"summary":"Create a bank account","description":"Creates a bank account. The response contains only the new bank account's id. Read the record with GET banking/bank-accounts/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingBankAccounts"]},"get":{"operationId":"bankAccounts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[paymentAllowed]","in":"query","required":false,"description":"Filter paymentAllowed (equality)","schema":{"type":"boolean"}},{"name":"filter[paymentAllowed][ne]","in":"query","required":false,"description":"Filter paymentAllowed (ne)","schema":{"type":"boolean"}},{"name":"filter[paymentAllowed][gt]","in":"query","required":false,"description":"Filter paymentAllowed (gt)","schema":{"type":"boolean"}},{"name":"filter[paymentAllowed][gte]","in":"query","required":false,"description":"Filter paymentAllowed (gte)","schema":{"type":"boolean"}},{"name":"filter[paymentAllowed][lt]","in":"query","required":false,"description":"Filter paymentAllowed (lt)","schema":{"type":"boolean"}},{"name":"filter[paymentAllowed][lte]","in":"query","required":false,"description":"Filter paymentAllowed (lte)","schema":{"type":"boolean"}},{"name":"filter[paymentAllowed][in]","in":"query","required":false,"description":"Filter paymentAllowed (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentAllowed][notIn]","in":"query","required":false,"description":"Filter paymentAllowed (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentAllowed][between]","in":"query","required":false,"description":"Filter paymentAllowed (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[receivableAccount]","in":"query","required":false,"description":"Filter receivableAccount (equality)","schema":{"type":"boolean"}},{"name":"filter[receivableAccount][ne]","in":"query","required":false,"description":"Filter receivableAccount (ne)","schema":{"type":"boolean"}},{"name":"filter[receivableAccount][gt]","in":"query","required":false,"description":"Filter receivableAccount (gt)","schema":{"type":"boolean"}},{"name":"filter[receivableAccount][gte]","in":"query","required":false,"description":"Filter receivableAccount (gte)","schema":{"type":"boolean"}},{"name":"filter[receivableAccount][lt]","in":"query","required":false,"description":"Filter receivableAccount (lt)","schema":{"type":"boolean"}},{"name":"filter[receivableAccount][lte]","in":"query","required":false,"description":"Filter receivableAccount (lte)","schema":{"type":"boolean"}},{"name":"filter[receivableAccount][in]","in":"query","required":false,"description":"Filter receivableAccount (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[receivableAccount][notIn]","in":"query","required":false,"description":"Filter receivableAccount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[receivableAccount][between]","in":"query","required":false,"description":"Filter receivableAccount (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[payableAccount]","in":"query","required":false,"description":"Filter payableAccount (equality)","schema":{"type":"boolean"}},{"name":"filter[payableAccount][ne]","in":"query","required":false,"description":"Filter payableAccount (ne)","schema":{"type":"boolean"}},{"name":"filter[payableAccount][gt]","in":"query","required":false,"description":"Filter payableAccount (gt)","schema":{"type":"boolean"}},{"name":"filter[payableAccount][gte]","in":"query","required":false,"description":"Filter payableAccount (gte)","schema":{"type":"boolean"}},{"name":"filter[payableAccount][lt]","in":"query","required":false,"description":"Filter payableAccount (lt)","schema":{"type":"boolean"}},{"name":"filter[payableAccount][lte]","in":"query","required":false,"description":"Filter payableAccount (lte)","schema":{"type":"boolean"}},{"name":"filter[payableAccount][in]","in":"query","required":false,"description":"Filter payableAccount (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payableAccount][notIn]","in":"query","required":false,"description":"Filter payableAccount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payableAccount][between]","in":"query","required":false,"description":"Filter payableAccount (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isReady]","in":"query","required":false,"description":"Filter isReady (equality)","schema":{"type":"boolean"}},{"name":"filter[isReady][ne]","in":"query","required":false,"description":"Filter isReady (ne)","schema":{"type":"boolean"}},{"name":"filter[isReady][gt]","in":"query","required":false,"description":"Filter isReady (gt)","schema":{"type":"boolean"}},{"name":"filter[isReady][gte]","in":"query","required":false,"description":"Filter isReady (gte)","schema":{"type":"boolean"}},{"name":"filter[isReady][lt]","in":"query","required":false,"description":"Filter isReady (lt)","schema":{"type":"boolean"}},{"name":"filter[isReady][lte]","in":"query","required":false,"description":"Filter isReady (lte)","schema":{"type":"boolean"}},{"name":"filter[isReady][in]","in":"query","required":false,"description":"Filter isReady (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReady][notIn]","in":"query","required":false,"description":"Filter isReady (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReady][between]","in":"query","required":false,"description":"Filter isReady (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reconciliationStartDate]","in":"query","required":false,"description":"Filter reconciliationStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciliationStartDate][ne]","in":"query","required":false,"description":"Filter reconciliationStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciliationStartDate][gt]","in":"query","required":false,"description":"Filter reconciliationStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciliationStartDate][gte]","in":"query","required":false,"description":"Filter reconciliationStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciliationStartDate][lt]","in":"query","required":false,"description":"Filter reconciliationStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciliationStartDate][lte]","in":"query","required":false,"description":"Filter reconciliationStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciliationStartDate][in]","in":"query","required":false,"description":"Filter reconciliationStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reconciliationStartDate][notIn]","in":"query","required":false,"description":"Filter reconciliationStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reconciliationStartDate][between]","in":"query","required":false,"description":"Filter reconciliationStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","type","-type","currency","-currency","balance","-balance","paymentAllowed","-paymentAllowed","isReady","-isReady","reconciliationStartDate","-reconciliationStartDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","externalAccountId","externalAccountName","externalDescription","type","currency","balance","mask","reference","referenceType","referenceNumber","bankAccountCode","bankAccountHolderName","paymentAllowed","receivableAccount","payableAccount","isReady","reconciliationStartDate","transactionsImportDate","accountName","accountNumber","bankName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/bankAccountsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List bank accounts","description":"Lists bank accounts. Bank accounts deleted with DELETE banking/bank-accounts/:id aren't included.\n\nTo match on an external identifier, a name, an account number, or a linked entity or institution, use POST banking/bank-accounts/search.","tags":["bankingBankAccounts"]}},"/accounting/products/{id}/product-lines/{productLineId}":{"patch":{"operationId":"updateAccountingProductLine","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAccountingProductLineOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND, UNKNOWN_TAX_ENTITY_IDS, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product the product line belongs to."},{"name":"productLineId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product line you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAccountingProductLineInput"}}}},"summary":"Update a product line","description":"Updates a product line with the fields you send. A field you leave out keeps its current value, except productLineTaxes and name. Leaving out productLineTaxes removes every tax record, and leaving out name replaces the name with one generated from the lineType.\n\nUse the product line's id, not its productLineNumber.\n\nA productLineTaxes list you send replaces the whole list, so include every tax record you want to keep.\n\nYou can't change lineType or pricing with this endpoint. To change pricing, use the pricing endpoints under accounting/products/:id/product-lines/:productLineId/pricing. To change lineType, delete the product line and add a new one.\n\nA paired 'usage' line is updated with its own id, like any other product line. Its priceModel ('rateCard'), unitOfMeasure, pricingTerm and invoiceFrequency are fixed: a different value fails with VALIDATION_FAILED.\n\nChanging a 'recurring' line's priceModel to 'thresholdBased' also creates a paired 'usage' line without pricing. Add its pricing with the pricing endpoints under accounting/products/:id/product-lines/:productLineId/pricing, using the 'usage' line's id. To find it, use POST accounting/product-lines/search with filters.parentProductLineId set to the parent line's id.\n\nThe response is empty. Read the updated record with GET accounting/product-lines/:id.","tags":["accounting/products/productLines"]},"delete":{"operationId":"deleteAccountingProductLine","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAccountingProductLineOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND, USAGE_LINE_NOT_DELETABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_LINE_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_LINE_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_LINE_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product the product line belongs to."},{"name":"productLineId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product line you want to delete."}],"summary":"Delete a product line","description":"Deletes a product line. Deleting a product line also deletes its pricing and its tax records. The pricing includes the pricing headers, their price book entries, and their rate-card entries. Deleting a line with a paired 'usage' line (a 'prepaid' line, or a 'recurring' line priced 'thresholdBased') also deletes the 'usage' line.\n\nA 'usage' line can't be deleted on its own: the request fails with USAGE_LINE_NOT_DELETABLE. Delete its parent line instead.\n\nThe request fails with VALIDATION_FAILED, and nothing is deleted, in these cases:\n\n- The product line, or its paired 'usage' line, has been used on a sales order.\n- A rate-card entry in the product line's pricing is used on a sales order.","tags":["accounting/products/productLines"]}},"/accounting/performance-obligations/{id}/products":{"get":{"operationId":"listPerformanceObligationProducts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listPerformanceObligationProductsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the performance obligation whose products you want to retrieve."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit for the first page."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of mappings per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}],"summary":"List a performance obligation's products","description":"Lists a performance obligation's products. This endpoint doesn't follow the standard collection rules in Pagination and querying.\n\nPage through the results with `pageSize` and `cursor`, not `page[size]` and `page[cursor]`. A pageSize below 1 is treated as 1. The response lists the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`. The endpoint takes no filters, and has no `sort` or `fields`.\n\nThe endpoint ignores any query parameter it doesn't declare, and returns no error. A request that follows the standard rules gets the first page, unfiltered, every time.","tags":["accountingPerformanceObligations"]}},"/accounting/books":{"post":{"operationId":"createBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: MULTI_BOOK_DISABLED, FIELD_REQUIRED, FIELD_NOT_ALLOWED, INVALID_FIELD_VALUE, REFERENCE_NOT_FOUND, INVALID_BASE_BOOK, ALL_ENTITIES_NOT_ALLOWED, ENTITY_HIERARCHY_INCOMPLETE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MULTI_BOOK_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BASE_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"baseBookId":{"type":"string"}},"additionalProperties":false,"required":["baseBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALL_ENTITIES_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"enum":["journalEntriesExist","incompleteSourceAssignment","incompleteAssignment"]},"entityIds":{"type":"array","items":{"type":"string"}},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","entityIds","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MULTI_BOOK_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BASE_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"baseBookId":{"type":"string"}},"additionalProperties":false,"required":["baseBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALL_ENTITIES_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"enum":["journalEntriesExist","incompleteSourceAssignment","incompleteAssignment"]},"entityIds":{"type":"array","items":{"type":"string"}},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","entityIds","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MULTI_BOOK_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_BASE_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"baseBookId":{"type":"string"}},"additionalProperties":false,"required":["baseBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALL_ENTITIES_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"enum":["journalEntriesExist","incompleteSourceAssignment","incompleteAssignment"]},"entityIds":{"type":"array","items":{"type":"string"}},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","entityIds","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBookInput"}}}},"summary":"Create an accounting book","description":"Creates an accounting book. A full book follows its own accounting standard; an adjustment book adjusts the full book named in baseBookId and copies that book's accounting standard and consolidation. Books can only be created while multi-book is on.\n\nA new book has no legal entities. Assign them with POST accounting/books/entity-assignments, or send allEntities: true to assign every legal entity at once: each one is assigned with the chart of accounts, fiscal calendar and currency it has in the book it is copied from (the tenant's first book for a full book, the base book for an adjustment book). allEntities: true fails while journal entries exist, or when an active legal entity has no complete assignment to copy.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingBooks"]},"get":{"operationId":"books","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[accountingStandard]","in":"query","required":false,"description":"Filter accountingStandard (equality)","schema":{"type":"string"}},{"name":"filter[accountingStandard][ne]","in":"query","required":false,"description":"Filter accountingStandard (ne)","schema":{"type":"string"}},{"name":"filter[accountingStandard][gt]","in":"query","required":false,"description":"Filter accountingStandard (gt)","schema":{"type":"string"}},{"name":"filter[accountingStandard][gte]","in":"query","required":false,"description":"Filter accountingStandard (gte)","schema":{"type":"string"}},{"name":"filter[accountingStandard][lt]","in":"query","required":false,"description":"Filter accountingStandard (lt)","schema":{"type":"string"}},{"name":"filter[accountingStandard][lte]","in":"query","required":false,"description":"Filter accountingStandard (lte)","schema":{"type":"string"}},{"name":"filter[accountingStandard][in]","in":"query","required":false,"description":"Filter accountingStandard (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingStandard][notIn]","in":"query","required":false,"description":"Filter accountingStandard (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingStandard][between]","in":"query","required":false,"description":"Filter accountingStandard (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountingStandard][like]","in":"query","required":false,"description":"Filter accountingStandard (like)","schema":{"type":"string"}},{"name":"filter[consolidation]","in":"query","required":false,"description":"Filter consolidation (equality)","schema":{"type":"boolean"}},{"name":"filter[consolidation][ne]","in":"query","required":false,"description":"Filter consolidation (ne)","schema":{"type":"boolean"}},{"name":"filter[consolidation][gt]","in":"query","required":false,"description":"Filter consolidation (gt)","schema":{"type":"boolean"}},{"name":"filter[consolidation][gte]","in":"query","required":false,"description":"Filter consolidation (gte)","schema":{"type":"boolean"}},{"name":"filter[consolidation][lt]","in":"query","required":false,"description":"Filter consolidation (lt)","schema":{"type":"boolean"}},{"name":"filter[consolidation][lte]","in":"query","required":false,"description":"Filter consolidation (lte)","schema":{"type":"boolean"}},{"name":"filter[consolidation][in]","in":"query","required":false,"description":"Filter consolidation (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[consolidation][notIn]","in":"query","required":false,"description":"Filter consolidation (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[consolidation][between]","in":"query","required":false,"description":"Filter consolidation (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[baseBookId]","in":"query","required":false,"description":"Filter baseBookId (equality)","schema":{"type":"string"}},{"name":"filter[baseBookId][ne]","in":"query","required":false,"description":"Filter baseBookId (ne)","schema":{"type":"string"}},{"name":"filter[baseBookId][gt]","in":"query","required":false,"description":"Filter baseBookId (gt)","schema":{"type":"string"}},{"name":"filter[baseBookId][gte]","in":"query","required":false,"description":"Filter baseBookId (gte)","schema":{"type":"string"}},{"name":"filter[baseBookId][lt]","in":"query","required":false,"description":"Filter baseBookId (lt)","schema":{"type":"string"}},{"name":"filter[baseBookId][lte]","in":"query","required":false,"description":"Filter baseBookId (lte)","schema":{"type":"string"}},{"name":"filter[baseBookId][in]","in":"query","required":false,"description":"Filter baseBookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[baseBookId][notIn]","in":"query","required":false,"description":"Filter baseBookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[baseBookId][between]","in":"query","required":false,"description":"Filter baseBookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[baseBookId][like]","in":"query","required":false,"description":"Filter baseBookId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","type","-type","accountingStandard","-accountingStandard","consolidation","-consolidation","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","type","accountingStandard","consolidation","description","baseBookId","allEntities","exchangeRateGroupId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/booksRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List accounting books. A full book keeps a complete ledger under one accounting standard. The entities that keep a book, and the functional currency each keeps in it, are on book entity assignments.","description":"Lists accounting books.","tags":["accountingBooks"]}},"/accounting/journal-entries/{id}/reverse":{"post":{"operationId":"reverseJournalEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reverseJournalEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REVERSAL_DESCRIPTION_REQUIRED, ALREADY_REVERSED, INVALID_REVERSAL_REASON, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSAL_DESCRIPTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSAL_DESCRIPTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSAL_DESCRIPTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the journal entry to reverse."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reverseJournalEntryInput"}}}},"summary":"Reverse a journal entry","description":"Reverses a journal entry. The request creates a new reversal journal entry with the original's debits and credits swapped, dated reversalDate. The reversal journal entry starts unposted and pending approval.\n\nIf no approval policy applies, the reversal journal entry is approved at once and posted to the general ledger. Otherwise the reversal journal entry is posted when it is approved.\n\nOnly a manual journal entry can be reversed, and only once. A journal entry created by a revaluation, or one that is itself a reversal, is not manual and can't be reversed. Reversing a journal entry a second time fails with ALREADY_REVERSED. Reversing a journal entry that is not manual, such as a reversal or a revaluation's entry, fails with VALIDATION_FAILED, with the rule's message in reason and rule 'systemEntryNotReversible'.","tags":["accountingJournalEntries"]}},"/accounting/tax-configurations":{"get":{"operationId":"taxConfigurations","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[taxRegime]","in":"query","required":false,"description":"Filter taxRegime (equality)","schema":{"type":"string"}},{"name":"filter[taxRegime][ne]","in":"query","required":false,"description":"Filter taxRegime (ne)","schema":{"type":"string"}},{"name":"filter[taxRegime][gt]","in":"query","required":false,"description":"Filter taxRegime (gt)","schema":{"type":"string"}},{"name":"filter[taxRegime][gte]","in":"query","required":false,"description":"Filter taxRegime (gte)","schema":{"type":"string"}},{"name":"filter[taxRegime][lt]","in":"query","required":false,"description":"Filter taxRegime (lt)","schema":{"type":"string"}},{"name":"filter[taxRegime][lte]","in":"query","required":false,"description":"Filter taxRegime (lte)","schema":{"type":"string"}},{"name":"filter[taxRegime][in]","in":"query","required":false,"description":"Filter taxRegime (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxRegime][notIn]","in":"query","required":false,"description":"Filter taxRegime (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxRegime][between]","in":"query","required":false,"description":"Filter taxRegime (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[taxRegime][like]","in":"query","required":false,"description":"Filter taxRegime (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","entityId","-entityId","status","-status","taxRegime","-taxRegime","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","entityId","status","taxRegime","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/taxConfigurationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List tax configurations","description":"Lists tax configurations. Each tax configuration in the list has no tax codes. For a configuration's tax codes and the general ledger accounts they use, use GET accounting/tax-configurations/:id or POST accounting/tax-configurations/search.","tags":["accountingTaxConfigurations"]},"post":{"operationId":"createTaxConfiguration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTaxConfigurationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ENTITY_NOT_FOUND, ENTITY_ALREADY_CONFIGURED, NO_LINES, DUPLICATE_LINE_TITLE, DUPLICATE_TAX_CODE, LINE_WITHOUT_ACCOUNTS, MISSING_REVERSE_CHARGE_ACCOUNT, CHART_OF_ACCOUNTS_NOT_FOUND, ACCOUNT_NOT_FOUND, REVERSE_CHARGE_ACCOUNT_NOT_FOUND, COLLECTED_ACCOUNT_NOT_FOUND, COMPONENT_WITHOUT_ACCOUNTS, COMPONENT_PERCENTAGE_MISMATCH, CASH_BASIS_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_ALREADY_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["entityId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_ALREADY_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["entityId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_ALREADY_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["entityId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTaxConfigurationInput"}}}},"summary":"Create a tax configuration","description":"Creates a tax configuration for a legal entity. A legal entity has at most one tax configuration. If the legal entity in entityId already has one, the request fails with ENTITY_ALREADY_CONFIGURED, which gives the existing configuration's id.\n\nThe response contains only the new configuration's id. Read the configuration with GET accounting/tax-configurations/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingTaxConfigurations"]}},"/accounting/invoices":{"get":{"operationId":"invoices","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[invoiceDate]","in":"query","required":false,"description":"Filter invoiceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][ne]","in":"query","required":false,"description":"Filter invoiceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][gt]","in":"query","required":false,"description":"Filter invoiceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][gte]","in":"query","required":false,"description":"Filter invoiceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][lt]","in":"query","required":false,"description":"Filter invoiceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][lte]","in":"query","required":false,"description":"Filter invoiceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][in]","in":"query","required":false,"description":"Filter invoiceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceDate][notIn]","in":"query","required":false,"description":"Filter invoiceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceDate][between]","in":"query","required":false,"description":"Filter invoiceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastPaidDate]","in":"query","required":false,"description":"Filter lastPaidDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[lastPaidDate][ne]","in":"query","required":false,"description":"Filter lastPaidDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[lastPaidDate][gt]","in":"query","required":false,"description":"Filter lastPaidDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[lastPaidDate][gte]","in":"query","required":false,"description":"Filter lastPaidDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[lastPaidDate][lt]","in":"query","required":false,"description":"Filter lastPaidDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[lastPaidDate][lte]","in":"query","required":false,"description":"Filter lastPaidDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[lastPaidDate][in]","in":"query","required":false,"description":"Filter lastPaidDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastPaidDate][notIn]","in":"query","required":false,"description":"Filter lastPaidDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastPaidDate][between]","in":"query","required":false,"description":"Filter lastPaidDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceStatus]","in":"query","required":false,"description":"Filter invoiceStatus (equality)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][ne]","in":"query","required":false,"description":"Filter invoiceStatus (ne)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][gt]","in":"query","required":false,"description":"Filter invoiceStatus (gt)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][gte]","in":"query","required":false,"description":"Filter invoiceStatus (gte)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][lt]","in":"query","required":false,"description":"Filter invoiceStatus (lt)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][lte]","in":"query","required":false,"description":"Filter invoiceStatus (lte)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][in]","in":"query","required":false,"description":"Filter invoiceStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceStatus][notIn]","in":"query","required":false,"description":"Filter invoiceStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceStatus][between]","in":"query","required":false,"description":"Filter invoiceStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceStatus][like]","in":"query","required":false,"description":"Filter invoiceStatus (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[deliveryStatus]","in":"query","required":false,"description":"Filter deliveryStatus (equality)","schema":{"type":"string"}},{"name":"filter[deliveryStatus][ne]","in":"query","required":false,"description":"Filter deliveryStatus (ne)","schema":{"type":"string"}},{"name":"filter[deliveryStatus][gt]","in":"query","required":false,"description":"Filter deliveryStatus (gt)","schema":{"type":"string"}},{"name":"filter[deliveryStatus][gte]","in":"query","required":false,"description":"Filter deliveryStatus (gte)","schema":{"type":"string"}},{"name":"filter[deliveryStatus][lt]","in":"query","required":false,"description":"Filter deliveryStatus (lt)","schema":{"type":"string"}},{"name":"filter[deliveryStatus][lte]","in":"query","required":false,"description":"Filter deliveryStatus (lte)","schema":{"type":"string"}},{"name":"filter[deliveryStatus][in]","in":"query","required":false,"description":"Filter deliveryStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryStatus][notIn]","in":"query","required":false,"description":"Filter deliveryStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryStatus][between]","in":"query","required":false,"description":"Filter deliveryStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryStatus][like]","in":"query","required":false,"description":"Filter deliveryStatus (like)","schema":{"type":"string"}},{"name":"filter[disputeStatus]","in":"query","required":false,"description":"Filter disputeStatus (equality)","schema":{"type":"string"}},{"name":"filter[disputeStatus][ne]","in":"query","required":false,"description":"Filter disputeStatus (ne)","schema":{"type":"string"}},{"name":"filter[disputeStatus][gt]","in":"query","required":false,"description":"Filter disputeStatus (gt)","schema":{"type":"string"}},{"name":"filter[disputeStatus][gte]","in":"query","required":false,"description":"Filter disputeStatus (gte)","schema":{"type":"string"}},{"name":"filter[disputeStatus][lt]","in":"query","required":false,"description":"Filter disputeStatus (lt)","schema":{"type":"string"}},{"name":"filter[disputeStatus][lte]","in":"query","required":false,"description":"Filter disputeStatus (lte)","schema":{"type":"string"}},{"name":"filter[disputeStatus][in]","in":"query","required":false,"description":"Filter disputeStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[disputeStatus][notIn]","in":"query","required":false,"description":"Filter disputeStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[disputeStatus][between]","in":"query","required":false,"description":"Filter disputeStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[disputeStatus][like]","in":"query","required":false,"description":"Filter disputeStatus (like)","schema":{"type":"string"}},{"name":"filter[dataSource]","in":"query","required":false,"description":"Filter dataSource (equality)","schema":{"type":"string"}},{"name":"filter[dataSource][ne]","in":"query","required":false,"description":"Filter dataSource (ne)","schema":{"type":"string"}},{"name":"filter[dataSource][gt]","in":"query","required":false,"description":"Filter dataSource (gt)","schema":{"type":"string"}},{"name":"filter[dataSource][gte]","in":"query","required":false,"description":"Filter dataSource (gte)","schema":{"type":"string"}},{"name":"filter[dataSource][lt]","in":"query","required":false,"description":"Filter dataSource (lt)","schema":{"type":"string"}},{"name":"filter[dataSource][lte]","in":"query","required":false,"description":"Filter dataSource (lte)","schema":{"type":"string"}},{"name":"filter[dataSource][in]","in":"query","required":false,"description":"Filter dataSource (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][notIn]","in":"query","required":false,"description":"Filter dataSource (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][between]","in":"query","required":false,"description":"Filter dataSource (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource][like]","in":"query","required":false,"description":"Filter dataSource (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[paymentTermDays]","in":"query","required":false,"description":"Filter paymentTermDays (equality)","schema":{"type":"number"}},{"name":"filter[paymentTermDays][ne]","in":"query","required":false,"description":"Filter paymentTermDays (ne)","schema":{"type":"number"}},{"name":"filter[paymentTermDays][gt]","in":"query","required":false,"description":"Filter paymentTermDays (gt)","schema":{"type":"number"}},{"name":"filter[paymentTermDays][gte]","in":"query","required":false,"description":"Filter paymentTermDays (gte)","schema":{"type":"number"}},{"name":"filter[paymentTermDays][lt]","in":"query","required":false,"description":"Filter paymentTermDays (lt)","schema":{"type":"number"}},{"name":"filter[paymentTermDays][lte]","in":"query","required":false,"description":"Filter paymentTermDays (lte)","schema":{"type":"number"}},{"name":"filter[paymentTermDays][in]","in":"query","required":false,"description":"Filter paymentTermDays (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTermDays][notIn]","in":"query","required":false,"description":"Filter paymentTermDays (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTermDays][between]","in":"query","required":false,"description":"Filter paymentTermDays (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[exchangeRate]","in":"query","required":false,"description":"Filter exchangeRate (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[exchangeRate][ne]","in":"query","required":false,"description":"Filter exchangeRate (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[exchangeRate][gt]","in":"query","required":false,"description":"Filter exchangeRate (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[exchangeRate][gte]","in":"query","required":false,"description":"Filter exchangeRate (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[exchangeRate][lt]","in":"query","required":false,"description":"Filter exchangeRate (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[exchangeRate][lte]","in":"query","required":false,"description":"Filter exchangeRate (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[exchangeRate][in]","in":"query","required":false,"description":"Filter exchangeRate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[exchangeRate][notIn]","in":"query","required":false,"description":"Filter exchangeRate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[exchangeRate][between]","in":"query","required":false,"description":"Filter exchangeRate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[excludeFromTaxEngine]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (equality)","schema":{"type":"boolean"}},{"name":"filter[excludeFromTaxEngine][ne]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (ne)","schema":{"type":"boolean"}},{"name":"filter[excludeFromTaxEngine][gt]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (gt)","schema":{"type":"boolean"}},{"name":"filter[excludeFromTaxEngine][gte]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (gte)","schema":{"type":"boolean"}},{"name":"filter[excludeFromTaxEngine][lt]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (lt)","schema":{"type":"boolean"}},{"name":"filter[excludeFromTaxEngine][lte]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (lte)","schema":{"type":"boolean"}},{"name":"filter[excludeFromTaxEngine][in]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[excludeFromTaxEngine][notIn]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[excludeFromTaxEngine][between]","in":"query","required":false,"description":"Filter excludeFromTaxEngine (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[salesOrderId]","in":"query","required":false,"description":"Filter salesOrderId (equality)","schema":{"type":"string"}},{"name":"filter[salesOrderId][ne]","in":"query","required":false,"description":"Filter salesOrderId (ne)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gt]","in":"query","required":false,"description":"Filter salesOrderId (gt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gte]","in":"query","required":false,"description":"Filter salesOrderId (gte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lt]","in":"query","required":false,"description":"Filter salesOrderId (lt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lte]","in":"query","required":false,"description":"Filter salesOrderId (lte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][in]","in":"query","required":false,"description":"Filter salesOrderId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][notIn]","in":"query","required":false,"description":"Filter salesOrderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][between]","in":"query","required":false,"description":"Filter salesOrderId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[salesOrderId][like]","in":"query","required":false,"description":"Filter salesOrderId (like)","schema":{"type":"string"}},{"name":"filter[subtotal]","in":"query","required":false,"description":"Filter subtotal (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[subtotal][ne]","in":"query","required":false,"description":"Filter subtotal (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[subtotal][gt]","in":"query","required":false,"description":"Filter subtotal (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[subtotal][gte]","in":"query","required":false,"description":"Filter subtotal (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[subtotal][lt]","in":"query","required":false,"description":"Filter subtotal (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[subtotal][lte]","in":"query","required":false,"description":"Filter subtotal (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[subtotal][in]","in":"query","required":false,"description":"Filter subtotal (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[subtotal][notIn]","in":"query","required":false,"description":"Filter subtotal (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[subtotal][between]","in":"query","required":false,"description":"Filter subtotal (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalTax]","in":"query","required":false,"description":"Filter totalTax (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTax][ne]","in":"query","required":false,"description":"Filter totalTax (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTax][gt]","in":"query","required":false,"description":"Filter totalTax (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTax][gte]","in":"query","required":false,"description":"Filter totalTax (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTax][lt]","in":"query","required":false,"description":"Filter totalTax (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTax][lte]","in":"query","required":false,"description":"Filter totalTax (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTax][in]","in":"query","required":false,"description":"Filter totalTax (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalTax][notIn]","in":"query","required":false,"description":"Filter totalTax (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalTax][between]","in":"query","required":false,"description":"Filter totalTax (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalDutiesAndCustoms]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalDutiesAndCustoms][ne]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalDutiesAndCustoms][gt]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalDutiesAndCustoms][gte]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalDutiesAndCustoms][lt]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalDutiesAndCustoms][lte]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalDutiesAndCustoms][in]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalDutiesAndCustoms][notIn]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalDutiesAndCustoms][between]","in":"query","required":false,"description":"Filter totalDutiesAndCustoms (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalAmount]","in":"query","required":false,"description":"Filter totalAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][ne]","in":"query","required":false,"description":"Filter totalAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][gt]","in":"query","required":false,"description":"Filter totalAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][gte]","in":"query","required":false,"description":"Filter totalAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][lt]","in":"query","required":false,"description":"Filter totalAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][lte]","in":"query","required":false,"description":"Filter totalAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][in]","in":"query","required":false,"description":"Filter totalAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAmount][notIn]","in":"query","required":false,"description":"Filter totalAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAmount][between]","in":"query","required":false,"description":"Filter totalAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalAmountDue]","in":"query","required":false,"description":"Filter totalAmountDue (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmountDue][ne]","in":"query","required":false,"description":"Filter totalAmountDue (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmountDue][gt]","in":"query","required":false,"description":"Filter totalAmountDue (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmountDue][gte]","in":"query","required":false,"description":"Filter totalAmountDue (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmountDue][lt]","in":"query","required":false,"description":"Filter totalAmountDue (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmountDue][lte]","in":"query","required":false,"description":"Filter totalAmountDue (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmountDue][in]","in":"query","required":false,"description":"Filter totalAmountDue (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAmountDue][notIn]","in":"query","required":false,"description":"Filter totalAmountDue (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAmountDue][between]","in":"query","required":false,"description":"Filter totalAmountDue (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalCredited]","in":"query","required":false,"description":"Filter totalCredited (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalCredited][ne]","in":"query","required":false,"description":"Filter totalCredited (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalCredited][gt]","in":"query","required":false,"description":"Filter totalCredited (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalCredited][gte]","in":"query","required":false,"description":"Filter totalCredited (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalCredited][lt]","in":"query","required":false,"description":"Filter totalCredited (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalCredited][lte]","in":"query","required":false,"description":"Filter totalCredited (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalCredited][in]","in":"query","required":false,"description":"Filter totalCredited (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalCredited][notIn]","in":"query","required":false,"description":"Filter totalCredited (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalCredited][between]","in":"query","required":false,"description":"Filter totalCredited (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalLateFeeAmount]","in":"query","required":false,"description":"Filter totalLateFeeAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalLateFeeAmount][ne]","in":"query","required":false,"description":"Filter totalLateFeeAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalLateFeeAmount][gt]","in":"query","required":false,"description":"Filter totalLateFeeAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalLateFeeAmount][gte]","in":"query","required":false,"description":"Filter totalLateFeeAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalLateFeeAmount][lt]","in":"query","required":false,"description":"Filter totalLateFeeAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalLateFeeAmount][lte]","in":"query","required":false,"description":"Filter totalLateFeeAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalLateFeeAmount][in]","in":"query","required":false,"description":"Filter totalLateFeeAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalLateFeeAmount][notIn]","in":"query","required":false,"description":"Filter totalLateFeeAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalLateFeeAmount][between]","in":"query","required":false,"description":"Filter totalLateFeeAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lineDiscounts]","in":"query","required":false,"description":"Filter lineDiscounts (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[lineDiscounts][ne]","in":"query","required":false,"description":"Filter lineDiscounts (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[lineDiscounts][gt]","in":"query","required":false,"description":"Filter lineDiscounts (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[lineDiscounts][gte]","in":"query","required":false,"description":"Filter lineDiscounts (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[lineDiscounts][lt]","in":"query","required":false,"description":"Filter lineDiscounts (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[lineDiscounts][lte]","in":"query","required":false,"description":"Filter lineDiscounts (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[lineDiscounts][in]","in":"query","required":false,"description":"Filter lineDiscounts (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lineDiscounts][notIn]","in":"query","required":false,"description":"Filter lineDiscounts (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lineDiscounts][between]","in":"query","required":false,"description":"Filter lineDiscounts (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[oneTimeDiscount]","in":"query","required":false,"description":"Filter oneTimeDiscount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[oneTimeDiscount][ne]","in":"query","required":false,"description":"Filter oneTimeDiscount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[oneTimeDiscount][gt]","in":"query","required":false,"description":"Filter oneTimeDiscount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[oneTimeDiscount][gte]","in":"query","required":false,"description":"Filter oneTimeDiscount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[oneTimeDiscount][lt]","in":"query","required":false,"description":"Filter oneTimeDiscount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[oneTimeDiscount][lte]","in":"query","required":false,"description":"Filter oneTimeDiscount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[oneTimeDiscount][in]","in":"query","required":false,"description":"Filter oneTimeDiscount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[oneTimeDiscount][notIn]","in":"query","required":false,"description":"Filter oneTimeDiscount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[oneTimeDiscount][between]","in":"query","required":false,"description":"Filter oneTimeDiscount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentsApplied]","in":"query","required":false,"description":"Filter paymentsApplied (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[paymentsApplied][ne]","in":"query","required":false,"description":"Filter paymentsApplied (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[paymentsApplied][gt]","in":"query","required":false,"description":"Filter paymentsApplied (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[paymentsApplied][gte]","in":"query","required":false,"description":"Filter paymentsApplied (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[paymentsApplied][lt]","in":"query","required":false,"description":"Filter paymentsApplied (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[paymentsApplied][lte]","in":"query","required":false,"description":"Filter paymentsApplied (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[paymentsApplied][in]","in":"query","required":false,"description":"Filter paymentsApplied (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentsApplied][notIn]","in":"query","required":false,"description":"Filter paymentsApplied (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentsApplied][between]","in":"query","required":false,"description":"Filter paymentsApplied (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[adjustments]","in":"query","required":false,"description":"Filter adjustments (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[adjustments][ne]","in":"query","required":false,"description":"Filter adjustments (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[adjustments][gt]","in":"query","required":false,"description":"Filter adjustments (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[adjustments][gte]","in":"query","required":false,"description":"Filter adjustments (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[adjustments][lt]","in":"query","required":false,"description":"Filter adjustments (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[adjustments][lte]","in":"query","required":false,"description":"Filter adjustments (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[adjustments][in]","in":"query","required":false,"description":"Filter adjustments (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[adjustments][notIn]","in":"query","required":false,"description":"Filter adjustments (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[adjustments][between]","in":"query","required":false,"description":"Filter adjustments (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","invoiceDate","-invoiceDate","dueDate","-dueDate","lastPaidDate","-lastPaidDate","invoiceStatus","-invoiceStatus","approvalStatus","-approvalStatus","deliveryStatus","-deliveryStatus","disputeStatus","-disputeStatus","dataSource","-dataSource","currency","-currency","customerId","-customerId","entityId","-entityId","salesOrderId","-salesOrderId","paymentTermDays","-paymentTermDays","exchangeRate","-exchangeRate","excludeFromTaxEngine","-excludeFromTaxEngine","subtotal","-subtotal","totalTax","-totalTax","totalDutiesAndCustoms","-totalDutiesAndCustoms","totalAmount","-totalAmount","totalAmountDue","-totalAmountDue","totalCredited","-totalCredited","totalLateFeeAmount","-totalLateFeeAmount","lineDiscounts","-lineDiscounts","oneTimeDiscount","-oneTimeDiscount","paymentsApplied","-paymentsApplied","adjustments","-adjustments","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","invoiceNumber","invoiceDate","dueDate","lastPaidDate","invoiceStatus","approvalStatus","deliveryStatus","disputeStatus","dataSource","currency","customerMessage","externalInvoiceId","invoiceEmail","purchaseOrderOverride","paymentTermDays","exchangeRate","excludeFromTaxEngine","customerId","customerName","customerNumber","entityId","entityName","salesOrderId","salesOrderNumber","subtotal","totalTax","totalDutiesAndCustoms","totalAmount","totalAmountDue","totalCredited","totalLateFeeAmount","lineDiscounts","oneTimeDiscount","paymentsApplied","adjustments","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoicesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List invoices, one row per invoice.","description":"Lists invoices. The collection doesn't include lines, billToAddress, soldToAddress, purchaseOrders, or externalIdentifiers. To get these fields, use GET accounting/invoices/:id or POST accounting/invoices/search.\n\nTo filter by invoiceNumber, customerName, customerNumber, entityName, salesOrderNumber, billToAddress, soldToAddress, invoiceEmail, purchaseOrderOverride, externalInvoiceId, customerMessage, or externalIdentifier, use POST accounting/invoices/search.","tags":["accountingInvoices"]}},"/accounting/books/{id}":{"patch":{"operationId":"updateBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, FIELD_NOT_ALLOWED, INVALID_FIELD_VALUE, REFERENCE_NOT_FOUND, SEED_BOOK_CONSTRAINT, BOOK_FIELD_LOCKED, ENTITY_HIERARCHY_INCOMPLETE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SEED_BOOK_CONSTRAINT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SEED_BOOK_CONSTRAINT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SEED_BOOK_CONSTRAINT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the accounting book to update.","example":"3f2a9c14-6d0b-4b8e-9f1a-2c7d5e8b9a10"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBookInput"}}}},"summary":"Update an accounting book","description":"Updates an accounting book with the fields you send. A field you leave out keeps its current value. The book's type and base book are set at creation and cannot change, and its legal entities change through the entity-assignment endpoints, never here.\n\nOnce the book has transactions, its accountingStandard and exchangeRateGroupId are locked. The tenant's first book must stay assigned to all entities. An adjustment book copies its accounting standard and consolidation from its base book, so neither can be sent for it. Turning consolidation on requires every subsidiary of an assigned legal entity to be assigned too.","tags":["accountingBooks"]},"get":{"operationId":"getBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the accounting book to return."}],"summary":"Retrieve an accounting book","description":"Retrieves an accounting book.","tags":["accountingBooks"]},"delete":{"operationId":"deleteBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, BOOK_NOT_DELETABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"enum":["seedBook","hasDependentBooks","hasTransactions","lastCompleteAssignment"]},"dependentBookIds":{"type":"array","items":{"type":"string"}},"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","dependentBookIds","entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"enum":["seedBook","hasDependentBooks","hasTransactions","lastCompleteAssignment"]},"dependentBookIds":{"type":"array","items":{"type":"string"}},"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","dependentBookIds","entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"enum":["seedBook","hasDependentBooks","hasTransactions","lastCompleteAssignment"]},"dependentBookIds":{"type":"array","items":{"type":"string"}},"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","dependentBookIds","entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the accounting book to delete.","example":"3f2a9c14-6d0b-4b8e-9f1a-2c7d5e8b9a10"}],"summary":"Delete an accounting book","description":"Deletes an accounting book together with its legal entity assignments, their accounting period statuses and tasks, and the default book settings that point to it. The delete is permanent.\n\nThe request fails with BOOK_NOT_DELETABLE for the tenant's first book, for a full book that adjustment books are based on (delete those first), for a book with transactions, and for a book that holds the last complete assignment of an active legal entity (assign the entity to another book first).","tags":["accountingBooks"]}},"/base/entities/{id}":{"patch":{"operationId":"updateEntity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateEntityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"deactivate":{"value":{"data":{}},"summary":"Deactivating an entity as of a date"},"externalIdentifiers":{"value":{"data":{}},"summary":"Adding one external identifier and removing another"},"rename":{"value":{"data":{}},"summary":"A single-field change"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PARENT_ENTITY_NOT_FOUND, FIELD_REQUIRED, FIELD_TOO_LONG, FIELD_NOT_ALLOWED, INVALID_FIELD_VALUE, DUPLICATE_ENTITY_NAME, INVALID_PARENT_ENTITY, INVALID_STATUS_TRANSITION, DATE_CONFLICT, ENTITY_NOT_EDITABLE, ENTITY_HAS_TRANSACTIONS, INCOMPLETE_BOOK_ASSIGNMENT, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentEntityId":{"type":"string","description":"The parentEntityId you sent."}},"additionalProperties":false,"required":["parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing field, for example 'endDate', 'registeredAddress.line1' or 'createExternalIdentifiers[0].value'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'entityName'."},"maxLength":{"type":"number","description":"The most characters the field accepts."}},"additionalProperties":false,"required":["field","maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'currency' or 'updateExternalIdentifiers[0].externalUrl'."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values. Empty for externalUrl, which takes a format rather than a list."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ENTITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityName":{"type":"string","description":"The name you sent."},"existingId":{"type":"string","description":"The id of the entity that already has the name."}},"additionalProperties":false,"required":["entityName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"Why the parent was refused."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STATUS_TRANSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"from":{"type":"string","description":"The current status."},"to":{"type":"string","description":"The status you sent."},"reason":{"type":"string","description":"Why the change was refused."}},"additionalProperties":false,"required":["from","to","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The date field in conflict: 'startDate' or 'endDate'."},"reason":{"type":"string","description":"Why the date was refused."}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field that cannot change."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The locked field: 'currency'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_BOOK_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book whose assignment is incomplete. See id on GET accounting/books/:id."},"field":{"type":"string","description":"The missing part: 'chartOfAccountsId', 'fiscalCalendarId' or 'currency'."}},"additionalProperties":false,"required":["bookId","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The repeated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentEntityId":{"type":"string","description":"The parentEntityId you sent."}},"additionalProperties":false,"required":["parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing field, for example 'endDate', 'registeredAddress.line1' or 'createExternalIdentifiers[0].value'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'entityName'."},"maxLength":{"type":"number","description":"The most characters the field accepts."}},"additionalProperties":false,"required":["field","maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'currency' or 'updateExternalIdentifiers[0].externalUrl'."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values. Empty for externalUrl, which takes a format rather than a list."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ENTITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityName":{"type":"string","description":"The name you sent."},"existingId":{"type":"string","description":"The id of the entity that already has the name."}},"additionalProperties":false,"required":["entityName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"Why the parent was refused."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STATUS_TRANSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"from":{"type":"string","description":"The current status."},"to":{"type":"string","description":"The status you sent."},"reason":{"type":"string","description":"Why the change was refused."}},"additionalProperties":false,"required":["from","to","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The date field in conflict: 'startDate' or 'endDate'."},"reason":{"type":"string","description":"Why the date was refused."}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field that cannot change."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The locked field: 'currency'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_BOOK_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book whose assignment is incomplete. See id on GET accounting/books/:id."},"field":{"type":"string","description":"The missing part: 'chartOfAccountsId', 'fiscalCalendarId' or 'currency'."}},"additionalProperties":false,"required":["bookId","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The repeated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentEntityId":{"type":"string","description":"The parentEntityId you sent."}},"additionalProperties":false,"required":["parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing field, for example 'endDate', 'registeredAddress.line1' or 'createExternalIdentifiers[0].value'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'entityName'."},"maxLength":{"type":"number","description":"The most characters the field accepts."}},"additionalProperties":false,"required":["field","maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field you sent, for example 'currency' or 'updateExternalIdentifiers[0].externalUrl'."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values. Empty for externalUrl, which takes a format rather than a list."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ENTITY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityName":{"type":"string","description":"The name you sent."},"existingId":{"type":"string","description":"The id of the entity that already has the name."}},"additionalProperties":false,"required":["entityName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"Why the parent was refused."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STATUS_TRANSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"from":{"type":"string","description":"The current status."},"to":{"type":"string","description":"The status you sent."},"reason":{"type":"string","description":"Why the change was refused."}},"additionalProperties":false,"required":["from","to","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The date field in conflict: 'startDate' or 'endDate'."},"reason":{"type":"string","description":"Why the date was refused."}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The field that cannot change."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The locked field: 'currency'."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_BOOK_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book whose assignment is incomplete. See id on GET accounting/books/:id."},"field":{"type":"string","description":"The missing part: 'chartOfAccountsId', 'fiscalCalendarId' or 'currency'."}},"additionalProperties":false,"required":["bookId","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The repeated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the entity to update.","examples":{"deactivate":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},"externalIdentifiers":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},"rename":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateEntityInput"},"examples":{"deactivate":{"value":{"status":"inactive","endDate":"2026-12-31"},"summary":"Deactivating an entity as of a date"},"externalIdentifiers":{"value":{"createExternalIdentifiers":[{"fieldName":"netsuiteSubsidiaryId","value":"12"}],"deleteExternalIdentifiers":["legacyErpId"]},"summary":"Adding one external identifier and removing another"},"rename":{"value":{"entityName":"Acme Deutschland GmbH"},"summary":"A single-field change"}}}}},"summary":"Update an entity","description":"Updates an entity with the fields you send. A field you leave out keeps its current value.\n\nStatus moves one way: 'created' to 'active' to 'inactive'. To activate, send status 'active' with a startDate that is not in the future (or rely on the stored one); the entity needs an active parent and at least one complete accounting-book assignment, created on POST accounting/books/entity-assignments and completed on PATCH accounting/books/entity-assignments/:id. To deactivate, send status 'inactive' with an endDate on or after the start date, not after the parent's end date and not before any child's end date; nothing may still depend on the entity. An inactive entity accepts no change: its end date cannot be moved and it cannot be reactivated.\n\nparentEntityId re-parents the entity; it cannot be cleared. A non-legal reporting entity is always top-level and takes no parent (FIELD_NOT_ALLOWED); a legal entity may be moved under one. currency cannot change once the entity has sales arrangements, customers, invoices or journal entries, and it is never copied to a book assignment. When multi-book is off, an entity assigned to a book keeps that book's currency: any other currency fails with INVALID_FIELD_VALUE, and every save aligns a differing stored currency with the book's (ENTITY_HAS_TRANSACTIONS when that would move a locked currency). Any save of an active entity needs its book assignments complete (INCOMPLETE_BOOK_ASSIGNMENT).\n\nClearing: send an empty string to clear country, entityCode, localeCode, registeredAddress.line2, registeredAddress.stateProvince or an external identifier's externalUrl. currency and timeZone cannot be cleared (FIELD_REQUIRED). registeredAddress changes only the sub-fields you send; when the entity has no address yet, send line1, city, country and zipCode to create it.\n\nThe response is empty. Read the updated record with GET base/entities/:id. Every call sends the Api-Version header: a missing or empty header, or an unknown version, answers 400; a route the requested version does not contain answers 404.","tags":["accountingEntities"]},"get":{"operationId":"getEntity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getEntityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the entity to return.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve an entity","description":"Retrieves one entity by its id, with its parent, registered address and external identifiers. Accounting-book membership is not part of this resource; read it on GET accounting/books/:bookId/entity-assignments. Every call sends the Api-Version header: a missing or empty header, or an unknown version, answers 400; a route the requested version does not contain answers 404.","tags":["accountingEntities"]}},"/accounting/performance-obligations/{id}":{"get":{"operationId":"getPerformanceObligation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPerformanceObligationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the performance obligation you want to retrieve."}],"summary":"Retrieve a performance obligation","description":"Retrieves a performance obligation. Use the performance obligation's id, not its performanceObligationNumber.\n\nThe response includes the performance obligation's standalone selling price ranges, but not its product mappings. To get the product mappings, use GET accounting/performance-obligations/:id/products.","tags":["accountingPerformanceObligations"]}},"/accounting/chart-of-accounts/{id}":{"get":{"operationId":"getChartOfAccounts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getChartOfAccountsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the chart of accounts to return."}],"summary":"Retrieve a chart of accounts","description":"Retrieves a chart of accounts.","tags":["accountingChartsOfAccounts"]},"patch":{"operationId":"updateChartOfAccounts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateChartOfAccountsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, FIELD_NOT_UPDATABLE, NAME_REQUIRED, INVALID_ACCOUNT_NUMBERING, INVALID_ACCOUNT_NUMBERING_DIGITS, ACCOUNT_NUMBERING_DIGITS_REQUIRED, ACCOUNT_NUMBERING_DIGITS_NOT_APPLICABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_UPDATABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field you sent."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumbering":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumbering"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING_DIGITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_UPDATABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field you sent."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumbering":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumbering"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING_DIGITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_UPDATABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field you sent."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumbering":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumbering"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING_DIGITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the chart of accounts to update.","example":"4b6f7c1e-2a9d-4e3b-8f51-0c7d2e9a6b14"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateChartOfAccountsInput"}}}},"summary":"Update a chart of accounts","description":"Updates a chart of accounts with the fields you send. A field you leave out keeps its current value.\n\nname and description can always change. accountNumbering and accountNumberingDigits can change only while the chart of accounts has no accounts, draft accounts included; once it has any, sending a different value fails with FIELD_NOT_UPDATABLE. Sending the current value is never a change, so you can send back what you read. Switching to 'manual' clears accountNumberingDigits; switching to 'hierarchical' needs accountNumberingDigits unless the chart of accounts already has one.\n\nAn update never changes which legal entities use the chart of accounts, and never touches its accounts. A request that changes nothing writes nothing, so lastModifiedDate stays as it was.\n\nEvery call needs the Api-Version header (e.g. 'v1'). A missing or empty header, or one that names no API version, answers 400; a route that is not published in the requested version answers 404, the same as an unknown path.","tags":["accountingChartsOfAccounts"]}},"/accounting/reports/financial-statement":{"post":{"operationId":"runFinancialStatement","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/runFinancialStatementOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: STATEMENT_NOT_FOUND, ENTITY_NOT_FOUND, BOOK_NOT_FOUND, PERIOD_NOT_FOUND, PERIODS_REQUIRED, ENTITY_SPLIT_REQUIRES_CONSOLIDATION, MALFORMED_ID, STATEMENT_CALCULATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"STATEMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"statementId":{"type":"string"}},"additionalProperties":false,"required":["statementId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"periodId":{"type":"string"}},"additionalProperties":false,"required":["periodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIODS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_SPLIT_REQUIRES_CONSOLIDATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MALFORMED_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATEMENT_CALCULATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"STATEMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"statementId":{"type":"string"}},"additionalProperties":false,"required":["statementId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"periodId":{"type":"string"}},"additionalProperties":false,"required":["periodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIODS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_SPLIT_REQUIRES_CONSOLIDATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MALFORMED_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATEMENT_CALCULATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/runFinancialStatementInput"}}}},"summary":"Retrieve a financial statement","description":"Retrieves a financial statement. You send one legal entity, one accounting book and the accounting periods in periodIds. When consolidated is true, the report also covers every legal entity beneath that entity.","tags":["accountingReportsFinancialStatement"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/revenue-scheduling-templates":{"get":{"operationId":"revenueSchedulingTemplates","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateNumber]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (equality)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateNumber][ne]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (ne)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateNumber][gt]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (gt)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateNumber][gte]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (gte)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateNumber][lt]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (lt)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateNumber][lte]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (lte)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateNumber][in]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateNumber][notIn]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateNumber][between]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateNumber][like]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateNumber (like)","schema":{"type":"string"}},{"name":"filter[revenueRecognitionPattern]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (equality)","schema":{"type":"string"}},{"name":"filter[revenueRecognitionPattern][ne]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (ne)","schema":{"type":"string"}},{"name":"filter[revenueRecognitionPattern][gt]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (gt)","schema":{"type":"string"}},{"name":"filter[revenueRecognitionPattern][gte]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (gte)","schema":{"type":"string"}},{"name":"filter[revenueRecognitionPattern][lt]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (lt)","schema":{"type":"string"}},{"name":"filter[revenueRecognitionPattern][lte]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (lte)","schema":{"type":"string"}},{"name":"filter[revenueRecognitionPattern][in]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueRecognitionPattern][notIn]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueRecognitionPattern][between]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[revenueRecognitionPattern][like]","in":"query","required":false,"description":"Filter revenueRecognitionPattern (like)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingEvent]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (equality)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingEvent][ne]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (ne)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingEvent][gt]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (gt)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingEvent][gte]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (gte)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingEvent][lt]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (lt)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingEvent][lte]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (lte)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingEvent][in]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueSchedulingEvent][notIn]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueSchedulingEvent][between]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[revenueSchedulingEvent][like]","in":"query","required":false,"description":"Filter revenueSchedulingEvent (like)","schema":{"type":"string"}},{"name":"filter[amortizationMethod]","in":"query","required":false,"description":"Filter amortizationMethod (equality)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][ne]","in":"query","required":false,"description":"Filter amortizationMethod (ne)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][gt]","in":"query","required":false,"description":"Filter amortizationMethod (gt)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][gte]","in":"query","required":false,"description":"Filter amortizationMethod (gte)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][lt]","in":"query","required":false,"description":"Filter amortizationMethod (lt)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][lte]","in":"query","required":false,"description":"Filter amortizationMethod (lte)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][in]","in":"query","required":false,"description":"Filter amortizationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationMethod][notIn]","in":"query","required":false,"description":"Filter amortizationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationMethod][between]","in":"query","required":false,"description":"Filter amortizationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[amortizationMethod][like]","in":"query","required":false,"description":"Filter amortizationMethod (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","revenueSchedulingTemplateNumber","-revenueSchedulingTemplateNumber","revenueSchedulingTemplateName","-revenueSchedulingTemplateName","revenueRecognitionPattern","-revenueRecognitionPattern","revenueSchedulingEvent","-revenueSchedulingEvent","amortizationMethod","-amortizationMethod","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","revenueSchedulingTemplateNumber","revenueSchedulingTemplateName","revenueRecognitionPattern","revenueSchedulingEvent","amortizationMethod","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/revenueSchedulingTemplatesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List revenue scheduling templates","description":"Lists revenue scheduling templates. To filter by name, or by part of a name, use POST accounting/revenue-scheduling-templates/search.","tags":["accountingRevenueSchedulingTemplates"]}},"/accounting/payments":{"get":{"operationId":"payments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[paymentDate]","in":"query","required":false,"description":"Filter paymentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][ne]","in":"query","required":false,"description":"Filter paymentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gt]","in":"query","required":false,"description":"Filter paymentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gte]","in":"query","required":false,"description":"Filter paymentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lt]","in":"query","required":false,"description":"Filter paymentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lte]","in":"query","required":false,"description":"Filter paymentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][in]","in":"query","required":false,"description":"Filter paymentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][notIn]","in":"query","required":false,"description":"Filter paymentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][between]","in":"query","required":false,"description":"Filter paymentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentType]","in":"query","required":false,"description":"Filter paymentType (equality)","schema":{"type":"string"}},{"name":"filter[paymentType][ne]","in":"query","required":false,"description":"Filter paymentType (ne)","schema":{"type":"string"}},{"name":"filter[paymentType][gt]","in":"query","required":false,"description":"Filter paymentType (gt)","schema":{"type":"string"}},{"name":"filter[paymentType][gte]","in":"query","required":false,"description":"Filter paymentType (gte)","schema":{"type":"string"}},{"name":"filter[paymentType][lt]","in":"query","required":false,"description":"Filter paymentType (lt)","schema":{"type":"string"}},{"name":"filter[paymentType][lte]","in":"query","required":false,"description":"Filter paymentType (lte)","schema":{"type":"string"}},{"name":"filter[paymentType][in]","in":"query","required":false,"description":"Filter paymentType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][notIn]","in":"query","required":false,"description":"Filter paymentType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][between]","in":"query","required":false,"description":"Filter paymentType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentType][like]","in":"query","required":false,"description":"Filter paymentType (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[customerPaymentStatus]","in":"query","required":false,"description":"Filter customerPaymentStatus (equality)","schema":{"type":"string"}},{"name":"filter[customerPaymentStatus][ne]","in":"query","required":false,"description":"Filter customerPaymentStatus (ne)","schema":{"type":"string"}},{"name":"filter[customerPaymentStatus][gt]","in":"query","required":false,"description":"Filter customerPaymentStatus (gt)","schema":{"type":"string"}},{"name":"filter[customerPaymentStatus][gte]","in":"query","required":false,"description":"Filter customerPaymentStatus (gte)","schema":{"type":"string"}},{"name":"filter[customerPaymentStatus][lt]","in":"query","required":false,"description":"Filter customerPaymentStatus (lt)","schema":{"type":"string"}},{"name":"filter[customerPaymentStatus][lte]","in":"query","required":false,"description":"Filter customerPaymentStatus (lte)","schema":{"type":"string"}},{"name":"filter[customerPaymentStatus][in]","in":"query","required":false,"description":"Filter customerPaymentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerPaymentStatus][notIn]","in":"query","required":false,"description":"Filter customerPaymentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerPaymentStatus][between]","in":"query","required":false,"description":"Filter customerPaymentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerPaymentStatus][like]","in":"query","required":false,"description":"Filter customerPaymentStatus (like)","schema":{"type":"string"}},{"name":"filter[disputeStatus]","in":"query","required":false,"description":"Filter disputeStatus (equality)","schema":{"type":"string"}},{"name":"filter[disputeStatus][ne]","in":"query","required":false,"description":"Filter disputeStatus (ne)","schema":{"type":"string"}},{"name":"filter[disputeStatus][gt]","in":"query","required":false,"description":"Filter disputeStatus (gt)","schema":{"type":"string"}},{"name":"filter[disputeStatus][gte]","in":"query","required":false,"description":"Filter disputeStatus (gte)","schema":{"type":"string"}},{"name":"filter[disputeStatus][lt]","in":"query","required":false,"description":"Filter disputeStatus (lt)","schema":{"type":"string"}},{"name":"filter[disputeStatus][lte]","in":"query","required":false,"description":"Filter disputeStatus (lte)","schema":{"type":"string"}},{"name":"filter[disputeStatus][in]","in":"query","required":false,"description":"Filter disputeStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[disputeStatus][notIn]","in":"query","required":false,"description":"Filter disputeStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[disputeStatus][between]","in":"query","required":false,"description":"Filter disputeStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[disputeStatus][like]","in":"query","required":false,"description":"Filter disputeStatus (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","paymentDate","-paymentDate","paymentType","-paymentType","currency","-currency","customerPaymentStatus","-customerPaymentStatus","disputeStatus","-disputeStatus","amount","-amount","unappliedAmount","-unappliedAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","paymentNumber","paymentDate","paymentType","currency","paymentAccountCurrency","exchangeRate","amount","appliedAmount","unappliedAmount","refundAmount","bankFeeAmount","smallBalanceWriteOffAmount","totalEarlyPaymentDiscount","customerPaymentStatus","disputeStatus","customerName","customerId","entityId","accountName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/paymentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List payments","description":"Lists payments. The collection doesn't include accountId, thirdPartyPayerId, paymentReference, or paymentNote. To get these fields, use GET accounting/payments/:id or POST accounting/payments/search.","tags":["accountingPayments"]},"post":{"operationId":"createPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_AMOUNT, CUSTOMER_NOT_FOUND, ENTITY_NOT_FOUND, ACCOUNT_NOT_FOUND, THIRD_PARTY_PAYER_NOT_FOUND, DEFAULT_ACCOUNT_NOT_CONFIGURED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"THIRD_PARTY_PAYER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"thirdPartyPayerId":{"type":"string"}},"additionalProperties":false,"required":["thirdPartyPayerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEFAULT_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"THIRD_PARTY_PAYER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"thirdPartyPayerId":{"type":"string"}},"additionalProperties":false,"required":["thirdPartyPayerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEFAULT_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"THIRD_PARTY_PAYER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"thirdPartyPayerId":{"type":"string"}},"additionalProperties":false,"required":["thirdPartyPayerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEFAULT_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPaymentInput"}}}},"summary":"Create a payment","description":"Creates a payment for a customer. The payment isn't applied to any invoice. The response contains only the new payment's id.\n\nTo apply the payment, use POST accounting/payments/:id/apply. To create a payment and apply it to one invoice in one request, use POST accounting/invoices/:id/pay.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPayments"]}},"/accounting/accounts/bulk":{"patch":{"operationId":"bulkUpdateAccounts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkUpdateAccountsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_ALLOWED, DUPLICATE_ACCOUNT_NUMBER, INVALID_PARENT_ACCOUNT, TOP_LEVEL_ACCOUNT_TYPE_IN_USE, ENTITY_NOT_IN_CHART_OF_ACCOUNTS, ACCOUNT_TYPE_LOCKED, CASH_ACCOUNT_IN_USE, ACCOUNT_NOT_EDITABLE, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND, VALIDATION_FAILED, TOO_MANY_ACCOUNTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["index","field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["index","accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["index","parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["index","accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The locked input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountStatus":{"type":"string","description":"The account's current status."}},"additionalProperties":false,"required":["index","accountStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The number of accounts you sent."},"maximum":{"type":"number","description":"The most accounts one call takes."}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["index","field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["index","accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["index","parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["index","accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The locked input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountStatus":{"type":"string","description":"The account's current status."}},"additionalProperties":false,"required":["index","accountStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The number of accounts you sent."},"maximum":{"type":"number","description":"The most accounts one call takes."}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["index","field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["index","accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["index","parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["index","accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The locked input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountStatus":{"type":"string","description":"The account's current status."}},"additionalProperties":false,"required":["index","accountStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The number of accounts you sent."},"maximum":{"type":"number","description":"The most accounts one call takes."}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkUpdateAccountsInput"}}}},"summary":"Update many accounts","description":"Changes many accounts in one call. All-or-nothing: if any row is rejected, nothing is changed and every error carries the row's index. Each row is the same object PATCH accounting/accounts/:id takes, with the account's id in the row. Rows are checked against the accounts as they were before the request, so a row may not move an account under a parent that another row moves or re-types.\n\nAn account that breaks an accounting rule the server enforces, for example switching on revaluation for an account a cash-basis tax rate uses, fails with VALIDATION_FAILED, with the rule's message in reason and, where known, the rule's name in rule.\n\nOne call takes at most 100 accounts; more fails with TOO_MANY_ACCOUNTS before any row is checked. Every request must carry the Api-Version header: a missing or empty header, or one naming no API version, is answered 400; a route that exists but not in the requested version is answered 404.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingAccounts"]},"post":{"operationId":"bulkCreateAccounts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateAccountsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_ALLOWED, DUPLICATE_ACCOUNT_NUMBER, INVALID_PARENT_ACCOUNT, TOP_LEVEL_ACCOUNT_TYPE_IN_USE, ENTITY_NOT_IN_CHART_OF_ACCOUNTS, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, VALIDATION_FAILED, TOO_MANY_ACCOUNTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["index","field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["index","accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["index","parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["index","accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The number of accounts you sent."},"maximum":{"type":"number","description":"The most accounts one call takes."}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["index","field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["index","accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["index","parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["index","accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The number of accounts you sent."},"maximum":{"type":"number","description":"The most accounts one call takes."}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["index","field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["index","accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["index","parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["index","accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["index","entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The position of the offending row in the request, starting at 0."},"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The number of accounts you sent."},"maximum":{"type":"number","description":"The most accounts one call takes."}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateAccountsInput"}}}},"summary":"Create many accounts","description":"Creates many accounts in one call and returns their ids in input order. All-or-nothing: if any row is rejected, nothing is created and every error carries the row's index.\n\nEach row is the same object POST accounting/accounts takes. A parentAccountId must name an account that existed before the request, so a tree is created one level per request.\n\nAn account that breaks an accounting rule the server enforces, for example a bank account for a legal entity whose book has no currency, fails with VALIDATION_FAILED, with the rule's message in reason and, where known, the rule's name in rule.\n\nOne call takes at most 100 accounts; more fails with TOO_MANY_ACCOUNTS before any row is checked. Every request must carry the Api-Version header: a missing or empty header, or one naming no API version, is answered 400; a route that exists but not in the requested version is answered 404.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingAccounts"]}},"/accounting/payments/{id}/unapply":{"post":{"operationId":"unapplyPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/unapplyPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_AMOUNT, INVOICE_NOT_FOUND, LOCKED_ACCOUNTING_PERIOD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCKED_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCKED_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCKED_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payment you want to unapply."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/unapplyPaymentInput"}}}},"summary":"Unapply a payment from invoices","description":"Unapplies a payment from invoices. Each item in invoices adds a negative application for one invoice, so the original application stays on the payment. To apply the payment again, use POST accounting/payments/:id/apply.","tags":["accountingPayments"]}},"/accounting/invoices/search":{"post":{"operationId":"searchInvoice","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInvoiceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_TIMESTAMP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInvoiceInput"}}}},"summary":"Search invoices","description":"Searches invoices.","tags":["accountingInvoices"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/credit-memos":{"post":{"operationId":"createCreditMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createCreditMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CUSTOMER_NOT_FOUND, ENTITY_NOT_FOUND, INVOICE_NOT_FOUND, NO_LINES, INVALID_FIELD_VALUE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected. Absent when the field was omitted."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected. Absent when the field was omitted."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected. Absent when the field was omitted."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createCreditMemoInput"}}}},"summary":"Create a credit memo","description":"Creates a manual credit memo. Each item in applications applies the new credit memo to an invoice, with the same checks as POST accounting/credit-memos/:id/apply. If any application can't be recorded, the credit memo isn't created either.\n\nThe response contains only the new credit memo's id. Read the record with GET accounting/credit-memos/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingCreditMemos"]},"get":{"operationId":"creditMemos","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[creditMemoDate]","in":"query","required":false,"description":"Filter creditMemoDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[creditMemoDate][ne]","in":"query","required":false,"description":"Filter creditMemoDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[creditMemoDate][gt]","in":"query","required":false,"description":"Filter creditMemoDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[creditMemoDate][gte]","in":"query","required":false,"description":"Filter creditMemoDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[creditMemoDate][lt]","in":"query","required":false,"description":"Filter creditMemoDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[creditMemoDate][lte]","in":"query","required":false,"description":"Filter creditMemoDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[creditMemoDate][in]","in":"query","required":false,"description":"Filter creditMemoDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoDate][notIn]","in":"query","required":false,"description":"Filter creditMemoDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoDate][between]","in":"query","required":false,"description":"Filter creditMemoDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[creditMemoStatus]","in":"query","required":false,"description":"Filter creditMemoStatus (equality)","schema":{"type":"string"}},{"name":"filter[creditMemoStatus][ne]","in":"query","required":false,"description":"Filter creditMemoStatus (ne)","schema":{"type":"string"}},{"name":"filter[creditMemoStatus][gt]","in":"query","required":false,"description":"Filter creditMemoStatus (gt)","schema":{"type":"string"}},{"name":"filter[creditMemoStatus][gte]","in":"query","required":false,"description":"Filter creditMemoStatus (gte)","schema":{"type":"string"}},{"name":"filter[creditMemoStatus][lt]","in":"query","required":false,"description":"Filter creditMemoStatus (lt)","schema":{"type":"string"}},{"name":"filter[creditMemoStatus][lte]","in":"query","required":false,"description":"Filter creditMemoStatus (lte)","schema":{"type":"string"}},{"name":"filter[creditMemoStatus][in]","in":"query","required":false,"description":"Filter creditMemoStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoStatus][notIn]","in":"query","required":false,"description":"Filter creditMemoStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoStatus][between]","in":"query","required":false,"description":"Filter creditMemoStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[creditMemoStatus][like]","in":"query","required":false,"description":"Filter creditMemoStatus (like)","schema":{"type":"string"}},{"name":"filter[creditMemoType]","in":"query","required":false,"description":"Filter creditMemoType (equality)","schema":{"type":"string"}},{"name":"filter[creditMemoType][ne]","in":"query","required":false,"description":"Filter creditMemoType (ne)","schema":{"type":"string"}},{"name":"filter[creditMemoType][gt]","in":"query","required":false,"description":"Filter creditMemoType (gt)","schema":{"type":"string"}},{"name":"filter[creditMemoType][gte]","in":"query","required":false,"description":"Filter creditMemoType (gte)","schema":{"type":"string"}},{"name":"filter[creditMemoType][lt]","in":"query","required":false,"description":"Filter creditMemoType (lt)","schema":{"type":"string"}},{"name":"filter[creditMemoType][lte]","in":"query","required":false,"description":"Filter creditMemoType (lte)","schema":{"type":"string"}},{"name":"filter[creditMemoType][in]","in":"query","required":false,"description":"Filter creditMemoType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoType][notIn]","in":"query","required":false,"description":"Filter creditMemoType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoType][between]","in":"query","required":false,"description":"Filter creditMemoType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[creditMemoType][like]","in":"query","required":false,"description":"Filter creditMemoType (like)","schema":{"type":"string"}},{"name":"filter[manualCreditMemoType]","in":"query","required":false,"description":"Filter manualCreditMemoType (equality)","schema":{"type":"string"}},{"name":"filter[manualCreditMemoType][ne]","in":"query","required":false,"description":"Filter manualCreditMemoType (ne)","schema":{"type":"string"}},{"name":"filter[manualCreditMemoType][gt]","in":"query","required":false,"description":"Filter manualCreditMemoType (gt)","schema":{"type":"string"}},{"name":"filter[manualCreditMemoType][gte]","in":"query","required":false,"description":"Filter manualCreditMemoType (gte)","schema":{"type":"string"}},{"name":"filter[manualCreditMemoType][lt]","in":"query","required":false,"description":"Filter manualCreditMemoType (lt)","schema":{"type":"string"}},{"name":"filter[manualCreditMemoType][lte]","in":"query","required":false,"description":"Filter manualCreditMemoType (lte)","schema":{"type":"string"}},{"name":"filter[manualCreditMemoType][in]","in":"query","required":false,"description":"Filter manualCreditMemoType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manualCreditMemoType][notIn]","in":"query","required":false,"description":"Filter manualCreditMemoType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manualCreditMemoType][between]","in":"query","required":false,"description":"Filter manualCreditMemoType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[manualCreditMemoType][like]","in":"query","required":false,"description":"Filter manualCreditMemoType (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[invoiceId]","in":"query","required":false,"description":"Filter invoiceId (equality)","schema":{"type":"string"}},{"name":"filter[invoiceId][ne]","in":"query","required":false,"description":"Filter invoiceId (ne)","schema":{"type":"string"}},{"name":"filter[invoiceId][gt]","in":"query","required":false,"description":"Filter invoiceId (gt)","schema":{"type":"string"}},{"name":"filter[invoiceId][gte]","in":"query","required":false,"description":"Filter invoiceId (gte)","schema":{"type":"string"}},{"name":"filter[invoiceId][lt]","in":"query","required":false,"description":"Filter invoiceId (lt)","schema":{"type":"string"}},{"name":"filter[invoiceId][lte]","in":"query","required":false,"description":"Filter invoiceId (lte)","schema":{"type":"string"}},{"name":"filter[invoiceId][in]","in":"query","required":false,"description":"Filter invoiceId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceId][notIn]","in":"query","required":false,"description":"Filter invoiceId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceId][between]","in":"query","required":false,"description":"Filter invoiceId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceId][like]","in":"query","required":false,"description":"Filter invoiceId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","creditMemoDate","-creditMemoDate","creditMemoStatus","-creditMemoStatus","creditMemoType","-creditMemoType","manualCreditMemoType","-manualCreditMemoType","currency","-currency","customerId","-customerId","entityId","-entityId","invoiceId","-invoiceId","subtotal","-subtotal","totalTax","-totalTax","totalDutiesAndCustoms","-totalDutiesAndCustoms","totalAmountCredited","-totalAmountCredited","appliedAmount","-appliedAmount","unappliedAmount","-unappliedAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","creditMemoNumber","creditMemoDate","creditMemoStatus","creditMemoType","manualCreditMemoType","currency","description","externalCreditMemoId","customerId","customerName","customerNumber","entityId","entityName","invoiceId","invoiceNumber","subtotal","totalTax","totalDutiesAndCustoms","totalAmountCredited","appliedAmount","unappliedAmount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/creditMemosRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List credit memos","description":"Lists credit memos. To filter by credit memo number, customer name or number, entity name, description, or external identifier, use POST accounting/credit-memos/search.","tags":["accountingCreditMemos"]}},"/accounting/books/entity-assignments/{id}":{"get":{"operationId":"getBookEntityAssignment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBookEntityAssignmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the entity assignment to return."}],"summary":"Retrieve an assignment of a legal entity to an accounting book","description":"Retrieves an assignment of a legal entity to an accounting book: the chart of accounts, fiscal calendar and currency the entity uses in that book.","tags":["accountingBooks"]},"patch":{"operationId":"updateBookEntityAssignment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBookEntityAssignmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_ALLOWED, CHART_OF_ACCOUNTS_INCOMPATIBLE, ASSIGNMENT_FIELD_LOCKED, ENTITY_HIERARCHY_INCOMPLETE, ASSIGNMENT_INCOMPLETE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_INCOMPATIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"chartOfAccountsId":{"type":"string"},"parentEntityId":{"type":"string"}},"additionalProperties":false,"required":["chartOfAccountsId","parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"},"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["bookId","missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityId","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_INCOMPATIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"chartOfAccountsId":{"type":"string"},"parentEntityId":{"type":"string"}},"additionalProperties":false,"required":["chartOfAccountsId","parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"},"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["bookId","missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityId","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_INCOMPATIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"chartOfAccountsId":{"type":"string"},"parentEntityId":{"type":"string"}},"additionalProperties":false,"required":["chartOfAccountsId","parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"},"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["bookId","missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityId","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the entity assignment to update.","example":"9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBookEntityAssignmentInput"}}}},"summary":"Update an assignment of a legal entity to an accounting book","description":"Changes the chart of accounts, fiscal calendar or currency a legal entity uses in an accounting book. A property you leave out keeps its current value; null clears it, which an active entity does not allow: an active entity needs all three properties in every book it is assigned to. The book and the entity of an assignment cannot change: delete the assignment and create another.\n\nThe properties are locked once the assignment has transactions, once the entity's assignment to an adjustment book based on this book has them, and, for the chart of accounts, while an intercompany process configured for the entity uses it. A new fiscal calendar rebuilds the entity's accounting period statuses in the book. A change in a full book is copied to the entity's assignments in the adjustment books based on it; an adjustment book's assignment takes its properties from there, so none can be sent for it.","tags":["accountingBooks"]},"delete":{"operationId":"deleteBookEntityAssignment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteBookEntityAssignmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ASSIGNMENT_NOT_REMOVABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_NOT_REMOVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"dependentBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","dependentBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_NOT_REMOVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"dependentBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","dependentBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_NOT_REMOVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"dependentBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["reason","dependentBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the entity assignment to delete.","example":"9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"}],"summary":"Remove a legal entity from an accounting book","description":"Removes a legal entity from an accounting book, together with the entity's accounting period statuses and tasks in the book and its default book settings for the book. The delete is permanent.\n\nThe request fails with ASSIGNMENT_NOT_REMOVABLE when the assignment has transactions, when the book consolidates or is assigned to all entities, while the entity is still assigned to an adjustment book based on this book, while an intercompany process configured for the entity uses its chart of accounts, or when it is the last complete assignment of an active entity.","tags":["accountingBooks"]}},"/accounting/product-lines/search":{"post":{"operationId":"searchAccountingProductLines","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAccountingProductLinesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_TIMESTAMP, UNKNOWN_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAccountingProductLinesInput"}}}},"summary":"Search product lines","description":"Searches product lines.","tags":["accounting/products/productLines"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/sales-returns/search":{"post":{"operationId":"searchAccountingSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAccountingSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_TIMESTAMP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAccountingSalesReturnInput"}}}},"summary":"Search sales returns","description":"Searches sales returns. Each sales return is returned with its lines.","tags":["accountingSalesReturns"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/fiscal-calendars/{id}":{"get":{"operationId":"getFiscalCalendar","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getFiscalCalendarOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fiscal calendar you want to retrieve."}],"summary":"Retrieve a fiscal calendar","description":"Retrieves a fiscal calendar. The response includes the fiscal years the calendar spans and the names of the legal entities it is assigned to.","tags":["accountingFiscalCalendars"]}},"/accounting/refunds/{id}":{"get":{"operationId":"getRefund","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getRefundOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the refund you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a refund","description":"Retrieves a refund. Use the refund's id, not its refundNumber.\n\nGET accounting/refunds and POST accounting/refunds/search return the same fields for each refund.","tags":["accountingRefunds"]},"patch":{"operationId":"updateRefund","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateRefundOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFUND_ALREADY_APPROVED, INVALID_AMOUNT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFUND_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFUND_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFUND_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the refund you want to update.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateRefundInput"}}}},"summary":"Update a refund","description":"Updates a refund with the fields you send. A field you leave out keeps its current value.\n\nUse the refund's id, not its refundNumber.\n\nA refund whose approvalStatus is 'approved' can't be updated. Every refund created with POST accounting/refunds is approved at once, so it can't be changed here. customerId, entityId, paymentId, and currency can't be changed.\n\nThe response is the updated refund. GET accounting/refunds/:id also returns unappliedAmount, refundNote, customerName, and paymentNumber.","tags":["accountingRefunds"]}},"/accounting/credit-memos/{id}/apply":{"post":{"operationId":"applyCreditMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/applyCreditMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVOICE_NOT_FOUND, NO_APPLICATIONS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the credit memo you want to apply."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyCreditMemoInput"}}}},"summary":"Apply a credit memo to invoices","description":"Applies a credit memo to invoices. Each item in applications applies part of the credit memo to one invoice of the same customer. The amount applied to an invoice can't exceed its amount due, and the total can't exceed the credit memo's unapplied amount.\n\nThe response is empty. Read the new allocations in applications on GET accounting/credit-memos/:id. To reverse an allocation, use POST accounting/credit-memos/:id/unapply.","tags":["accountingCreditMemos"]}},"/banking/fund-transfers/{id}/void":{"post":{"operationId":"voidFundTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidFundTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VOID_REASON_REQUIRED, FUND_TRANSFER_ALREADY_VOIDED, POSTING_PERIOD_NOT_OPEN, VOID_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the transfer that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUND_TRANSFER_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fundTransferNumber":{"type":"string","description":"The number of the fund transfer."}},"additionalProperties":false,"required":["fundTransferNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fundTransferNumber":{"type":"string","description":"The number of the fund transfer."}},"additionalProperties":false,"required":["fundTransferNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the transfer that was not voided."},"detail":{"type":"string","description":"The reason the void reported."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the transfer that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUND_TRANSFER_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fundTransferNumber":{"type":"string","description":"The number of the fund transfer."}},"additionalProperties":false,"required":["fundTransferNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fundTransferNumber":{"type":"string","description":"The number of the fund transfer."}},"additionalProperties":false,"required":["fundTransferNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the transfer that was not voided."},"detail":{"type":"string","description":"The reason the void reported."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the transfer that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUND_TRANSFER_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fundTransferNumber":{"type":"string","description":"The number of the fund transfer."}},"additionalProperties":false,"required":["fundTransferNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fundTransferNumber":{"type":"string","description":"The number of the fund transfer."}},"additionalProperties":false,"required":["fundTransferNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the transfer that was not voided."},"detail":{"type":"string","description":"The reason the void reported."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fund transfer you want to void.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidFundTransferInput"}}}},"summary":"Void a fund transfer","description":"Voids a fund transfer. Voiding doesn't delete the transfer. The transfer, its number, and its audit trail stay. There is no endpoint to delete a fund transfer.\n\nThe transfer's journal entry is voided, and no reversing journal entry is created. Amortization schedule journal entries created from the transfer's journal entry are voided too. Any pending approval becomes rejected, and bank transactions matched to the transfer are unmatched.\n\nThe transfer's attachments and lines don't change. A void can't be undone.\n\nThe transfer's accounting period must be open in every legal entity the transfer involves. An intercompany transfer involves two legal entities, and if the period is closed in either one, the request fails with POSTING_PERIOD_NOT_OPEN.\n\nThe response is empty. To see the voided transfer, use GET banking/fund-transfers/:id, where isVoided is true. voidReason is saved on the transfer, but no endpoint returns it.","tags":["bankingFundTransfers"]}},"/accounting/intercompany-bills":{"get":{"operationId":"intercompanyBills","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[fromEntityId]","in":"query","required":false,"description":"Filter fromEntityId (equality)","schema":{"type":"string"}},{"name":"filter[fromEntityId][ne]","in":"query","required":false,"description":"Filter fromEntityId (ne)","schema":{"type":"string"}},{"name":"filter[fromEntityId][gt]","in":"query","required":false,"description":"Filter fromEntityId (gt)","schema":{"type":"string"}},{"name":"filter[fromEntityId][gte]","in":"query","required":false,"description":"Filter fromEntityId (gte)","schema":{"type":"string"}},{"name":"filter[fromEntityId][lt]","in":"query","required":false,"description":"Filter fromEntityId (lt)","schema":{"type":"string"}},{"name":"filter[fromEntityId][lte]","in":"query","required":false,"description":"Filter fromEntityId (lte)","schema":{"type":"string"}},{"name":"filter[fromEntityId][in]","in":"query","required":false,"description":"Filter fromEntityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fromEntityId][notIn]","in":"query","required":false,"description":"Filter fromEntityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fromEntityId][between]","in":"query","required":false,"description":"Filter fromEntityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fromEntityId][like]","in":"query","required":false,"description":"Filter fromEntityId (like)","schema":{"type":"string"}},{"name":"filter[toEntityId]","in":"query","required":false,"description":"Filter toEntityId (equality)","schema":{"type":"string"}},{"name":"filter[toEntityId][ne]","in":"query","required":false,"description":"Filter toEntityId (ne)","schema":{"type":"string"}},{"name":"filter[toEntityId][gt]","in":"query","required":false,"description":"Filter toEntityId (gt)","schema":{"type":"string"}},{"name":"filter[toEntityId][gte]","in":"query","required":false,"description":"Filter toEntityId (gte)","schema":{"type":"string"}},{"name":"filter[toEntityId][lt]","in":"query","required":false,"description":"Filter toEntityId (lt)","schema":{"type":"string"}},{"name":"filter[toEntityId][lte]","in":"query","required":false,"description":"Filter toEntityId (lte)","schema":{"type":"string"}},{"name":"filter[toEntityId][in]","in":"query","required":false,"description":"Filter toEntityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[toEntityId][notIn]","in":"query","required":false,"description":"Filter toEntityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[toEntityId][between]","in":"query","required":false,"description":"Filter toEntityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[toEntityId][like]","in":"query","required":false,"description":"Filter toEntityId (like)","schema":{"type":"string"}},{"name":"filter[intercompanyProcessId]","in":"query","required":false,"description":"Filter intercompanyProcessId (equality)","schema":{"type":"string"}},{"name":"filter[intercompanyProcessId][ne]","in":"query","required":false,"description":"Filter intercompanyProcessId (ne)","schema":{"type":"string"}},{"name":"filter[intercompanyProcessId][gt]","in":"query","required":false,"description":"Filter intercompanyProcessId (gt)","schema":{"type":"string"}},{"name":"filter[intercompanyProcessId][gte]","in":"query","required":false,"description":"Filter intercompanyProcessId (gte)","schema":{"type":"string"}},{"name":"filter[intercompanyProcessId][lt]","in":"query","required":false,"description":"Filter intercompanyProcessId (lt)","schema":{"type":"string"}},{"name":"filter[intercompanyProcessId][lte]","in":"query","required":false,"description":"Filter intercompanyProcessId (lte)","schema":{"type":"string"}},{"name":"filter[intercompanyProcessId][in]","in":"query","required":false,"description":"Filter intercompanyProcessId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[intercompanyProcessId][notIn]","in":"query","required":false,"description":"Filter intercompanyProcessId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[intercompanyProcessId][between]","in":"query","required":false,"description":"Filter intercompanyProcessId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[intercompanyProcessId][like]","in":"query","required":false,"description":"Filter intercompanyProcessId (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[billMarkup]","in":"query","required":false,"description":"Filter billMarkup (equality)","schema":{"type":"string"}},{"name":"filter[billMarkup][ne]","in":"query","required":false,"description":"Filter billMarkup (ne)","schema":{"type":"string"}},{"name":"filter[billMarkup][gt]","in":"query","required":false,"description":"Filter billMarkup (gt)","schema":{"type":"string"}},{"name":"filter[billMarkup][gte]","in":"query","required":false,"description":"Filter billMarkup (gte)","schema":{"type":"string"}},{"name":"filter[billMarkup][lt]","in":"query","required":false,"description":"Filter billMarkup (lt)","schema":{"type":"string"}},{"name":"filter[billMarkup][lte]","in":"query","required":false,"description":"Filter billMarkup (lte)","schema":{"type":"string"}},{"name":"filter[billMarkup][in]","in":"query","required":false,"description":"Filter billMarkup (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billMarkup][notIn]","in":"query","required":false,"description":"Filter billMarkup (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billMarkup][between]","in":"query","required":false,"description":"Filter billMarkup (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billMarkup][like]","in":"query","required":false,"description":"Filter billMarkup (like)","schema":{"type":"string"}},{"name":"filter[billDate]","in":"query","required":false,"description":"Filter billDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][ne]","in":"query","required":false,"description":"Filter billDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][gt]","in":"query","required":false,"description":"Filter billDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][gte]","in":"query","required":false,"description":"Filter billDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][lt]","in":"query","required":false,"description":"Filter billDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][lte]","in":"query","required":false,"description":"Filter billDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][in]","in":"query","required":false,"description":"Filter billDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billDate][notIn]","in":"query","required":false,"description":"Filter billDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billDate][between]","in":"query","required":false,"description":"Filter billDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms]","in":"query","required":false,"description":"Filter paymentTerms (equality)","schema":{"type":"string"}},{"name":"filter[paymentTerms][ne]","in":"query","required":false,"description":"Filter paymentTerms (ne)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gt]","in":"query","required":false,"description":"Filter paymentTerms (gt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gte]","in":"query","required":false,"description":"Filter paymentTerms (gte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lt]","in":"query","required":false,"description":"Filter paymentTerms (lt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lte]","in":"query","required":false,"description":"Filter paymentTerms (lte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][in]","in":"query","required":false,"description":"Filter paymentTerms (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][notIn]","in":"query","required":false,"description":"Filter paymentTerms (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][between]","in":"query","required":false,"description":"Filter paymentTerms (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms][like]","in":"query","required":false,"description":"Filter paymentTerms (like)","schema":{"type":"string"}},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceDate]","in":"query","required":false,"description":"Filter serviceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][ne]","in":"query","required":false,"description":"Filter serviceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gt]","in":"query","required":false,"description":"Filter serviceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gte]","in":"query","required":false,"description":"Filter serviceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lt]","in":"query","required":false,"description":"Filter serviceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lte]","in":"query","required":false,"description":"Filter serviceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][in]","in":"query","required":false,"description":"Filter serviceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][notIn]","in":"query","required":false,"description":"Filter serviceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][between]","in":"query","required":false,"description":"Filter serviceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[postingDirection]","in":"query","required":false,"description":"Filter postingDirection (equality)","schema":{"type":"string"}},{"name":"filter[postingDirection][ne]","in":"query","required":false,"description":"Filter postingDirection (ne)","schema":{"type":"string"}},{"name":"filter[postingDirection][gt]","in":"query","required":false,"description":"Filter postingDirection (gt)","schema":{"type":"string"}},{"name":"filter[postingDirection][gte]","in":"query","required":false,"description":"Filter postingDirection (gte)","schema":{"type":"string"}},{"name":"filter[postingDirection][lt]","in":"query","required":false,"description":"Filter postingDirection (lt)","schema":{"type":"string"}},{"name":"filter[postingDirection][lte]","in":"query","required":false,"description":"Filter postingDirection (lte)","schema":{"type":"string"}},{"name":"filter[postingDirection][in]","in":"query","required":false,"description":"Filter postingDirection (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postingDirection][notIn]","in":"query","required":false,"description":"Filter postingDirection (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postingDirection][between]","in":"query","required":false,"description":"Filter postingDirection (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[postingDirection][like]","in":"query","required":false,"description":"Filter postingDirection (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["billDate","-billDate","dueDate","-dueDate","serviceDate","-serviceDate","status","-status","type","-type","billMarkup","-billMarkup","postingDirection","-postingDirection","currency","-currency","paymentTerms","-paymentTerms","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","intercompanyBillNumber","name","description","fromEntityId","fromEntityName","toEntityId","toEntityName","intercompanyProcessId","intercompanyProcessName","currency","exchangeRate","billMarkup","markupAmount","billDate","paymentTerms","dueDate","serviceDate","status","voidReason","type","postingDirection","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/intercompanyBillsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List intercompany bills","description":"Lists intercompany bills. Each intercompany bill is returned without its lines. To get the lines, use GET accounting/intercompany-bills/:id or POST accounting/intercompany-bills/search. To filter by intercompanyBillNumber, name, description, exchangeRate, markupAmount, or eitherEntityId, use POST accounting/intercompany-bills/search.","tags":["accountingIntercompanyBills"]}},"/accounting/intercompany-bills/search":{"post":{"operationId":"searchIntercompanyBills","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchIntercompanyBillsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchIntercompanyBillsInput"}}}},"summary":"Search intercompany bills","description":"Searches intercompany bills. Each intercompany bill is returned in full, including its lines.","tags":["accountingIntercompanyBills"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/sales-order-shipments/search":{"post":{"operationId":"searchSalesOrderShipments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSalesOrderShipmentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSalesOrderShipmentsInput"}}}},"summary":"Search sales order shipments","description":"Searches sales order shipments. Unlike GET accounting/sales-order-shipments, this endpoint matches part of the carrier, tracking id, shipment number, incoterm, or shipping contact email. It also filters by several statuses at once, by the customer's requested delivery date, and by the shipped sales order product item.","tags":["accountingSalesOrderShipments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/banking/bank-entries/search":{"post":{"operationId":"searchBankEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBankEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBankEntryInput"}}}},"summary":"Search bank entries","description":"Searches bank entries. Each bank entry in the response includes its lines.","tags":["bankingBankEntries"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/banking/credit-card-entries":{"get":{"operationId":"creditCardEntries","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[creditCardEntryNumber]","in":"query","required":false,"description":"Filter creditCardEntryNumber (equality)","schema":{"type":"string"}},{"name":"filter[creditCardEntryNumber][ne]","in":"query","required":false,"description":"Filter creditCardEntryNumber (ne)","schema":{"type":"string"}},{"name":"filter[creditCardEntryNumber][gt]","in":"query","required":false,"description":"Filter creditCardEntryNumber (gt)","schema":{"type":"string"}},{"name":"filter[creditCardEntryNumber][gte]","in":"query","required":false,"description":"Filter creditCardEntryNumber (gte)","schema":{"type":"string"}},{"name":"filter[creditCardEntryNumber][lt]","in":"query","required":false,"description":"Filter creditCardEntryNumber (lt)","schema":{"type":"string"}},{"name":"filter[creditCardEntryNumber][lte]","in":"query","required":false,"description":"Filter creditCardEntryNumber (lte)","schema":{"type":"string"}},{"name":"filter[creditCardEntryNumber][in]","in":"query","required":false,"description":"Filter creditCardEntryNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditCardEntryNumber][notIn]","in":"query","required":false,"description":"Filter creditCardEntryNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditCardEntryNumber][between]","in":"query","required":false,"description":"Filter creditCardEntryNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[creditCardEntryNumber][like]","in":"query","required":false,"description":"Filter creditCardEntryNumber (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceDate]","in":"query","required":false,"description":"Filter serviceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][ne]","in":"query","required":false,"description":"Filter serviceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gt]","in":"query","required":false,"description":"Filter serviceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gte]","in":"query","required":false,"description":"Filter serviceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lt]","in":"query","required":false,"description":"Filter serviceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lte]","in":"query","required":false,"description":"Filter serviceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][in]","in":"query","required":false,"description":"Filter serviceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][notIn]","in":"query","required":false,"description":"Filter serviceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][between]","in":"query","required":false,"description":"Filter serviceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber]","in":"query","required":false,"description":"Filter journalEntryNumber (equality)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][ne]","in":"query","required":false,"description":"Filter journalEntryNumber (ne)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][gt]","in":"query","required":false,"description":"Filter journalEntryNumber (gt)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][gte]","in":"query","required":false,"description":"Filter journalEntryNumber (gte)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][lt]","in":"query","required":false,"description":"Filter journalEntryNumber (lt)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][lte]","in":"query","required":false,"description":"Filter journalEntryNumber (lte)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][in]","in":"query","required":false,"description":"Filter journalEntryNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryNumber][notIn]","in":"query","required":false,"description":"Filter journalEntryNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryNumber][between]","in":"query","required":false,"description":"Filter journalEntryNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[journalEntryNumber][like]","in":"query","required":false,"description":"Filter journalEntryNumber (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","creditCardEntryNumber","-creditCardEntryNumber","transactionDate","-transactionDate","serviceDate","-serviceDate","currency","-currency","status","-status","journalEntryNumber","-journalEntryNumber","origin","-origin","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","creditCardEntryNumber","name","description","transactionDate","serviceDate","currency","status","journalEntryNumber","origin","creditCardAccountName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/creditCardEntriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List credit card entries","description":"Lists credit card entries. The list doesn't include the lines of each entry. To read the lines, use GET banking/credit-card-entries/:id. To filter by credit card account or legal entity, use POST banking/credit-card-entries/search.","tags":["bankingCreditCardEntries"]},"post":{"operationId":"createCreditCardEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createCreditCardEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, REPORTING_TAG_CONFLICT, TAG_VALIDATION_FAILED, TAGS_DISABLED, POSTING_PERIOD_NOT_OPEN, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, GROUPING_ACCOUNT_NOT_ALLOWED, BUSINESS_PARTNER_REQUIRED_FOR_VAT, TAX_CODE_NOT_FOUND, TAX_CODE_AMBIGUOUS, TAX_CODE_ACCOUNT_NOT_CONFIGURED, NO_LINES, ZERO_LINE_AMOUNT, ZERO_TOTAL_AMOUNT, ATTACHMENT_REQUIRED, CROSS_CHARGE_INVALID, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the line."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported, naming the blocking books where it can identify them."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_LINE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_TOTAL_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the line."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported, naming the blocking books where it can identify them."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_LINE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_TOTAL_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the line."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported, naming the blocking books where it can identify them."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_LINE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_TOTAL_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createCreditCardEntryInput"}}}},"summary":"Create a credit card entry","description":"Creates a credit card entry with its lines. If the accounting period that contains transactionDate is closed or locked in every full accounting book of the legal entity, the entry goes into the next period that is open in all of them, up to 11 periods later. If none of those periods is open in every book, or a period is open in some books and closed in others, the request fails with POSTING_PERIOD_NOT_OPEN.\n\nThe response contains only the new entry's id. Read the record with GET banking/credit-card-entries/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingCreditCardEntries"]}},"/accounting/accounting-periods/{id}":{"get":{"operationId":"getAccountingPeriod","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountingPeriodOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the entity-book accounting period record you want to retrieve. This is the id of a record from GET accounting/accounting-periods, not the shared accountingPeriodId."}],"summary":"Retrieve an accounting period","description":"Retrieves an accounting period. The record is one period for one legal entity and one accounting book, so the same period has a separate record for each entity and book. The response includes whether the period accepts new journal entries for that entity and book (postable), and the period-close checklist (closeTasks).","tags":["accountingAccountingPeriods"]}},"/banking/fund-transfers/{id}":{"get":{"operationId":"getFundTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getFundTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fund transfer you want to retrieve.","example":"5d9be174-80c2-465f-a165-9b7bcd59b8cc"}],"summary":"Retrieve a fund transfer","description":"Retrieves a fund transfer. Use the fund transfer's id, not its fundTransferNumber.\n\nEach side of the transfer has one line in lines. A line's accountType says which side it is: 'from' or 'to'. On an intercompany transfer, the two sides belong to different legal entities, and toEntityId is the receiving entity.","tags":["bankingFundTransfers"]},"patch":{"operationId":"updateFundTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateFundTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, SAME_ACCOUNT, TRANSFER_AMOUNT_NOT_POSITIVE, INVALID_EXCHANGE_RATE, GROUPING_ACCOUNT_NOT_ALLOWED, ACCOUNT_CURRENCY_MISSING, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, POSTING_PERIOD_NOT_OPEN","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account named on both sides."}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSFER_AMOUNT_NOT_POSITIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferAmount":{"type":"string","description":"The amount that was rejected."}},"additionalProperties":false,"required":["transferAmount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXCHANGE_RATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exchangeRate":{"type":"string","description":"The rate that was rejected."}},"additionalProperties":false,"required":["exchangeRate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the grouping account."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_CURRENCY_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account with no currency."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent."},"accountCurrency":{"type":"string","description":"The currency the from-account is denominated in."},"accountId":{"type":"string","description":"The identifier of the account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account."},"lineIndex":{"type":"number","description":"Which side of the transfer it is on. 0 is from and 1 is to."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferDate":{"type":"string","description":"The transfer date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The identifier of the legal entity whose books were checked."},"detail":{"type":"string","description":"What the period check reported."}},"additionalProperties":false,"required":["transferDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account named on both sides."}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSFER_AMOUNT_NOT_POSITIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferAmount":{"type":"string","description":"The amount that was rejected."}},"additionalProperties":false,"required":["transferAmount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXCHANGE_RATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exchangeRate":{"type":"string","description":"The rate that was rejected."}},"additionalProperties":false,"required":["exchangeRate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the grouping account."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_CURRENCY_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account with no currency."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent."},"accountCurrency":{"type":"string","description":"The currency the from-account is denominated in."},"accountId":{"type":"string","description":"The identifier of the account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account."},"lineIndex":{"type":"number","description":"Which side of the transfer it is on. 0 is from and 1 is to."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferDate":{"type":"string","description":"The transfer date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The identifier of the legal entity whose books were checked."},"detail":{"type":"string","description":"What the period check reported."}},"additionalProperties":false,"required":["transferDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account named on both sides."}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSFER_AMOUNT_NOT_POSITIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferAmount":{"type":"string","description":"The amount that was rejected."}},"additionalProperties":false,"required":["transferAmount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXCHANGE_RATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exchangeRate":{"type":"string","description":"The rate that was rejected."}},"additionalProperties":false,"required":["exchangeRate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the grouping account."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_CURRENCY_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account with no currency."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent."},"accountCurrency":{"type":"string","description":"The currency the from-account is denominated in."},"accountId":{"type":"string","description":"The identifier of the account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account."},"lineIndex":{"type":"number","description":"Which side of the transfer it is on. 0 is from and 1 is to."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferDate":{"type":"string","description":"The transfer date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The identifier of the legal entity whose books were checked."},"detail":{"type":"string","description":"What the period check reported."}},"additionalProperties":false,"required":["transferDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fund transfer you want to update.","example":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateFundTransferInput"}}}},"summary":"Update a fund transfer","description":"Updates a fund transfer with the fields you send. A field you leave out keeps its current value, except toAmount. When you leave out toAmount, the 'to' line's amount goes back to transferAmount.\n\nUse the fund transfer's id, not its fundTransferNumber.\n\nEvery update creates the two lines again from the transfer, so changing fromAccountId, toAccountId, transferAmount, or toAmount changes the lines. You can't edit lines directly.\n\nThe response is empty. To read the updated transfer, use GET banking/fund-transfers/:id.","tags":["bankingFundTransfers"]}},"/banking/credit-card-entries/{id}/void":{"post":{"operationId":"voidCreditCardEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidCreditCardEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VOID_REASON_REQUIRED, CREDIT_CARD_ENTRY_ALREADY_VOIDED, POSTING_PERIOD_NOT_OPEN, MISSING_POSTING_CONTEXT, VOID_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_CARD_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditCardEntryNumber":{"type":"string","description":"The credit card entry number."}},"additionalProperties":false,"required":["creditCardEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditCardEntryNumber":{"type":"string","description":"The credit card entry number."}},"additionalProperties":false,"required":["creditCardEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_CARD_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditCardEntryNumber":{"type":"string","description":"The credit card entry number."}},"additionalProperties":false,"required":["creditCardEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditCardEntryNumber":{"type":"string","description":"The credit card entry number."}},"additionalProperties":false,"required":["creditCardEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_CARD_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditCardEntryNumber":{"type":"string","description":"The credit card entry number."}},"additionalProperties":false,"required":["creditCardEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditCardEntryNumber":{"type":"string","description":"The credit card entry number."}},"additionalProperties":false,"required":["creditCardEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the credit card entry you want to void.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidCreditCardEntryInput"}}}},"summary":"Void a credit card entry","description":"Voids a credit card entry. The journal entry that the credit card entry created is voided too, and no reversing journal entry is created. The credit card entry keeps its number, lines, and attachments. There is no endpoint to delete a credit card entry.\n\nVoiding also voids the journal entries of the amortization schedules on the entry's lines, rejects any pending approval, and unmatches the bank transactions matched to the entry. Voiding can't be undone.\n\nThe entry's accounting period must be open. No read endpoint returns voidReason, which is recorded in the audit trail.\n\nThe response is empty. Read the entry with GET banking/credit-card-entries/:id to see its status 'Voided'.","tags":["bankingCreditCardEntries"]}},"/accounting/tax-configurations/search":{"post":{"operationId":"searchTaxConfiguration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchTaxConfigurationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchTaxConfigurationInput"}}}},"summary":"Search tax configurations","description":"Searches tax configurations. Each tax configuration in the response includes its tax codes and the general ledger accounts of each tax code.","tags":["accountingTaxConfigurations"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/invoice-milestones/{id}/release":{"post":{"operationId":"releaseInvoiceMilestone","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/releaseInvoiceMilestoneOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NO_PRODUCT_LINES, SALES_ORDER_NOT_APPROVED, ALREADY_RELEASED, ALREADY_INVOICED, PERIOD_NOT_OPEN","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_RELEASED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released again."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date","description":"The invoice date that was refused. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_RELEASED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released again."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date","description":"The invoice date that was refused. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_RELEASED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released again."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that was not released."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date","description":"The invoice date that was refused. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice milestone you want to release.","example":"4b8f2d61-0c3e-4f7a-9a15-6e2d8c90b7a4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/releaseInvoiceMilestoneInput"}}}},"summary":"Release an invoice milestone for invoicing","description":"Releases an open invoice milestone for invoicing on invoiceDate. No invoice is created now: the milestone gets an invoice plan line for each of its product lines, and the invoice run, or creating invoices from the sales order, invoices it once invoiceDate is reached.\n\nThe accounting period of invoiceDate must be open. A released milestone can't be changed; unrelease it with POST accounting/invoice-milestones/:id/unrelease while it is not invoiced yet.\n\nThe response is empty. Read the milestone with GET accounting/invoice-milestones/:id to see its status 'released'.","tags":["accountingInvoiceMilestones"]}},"/accounting/usages/ingest":{"post":{"operationId":"ingestUsage","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ingestUsageOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: MAPPING_NOT_FOUND, PROCESSING_FAILED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MAPPING_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mapping":{"type":"string"}},"additionalProperties":false,"required":["mapping"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROCESSING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MAPPING_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mapping":{"type":"string"}},"additionalProperties":false,"required":["mapping"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROCESSING_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ingestUsageInput"}}}},"summary":"Ingest usage records","description":"Ingests one or more usage records. The column mapping is applied to the records, and then they're imported in the background. To wait until the import finishes before the response, set sync to true.\n\nThe response contains a dataExtractionId. To see the outcome of each record, pass it to GET accounting/usages/ingestions.","tags":["accountingUsages"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/banking/credit-card-entries/search":{"post":{"operationId":"searchCreditCardEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchCreditCardEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchCreditCardEntryInput"}}}},"summary":"Search credit card entries","description":"Searches credit card entries. Each credit card entry in the results includes its lines, unlike GET banking/credit-card-entries.","tags":["bankingCreditCardEntries"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/sales-orders/search":{"post":{"operationId":"searchSalesOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSalesOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSalesOrderInput"}}}},"summary":"Search sales orders","description":"Searches sales orders.","tags":["accountingSalesOrders"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/customers/{id}":{"get":{"operationId":"getCustomer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getCustomerOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the customer you want to retrieve."}],"summary":"Retrieve a customer","description":"Retrieves a customer. Use the customer's id, not its customerNumber.","tags":["accountingCustomers"]},"patch":{"operationId":"updateCustomer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateCustomerOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"addresses":{"value":{"data":{}},"summary":"Correcting one address, adding another and removing a third — everything else left alone"},"basic":{"value":{"data":{}},"summary":"A single-field change"},"entityMove":{"value":{"data":{}},"summary":"Moving a customer to another legal entity, with the currency and payment term that entity bills in"},"externalIdentifiers":{"value":{"data":{}},"summary":"Adding one external identifier and removing another"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_ENTITY, PAYMENT_TERM_NOT_AVAILABLE_FOR_ENTITY, INVALID_FIELD_VALUE, MULTIPLE_DEFAULT_ADDRESSES, DUPLICATE_CUSTOMER, END_CUSTOMER_NOT_SUPPORTED, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND, ADDRESS_NOT_FOUND, CUSTOMER_TYPE_CHANGE_NOT_ALLOWED, UNKNOWN_REFERENCE, UNKNOWN_PAYMENT_PROVIDER, PAYMENT_METHOD_REQUIRES_CUSTOMER_ID, EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_AVAILABLE_FOR_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTermCode":{"type":"string"}},"additionalProperties":false,"required":["paymentTermCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_DEFAULT_ADDRESSES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"type":{"type":"string"}},"additionalProperties":false,"required":["type"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"customerType":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["name","customerType","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressId":{"type":"string"}},"additionalProperties":false,"required":["addressId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_TYPE_CHANGE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false,"required":["from","to"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"uuid":{"type":"string"}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PAYMENT_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provider":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["provider","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_METHOD_REQUIRES_CUSTOMER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_AVAILABLE_FOR_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTermCode":{"type":"string"}},"additionalProperties":false,"required":["paymentTermCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_DEFAULT_ADDRESSES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"type":{"type":"string"}},"additionalProperties":false,"required":["type"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"customerType":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["name","customerType","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressId":{"type":"string"}},"additionalProperties":false,"required":["addressId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_TYPE_CHANGE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false,"required":["from","to"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"uuid":{"type":"string"}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PAYMENT_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provider":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["provider","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_METHOD_REQUIRES_CUSTOMER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_AVAILABLE_FOR_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTermCode":{"type":"string"}},"additionalProperties":false,"required":["paymentTermCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_DEFAULT_ADDRESSES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"type":{"type":"string"}},"additionalProperties":false,"required":["type"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"customerType":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["name","customerType","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressId":{"type":"string"}},"additionalProperties":false,"required":["addressId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_TYPE_CHANGE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"additionalProperties":false,"required":["from","to"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"uuid":{"type":"string"}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PAYMENT_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provider":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["provider","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_METHOD_REQUIRES_CUSTOMER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the customer you want to update.","examples":{"addresses":{"value":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"},"basic":{"value":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"},"entityMove":{"value":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"},"externalIdentifiers":{"value":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCustomerInput"},"examples":{"addresses":{"value":{"updateAddresses":[{"addressId":"c1f8a2b4-5d6e-4f70-8a91-2b3c4d5e6f70","line1":"501 Market St"}],"createAddresses":[{"type":"soldTo","line1":"12 Bishopsgate","city":"London","country":"GB","zipCode":"EC2N 4AJ"}],"deleteAddresses":["7a6b5c4d-3e2f-4108-9b8a-7c6d5e4f3a21"]},"summary":"Correcting one address, adding another and removing a third — everything else left alone"},"basic":{"value":{"invoiceEmail":"ap@example-robotics.com"},"summary":"A single-field change"},"entityMove":{"value":{"entityId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","defaultCurrency":"EUR","paymentTermCode":"net30"},"summary":"Moving a customer to another legal entity, with the currency and payment term that entity bills in"},"externalIdentifiers":{"value":{"createExternalIdentifiers":[{"fieldName":"netsuiteCustomerId","value":"CUST-9981"}],"deleteExternalIdentifiers":["legacyCrmId"]},"summary":"Adding one external identifier and removing another"}}}}},"summary":"Update a customer","description":"Updates a customer with the fields you send. A field you leave out keeps its current value. To clear a field that accepts null, send null.\n\nUse the customer's id, not its customerNumber.\n\ntaxRegistrations and addresses each replace the whole list, so include every item you want to keep. To change addresses one at a time, use createAddresses, updateAddresses, and deleteAddresses. External identifiers change through createExternalIdentifiers, updateExternalIdentifiers, and deleteExternalIdentifiers.\n\nTo move the customer to another legal entity, send entityId. Documents created afterward use the new legal entity. Existing sales orders, invoices, and payments keep the legal entity they were created under. The customer keeps its payment term unless you also send paymentTermCode, and the request fails with PAYMENT_TERM_NOT_AVAILABLE_FOR_ENTITY when the new legal entity doesn't have that payment term. defaultCurrency doesn't change, so send it too if the new legal entity uses another currency.\n\nIf you change name, customerType, or entityId, another customer with the same name, legal entity, and customer type makes the request fail with DUPLICATE_CUSTOMER.\n\nThe response is empty. Read the updated record with GET accounting/customers/:id.","tags":["accountingCustomers"]}},"/accounting/sales-order-shipments":{"post":{"operationId":"createSalesOrderShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSalesOrderShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: SALES_ORDER_NOT_FOUND, WAREHOUSE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseId":{"type":"string"}},"additionalProperties":false,"required":["warehouseId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseId":{"type":"string"}},"additionalProperties":false,"required":["warehouseId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseId":{"type":"string"}},"additionalProperties":false,"required":["warehouseId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSalesOrderShipmentInput"}}}},"summary":"Ship a sales order","description":"Ships an approved sales order to its customer. The request drafts the shipment in inventory, then creates this sales order shipment, linked to the inventory shipment by inventoryShipmentId. The lines come from the sales order's inventory products and their items, and can't be sent in the request.\n\nThe new shipment starts at 'pendingShipment' with shippedQty 0 on every line. Inventory fills in the quantities when the shipment is committed there.\n\nBesides SALES_ORDER_NOT_FOUND and WAREHOUSE_NOT_FOUND, the request fails with a localized message when the sales order isn't approved, or has no inventory products or no inventory product items. The request also fails when no inventory implementation is registered.\n\nThe response contains only the new shipment's id. Read the shipment number and inventoryShipmentId with GET accounting/sales-order-shipments/:id. You can set carrier, trackingId, incoterm, warehouseId, shipToContactEmail, customerRequestDate, and deliveryDate here or later with PATCH accounting/sales-order-shipments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingSalesOrderShipments"]},"get":{"operationId":"listSalesOrderShipments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listSalesOrderShipmentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_FILTER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"salesOrderId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments that fulfill this sales order. See id on GET accounting/sales-orders/:id.","example":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"},{"name":"inventoryShipmentId","in":"query","required":false,"schema":{"type":"number"},"description":"Limits results to the shipment mirroring this inventory shipment, given as its numeric inventory shipment id. At most one shipment matches."},{"name":"warehouseId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments dispatched from this warehouse location. See id on GET inventory/warehouses/:id."},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments in this state. Accepted values: 'pendingShipment', 'shipped', 'cancelled'. Any other value matches no shipment. Use search to match several states at once.","example":"shipped"},{"name":"shipDateFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments dispatched on or after this date, inclusive. Format YYYY-MM-DD. Shipments with no ship date are excluded once this bound is given."},{"name":"shipDateTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments dispatched on or before this date, inclusive. Format YYYY-MM-DD."},{"name":"deliveryDateFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments delivered, or expected to be delivered, on or after this date, inclusive. Format YYYY-MM-DD."},{"name":"deliveryDateTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments delivered, or expected to be delivered, on or before this date, inclusive. Format YYYY-MM-DD."},{"name":"modifiedFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments changed at or after this time, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ in UTC."},{"name":"modifiedTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to shipments changed at or before this time, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ in UTC."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit for the first page."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of shipments per page. Defaults to 50. A value above 200 is treated as 200, not rejected.","example":50}],"summary":"List sales order shipments","description":"Lists sales order shipments. Each shipment is returned with its lines. The date and time filters include their bounds, so a shipment exactly on a bound is returned again by the next range. Deduplicate on id when you page an incremental sync with modifiedFrom.\n\nThis endpoint doesn't follow the standard rules in Pagination and querying. Page with `pageSize` and `cursor`, not `page[size]` and `page[cursor]`. The records are in `data.items`, and the next page's cursor is in `data.pagination.nextCursor`.\n\nFilter with the plain query parameters listed below, such as `status`, not `filter[field][op]`. There is no `sort` or `fields`. Any query parameter the endpoint doesn't declare is ignored without an error, so a request that follows the standard rules gets the first page, unfiltered, every time.\n\nTo match on carrier, tracking id, shipment number, incoterm, or the shipping contact email, use POST accounting/sales-order-shipments/search. The search endpoint also filters by several statuses at once, by the customer's requested date, and by a shipped sales order product item.","tags":["accountingSalesOrderShipments"]}},"/accounting/chart-of-accounts":{"post":{"operationId":"createChartOfAccounts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createChartOfAccountsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_REQUIRED, INVALID_ACCOUNT_NUMBERING, INVALID_ACCOUNT_NUMBERING_DIGITS, ACCOUNT_NUMBERING_DIGITS_NOT_APPLICABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumbering":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumbering"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING_DIGITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumbering":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumbering"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING_DIGITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumbering":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumbering"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT_NUMBERING_DIGITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NUMBERING_DIGITS_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumberingDigits":{"type":"string","description":"The value you sent, returned unchanged."}},"additionalProperties":false,"required":["accountNumberingDigits"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createChartOfAccountsInput"}}}},"summary":"Create a chart of accounts","description":"Creates a chart of accounts with no accounts and no legal entities assigned.\n\naccountNumbering and accountNumberingDigits can be changed with PATCH accounting/chart-of-accounts/:id until the chart of accounts has accounts. With only a name, the chart of accounts is numbered hierarchically with six-digit account numbers, as in the app's New chart of accounts dialog. A manually numbered chart of accounts takes no accountNumberingDigits.\n\nThe response contains only the new chart of accounts' id. Read it with GET accounting/chart-of-accounts/:id.\n\nEvery call needs the Api-Version header (e.g. 'v1'). A missing or empty header, or one that names no API version, answers 400; a route that is not published in the requested version answers 404, the same as an unknown path.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingChartsOfAccounts"]},"get":{"operationId":"chartsOfAccounts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[accountNumbering]","in":"query","required":false,"description":"Filter accountNumbering (equality)","schema":{"type":"string"}},{"name":"filter[accountNumbering][ne]","in":"query","required":false,"description":"Filter accountNumbering (ne)","schema":{"type":"string"}},{"name":"filter[accountNumbering][gt]","in":"query","required":false,"description":"Filter accountNumbering (gt)","schema":{"type":"string"}},{"name":"filter[accountNumbering][gte]","in":"query","required":false,"description":"Filter accountNumbering (gte)","schema":{"type":"string"}},{"name":"filter[accountNumbering][lt]","in":"query","required":false,"description":"Filter accountNumbering (lt)","schema":{"type":"string"}},{"name":"filter[accountNumbering][lte]","in":"query","required":false,"description":"Filter accountNumbering (lte)","schema":{"type":"string"}},{"name":"filter[accountNumbering][in]","in":"query","required":false,"description":"Filter accountNumbering (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumbering][notIn]","in":"query","required":false,"description":"Filter accountNumbering (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumbering][between]","in":"query","required":false,"description":"Filter accountNumbering (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountNumbering][like]","in":"query","required":false,"description":"Filter accountNumbering (like)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits]","in":"query","required":false,"description":"Filter accountNumberingDigits (equality)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][ne]","in":"query","required":false,"description":"Filter accountNumberingDigits (ne)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][gt]","in":"query","required":false,"description":"Filter accountNumberingDigits (gt)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][gte]","in":"query","required":false,"description":"Filter accountNumberingDigits (gte)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][lt]","in":"query","required":false,"description":"Filter accountNumberingDigits (lt)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][lte]","in":"query","required":false,"description":"Filter accountNumberingDigits (lte)","schema":{"type":"string"}},{"name":"filter[accountNumberingDigits][in]","in":"query","required":false,"description":"Filter accountNumberingDigits (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumberingDigits][notIn]","in":"query","required":false,"description":"Filter accountNumberingDigits (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumberingDigits][between]","in":"query","required":false,"description":"Filter accountNumberingDigits (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountNumberingDigits][like]","in":"query","required":false,"description":"Filter accountNumberingDigits (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","accountNumbering","-accountNumbering","accountNumberingDigits","-accountNumberingDigits","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","accountNumbering","accountNumberingDigits","description","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/chartsOfAccountsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List charts of accounts","description":"Lists charts of accounts. By default, the list is ordered by name. To match on name or description, use POST accounting/chart-of-accounts/search.","tags":["accountingChartsOfAccounts"]}},"/banking/bank-accounts/{id}":{"patch":{"operationId":"updateBankAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBankAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, INVALID_QR_IBAN, DUPLICATE_EXTERNAL_ACCOUNT_ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account or financialInstitution."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QR_IBAN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string","description":"The reference that failed the QR-IBAN check."}},"additionalProperties":false,"required":["reference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ACCOUNT_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The externalAccountId that is already taken."},"existingId":{"type":"string","description":"The identifier of the account that already has it."}},"additionalProperties":false,"required":["externalAccountId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account or financialInstitution."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QR_IBAN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string","description":"The reference that failed the QR-IBAN check."}},"additionalProperties":false,"required":["reference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ACCOUNT_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The externalAccountId that is already taken."},"existingId":{"type":"string","description":"The identifier of the account that already has it."}},"additionalProperties":false,"required":["externalAccountId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account or financialInstitution."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QR_IBAN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string","description":"The reference that failed the QR-IBAN check."}},"additionalProperties":false,"required":["reference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ACCOUNT_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The externalAccountId that is already taken."},"existingId":{"type":"string","description":"The identifier of the account that already has it."}},"additionalProperties":false,"required":["externalAccountId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank account you want to update.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBankAccountInput"}}}},"summary":"Update a bank account","description":"Updates a bank account with the fields you send. A field you leave out keeps its current value.\n\nThis endpoint can't change reconciliationStartDate or paymentAllowed. Both are set when the bank account is created.\n\nThe response is empty. Read the result with GET banking/bank-accounts/:id.","tags":["bankingBankAccounts"]},"get":{"operationId":"getBankAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBankAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank account you want to retrieve.","example":"d5397c8b-6d2b-47e9-83a3-712d9180711e"}],"summary":"Retrieve a bank account","description":"Retrieves a bank account. The response includes the bank account's full payment details: reference, bankAccountCode, and bankAccountHolderName. Show mask where the full account number isn't needed.\n\nA bank account deleted with DELETE banking/bank-accounts/:id isn't returned, and the request fails with NOT_FOUND.","tags":["bankingBankAccounts"]},"delete":{"operationId":"deleteBankAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteBankAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, BANK_ACCOUNT_IN_USE, REMOVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the account that was refused."},"matchStatus":{"type":"string","description":"The match status of the transaction that blocked the delete, either 'matched' or 'autoMatched'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REMOVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the account that was not removed."},"detail":{"type":"string","description":"The reason the removal reported."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the account that was refused."},"matchStatus":{"type":"string","description":"The match status of the transaction that blocked the delete, either 'matched' or 'autoMatched'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REMOVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the account that was not removed."},"detail":{"type":"string","description":"The reason the removal reported."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the account that was refused."},"matchStatus":{"type":"string","description":"The match status of the transaction that blocked the delete, either 'matched' or 'autoMatched'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REMOVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the account that was not removed."},"detail":{"type":"string","description":"The reason the removal reported."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank account you want to delete.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"summary":"Delete a bank account","description":"Deletes a bank account. This is a recoverable soft delete. The response is empty. The account is flagged deleted, unlinked from its chart of accounts, and, for an integration account that has a fingerprint, added to the recovery list behind \"Recover Accounts\". It disappears from the get, list and search endpoints at once, because those return only accounts that are not deleted. Two accounts get no recovery row and cannot be restored this way: a manual account, and any account without a fingerprint.\n\nThis is not the counterpart of DELETE banking/bank-transactions/:id, which is an irreversible hard delete.\n\nUnmatched and suggested transactions on the account are hard-deleted as part of the removal, and for a SaltEdge account the bank consent is revoked. An account that has a matched or auto-matched transaction is refused with BANK_ACCOUNT_IN_USE. The underlying action can override that case, and it is deliberately not published, so this endpoint cannot force it through.","tags":["bankingBankAccounts"]}},"/accounting/pricing":{"get":{"operationId":"pricing","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[productLineId]","in":"query","required":false,"description":"Filter productLineId (equality)","schema":{"type":"string"}},{"name":"filter[productLineId][ne]","in":"query","required":false,"description":"Filter productLineId (ne)","schema":{"type":"string"}},{"name":"filter[productLineId][gt]","in":"query","required":false,"description":"Filter productLineId (gt)","schema":{"type":"string"}},{"name":"filter[productLineId][gte]","in":"query","required":false,"description":"Filter productLineId (gte)","schema":{"type":"string"}},{"name":"filter[productLineId][lt]","in":"query","required":false,"description":"Filter productLineId (lt)","schema":{"type":"string"}},{"name":"filter[productLineId][lte]","in":"query","required":false,"description":"Filter productLineId (lte)","schema":{"type":"string"}},{"name":"filter[productLineId][in]","in":"query","required":false,"description":"Filter productLineId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productLineId][notIn]","in":"query","required":false,"description":"Filter productLineId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productLineId][between]","in":"query","required":false,"description":"Filter productLineId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productLineId][like]","in":"query","required":false,"description":"Filter productLineId (like)","schema":{"type":"string"}},{"name":"filter[productId]","in":"query","required":false,"description":"Filter productId (equality)","schema":{"type":"string"}},{"name":"filter[productId][ne]","in":"query","required":false,"description":"Filter productId (ne)","schema":{"type":"string"}},{"name":"filter[productId][gt]","in":"query","required":false,"description":"Filter productId (gt)","schema":{"type":"string"}},{"name":"filter[productId][gte]","in":"query","required":false,"description":"Filter productId (gte)","schema":{"type":"string"}},{"name":"filter[productId][lt]","in":"query","required":false,"description":"Filter productId (lt)","schema":{"type":"string"}},{"name":"filter[productId][lte]","in":"query","required":false,"description":"Filter productId (lte)","schema":{"type":"string"}},{"name":"filter[productId][in]","in":"query","required":false,"description":"Filter productId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productId][notIn]","in":"query","required":false,"description":"Filter productId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productId][between]","in":"query","required":false,"description":"Filter productId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productId][like]","in":"query","required":false,"description":"Filter productId (like)","schema":{"type":"string"}},{"name":"filter[priceBookId]","in":"query","required":false,"description":"Filter priceBookId (equality)","schema":{"type":"string"}},{"name":"filter[priceBookId][ne]","in":"query","required":false,"description":"Filter priceBookId (ne)","schema":{"type":"string"}},{"name":"filter[priceBookId][gt]","in":"query","required":false,"description":"Filter priceBookId (gt)","schema":{"type":"string"}},{"name":"filter[priceBookId][gte]","in":"query","required":false,"description":"Filter priceBookId (gte)","schema":{"type":"string"}},{"name":"filter[priceBookId][lt]","in":"query","required":false,"description":"Filter priceBookId (lt)","schema":{"type":"string"}},{"name":"filter[priceBookId][lte]","in":"query","required":false,"description":"Filter priceBookId (lte)","schema":{"type":"string"}},{"name":"filter[priceBookId][in]","in":"query","required":false,"description":"Filter priceBookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priceBookId][notIn]","in":"query","required":false,"description":"Filter priceBookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priceBookId][between]","in":"query","required":false,"description":"Filter priceBookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[priceBookId][like]","in":"query","required":false,"description":"Filter priceBookId (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[validFrom]","in":"query","required":false,"description":"Filter validFrom (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[validFrom][ne]","in":"query","required":false,"description":"Filter validFrom (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[validFrom][gt]","in":"query","required":false,"description":"Filter validFrom (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[validFrom][gte]","in":"query","required":false,"description":"Filter validFrom (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[validFrom][lt]","in":"query","required":false,"description":"Filter validFrom (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[validFrom][lte]","in":"query","required":false,"description":"Filter validFrom (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[validFrom][in]","in":"query","required":false,"description":"Filter validFrom (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[validFrom][notIn]","in":"query","required":false,"description":"Filter validFrom (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[validFrom][between]","in":"query","required":false,"description":"Filter validFrom (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[validTo]","in":"query","required":false,"description":"Filter validTo (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[validTo][ne]","in":"query","required":false,"description":"Filter validTo (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[validTo][gt]","in":"query","required":false,"description":"Filter validTo (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[validTo][gte]","in":"query","required":false,"description":"Filter validTo (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[validTo][lt]","in":"query","required":false,"description":"Filter validTo (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[validTo][lte]","in":"query","required":false,"description":"Filter validTo (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[validTo][in]","in":"query","required":false,"description":"Filter validTo (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[validTo][notIn]","in":"query","required":false,"description":"Filter validTo (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[validTo][between]","in":"query","required":false,"description":"Filter validTo (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource]","in":"query","required":false,"description":"Filter dataSource (equality)","schema":{"type":"string"}},{"name":"filter[dataSource][ne]","in":"query","required":false,"description":"Filter dataSource (ne)","schema":{"type":"string"}},{"name":"filter[dataSource][gt]","in":"query","required":false,"description":"Filter dataSource (gt)","schema":{"type":"string"}},{"name":"filter[dataSource][gte]","in":"query","required":false,"description":"Filter dataSource (gte)","schema":{"type":"string"}},{"name":"filter[dataSource][lt]","in":"query","required":false,"description":"Filter dataSource (lt)","schema":{"type":"string"}},{"name":"filter[dataSource][lte]","in":"query","required":false,"description":"Filter dataSource (lte)","schema":{"type":"string"}},{"name":"filter[dataSource][in]","in":"query","required":false,"description":"Filter dataSource (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][notIn]","in":"query","required":false,"description":"Filter dataSource (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][between]","in":"query","required":false,"description":"Filter dataSource (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource][like]","in":"query","required":false,"description":"Filter dataSource (like)","schema":{"type":"string"}},{"name":"filter[hasBeenUsed]","in":"query","required":false,"description":"Filter hasBeenUsed (equality)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][ne]","in":"query","required":false,"description":"Filter hasBeenUsed (ne)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][gt]","in":"query","required":false,"description":"Filter hasBeenUsed (gt)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][gte]","in":"query","required":false,"description":"Filter hasBeenUsed (gte)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][lt]","in":"query","required":false,"description":"Filter hasBeenUsed (lt)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][lte]","in":"query","required":false,"description":"Filter hasBeenUsed (lte)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][in]","in":"query","required":false,"description":"Filter hasBeenUsed (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasBeenUsed][notIn]","in":"query","required":false,"description":"Filter hasBeenUsed (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasBeenUsed][between]","in":"query","required":false,"description":"Filter hasBeenUsed (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[createdDate]","in":"query","required":false,"description":"Filter createdDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][ne]","in":"query","required":false,"description":"Filter createdDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gt]","in":"query","required":false,"description":"Filter createdDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gte]","in":"query","required":false,"description":"Filter createdDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lt]","in":"query","required":false,"description":"Filter createdDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lte]","in":"query","required":false,"description":"Filter createdDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][in]","in":"query","required":false,"description":"Filter createdDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][notIn]","in":"query","required":false,"description":"Filter createdDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][between]","in":"query","required":false,"description":"Filter createdDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","productLineId","-productLineId","productLineName","-productLineName","productId","-productId","productName","-productName","priceBookId","-priceBookId","priceBookName","-priceBookName","currency","-currency","dataSource","-dataSource","hasBeenUsed","-hasBeenUsed","validFrom","-validFrom","validTo","-validTo","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","headerNumber","productLineId","productLineName","productLineNumber","productId","productName","priceBookId","priceBookName","currency","validFrom","validTo","dataSource","hasBeenUsed","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/pricingRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List pricing headers","description":"Lists pricing headers. Each item is the pricing header without its price book entries. To get the entries, with their rate-card entries and external identifiers, use GET accounting/pricing/:id or POST accounting/pricing/search. To filter by free text, header number, or an entry's external identifier, use POST accounting/pricing/search.","tags":["accounting/products/productLines"]}},"/accounting/sales-returns/{id}/cancel":{"post":{"operationId":"cancelAccountingSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/cancelAccountingSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales return you want to cancel."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cancelAccountingSalesReturnInput"}}}},"summary":"Cancel a sales return","description":"Cancels a sales return. Each line of the sales return is set to 'cancelled' too.","tags":["accountingSalesReturns"]}},"/accounting/price-books/search":{"post":{"operationId":"searchPriceBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPriceBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPriceBookInput"}}}},"summary":"Search price books","description":"Searches price books.","tags":["accountingPriceBooks"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/intercompany-bills/{id}":{"get":{"operationId":"getIntercompanyBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getIntercompanyBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the intercompany bill you want to retrieve."}],"summary":"Retrieve an intercompany bill","description":"Retrieves an intercompany bill. Use the intercompany bill's id, not its intercompanyBillNumber.\n\nThe response includes the bill's lines.","tags":["accountingIntercompanyBills"]}},"/accounting/accounts":{"get":{"operationId":"accounts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[accountNumber]","in":"query","required":false,"description":"Filter accountNumber (equality)","schema":{"type":"string"}},{"name":"filter[accountNumber][ne]","in":"query","required":false,"description":"Filter accountNumber (ne)","schema":{"type":"string"}},{"name":"filter[accountNumber][gt]","in":"query","required":false,"description":"Filter accountNumber (gt)","schema":{"type":"string"}},{"name":"filter[accountNumber][gte]","in":"query","required":false,"description":"Filter accountNumber (gte)","schema":{"type":"string"}},{"name":"filter[accountNumber][lt]","in":"query","required":false,"description":"Filter accountNumber (lt)","schema":{"type":"string"}},{"name":"filter[accountNumber][lte]","in":"query","required":false,"description":"Filter accountNumber (lte)","schema":{"type":"string"}},{"name":"filter[accountNumber][in]","in":"query","required":false,"description":"Filter accountNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumber][notIn]","in":"query","required":false,"description":"Filter accountNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountNumber][between]","in":"query","required":false,"description":"Filter accountNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountNumber][like]","in":"query","required":false,"description":"Filter accountNumber (like)","schema":{"type":"string"}},{"name":"filter[accountType]","in":"query","required":false,"description":"Filter accountType (equality)","schema":{"type":"string"}},{"name":"filter[accountType][ne]","in":"query","required":false,"description":"Filter accountType (ne)","schema":{"type":"string"}},{"name":"filter[accountType][gt]","in":"query","required":false,"description":"Filter accountType (gt)","schema":{"type":"string"}},{"name":"filter[accountType][gte]","in":"query","required":false,"description":"Filter accountType (gte)","schema":{"type":"string"}},{"name":"filter[accountType][lt]","in":"query","required":false,"description":"Filter accountType (lt)","schema":{"type":"string"}},{"name":"filter[accountType][lte]","in":"query","required":false,"description":"Filter accountType (lte)","schema":{"type":"string"}},{"name":"filter[accountType][in]","in":"query","required":false,"description":"Filter accountType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountType][notIn]","in":"query","required":false,"description":"Filter accountType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountType][between]","in":"query","required":false,"description":"Filter accountType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountType][like]","in":"query","required":false,"description":"Filter accountType (like)","schema":{"type":"string"}},{"name":"filter[accountSubType]","in":"query","required":false,"description":"Filter accountSubType (equality)","schema":{"type":"string"}},{"name":"filter[accountSubType][ne]","in":"query","required":false,"description":"Filter accountSubType (ne)","schema":{"type":"string"}},{"name":"filter[accountSubType][gt]","in":"query","required":false,"description":"Filter accountSubType (gt)","schema":{"type":"string"}},{"name":"filter[accountSubType][gte]","in":"query","required":false,"description":"Filter accountSubType (gte)","schema":{"type":"string"}},{"name":"filter[accountSubType][lt]","in":"query","required":false,"description":"Filter accountSubType (lt)","schema":{"type":"string"}},{"name":"filter[accountSubType][lte]","in":"query","required":false,"description":"Filter accountSubType (lte)","schema":{"type":"string"}},{"name":"filter[accountSubType][in]","in":"query","required":false,"description":"Filter accountSubType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountSubType][notIn]","in":"query","required":false,"description":"Filter accountSubType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountSubType][between]","in":"query","required":false,"description":"Filter accountSubType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountSubType][like]","in":"query","required":false,"description":"Filter accountSubType (like)","schema":{"type":"string"}},{"name":"filter[accountStatus]","in":"query","required":false,"description":"Filter accountStatus (equality)","schema":{"type":"string"}},{"name":"filter[accountStatus][ne]","in":"query","required":false,"description":"Filter accountStatus (ne)","schema":{"type":"string"}},{"name":"filter[accountStatus][gt]","in":"query","required":false,"description":"Filter accountStatus (gt)","schema":{"type":"string"}},{"name":"filter[accountStatus][gte]","in":"query","required":false,"description":"Filter accountStatus (gte)","schema":{"type":"string"}},{"name":"filter[accountStatus][lt]","in":"query","required":false,"description":"Filter accountStatus (lt)","schema":{"type":"string"}},{"name":"filter[accountStatus][lte]","in":"query","required":false,"description":"Filter accountStatus (lte)","schema":{"type":"string"}},{"name":"filter[accountStatus][in]","in":"query","required":false,"description":"Filter accountStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountStatus][notIn]","in":"query","required":false,"description":"Filter accountStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountStatus][between]","in":"query","required":false,"description":"Filter accountStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountStatus][like]","in":"query","required":false,"description":"Filter accountStatus (like)","schema":{"type":"string"}},{"name":"filter[chartOfAccountsId]","in":"query","required":false,"description":"Filter chartOfAccountsId (equality)","schema":{"type":"string"}},{"name":"filter[chartOfAccountsId][ne]","in":"query","required":false,"description":"Filter chartOfAccountsId (ne)","schema":{"type":"string"}},{"name":"filter[chartOfAccountsId][gt]","in":"query","required":false,"description":"Filter chartOfAccountsId (gt)","schema":{"type":"string"}},{"name":"filter[chartOfAccountsId][gte]","in":"query","required":false,"description":"Filter chartOfAccountsId (gte)","schema":{"type":"string"}},{"name":"filter[chartOfAccountsId][lt]","in":"query","required":false,"description":"Filter chartOfAccountsId (lt)","schema":{"type":"string"}},{"name":"filter[chartOfAccountsId][lte]","in":"query","required":false,"description":"Filter chartOfAccountsId (lte)","schema":{"type":"string"}},{"name":"filter[chartOfAccountsId][in]","in":"query","required":false,"description":"Filter chartOfAccountsId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[chartOfAccountsId][notIn]","in":"query","required":false,"description":"Filter chartOfAccountsId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[chartOfAccountsId][between]","in":"query","required":false,"description":"Filter chartOfAccountsId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[chartOfAccountsId][like]","in":"query","required":false,"description":"Filter chartOfAccountsId (like)","schema":{"type":"string"}},{"name":"filter[parentAccountId]","in":"query","required":false,"description":"Filter parentAccountId (equality)","schema":{"type":"string"}},{"name":"filter[parentAccountId][ne]","in":"query","required":false,"description":"Filter parentAccountId (ne)","schema":{"type":"string"}},{"name":"filter[parentAccountId][gt]","in":"query","required":false,"description":"Filter parentAccountId (gt)","schema":{"type":"string"}},{"name":"filter[parentAccountId][gte]","in":"query","required":false,"description":"Filter parentAccountId (gte)","schema":{"type":"string"}},{"name":"filter[parentAccountId][lt]","in":"query","required":false,"description":"Filter parentAccountId (lt)","schema":{"type":"string"}},{"name":"filter[parentAccountId][lte]","in":"query","required":false,"description":"Filter parentAccountId (lte)","schema":{"type":"string"}},{"name":"filter[parentAccountId][in]","in":"query","required":false,"description":"Filter parentAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentAccountId][notIn]","in":"query","required":false,"description":"Filter parentAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentAccountId][between]","in":"query","required":false,"description":"Filter parentAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentAccountId][like]","in":"query","required":false,"description":"Filter parentAccountId (like)","schema":{"type":"string"}},{"name":"filter[groupingAccount]","in":"query","required":false,"description":"Filter groupingAccount (equality)","schema":{"type":"boolean"}},{"name":"filter[groupingAccount][ne]","in":"query","required":false,"description":"Filter groupingAccount (ne)","schema":{"type":"boolean"}},{"name":"filter[groupingAccount][gt]","in":"query","required":false,"description":"Filter groupingAccount (gt)","schema":{"type":"boolean"}},{"name":"filter[groupingAccount][gte]","in":"query","required":false,"description":"Filter groupingAccount (gte)","schema":{"type":"boolean"}},{"name":"filter[groupingAccount][lt]","in":"query","required":false,"description":"Filter groupingAccount (lt)","schema":{"type":"boolean"}},{"name":"filter[groupingAccount][lte]","in":"query","required":false,"description":"Filter groupingAccount (lte)","schema":{"type":"boolean"}},{"name":"filter[groupingAccount][in]","in":"query","required":false,"description":"Filter groupingAccount (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupingAccount][notIn]","in":"query","required":false,"description":"Filter groupingAccount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupingAccount][between]","in":"query","required":false,"description":"Filter groupingAccount (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[revaluation]","in":"query","required":false,"description":"Filter revaluation (equality)","schema":{"type":"boolean"}},{"name":"filter[revaluation][ne]","in":"query","required":false,"description":"Filter revaluation (ne)","schema":{"type":"boolean"}},{"name":"filter[revaluation][gt]","in":"query","required":false,"description":"Filter revaluation (gt)","schema":{"type":"boolean"}},{"name":"filter[revaluation][gte]","in":"query","required":false,"description":"Filter revaluation (gte)","schema":{"type":"boolean"}},{"name":"filter[revaluation][lt]","in":"query","required":false,"description":"Filter revaluation (lt)","schema":{"type":"boolean"}},{"name":"filter[revaluation][lte]","in":"query","required":false,"description":"Filter revaluation (lte)","schema":{"type":"boolean"}},{"name":"filter[revaluation][in]","in":"query","required":false,"description":"Filter revaluation (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revaluation][notIn]","in":"query","required":false,"description":"Filter revaluation (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revaluation][between]","in":"query","required":false,"description":"Filter revaluation (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[payOnBehalf]","in":"query","required":false,"description":"Filter payOnBehalf (equality)","schema":{"type":"boolean"}},{"name":"filter[payOnBehalf][ne]","in":"query","required":false,"description":"Filter payOnBehalf (ne)","schema":{"type":"boolean"}},{"name":"filter[payOnBehalf][gt]","in":"query","required":false,"description":"Filter payOnBehalf (gt)","schema":{"type":"boolean"}},{"name":"filter[payOnBehalf][gte]","in":"query","required":false,"description":"Filter payOnBehalf (gte)","schema":{"type":"boolean"}},{"name":"filter[payOnBehalf][lt]","in":"query","required":false,"description":"Filter payOnBehalf (lt)","schema":{"type":"boolean"}},{"name":"filter[payOnBehalf][lte]","in":"query","required":false,"description":"Filter payOnBehalf (lte)","schema":{"type":"boolean"}},{"name":"filter[payOnBehalf][in]","in":"query","required":false,"description":"Filter payOnBehalf (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payOnBehalf][notIn]","in":"query","required":false,"description":"Filter payOnBehalf (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payOnBehalf][between]","in":"query","required":false,"description":"Filter payOnBehalf (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[elimination]","in":"query","required":false,"description":"Filter elimination (equality)","schema":{"type":"boolean"}},{"name":"filter[elimination][ne]","in":"query","required":false,"description":"Filter elimination (ne)","schema":{"type":"boolean"}},{"name":"filter[elimination][gt]","in":"query","required":false,"description":"Filter elimination (gt)","schema":{"type":"boolean"}},{"name":"filter[elimination][gte]","in":"query","required":false,"description":"Filter elimination (gte)","schema":{"type":"boolean"}},{"name":"filter[elimination][lt]","in":"query","required":false,"description":"Filter elimination (lt)","schema":{"type":"boolean"}},{"name":"filter[elimination][lte]","in":"query","required":false,"description":"Filter elimination (lte)","schema":{"type":"boolean"}},{"name":"filter[elimination][in]","in":"query","required":false,"description":"Filter elimination (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[elimination][notIn]","in":"query","required":false,"description":"Filter elimination (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[elimination][between]","in":"query","required":false,"description":"Filter elimination (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[exchangeRateType]","in":"query","required":false,"description":"Filter exchangeRateType (equality)","schema":{"type":"string"}},{"name":"filter[exchangeRateType][ne]","in":"query","required":false,"description":"Filter exchangeRateType (ne)","schema":{"type":"string"}},{"name":"filter[exchangeRateType][gt]","in":"query","required":false,"description":"Filter exchangeRateType (gt)","schema":{"type":"string"}},{"name":"filter[exchangeRateType][gte]","in":"query","required":false,"description":"Filter exchangeRateType (gte)","schema":{"type":"string"}},{"name":"filter[exchangeRateType][lt]","in":"query","required":false,"description":"Filter exchangeRateType (lt)","schema":{"type":"string"}},{"name":"filter[exchangeRateType][lte]","in":"query","required":false,"description":"Filter exchangeRateType (lte)","schema":{"type":"string"}},{"name":"filter[exchangeRateType][in]","in":"query","required":false,"description":"Filter exchangeRateType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[exchangeRateType][notIn]","in":"query","required":false,"description":"Filter exchangeRateType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[exchangeRateType][between]","in":"query","required":false,"description":"Filter exchangeRateType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[exchangeRateType][like]","in":"query","required":false,"description":"Filter exchangeRateType (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","accountNumber","-accountNumber","accountType","-accountType","accountSubType","-accountSubType","accountStatus","-accountStatus","chartOfAccountsId","-chartOfAccountsId","groupingAccount","-groupingAccount","entityId","-entityId","currency","-currency","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","accountNumber","accountName","accountType","accountSubType","accountStatus","description","chartOfAccountsId","parentAccountId","groupingAccount","entityId","currency","revaluation","revaluationMode","payOnBehalf","elimination","exchangeRateType","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/accountsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List accounts","description":"Lists accounts. The items don't include externalIdentifiers, which GET accounting/accounts/:id returns.\n\nTo match on name or by external identifier, use POST accounting/accounts/search.","tags":["accountingAccounts"]},"post":{"operationId":"createAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_ALLOWED, DUPLICATE_ACCOUNT_NUMBER, INVALID_PARENT_ACCOUNT, TOP_LEVEL_ACCOUNT_TYPE_IN_USE, ENTITY_NOT_IN_CHART_OF_ACCOUNTS, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAccountInput"}}}},"summary":"Create an account","description":"Creates one account in a chart of accounts and returns its id. Read the stored account with GET accounting/accounts/:id: the server derives the account number under hierarchical numbering, the exchange-rate type, and the stored revaluation mode.\n\nA bank or credit-card account needs entityId and currency, and a new cash account is created for it. A grouping account takes no sub-type, entity, currency or revaluation mode. Fields that do not apply are rejected with FIELD_NOT_ALLOWED.\n\nAn account that breaks an accounting rule the server enforces, for example a bank account for a legal entity whose book has no currency, fails with VALIDATION_FAILED, with the rule's message in reason and, where known, the rule's name in rule. Every request must carry the Api-Version header: a missing or empty header, or one naming no API version, is answered 400; a route that exists but not in the requested version is answered 404.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingAccounts"]}},"/accounting/credit-memos/{id}":{"patch":{"operationId":"updateCreditMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateCreditMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, LINE_NOT_FOUND, LINE_DESCRIPTION_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_DESCRIPTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_DESCRIPTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_DESCRIPTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the credit memo you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCreditMemoInput"}}}},"summary":"Update a credit memo","description":"Updates a credit memo with the fields you send. A field you leave out keeps its current value. updateLines changes only the description of each line you name, and a line you leave out keeps its description.\n\nUse the credit memo's id, not its creditMemoNumber.\n\nThe response is empty. To apply the credit memo to invoices, use POST accounting/credit-memos/:id/apply.","tags":["accountingCreditMemos"]},"get":{"operationId":"getCreditMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getCreditMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the credit memo you want to retrieve."}],"summary":"Retrieve a credit memo","description":"Retrieves a credit memo. Use the credit memo's id, not its creditMemoNumber.\n\n`pdf` holds a short-lived file handle for the credit memo PDF: exchange it at `GET /public/files/{handle}` for the file, or at `GET /public/files/{handle}/metadata` for its name, type and size. The PDF always reflects the credit memo as it is now, applications included; it is generated on this call when the credit memo changed since the last one. Read the credit memo again for a fresh handle once it has expired.","tags":["accountingCreditMemos"]}},"/accounting/journal-entries":{"get":{"operationId":"journalEntries","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[consolidationAdjustmentType]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (equality)","schema":{"type":"string"}},{"name":"filter[consolidationAdjustmentType][ne]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (ne)","schema":{"type":"string"}},{"name":"filter[consolidationAdjustmentType][gt]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (gt)","schema":{"type":"string"}},{"name":"filter[consolidationAdjustmentType][gte]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (gte)","schema":{"type":"string"}},{"name":"filter[consolidationAdjustmentType][lt]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (lt)","schema":{"type":"string"}},{"name":"filter[consolidationAdjustmentType][lte]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (lte)","schema":{"type":"string"}},{"name":"filter[consolidationAdjustmentType][in]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[consolidationAdjustmentType][notIn]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[consolidationAdjustmentType][between]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[consolidationAdjustmentType][like]","in":"query","required":false,"description":"Filter consolidationAdjustmentType (like)","schema":{"type":"string"}},{"name":"filter[postingDate]","in":"query","required":false,"description":"Filter postingDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[postingDate][ne]","in":"query","required":false,"description":"Filter postingDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[postingDate][gt]","in":"query","required":false,"description":"Filter postingDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[postingDate][gte]","in":"query","required":false,"description":"Filter postingDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[postingDate][lt]","in":"query","required":false,"description":"Filter postingDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[postingDate][lte]","in":"query","required":false,"description":"Filter postingDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[postingDate][in]","in":"query","required":false,"description":"Filter postingDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postingDate][notIn]","in":"query","required":false,"description":"Filter postingDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postingDate][between]","in":"query","required":false,"description":"Filter postingDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookName]","in":"query","required":false,"description":"Filter bookName (equality)","schema":{"type":"string"}},{"name":"filter[bookName][ne]","in":"query","required":false,"description":"Filter bookName (ne)","schema":{"type":"string"}},{"name":"filter[bookName][gt]","in":"query","required":false,"description":"Filter bookName (gt)","schema":{"type":"string"}},{"name":"filter[bookName][gte]","in":"query","required":false,"description":"Filter bookName (gte)","schema":{"type":"string"}},{"name":"filter[bookName][lt]","in":"query","required":false,"description":"Filter bookName (lt)","schema":{"type":"string"}},{"name":"filter[bookName][lte]","in":"query","required":false,"description":"Filter bookName (lte)","schema":{"type":"string"}},{"name":"filter[bookName][in]","in":"query","required":false,"description":"Filter bookName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookName][notIn]","in":"query","required":false,"description":"Filter bookName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookName][between]","in":"query","required":false,"description":"Filter bookName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookName][like]","in":"query","required":false,"description":"Filter bookName (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","status","-status","type","-type","postingDate","-postingDate","bookName","-bookName","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","status","type","consolidationAdjustmentType","approvalStatus","postingDate","reversalDate","reversalReason","reversalDescription","description","url","bookName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/journalEntriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List journal entries","description":"Lists journal entries. Each journal entry in the list has no lines. To read a journal entry with its lines, use GET accounting/journal-entries/:id or POST accounting/journal-entries/search.","tags":["accountingJournalEntries"]},"post":{"operationId":"createJournalEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createJournalEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_REVERSAL_REASON, REFERENCED_RECORD_NOT_FOUND, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createJournalEntryInput"}}}},"summary":"Create a journal entry","description":"Creates a manual journal entry. The journal entry is created with its debit and credit lines, unposted and pending approval. The journal entry is then approved at once if no approval policy applies, or if your approval completes the approvals the policy requires.\n\nApproval posts the journal entry to the general ledger. Until then, the journal entry stays unposted.\n\nThe response contains only the new journal entry's id. Read the journal entry with GET accounting/journal-entries/:id.\n\nA journal entry an accounting rule rejects, for example one whose debits and credits do not balance, is not created. The request fails with VALIDATION_FAILED, with the rule's message in reason and, where known, the rule's name in rule.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingJournalEntries"]}},"/accounting/performance-obligations/search":{"post":{"operationId":"searchPerformanceObligation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPerformanceObligationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPerformanceObligationInput"}}}},"summary":"Search performance obligations","description":"Searches performance obligations. Each item includes the performance obligation's standalone selling price ranges, but not its product mappings. To get an obligation's product mappings, use GET accounting/performance-obligations/:id/products.","tags":["accountingPerformanceObligations"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/chart-of-accounts/search":{"post":{"operationId":"searchChartOfAccounts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchChartOfAccountsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_PAGE_SIZE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_PAGE_SIZE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The page size you sent."},"maximum":{"type":"number","description":"The largest page size this endpoint accepts."}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_PAGE_SIZE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The page size you sent."},"maximum":{"type":"number","description":"The largest page size this endpoint accepts."}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchChartOfAccountsInput"}}}},"summary":"Search charts of accounts","description":"Searches charts of accounts.","tags":["accountingChartsOfAccounts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/payments/{id}":{"patch":{"operationId":"updatePayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_AMOUNT, ACCOUNT_NOT_FOUND, THIRD_PARTY_PAYER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"THIRD_PARTY_PAYER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"thirdPartyPayerId":{"type":"string"}},"additionalProperties":false,"required":["thirdPartyPayerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"THIRD_PARTY_PAYER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"thirdPartyPayerId":{"type":"string"}},"additionalProperties":false,"required":["thirdPartyPayerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"THIRD_PARTY_PAYER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"thirdPartyPayerId":{"type":"string"}},"additionalProperties":false,"required":["thirdPartyPayerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payment you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePaymentInput"}}}},"summary":"Update a payment","description":"Updates a payment with the fields you send. A field you leave out keeps its current value. To clear paymentReference, paymentNote, bankFeeAmount, or thirdPartyPayerId, send null.\n\nUse the payment's id, not its paymentNumber.","tags":["accountingPayments"]},"get":{"operationId":"getPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payment you want to retrieve."}],"summary":"Retrieve a payment","description":"Retrieves a payment. Use the payment's id, not its paymentNumber.","tags":["accountingPayments"]}},"/accounting/reports/trial-balance/search":{"post":{"operationId":"searchTrialBalance","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchTrialBalanceOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"functionalDebit":{"type":"string","format":"decimal"},"functionalCredit":{"type":"string","format":"decimal"},"difference":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["functionalDebit","functionalCredit","difference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_REPORT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false},"examples":{"balanced":{"value":{"data":{"items":[{"accountId":"64e38cef-4809-47b8-b014-59065920d070","accountNumber":"111100","accountName":"Banks","accountType":"asset","isGroupingAccount":true,"parentAccountId":"fdab0cfb-add5-4c96-bc58-41a2a81bda65","functionalStartingBalance":"0","functionalDebit":"5004791.99","functionalCredit":"514762.02","functionalEndingBalance":"4490029.97"},{"accountId":"0383f7c4-6176-4dc3-89e7-48c49511070f","accountNumber":"111101","accountName":"Chase Checking","accountType":"asset","isGroupingAccount":false,"parentAccountId":"64e38cef-4809-47b8-b014-59065920d070","functionalStartingBalance":"0","functionalDebit":"5000701.99","functionalCredit":"503350.02","functionalEndingBalance":"4497351.97"}],"totals":{"functionalStartingBalance":"0","functionalDebit":"6156388.01","functionalCredit":"6156388.01","functionalEndingBalance":"0"},"tiesOut":true,"reportingCurrency":"USD"}},"summary":"A full year on the posting-date axis, single entity. Debits equal credits, so the report ties out."},"emptyWindow":{"value":{"data":{"items":[],"totals":{"functionalStartingBalance":"0","functionalDebit":"0","functionalCredit":"0","functionalEndingBalance":"0"},"tiesOut":true,"reportingCurrency":"USD"}},"summary":"A window before any posting exists. The scope resolved, so this is a genuinely empty period rather than a failed lookup, and it comes back as an empty items array with an EMPTY_REPORT warning."}}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE_RANGE, ENTITY_NOT_FOUND, BOOK_NOT_FOUND, CONSOLIDATION_ACCOUNT_MAPPING_MISSING, CONSOLIDATION_RATES_NOT_CONFIGURED, EXCHANGE_RATE_NOT_FOUND, TRIAL_BALANCE_CALCULATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNT_MAPPING_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_RATES_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_CALCULATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"functionalDebit":{"type":"string","format":"decimal"},"functionalCredit":{"type":"string","format":"decimal"},"difference":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["functionalDebit","functionalCredit","difference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_REPORT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNT_MAPPING_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_RATES_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_CALCULATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRIAL_BALANCE_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"functionalDebit":{"type":"string","format":"decimal"},"functionalCredit":{"type":"string","format":"decimal"},"difference":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["functionalDebit","functionalCredit","difference"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_REPORT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchTrialBalanceInput"},"examples":{"balanced":{"value":{"entityId":"ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3","bookId":"8d534b26-2998-40dd-8727-9fe3f89ff503","consolidated":false,"startDate":"2025-01-01","endDate":"2025-12-31","dateAxis":"postingDate"},"summary":"A full year on the posting-date axis, single entity. Debits equal credits, so the report ties out."},"emptyWindow":{"value":{"entityId":"ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3","bookId":"8d534b26-2998-40dd-8727-9fe3f89ff503","consolidated":false,"startDate":"1990-01-01","endDate":"1990-01-31","dateAxis":"postingDate"},"summary":"A window before any posting exists. The scope resolved, so this is a genuinely empty period rather than a failed lookup, and it comes back as an empty items array with an EMPTY_REPORT warning."}}}}},"summary":"Retrieve a trial balance","description":"Retrieves the trial balance for one legal entity, book, and date range. The response has one item per account with a balance or a movement between startDate and endDate. The items cover the whole chart of accounts, so they include grouping accounts as well as the accounts below them.\n\nA grouping account's figures repeat the sums of the accounts below it. To add up the report, sum only the items where isGroupingAccount is false, or use totals.\n\nThe report is not paginated, because a partial page would not balance.","tags":["accounting/reports/trialBalances"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/revenue-contracts/search":{"post":{"operationId":"searchRevenueContract","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchRevenueContractOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchRevenueContractInput"}}}},"summary":"Search revenue contracts","description":"Searches revenue contracts. Each revenue contract is returned in full, with its revenue lines, each line's revenue plan, and the plan's periods. For a smaller list without the revenue lines, use GET accounting/revenue-contracts.","tags":["accountingRevenueContracts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/usages/{id}":{"get":{"operationId":"getUsage","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getUsageOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the usage record you want to retrieve."}],"summary":"Retrieve a usage record","description":"Retrieves a usage record.","tags":["accountingUsages"]}},"/accounting/sales-returns/{id}":{"patch":{"operationId":"updateAccountingSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAccountingSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales return you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAccountingSalesReturnInput"}}}},"summary":"Update a sales return","description":"Updates a sales return with the fields you send. A field you leave out keeps its current value.\n\nUse the sales return's id, not its salesReturnNumber. To clear a field, send null.\n\nThe response is empty. Read the updated sales return with GET accounting/sales-returns/:id.","tags":["accountingSalesReturns"]},"get":{"operationId":"getAccountingSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountingSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales return you want to retrieve."}],"summary":"Retrieve a sales return","description":"Retrieves a sales return. Use the sales return's id, not its salesReturnNumber.\n\nThe response includes the sales return's lines. POST accounting/sales-returns/search returns the same fields for each sales return.","tags":["accountingSalesReturns"]}},"/accounting/products":{"get":{"operationId":"products","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[productCode]","in":"query","required":false,"description":"Filter productCode (equality)","schema":{"type":"string"}},{"name":"filter[productCode][ne]","in":"query","required":false,"description":"Filter productCode (ne)","schema":{"type":"string"}},{"name":"filter[productCode][gt]","in":"query","required":false,"description":"Filter productCode (gt)","schema":{"type":"string"}},{"name":"filter[productCode][gte]","in":"query","required":false,"description":"Filter productCode (gte)","schema":{"type":"string"}},{"name":"filter[productCode][lt]","in":"query","required":false,"description":"Filter productCode (lt)","schema":{"type":"string"}},{"name":"filter[productCode][lte]","in":"query","required":false,"description":"Filter productCode (lte)","schema":{"type":"string"}},{"name":"filter[productCode][in]","in":"query","required":false,"description":"Filter productCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productCode][notIn]","in":"query","required":false,"description":"Filter productCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productCode][between]","in":"query","required":false,"description":"Filter productCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productCode][like]","in":"query","required":false,"description":"Filter productCode (like)","schema":{"type":"string"}},{"name":"filter[effectiveStartDate]","in":"query","required":false,"description":"Filter effectiveStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][ne]","in":"query","required":false,"description":"Filter effectiveStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][gt]","in":"query","required":false,"description":"Filter effectiveStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][gte]","in":"query","required":false,"description":"Filter effectiveStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][lt]","in":"query","required":false,"description":"Filter effectiveStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][lte]","in":"query","required":false,"description":"Filter effectiveStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][in]","in":"query","required":false,"description":"Filter effectiveStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveStartDate][notIn]","in":"query","required":false,"description":"Filter effectiveStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveStartDate][between]","in":"query","required":false,"description":"Filter effectiveStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[effectiveEndDate]","in":"query","required":false,"description":"Filter effectiveEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][ne]","in":"query","required":false,"description":"Filter effectiveEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][gt]","in":"query","required":false,"description":"Filter effectiveEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][gte]","in":"query","required":false,"description":"Filter effectiveEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][lt]","in":"query","required":false,"description":"Filter effectiveEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][lte]","in":"query","required":false,"description":"Filter effectiveEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][in]","in":"query","required":false,"description":"Filter effectiveEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveEndDate][notIn]","in":"query","required":false,"description":"Filter effectiveEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveEndDate][between]","in":"query","required":false,"description":"Filter effectiveEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productFamily]","in":"query","required":false,"description":"Filter productFamily (equality)","schema":{"type":"string"}},{"name":"filter[productFamily][ne]","in":"query","required":false,"description":"Filter productFamily (ne)","schema":{"type":"string"}},{"name":"filter[productFamily][gt]","in":"query","required":false,"description":"Filter productFamily (gt)","schema":{"type":"string"}},{"name":"filter[productFamily][gte]","in":"query","required":false,"description":"Filter productFamily (gte)","schema":{"type":"string"}},{"name":"filter[productFamily][lt]","in":"query","required":false,"description":"Filter productFamily (lt)","schema":{"type":"string"}},{"name":"filter[productFamily][lte]","in":"query","required":false,"description":"Filter productFamily (lte)","schema":{"type":"string"}},{"name":"filter[productFamily][in]","in":"query","required":false,"description":"Filter productFamily (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productFamily][notIn]","in":"query","required":false,"description":"Filter productFamily (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productFamily][between]","in":"query","required":false,"description":"Filter productFamily (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productFamily][like]","in":"query","required":false,"description":"Filter productFamily (like)","schema":{"type":"string"}},{"name":"filter[productType]","in":"query","required":false,"description":"Filter productType (equality)","schema":{"type":"string"}},{"name":"filter[productType][ne]","in":"query","required":false,"description":"Filter productType (ne)","schema":{"type":"string"}},{"name":"filter[productType][gt]","in":"query","required":false,"description":"Filter productType (gt)","schema":{"type":"string"}},{"name":"filter[productType][gte]","in":"query","required":false,"description":"Filter productType (gte)","schema":{"type":"string"}},{"name":"filter[productType][lt]","in":"query","required":false,"description":"Filter productType (lt)","schema":{"type":"string"}},{"name":"filter[productType][lte]","in":"query","required":false,"description":"Filter productType (lte)","schema":{"type":"string"}},{"name":"filter[productType][in]","in":"query","required":false,"description":"Filter productType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productType][notIn]","in":"query","required":false,"description":"Filter productType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productType][between]","in":"query","required":false,"description":"Filter productType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productType][like]","in":"query","required":false,"description":"Filter productType (like)","schema":{"type":"string"}},{"name":"filter[productStatus]","in":"query","required":false,"description":"Filter productStatus (equality)","schema":{"type":"string"}},{"name":"filter[productStatus][ne]","in":"query","required":false,"description":"Filter productStatus (ne)","schema":{"type":"string"}},{"name":"filter[productStatus][gt]","in":"query","required":false,"description":"Filter productStatus (gt)","schema":{"type":"string"}},{"name":"filter[productStatus][gte]","in":"query","required":false,"description":"Filter productStatus (gte)","schema":{"type":"string"}},{"name":"filter[productStatus][lt]","in":"query","required":false,"description":"Filter productStatus (lt)","schema":{"type":"string"}},{"name":"filter[productStatus][lte]","in":"query","required":false,"description":"Filter productStatus (lte)","schema":{"type":"string"}},{"name":"filter[productStatus][in]","in":"query","required":false,"description":"Filter productStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productStatus][notIn]","in":"query","required":false,"description":"Filter productStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productStatus][between]","in":"query","required":false,"description":"Filter productStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productStatus][like]","in":"query","required":false,"description":"Filter productStatus (like)","schema":{"type":"string"}},{"name":"filter[isInventory]","in":"query","required":false,"description":"Filter isInventory (equality)","schema":{"type":"boolean"}},{"name":"filter[isInventory][ne]","in":"query","required":false,"description":"Filter isInventory (ne)","schema":{"type":"boolean"}},{"name":"filter[isInventory][gt]","in":"query","required":false,"description":"Filter isInventory (gt)","schema":{"type":"boolean"}},{"name":"filter[isInventory][gte]","in":"query","required":false,"description":"Filter isInventory (gte)","schema":{"type":"boolean"}},{"name":"filter[isInventory][lt]","in":"query","required":false,"description":"Filter isInventory (lt)","schema":{"type":"boolean"}},{"name":"filter[isInventory][lte]","in":"query","required":false,"description":"Filter isInventory (lte)","schema":{"type":"boolean"}},{"name":"filter[isInventory][in]","in":"query","required":false,"description":"Filter isInventory (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isInventory][notIn]","in":"query","required":false,"description":"Filter isInventory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isInventory][between]","in":"query","required":false,"description":"Filter isInventory (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","productCode","-productCode","productName","-productName","productStatus","-productStatus","productFamily","-productFamily","productType","-productType","isInventory","-isInventory","effectiveStartDate","-effectiveStartDate","effectiveEndDate","-effectiveEndDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","productName","productCode","productNumber","description","internalDescription","crmProductId","effectiveStartDate","effectiveEndDate","productFamily","productType","productStatus","isInventory","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/productsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List products","description":"Lists products. Each item is the product without its itemIds and externalIdentifiers. To get both, use GET accounting/products/:id or POST accounting/products/search.\n\nTo match by free text or filter by CRM id, use POST accounting/products/search.","tags":["accounting/products"]},"post":{"operationId":"createAccountingProduct","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAccountingProductOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, DUPLICATE_PRODUCT_CODE, UNKNOWN_ITEM_IDS, UNKNOWN_ENTITY_ID, UNKNOWN_PRICE_BOOK_IDS, UNKNOWN_BILLABLE_COMPONENT_IDS, UNKNOWN_TAX_ENTITY_IDS, UNSUPPORTED_LINE_TYPE, USAGE_PRICING_NOT_APPLICABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ENTITY_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ENTITY_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ENTITY_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAccountingProductInput"}}}},"summary":"Create a product","description":"Creates a product. The request can include the product's product lines, with their pricing and tax records. If the product or any of its product lines can't be created, nothing is created.\n\nIf another product already uses the productCode, the request fails with DUPLICATE_PRODUCT_CODE, which names the other product's id.\n\nThe response contains only the new product's id. Read the record with GET accounting/products/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accounting/products"]}},"/accounting/payments/search":{"post":{"operationId":"searchPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPaymentInput"}}}},"summary":"Search payments","description":"Searches payments.","tags":["accountingPayments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/debit-memos/{id}":{"get":{"operationId":"getDebitMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDebitMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the debit memo you want to retrieve."}],"summary":"Retrieve a debit memo","description":"Retrieves a debit memo. Use the debit memo's id, not its debitMemoNumber.\n\n`pdf` holds a short-lived file handle for the debit memo PDF: exchange it at `GET /public/files/{handle}` for the file, or at `GET /public/files/{handle}/metadata` for its name, type and size. The PDF always reflects the debit memo as it is now, payments and credits included; it is generated on this call when the debit memo changed since the last one. Read the debit memo again for a fresh handle once it has expired.","tags":["accountingDebitMemos"]},"patch":{"operationId":"updateDebitMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateDebitMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"changingThePaymentTerm":{"value":{"data":{}},"summary":"Recording a renegotiated payment term. dueDate is left out, so it moves to the debit memo date plus the new term's days. The call returns no body."},"editingADraft":{"value":{"data":{}},"summary":"Correcting a draft standalone debit memo: a new amount on one line, an added line, and a removed one."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNKNOWN_EXTERNAL_IDENTIFIER, LINE_NOT_FOUND, PAYMENT_TERM_NOT_FOUND, PRODUCT_NOT_FOUND, PRODUCT_LINE_NOT_FOUND, ACCOUNT_NOT_FOUND, ADDRESS_NOT_FOUND, FIELD_NOT_ALLOWED, FIELD_LOCKED, LINES_LOCKED, DATE_LOCKED, ACCOUNTING_PERIOD_NOT_FOUND, ACCOUNTING_PERIOD_CLOSED, DUE_DATE_BEFORE_DEBIT_MEMO_DATE, INVALID_AMOUNT, INVALID_ENUM_VALUE, NO_LINES, MISSING_REQUIRED_FIELD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTerm":{"type":"string"}},"additionalProperties":false,"required":["paymentTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_BEFORE_DEBIT_MEMO_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dueDate":{"type":"string","format":"date"},"debitMemoDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["dueDate","debitMemoDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTerm":{"type":"string"}},"additionalProperties":false,"required":["paymentTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_BEFORE_DEBIT_MEMO_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dueDate":{"type":"string","format":"date"},"debitMemoDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["dueDate","debitMemoDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTerm":{"type":"string"}},"additionalProperties":false,"required":["paymentTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_BEFORE_DEBIT_MEMO_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dueDate":{"type":"string","format":"date"},"debitMemoDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["dueDate","debitMemoDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the debit memo you want to update.","examples":{"changingThePaymentTerm":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},"editingADraft":{"value":"c41e9a72-5d0b-4f36-8e1a-7b29d6f0c583"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateDebitMemoInput"},"examples":{"changingThePaymentTerm":{"value":{"paymentTerm":"net60"},"summary":"Recording a renegotiated payment term. dueDate is left out, so it moves to the debit memo date plus the new term's days. The call returns no body."},"editingADraft":{"value":{"updateLines":[{"id":"6779dfc9-3757-473c-a1cb-7d110abc6fb9","totalPrice":"300.00"}],"createLines":[{"description":"Expedited shipping","totalPrice":"45.00","creditGlAccountId":"4b1d7e20-93c5-4f8a-b6d2-0e7a5c9f1d38"}],"deleteLines":["c8cf7e86-54a6-4906-bee1-2d39874970d4"]},"summary":"Correcting a draft standalone debit memo: a new amount on one line, an added line, and a removed one."}}}}},"summary":"Update a debit memo","description":"Updates a debit memo with the fields you send. A field you leave out keeps its current value.\n\nUse the debit memo's id, not its debitMemoNumber.\n\nWhat you can change follows the approval status, as on the debit memo page. While a debit memo isn't approved yet (draft, pendingApproval or revise), you can change its dates, payment term, debit account, addresses and text, and add, change or remove lines with createLines, updateLines and deleteLines. Editing a debit memo that is pending approval puts it back in revise. Once it's approved, you can still change customerMessage, purchaseOrder, paymentTerm, dueDate and the addresses, debitMemoDate while no payment or credit is applied, and a line's description; anything else fails with FIELD_LOCKED, LINES_LOCKED or DATE_LOCKED.\n\nWhen you change paymentTerm or debitMemoDate and leave out dueDate, the due date is recomputed from the date and the term's days. Line edits don't recalculate tax.\n\nThe response is empty. Read the updated record with GET accounting/debit-memos/:id.","tags":["accountingDebitMemos"]}},"/accounting/accounts/{id}":{"patch":{"operationId":"updateAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_ALLOWED, DUPLICATE_ACCOUNT_NUMBER, INVALID_PARENT_ACCOUNT, TOP_LEVEL_ACCOUNT_TYPE_IN_USE, ENTITY_NOT_IN_CHART_OF_ACCOUNTS, ACCOUNT_TYPE_LOCKED, CASH_ACCOUNT_IN_USE, ACCOUNT_NOT_EDITABLE, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The locked input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountStatus":{"type":"string","description":"The account's current status."}},"additionalProperties":false,"required":["accountStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The locked input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountStatus":{"type":"string","description":"The account's current status."}},"additionalProperties":false,"required":["accountStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that names the missing record."},"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The input that carries the value."},"value":{"type":"string","description":"The value you sent."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The accepted values; empty when the set is open."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The missing input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The rejected input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ACCOUNT_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The account number you sent."}},"additionalProperties":false,"required":["accountNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountId":{"type":"string","description":"The parent account's identifier."}},"additionalProperties":false,"required":["parentAccountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOP_LEVEL_ACCOUNT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountType":{"type":"string","description":"The accountType that is taken."}},"additionalProperties":false,"required":["accountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_CHART_OF_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity's identifier."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The locked input."}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_ACCOUNT_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountStatus":{"type":"string","description":"The account's current status."}},"additionalProperties":false,"required":["accountStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"The unknown fieldNames."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The duplicated fieldName."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string","description":"The fieldName you sent."}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"The rule's message."},"rule":{"type":"string","description":"The name of the rule that failed, when known. An open set: treat an unknown value like an absent one."}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The identifier of the account to update.","example":"7d3c2b1a-9e8f-4d6c-b5a4-3e2f1d0c9b8a"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAccountInput"}}}},"summary":"Update an account","description":"Changes an account. Send only the fields to change; an omitted field keeps its value. The response is empty; read the account back with GET accounting/accounts/:id.\n\nOnce the account has postings, accountType, accountSubType, elimination, entityId and currency are locked, and revaluation cannot be switched on or off. accountStatus moves a posting account between 'enabled' and 'disabled'; a disabled account only accepts a request that enables it.\n\nAn account that breaks an accounting rule the server enforces, for example switching on revaluation for an account a cash-basis tax rate uses, fails with VALIDATION_FAILED, with the rule's message in reason and, where known, the rule's name in rule. Every request must carry the Api-Version header: a missing or empty header, or one naming no API version, is answered 400; a route that exists but not in the requested version is answered 404.","tags":["accountingAccounts"]},"get":{"operationId":"getAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the account to return."}],"summary":"Retrieve an account","description":"Retrieves an account. Use the account's id, not its accountNumber.","tags":["accountingAccounts"]}},"/accounting/tax-configurations/{id}":{"get":{"operationId":"getTaxConfiguration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTaxConfigurationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the tax configuration you want to retrieve."}],"summary":"Retrieve a tax configuration","description":"Retrieves a tax configuration.","tags":["accountingTaxConfigurations"]},"patch":{"operationId":"updateTaxConfiguration","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateTaxConfigurationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NO_LINES, LINE_NOT_FOUND, DUPLICATE_LINE_TITLE, DUPLICATE_TAX_CODE, LINE_WITHOUT_ACCOUNTS, MISSING_REVERSE_CHARGE_ACCOUNT, CHART_OF_ACCOUNTS_NOT_FOUND, ACCOUNT_NOT_FOUND, REVERSE_CHARGE_ACCOUNT_NOT_FOUND, COLLECTED_ACCOUNT_NOT_FOUND, COMPONENT_WITHOUT_ACCOUNTS, COMPONENT_PERCENTAGE_MISMATCH, CASH_BASIS_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LINE_TITLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TAX_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taxCode":{"type":"string"}},"additionalProperties":false,"required":["taxCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REVERSE_CHARGE_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"chartOfAccountsId":{"type":"string"}},"additionalProperties":false,"required":["title","chartOfAccountsId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVERSE_CHARGE_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COLLECTED_ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["title","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_WITHOUT_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"taxComponentCode":{"type":"string"}},"additionalProperties":false,"required":["title","taxComponentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMPONENT_PERCENTAGE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CASH_BASIS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"title":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["title","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the tax configuration you want to update.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateTaxConfigurationInput"}}}},"summary":"Update a tax configuration","description":"Updates a tax configuration with the fields you send. A field you leave out keeps its current value.\n\nA lines list you send replaces the whole set of tax codes, so include every tax code you want to keep. A line with an id updates that tax code, and a line without one creates a tax code. An existing tax code that isn't in the list is deleted with its accounts.\n\nThe response is empty. Read the updated configuration with GET accounting/tax-configurations/:id.","tags":["accountingTaxConfigurations"]}},"/base/entity-external-identifier-fields":{"get":{"operationId":"entityExternalIdentifierFields","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[fieldName]","in":"query","required":false,"description":"Filter fieldName (equality)","schema":{"type":"string"}},{"name":"filter[fieldName][ne]","in":"query","required":false,"description":"Filter fieldName (ne)","schema":{"type":"string"}},{"name":"filter[fieldName][gt]","in":"query","required":false,"description":"Filter fieldName (gt)","schema":{"type":"string"}},{"name":"filter[fieldName][gte]","in":"query","required":false,"description":"Filter fieldName (gte)","schema":{"type":"string"}},{"name":"filter[fieldName][lt]","in":"query","required":false,"description":"Filter fieldName (lt)","schema":{"type":"string"}},{"name":"filter[fieldName][lte]","in":"query","required":false,"description":"Filter fieldName (lte)","schema":{"type":"string"}},{"name":"filter[fieldName][in]","in":"query","required":false,"description":"Filter fieldName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fieldName][notIn]","in":"query","required":false,"description":"Filter fieldName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fieldName][between]","in":"query","required":false,"description":"Filter fieldName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fieldName][like]","in":"query","required":false,"description":"Filter fieldName (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["fieldName","-fieldName","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","fieldName","source","instanceName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/entityExternalIdentifierFieldsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List entity external identifier fields","description":"Lists the external-identifier fields configured for entities: the fieldName values that externalIdentifiers on POST base/entities, createExternalIdentifiers and updateExternalIdentifiers on PATCH base/entities/:id, and the externalIdentifier filter on POST base/entities/search accept. Any other fieldName fails there with UNKNOWN_EXTERNAL_IDENTIFIER. A field retired by its administrator is no longer listed and can no longer be written, but an entity that still carries it returns it on GET base/entities/:id, and PATCH base/entities/:id can remove it with deleteExternalIdentifiers. Fields are configured in the application, not over the API. Every call sends the Api-Version header: a missing or empty header, or an unknown version, answers 400; a route the requested version does not contain answers 404.","tags":["accountingEntities"]}},"/accounting/journal-entries/{id}":{"get":{"operationId":"getJournalEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getJournalEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the journal entry to return."}],"summary":"Retrieve a journal entry","description":"Retrieves a journal entry.","tags":["accountingJournalEntries"]},"patch":{"operationId":"updateJournalEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateJournalEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_REVERSAL_REASON, NOT_FOUND, REFERENCED_RECORD_NOT_FOUND, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_REVERSAL_REASON"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reversalReason":{"type":"string"}},"additionalProperties":false,"required":["reversalReason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the journal entry to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateJournalEntryInput"}}}},"summary":"Update a journal entry","description":"Updates a journal entry with the fields you send. A field you leave out keeps its current value. Lines change through three lists: createJournalEntryLines adds lines, updateJournalEntryLines changes lines by id, and deleteJournalEntryLines deletes lines.\n\nAn update sets the journal entry back to unposted and pending approval, including a journal entry that was posted. The journal entry is then approved at once if no approval policy applies, or if your approval completes the approvals the policy requires. Approval posts the journal entry to the general ledger, and no new journal entry is created.\n\nOnly a manual journal entry can be updated. The request fails if the journal entry is pending approval and has a pending reversal, if it has amortizations that have started, or if its accounting period is closed. A request an accounting rule rejects answers VALIDATION_FAILED, with the rule's message in reason and, where known, the rule's name in rule.","tags":["accountingJournalEntries"]}},"/accounting/invoice-milestones":{"get":{"operationId":"invoiceMilestones","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[salesOrderId]","in":"query","required":false,"description":"Filter salesOrderId (equality)","schema":{"type":"string"}},{"name":"filter[salesOrderId][ne]","in":"query","required":false,"description":"Filter salesOrderId (ne)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gt]","in":"query","required":false,"description":"Filter salesOrderId (gt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gte]","in":"query","required":false,"description":"Filter salesOrderId (gte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lt]","in":"query","required":false,"description":"Filter salesOrderId (lt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lte]","in":"query","required":false,"description":"Filter salesOrderId (lte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][in]","in":"query","required":false,"description":"Filter salesOrderId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][notIn]","in":"query","required":false,"description":"Filter salesOrderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][between]","in":"query","required":false,"description":"Filter salesOrderId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[salesOrderId][like]","in":"query","required":false,"description":"Filter salesOrderId (like)","schema":{"type":"string"}},{"name":"filter[orderSequence]","in":"query","required":false,"description":"Filter orderSequence (equality)","schema":{"type":"number"}},{"name":"filter[orderSequence][ne]","in":"query","required":false,"description":"Filter orderSequence (ne)","schema":{"type":"number"}},{"name":"filter[orderSequence][gt]","in":"query","required":false,"description":"Filter orderSequence (gt)","schema":{"type":"number"}},{"name":"filter[orderSequence][gte]","in":"query","required":false,"description":"Filter orderSequence (gte)","schema":{"type":"number"}},{"name":"filter[orderSequence][lt]","in":"query","required":false,"description":"Filter orderSequence (lt)","schema":{"type":"number"}},{"name":"filter[orderSequence][lte]","in":"query","required":false,"description":"Filter orderSequence (lte)","schema":{"type":"number"}},{"name":"filter[orderSequence][in]","in":"query","required":false,"description":"Filter orderSequence (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[orderSequence][notIn]","in":"query","required":false,"description":"Filter orderSequence (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[orderSequence][between]","in":"query","required":false,"description":"Filter orderSequence (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectedDate]","in":"query","required":false,"description":"Filter projectedDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[projectedDate][ne]","in":"query","required":false,"description":"Filter projectedDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[projectedDate][gt]","in":"query","required":false,"description":"Filter projectedDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[projectedDate][gte]","in":"query","required":false,"description":"Filter projectedDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[projectedDate][lt]","in":"query","required":false,"description":"Filter projectedDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[projectedDate][lte]","in":"query","required":false,"description":"Filter projectedDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[projectedDate][in]","in":"query","required":false,"description":"Filter projectedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectedDate][notIn]","in":"query","required":false,"description":"Filter projectedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectedDate][between]","in":"query","required":false,"description":"Filter projectedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[amount]","in":"query","required":false,"description":"Filter amount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[amount][ne]","in":"query","required":false,"description":"Filter amount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[amount][gt]","in":"query","required":false,"description":"Filter amount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[amount][gte]","in":"query","required":false,"description":"Filter amount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[amount][lt]","in":"query","required":false,"description":"Filter amount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[amount][lte]","in":"query","required":false,"description":"Filter amount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[amount][in]","in":"query","required":false,"description":"Filter amount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amount][notIn]","in":"query","required":false,"description":"Filter amount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amount][between]","in":"query","required":false,"description":"Filter amount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[invoiceDate]","in":"query","required":false,"description":"Filter invoiceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][ne]","in":"query","required":false,"description":"Filter invoiceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][gt]","in":"query","required":false,"description":"Filter invoiceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][gte]","in":"query","required":false,"description":"Filter invoiceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][lt]","in":"query","required":false,"description":"Filter invoiceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][lte]","in":"query","required":false,"description":"Filter invoiceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][in]","in":"query","required":false,"description":"Filter invoiceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceDate][notIn]","in":"query","required":false,"description":"Filter invoiceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceDate][between]","in":"query","required":false,"description":"Filter invoiceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceNumber]","in":"query","required":false,"description":"Filter invoiceNumber (equality)","schema":{"type":"string"}},{"name":"filter[invoiceNumber][ne]","in":"query","required":false,"description":"Filter invoiceNumber (ne)","schema":{"type":"string"}},{"name":"filter[invoiceNumber][gt]","in":"query","required":false,"description":"Filter invoiceNumber (gt)","schema":{"type":"string"}},{"name":"filter[invoiceNumber][gte]","in":"query","required":false,"description":"Filter invoiceNumber (gte)","schema":{"type":"string"}},{"name":"filter[invoiceNumber][lt]","in":"query","required":false,"description":"Filter invoiceNumber (lt)","schema":{"type":"string"}},{"name":"filter[invoiceNumber][lte]","in":"query","required":false,"description":"Filter invoiceNumber (lte)","schema":{"type":"string"}},{"name":"filter[invoiceNumber][in]","in":"query","required":false,"description":"Filter invoiceNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceNumber][notIn]","in":"query","required":false,"description":"Filter invoiceNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceNumber][between]","in":"query","required":false,"description":"Filter invoiceNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceNumber][like]","in":"query","required":false,"description":"Filter invoiceNumber (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","salesOrderId","-salesOrderId","orderSequence","-orderSequence","projectedDate","-projectedDate","currency","-currency","amount","-amount","status","-status","invoiceDate","-invoiceDate","invoiceNumber","-invoiceNumber","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","salesOrderId","description","orderSequence","percentage","projectedDate","currency","amount","status","invoiceDate","invoiceNumber","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceMilestonesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List invoice milestones","description":"Lists invoice milestones. Filter by salesOrderId to read one order's milestones, or by status to find the milestones waiting to be released ('open') or to be invoiced ('released'). The list doesn't include the product lines of each milestone; read them with GET accounting/invoice-milestones/:id.","tags":["accountingInvoiceMilestones"]}},"/accounting/revenue-contracts":{"get":{"operationId":"revenueContracts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[generalStatus]","in":"query","required":false,"description":"Filter generalStatus (equality)","schema":{"type":"string"}},{"name":"filter[generalStatus][ne]","in":"query","required":false,"description":"Filter generalStatus (ne)","schema":{"type":"string"}},{"name":"filter[generalStatus][gt]","in":"query","required":false,"description":"Filter generalStatus (gt)","schema":{"type":"string"}},{"name":"filter[generalStatus][gte]","in":"query","required":false,"description":"Filter generalStatus (gte)","schema":{"type":"string"}},{"name":"filter[generalStatus][lt]","in":"query","required":false,"description":"Filter generalStatus (lt)","schema":{"type":"string"}},{"name":"filter[generalStatus][lte]","in":"query","required":false,"description":"Filter generalStatus (lte)","schema":{"type":"string"}},{"name":"filter[generalStatus][in]","in":"query","required":false,"description":"Filter generalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[generalStatus][notIn]","in":"query","required":false,"description":"Filter generalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[generalStatus][between]","in":"query","required":false,"description":"Filter generalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[generalStatus][like]","in":"query","required":false,"description":"Filter generalStatus (like)","schema":{"type":"string"}},{"name":"filter[revenueStatus]","in":"query","required":false,"description":"Filter revenueStatus (equality)","schema":{"type":"string"}},{"name":"filter[revenueStatus][ne]","in":"query","required":false,"description":"Filter revenueStatus (ne)","schema":{"type":"string"}},{"name":"filter[revenueStatus][gt]","in":"query","required":false,"description":"Filter revenueStatus (gt)","schema":{"type":"string"}},{"name":"filter[revenueStatus][gte]","in":"query","required":false,"description":"Filter revenueStatus (gte)","schema":{"type":"string"}},{"name":"filter[revenueStatus][lt]","in":"query","required":false,"description":"Filter revenueStatus (lt)","schema":{"type":"string"}},{"name":"filter[revenueStatus][lte]","in":"query","required":false,"description":"Filter revenueStatus (lte)","schema":{"type":"string"}},{"name":"filter[revenueStatus][in]","in":"query","required":false,"description":"Filter revenueStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueStatus][notIn]","in":"query","required":false,"description":"Filter revenueStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueStatus][between]","in":"query","required":false,"description":"Filter revenueStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[revenueStatus][like]","in":"query","required":false,"description":"Filter revenueStatus (like)","schema":{"type":"string"}},{"name":"filter[isContractClosed]","in":"query","required":false,"description":"Filter isContractClosed (equality)","schema":{"type":"boolean"}},{"name":"filter[isContractClosed][ne]","in":"query","required":false,"description":"Filter isContractClosed (ne)","schema":{"type":"boolean"}},{"name":"filter[isContractClosed][gt]","in":"query","required":false,"description":"Filter isContractClosed (gt)","schema":{"type":"boolean"}},{"name":"filter[isContractClosed][gte]","in":"query","required":false,"description":"Filter isContractClosed (gte)","schema":{"type":"boolean"}},{"name":"filter[isContractClosed][lt]","in":"query","required":false,"description":"Filter isContractClosed (lt)","schema":{"type":"boolean"}},{"name":"filter[isContractClosed][lte]","in":"query","required":false,"description":"Filter isContractClosed (lte)","schema":{"type":"boolean"}},{"name":"filter[isContractClosed][in]","in":"query","required":false,"description":"Filter isContractClosed (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isContractClosed][notIn]","in":"query","required":false,"description":"Filter isContractClosed (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isContractClosed][between]","in":"query","required":false,"description":"Filter isContractClosed (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isContractCombined]","in":"query","required":false,"description":"Filter isContractCombined (equality)","schema":{"type":"boolean"}},{"name":"filter[isContractCombined][ne]","in":"query","required":false,"description":"Filter isContractCombined (ne)","schema":{"type":"boolean"}},{"name":"filter[isContractCombined][gt]","in":"query","required":false,"description":"Filter isContractCombined (gt)","schema":{"type":"boolean"}},{"name":"filter[isContractCombined][gte]","in":"query","required":false,"description":"Filter isContractCombined (gte)","schema":{"type":"boolean"}},{"name":"filter[isContractCombined][lt]","in":"query","required":false,"description":"Filter isContractCombined (lt)","schema":{"type":"boolean"}},{"name":"filter[isContractCombined][lte]","in":"query","required":false,"description":"Filter isContractCombined (lte)","schema":{"type":"boolean"}},{"name":"filter[isContractCombined][in]","in":"query","required":false,"description":"Filter isContractCombined (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isContractCombined][notIn]","in":"query","required":false,"description":"Filter isContractCombined (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isContractCombined][between]","in":"query","required":false,"description":"Filter isContractCombined (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[initialSalesOrderId]","in":"query","required":false,"description":"Filter initialSalesOrderId (equality)","schema":{"type":"string"}},{"name":"filter[initialSalesOrderId][ne]","in":"query","required":false,"description":"Filter initialSalesOrderId (ne)","schema":{"type":"string"}},{"name":"filter[initialSalesOrderId][gt]","in":"query","required":false,"description":"Filter initialSalesOrderId (gt)","schema":{"type":"string"}},{"name":"filter[initialSalesOrderId][gte]","in":"query","required":false,"description":"Filter initialSalesOrderId (gte)","schema":{"type":"string"}},{"name":"filter[initialSalesOrderId][lt]","in":"query","required":false,"description":"Filter initialSalesOrderId (lt)","schema":{"type":"string"}},{"name":"filter[initialSalesOrderId][lte]","in":"query","required":false,"description":"Filter initialSalesOrderId (lte)","schema":{"type":"string"}},{"name":"filter[initialSalesOrderId][in]","in":"query","required":false,"description":"Filter initialSalesOrderId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[initialSalesOrderId][notIn]","in":"query","required":false,"description":"Filter initialSalesOrderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[initialSalesOrderId][between]","in":"query","required":false,"description":"Filter initialSalesOrderId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[initialSalesOrderId][like]","in":"query","required":false,"description":"Filter initialSalesOrderId (like)","schema":{"type":"string"}},{"name":"filter[migrationDate]","in":"query","required":false,"description":"Filter migrationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[migrationDate][ne]","in":"query","required":false,"description":"Filter migrationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[migrationDate][gt]","in":"query","required":false,"description":"Filter migrationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[migrationDate][gte]","in":"query","required":false,"description":"Filter migrationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[migrationDate][lt]","in":"query","required":false,"description":"Filter migrationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[migrationDate][lte]","in":"query","required":false,"description":"Filter migrationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[migrationDate][in]","in":"query","required":false,"description":"Filter migrationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[migrationDate][notIn]","in":"query","required":false,"description":"Filter migrationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[migrationDate][between]","in":"query","required":false,"description":"Filter migrationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[revenueStartDate]","in":"query","required":false,"description":"Filter revenueStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueStartDate][ne]","in":"query","required":false,"description":"Filter revenueStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueStartDate][gt]","in":"query","required":false,"description":"Filter revenueStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueStartDate][gte]","in":"query","required":false,"description":"Filter revenueStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueStartDate][lt]","in":"query","required":false,"description":"Filter revenueStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueStartDate][lte]","in":"query","required":false,"description":"Filter revenueStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueStartDate][in]","in":"query","required":false,"description":"Filter revenueStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueStartDate][notIn]","in":"query","required":false,"description":"Filter revenueStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueStartDate][between]","in":"query","required":false,"description":"Filter revenueStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[revenueEndDate]","in":"query","required":false,"description":"Filter revenueEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueEndDate][ne]","in":"query","required":false,"description":"Filter revenueEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueEndDate][gt]","in":"query","required":false,"description":"Filter revenueEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueEndDate][gte]","in":"query","required":false,"description":"Filter revenueEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueEndDate][lt]","in":"query","required":false,"description":"Filter revenueEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueEndDate][lte]","in":"query","required":false,"description":"Filter revenueEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[revenueEndDate][in]","in":"query","required":false,"description":"Filter revenueEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueEndDate][notIn]","in":"query","required":false,"description":"Filter revenueEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueEndDate][between]","in":"query","required":false,"description":"Filter revenueEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","approvalStatus","-approvalStatus","generalStatus","-generalStatus","revenueStatus","-revenueStatus","isContractClosed","-isContractClosed","isContractCombined","-isContractCombined","currency","-currency","migrationDate","-migrationDate","revenueStartDate","-revenueStartDate","revenueEndDate","-revenueEndDate","totalContractValue","-totalContractValue","deferredRevenue","-deferredRevenue","revenueRecognized","-revenueRecognized","revenueRemaining","-revenueRemaining","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","revenueContractNumber","approvalStatus","generalStatus","revenueStatus","isContractClosed","isContractCombined","isLongTermContract","currency","functionalCurrency","exchangeRate","entityName","entityId","customerName","customerId","initialSalesOrderId","migrationDate","revenueStartDate","revenueEndDate","totalContractValue","deferredRevenue","revenueRecognized","revenueRemaining","totalCostOfContractValue","costOfRevenueRecognized","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/revenueContractsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List revenue contracts. One order yields one contract per book and a contract carries no bookId: a total over contracts keeps one book through bookId on revenue plan lines (joined on revenueContractId), or a multi-book entity counts each contract once per book. revenueRecognized, deferredRevenue and revenueRemaining are today's values, not values as of a date.","description":"Lists revenue contracts. Each revenue contract is returned with only some of its fields, and without its revenue lines. For the revenue lines and revenue plans, use GET accounting/revenue-contracts/:id or POST accounting/revenue-contracts/search.\n\nTo filter by the modified revenue contract, use POST accounting/revenue-contracts/search.","tags":["accountingRevenueContracts"]}},"/accounting/sales-orders/{id}":{"get":{"operationId":"getSalesOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSalesOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales order you want to retrieve."}],"summary":"Retrieve a sales order","description":"Retrieves a sales order. Use the sales order's id, not its orderNumber.\n\nThe response includes the customer, the addresses, and the product lines, grouped by subscription. POST accounting/sales-orders/search returns the same fields for each sales order.","tags":["accountingSalesOrders"]},"delete":{"operationId":"deleteSalesOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteSalesOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_PENDING_APPROVAL, ORDER_IS_MODIFICATION, HAS_JOURNAL_ENTRIES, ALREADY_INVOICED, REVENUE_RECOGNIZED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ORDER_IS_MODIFICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_RECOGNIZED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ORDER_IS_MODIFICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_RECOGNIZED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_PENDING_APPROVAL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ORDER_IS_MODIFICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_RECOGNIZED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales order you want to delete.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Delete a sales order","description":"Deletes a sales order together with its products and product lines, the subscription lines that no other sales order uses, and the invoice plans and revenue records created from them. When the sales order was the last one in its sales arrangement, the sales arrangement is deleted too.\n\nUnless the sales order is a draft, it can be deleted only while its approvalStatus is 'pendingApproval' and its orderType is 'new'. Every sales order must also have no journal entries, no invoices, and no recognized revenue.","tags":["accountingSalesOrders"]},"patch":{"operationId":"updateSalesOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSalesOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: APPROVED_FIELD_LOCKED, INVALID_ADDRESS, INVALID_LINE, INVALID_SUBSCRIPTION, INVALID_SUBSCRIPTION_PRODUCT, UNKNOWN_EXTERNAL_IDENTIFIER, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"APPROVED_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The first field in the request that an approved order does not allow. Only `purchaseOrder`, `opportunityName`, `signDate`, `effectiveDate`, `paymentTermCode`, `billToAddressId`, `soldToAddressId` and product-line `tags` survive approval. A locked field inside an `updateProducts` entry is reported as `updateProducts.<field>`.","examples":["serviceStartDate"]}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressId":{"type":"string","description":"The address id that does not exist.","examples":["5b8c31f6-04ad-472e-9f81-63a0d7e295cb"]}},"additionalProperties":false,"required":["addressId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"A product line id that is not on this order.","examples":["a05e7d13-8f62-4b90-bc47-1e63d0592a8f"]}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"A subscription id that is not on this order.","examples":["c8402e17-95bf-4a63-8d20-71ec3f6a0b48"]}},"additionalProperties":false,"required":["subscriptionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION_PRODUCT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"A product line placed under a subscription although its line type is not subscription-based.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The sales order id that does not resolve.","examples":["b71c04e9-3a5d-4f28-9106-d8e5fa27c3b1"]}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every product-line `externalIdentifiers[].fieldName` in the request that is not configured for sales order product lines in your tenant. Nothing is changed.","examples":[["netsuiteLineId"]]}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"What made the update unacceptable, in the words of the rule that rejected it.","examples":["Product line could not be located on the order during update. No changes were applied."]}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"APPROVED_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The first field in the request that an approved order does not allow. Only `purchaseOrder`, `opportunityName`, `signDate`, `effectiveDate`, `paymentTermCode`, `billToAddressId`, `soldToAddressId` and product-line `tags` survive approval. A locked field inside an `updateProducts` entry is reported as `updateProducts.<field>`.","examples":["serviceStartDate"]}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressId":{"type":"string","description":"The address id that does not exist.","examples":["5b8c31f6-04ad-472e-9f81-63a0d7e295cb"]}},"additionalProperties":false,"required":["addressId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"A product line id that is not on this order.","examples":["a05e7d13-8f62-4b90-bc47-1e63d0592a8f"]}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"A subscription id that is not on this order.","examples":["c8402e17-95bf-4a63-8d20-71ec3f6a0b48"]}},"additionalProperties":false,"required":["subscriptionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION_PRODUCT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"A product line placed under a subscription although its line type is not subscription-based.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The sales order id that does not resolve.","examples":["b71c04e9-3a5d-4f28-9106-d8e5fa27c3b1"]}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every product-line `externalIdentifiers[].fieldName` in the request that is not configured for sales order product lines in your tenant. Nothing is changed.","examples":[["netsuiteLineId"]]}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"What made the update unacceptable, in the words of the rule that rejected it.","examples":["Product line could not be located on the order during update. No changes were applied."]}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"APPROVED_FIELD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The first field in the request that an approved order does not allow. Only `purchaseOrder`, `opportunityName`, `signDate`, `effectiveDate`, `paymentTermCode`, `billToAddressId`, `soldToAddressId` and product-line `tags` survive approval. A locked field inside an `updateProducts` entry is reported as `updateProducts.<field>`.","examples":["serviceStartDate"]}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ADDRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressId":{"type":"string","description":"The address id that does not exist.","examples":["5b8c31f6-04ad-472e-9f81-63a0d7e295cb"]}},"additionalProperties":false,"required":["addressId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"A product line id that is not on this order.","examples":["a05e7d13-8f62-4b90-bc47-1e63d0592a8f"]}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"A subscription id that is not on this order.","examples":["c8402e17-95bf-4a63-8d20-71ec3f6a0b48"]}},"additionalProperties":false,"required":["subscriptionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION_PRODUCT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"A product line placed under a subscription although its line type is not subscription-based.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The sales order id that does not resolve.","examples":["b71c04e9-3a5d-4f28-9106-d8e5fa27c3b1"]}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every product-line `externalIdentifiers[].fieldName` in the request that is not configured for sales order product lines in your tenant. Nothing is changed.","examples":[["netsuiteLineId"]]}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"What made the update unacceptable, in the words of the rule that rejected it.","examples":["Product line could not be located on the order during update. No changes were applied."]}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"UUID of the sales order to update. The selector, never itself changed.","example":"b71c04e9-3a5d-4f28-9106-d8e5fa27c3b1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSalesOrderInput"}}}},"summary":"Partially update a sales order","description":"Writes only the fields the request body carries. Everything omitted is left exactly as it was. Product lines are edited through three parallel arrays: `createProducts` adds new lines, `updateProducts` rewrites existing ones (matched by `salesOrderProductLineId`, omitted fields left unchanged), and `deleteProducts` removes them by id; `createSubscriptions` adds new subscriptions with their own lines. A new Commit with Overage line requires `allowance` (its Allowance & Overage terms, defaulting from the product catalog); other line types reject it, and `updateProducts` cannot change an existing line's allowance. While an order is pending approval the whole header and its lines are editable. Once approved only a small set of header fields may change, and `updateProducts` entries may carry nothing but `salesOrderProductLineId` and `tags`; any other field or product operation fails with `APPROVED_FIELD_LOCKED`. An unknown id fails with `NOT_FOUND`; a product line id that does not belong to the order fails with `INVALID_LINE`. Runs in a transaction, so a failure leaves the order untouched.","tags":["accountingSalesOrders"]}},"/accounting/customers":{"get":{"operationId":"customers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[customerType]","in":"query","required":false,"description":"Filter customerType (equality)","schema":{"type":"string"}},{"name":"filter[customerType][ne]","in":"query","required":false,"description":"Filter customerType (ne)","schema":{"type":"string"}},{"name":"filter[customerType][gt]","in":"query","required":false,"description":"Filter customerType (gt)","schema":{"type":"string"}},{"name":"filter[customerType][gte]","in":"query","required":false,"description":"Filter customerType (gte)","schema":{"type":"string"}},{"name":"filter[customerType][lt]","in":"query","required":false,"description":"Filter customerType (lt)","schema":{"type":"string"}},{"name":"filter[customerType][lte]","in":"query","required":false,"description":"Filter customerType (lte)","schema":{"type":"string"}},{"name":"filter[customerType][in]","in":"query","required":false,"description":"Filter customerType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerType][notIn]","in":"query","required":false,"description":"Filter customerType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerType][between]","in":"query","required":false,"description":"Filter customerType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerType][like]","in":"query","required":false,"description":"Filter customerType (like)","schema":{"type":"string"}},{"name":"filter[partnerType]","in":"query","required":false,"description":"Filter partnerType (equality)","schema":{"type":"string"}},{"name":"filter[partnerType][ne]","in":"query","required":false,"description":"Filter partnerType (ne)","schema":{"type":"string"}},{"name":"filter[partnerType][gt]","in":"query","required":false,"description":"Filter partnerType (gt)","schema":{"type":"string"}},{"name":"filter[partnerType][gte]","in":"query","required":false,"description":"Filter partnerType (gte)","schema":{"type":"string"}},{"name":"filter[partnerType][lt]","in":"query","required":false,"description":"Filter partnerType (lt)","schema":{"type":"string"}},{"name":"filter[partnerType][lte]","in":"query","required":false,"description":"Filter partnerType (lte)","schema":{"type":"string"}},{"name":"filter[partnerType][in]","in":"query","required":false,"description":"Filter partnerType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[partnerType][notIn]","in":"query","required":false,"description":"Filter partnerType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[partnerType][between]","in":"query","required":false,"description":"Filter partnerType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[partnerType][like]","in":"query","required":false,"description":"Filter partnerType (like)","schema":{"type":"string"}},{"name":"filter[businessType]","in":"query","required":false,"description":"Filter businessType (equality)","schema":{"type":"string"}},{"name":"filter[businessType][ne]","in":"query","required":false,"description":"Filter businessType (ne)","schema":{"type":"string"}},{"name":"filter[businessType][gt]","in":"query","required":false,"description":"Filter businessType (gt)","schema":{"type":"string"}},{"name":"filter[businessType][gte]","in":"query","required":false,"description":"Filter businessType (gte)","schema":{"type":"string"}},{"name":"filter[businessType][lt]","in":"query","required":false,"description":"Filter businessType (lt)","schema":{"type":"string"}},{"name":"filter[businessType][lte]","in":"query","required":false,"description":"Filter businessType (lte)","schema":{"type":"string"}},{"name":"filter[businessType][in]","in":"query","required":false,"description":"Filter businessType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[businessType][notIn]","in":"query","required":false,"description":"Filter businessType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[businessType][between]","in":"query","required":false,"description":"Filter businessType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[businessType][like]","in":"query","required":false,"description":"Filter businessType (like)","schema":{"type":"string"}},{"name":"filter[customerSegment]","in":"query","required":false,"description":"Filter customerSegment (equality)","schema":{"type":"string"}},{"name":"filter[customerSegment][ne]","in":"query","required":false,"description":"Filter customerSegment (ne)","schema":{"type":"string"}},{"name":"filter[customerSegment][gt]","in":"query","required":false,"description":"Filter customerSegment (gt)","schema":{"type":"string"}},{"name":"filter[customerSegment][gte]","in":"query","required":false,"description":"Filter customerSegment (gte)","schema":{"type":"string"}},{"name":"filter[customerSegment][lt]","in":"query","required":false,"description":"Filter customerSegment (lt)","schema":{"type":"string"}},{"name":"filter[customerSegment][lte]","in":"query","required":false,"description":"Filter customerSegment (lte)","schema":{"type":"string"}},{"name":"filter[customerSegment][in]","in":"query","required":false,"description":"Filter customerSegment (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerSegment][notIn]","in":"query","required":false,"description":"Filter customerSegment (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerSegment][between]","in":"query","required":false,"description":"Filter customerSegment (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerSegment][like]","in":"query","required":false,"description":"Filter customerSegment (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[salesChannel]","in":"query","required":false,"description":"Filter salesChannel (equality)","schema":{"type":"string"}},{"name":"filter[salesChannel][ne]","in":"query","required":false,"description":"Filter salesChannel (ne)","schema":{"type":"string"}},{"name":"filter[salesChannel][gt]","in":"query","required":false,"description":"Filter salesChannel (gt)","schema":{"type":"string"}},{"name":"filter[salesChannel][gte]","in":"query","required":false,"description":"Filter salesChannel (gte)","schema":{"type":"string"}},{"name":"filter[salesChannel][lt]","in":"query","required":false,"description":"Filter salesChannel (lt)","schema":{"type":"string"}},{"name":"filter[salesChannel][lte]","in":"query","required":false,"description":"Filter salesChannel (lte)","schema":{"type":"string"}},{"name":"filter[salesChannel][in]","in":"query","required":false,"description":"Filter salesChannel (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesChannel][notIn]","in":"query","required":false,"description":"Filter salesChannel (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesChannel][between]","in":"query","required":false,"description":"Filter salesChannel (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[salesChannel][like]","in":"query","required":false,"description":"Filter salesChannel (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[globalParentId]","in":"query","required":false,"description":"Filter globalParentId (equality)","schema":{"type":"string"}},{"name":"filter[globalParentId][ne]","in":"query","required":false,"description":"Filter globalParentId (ne)","schema":{"type":"string"}},{"name":"filter[globalParentId][gt]","in":"query","required":false,"description":"Filter globalParentId (gt)","schema":{"type":"string"}},{"name":"filter[globalParentId][gte]","in":"query","required":false,"description":"Filter globalParentId (gte)","schema":{"type":"string"}},{"name":"filter[globalParentId][lt]","in":"query","required":false,"description":"Filter globalParentId (lt)","schema":{"type":"string"}},{"name":"filter[globalParentId][lte]","in":"query","required":false,"description":"Filter globalParentId (lte)","schema":{"type":"string"}},{"name":"filter[globalParentId][in]","in":"query","required":false,"description":"Filter globalParentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[globalParentId][notIn]","in":"query","required":false,"description":"Filter globalParentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[globalParentId][between]","in":"query","required":false,"description":"Filter globalParentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[globalParentId][like]","in":"query","required":false,"description":"Filter globalParentId (like)","schema":{"type":"string"}},{"name":"filter[defaultCurrency]","in":"query","required":false,"description":"Filter defaultCurrency (equality)","schema":{"type":"string"}},{"name":"filter[defaultCurrency][ne]","in":"query","required":false,"description":"Filter defaultCurrency (ne)","schema":{"type":"string"}},{"name":"filter[defaultCurrency][gt]","in":"query","required":false,"description":"Filter defaultCurrency (gt)","schema":{"type":"string"}},{"name":"filter[defaultCurrency][gte]","in":"query","required":false,"description":"Filter defaultCurrency (gte)","schema":{"type":"string"}},{"name":"filter[defaultCurrency][lt]","in":"query","required":false,"description":"Filter defaultCurrency (lt)","schema":{"type":"string"}},{"name":"filter[defaultCurrency][lte]","in":"query","required":false,"description":"Filter defaultCurrency (lte)","schema":{"type":"string"}},{"name":"filter[defaultCurrency][in]","in":"query","required":false,"description":"Filter defaultCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultCurrency][notIn]","in":"query","required":false,"description":"Filter defaultCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultCurrency][between]","in":"query","required":false,"description":"Filter defaultCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[defaultCurrency][like]","in":"query","required":false,"description":"Filter defaultCurrency (like)","schema":{"type":"string"}},{"name":"filter[taxExempt]","in":"query","required":false,"description":"Filter taxExempt (equality)","schema":{"type":"boolean"}},{"name":"filter[taxExempt][ne]","in":"query","required":false,"description":"Filter taxExempt (ne)","schema":{"type":"boolean"}},{"name":"filter[taxExempt][gt]","in":"query","required":false,"description":"Filter taxExempt (gt)","schema":{"type":"boolean"}},{"name":"filter[taxExempt][gte]","in":"query","required":false,"description":"Filter taxExempt (gte)","schema":{"type":"boolean"}},{"name":"filter[taxExempt][lt]","in":"query","required":false,"description":"Filter taxExempt (lt)","schema":{"type":"boolean"}},{"name":"filter[taxExempt][lte]","in":"query","required":false,"description":"Filter taxExempt (lte)","schema":{"type":"boolean"}},{"name":"filter[taxExempt][in]","in":"query","required":false,"description":"Filter taxExempt (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxExempt][notIn]","in":"query","required":false,"description":"Filter taxExempt (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxExempt][between]","in":"query","required":false,"description":"Filter taxExempt (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTermLabel]","in":"query","required":false,"description":"Filter paymentTermLabel (equality)","schema":{"type":"string"}},{"name":"filter[paymentTermLabel][ne]","in":"query","required":false,"description":"Filter paymentTermLabel (ne)","schema":{"type":"string"}},{"name":"filter[paymentTermLabel][gt]","in":"query","required":false,"description":"Filter paymentTermLabel (gt)","schema":{"type":"string"}},{"name":"filter[paymentTermLabel][gte]","in":"query","required":false,"description":"Filter paymentTermLabel (gte)","schema":{"type":"string"}},{"name":"filter[paymentTermLabel][lt]","in":"query","required":false,"description":"Filter paymentTermLabel (lt)","schema":{"type":"string"}},{"name":"filter[paymentTermLabel][lte]","in":"query","required":false,"description":"Filter paymentTermLabel (lte)","schema":{"type":"string"}},{"name":"filter[paymentTermLabel][in]","in":"query","required":false,"description":"Filter paymentTermLabel (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTermLabel][notIn]","in":"query","required":false,"description":"Filter paymentTermLabel (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTermLabel][between]","in":"query","required":false,"description":"Filter paymentTermLabel (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTermLabel][like]","in":"query","required":false,"description":"Filter paymentTermLabel (like)","schema":{"type":"string"}},{"name":"filter[country]","in":"query","required":false,"description":"Filter country (equality)","schema":{"type":"string"}},{"name":"filter[country][ne]","in":"query","required":false,"description":"Filter country (ne)","schema":{"type":"string"}},{"name":"filter[country][gt]","in":"query","required":false,"description":"Filter country (gt)","schema":{"type":"string"}},{"name":"filter[country][gte]","in":"query","required":false,"description":"Filter country (gte)","schema":{"type":"string"}},{"name":"filter[country][lt]","in":"query","required":false,"description":"Filter country (lt)","schema":{"type":"string"}},{"name":"filter[country][lte]","in":"query","required":false,"description":"Filter country (lte)","schema":{"type":"string"}},{"name":"filter[country][in]","in":"query","required":false,"description":"Filter country (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[country][notIn]","in":"query","required":false,"description":"Filter country (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[country][between]","in":"query","required":false,"description":"Filter country (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[country][like]","in":"query","required":false,"description":"Filter country (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","customerName","-customerName","customerType","-customerType","businessType","-businessType","customerSegment","-customerSegment","defaultCurrency","-defaultCurrency","taxExempt","-taxExempt","paymentTermLabel","-paymentTermLabel","exemptionNumber","-exemptionNumber","invoiceEmail","-invoiceEmail","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","customerNumber","customerName","customerCode","customerType","partnerType","businessType","customerSegment","status","salesChannel","entityId","entityName","globalParentId","globalParentName","defaultCurrency","taxExempt","paymentTermLabel","exemptionNumber","invoiceEmail","country","stateProvince","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/customersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List customers","description":"Lists customers. To filter by customer number, name, legal entity, or external identifier, use `POST accounting/customers/search`.","tags":["accountingCustomers"]},"post":{"operationId":"createCustomer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createCustomerOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ENTITY, INVALID_FIELD_VALUE, MULTIPLE_DEFAULT_ADDRESSES, DUPLICATE_CUSTOMER, END_CUSTOMER_NOT_SUPPORTED, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, UNKNOWN_REFERENCE, UNKNOWN_PAYMENT_PROVIDER, PAYMENT_METHOD_REQUIRES_CUSTOMER_ID, EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_DEFAULT_ADDRESSES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"type":{"type":"string"}},"additionalProperties":false,"required":["type"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"entityId":{"type":"string"},"customerType":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["name","entityId","customerType","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"uuid":{"type":"string"}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PAYMENT_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provider":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["provider","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_METHOD_REQUIRES_CUSTOMER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_DEFAULT_ADDRESSES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"type":{"type":"string"}},"additionalProperties":false,"required":["type"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"entityId":{"type":"string"},"customerType":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["name","entityId","customerType","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"uuid":{"type":"string"}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PAYMENT_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provider":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["provider","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_METHOD_REQUIRES_CUSTOMER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_DEFAULT_ADDRESSES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"type":{"type":"string"}},"additionalProperties":false,"required":["type"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CUSTOMER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"entityId":{"type":"string"},"customerType":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["name","entityId","customerType","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_CUSTOMER_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"uuid":{"type":"string"}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PAYMENT_PROVIDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provider":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["provider","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_METHOD_REQUIRES_CUSTOMER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createCustomerInput"}}}},"summary":"Create a customer","description":"Creates a customer. The combination of name, legal entity, and customer type must be unique. If another customer already has the same combination, the request fails with DUPLICATE_CUSTOMER.\n\nThe response contains only the new customer's id. Read the record with GET accounting/customers/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingCustomers"]}},"/accounting/usages/search":{"post":{"operationId":"searchUsage","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchUsageOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE_FILTER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchUsageInput"}}}},"summary":"Search usage records","description":"Searches usage records.","tags":["accountingUsages"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/pricing/search":{"post":{"operationId":"searchAccountingPricing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAccountingPricingOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE, INVALID_TIMESTAMP, UNKNOWN_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAccountingPricingInput"}}}},"summary":"Search pricing headers","description":"Searches pricing headers.","tags":["accounting/products/productLines"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/usages":{"get":{"operationId":"listUsage","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listUsageOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE_FILTER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records with this status. Accepted values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'. Omit for every status."},{"name":"unitOfMeasure","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records in this unit, for example 'Hour', 'GB' or 'Call'. Omit for every unit."},{"name":"usagePeriodId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records in the usage period with this identifier. An identifier matching no usage period returns an empty page."},{"name":"billableComponentId","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records attributed to the billable component with this identifier. An identifier matching no billable component returns an empty page."},{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records whose date is on or after this bound. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ. A time zone is converted to UTC before matching."},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records whose date is on or before this bound. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ. A time zone is converted to UTC before matching."},{"name":"lastModifiedFrom","in":"query","required":false,"schema":{"type":"string"},"description":"Limits results to usage records changed on or after this time, in UTC. Use format YYYY-MM-DDTHH:mm:ss.sssZ."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit for the first page."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of usage records per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}],"summary":"List usage records","description":"Lists usage records. This collection does not follow the standard rules in Pagination and querying. Page with `pageSize` and `cursor`, not `page[size]` and `page[cursor]`. Filter with the query parameters listed below, such as `status`, not `filter[field][op]`.\n\nThe response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`. There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules gets the first page, unfiltered, every time.","tags":["accountingUsages"]}},"/accounting/credit-memos/{id}/unapply":{"post":{"operationId":"unapplyCreditMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/unapplyCreditMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVOICE_NOT_FOUND, NO_APPLICATIONS, UNAPPLY_EXCEEDS_APPLIED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNAPPLY_EXCEEDS_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNAPPLY_EXCEEDS_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNAPPLY_EXCEEDS_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceId":{"type":"string"}},"additionalProperties":false,"required":["invoiceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the credit memo you want to unapply."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/unapplyCreditMemoInput"}}}},"summary":"Unapply a credit memo from invoices","description":"Unapplies a credit memo from invoices. Each reversal is recorded as a negative allocation. The original allocation stays, so applications on GET accounting/credit-memos/:id lists both the allocation and its reversal.\n\nThe response is empty.","tags":["accountingCreditMemos"]}},"/accounting/payment-terms":{"get":{"operationId":"paymentTerms","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[code]","in":"query","required":false,"description":"Filter code (equality)","schema":{"type":"string"}},{"name":"filter[code][ne]","in":"query","required":false,"description":"Filter code (ne)","schema":{"type":"string"}},{"name":"filter[code][gt]","in":"query","required":false,"description":"Filter code (gt)","schema":{"type":"string"}},{"name":"filter[code][gte]","in":"query","required":false,"description":"Filter code (gte)","schema":{"type":"string"}},{"name":"filter[code][lt]","in":"query","required":false,"description":"Filter code (lt)","schema":{"type":"string"}},{"name":"filter[code][lte]","in":"query","required":false,"description":"Filter code (lte)","schema":{"type":"string"}},{"name":"filter[code][in]","in":"query","required":false,"description":"Filter code (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[code][notIn]","in":"query","required":false,"description":"Filter code (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[code][between]","in":"query","required":false,"description":"Filter code (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[code][like]","in":"query","required":false,"description":"Filter code (like)","schema":{"type":"string"}},{"name":"filter[numberOfDays]","in":"query","required":false,"description":"Filter numberOfDays (equality)","schema":{"type":"number"}},{"name":"filter[numberOfDays][ne]","in":"query","required":false,"description":"Filter numberOfDays (ne)","schema":{"type":"number"}},{"name":"filter[numberOfDays][gt]","in":"query","required":false,"description":"Filter numberOfDays (gt)","schema":{"type":"number"}},{"name":"filter[numberOfDays][gte]","in":"query","required":false,"description":"Filter numberOfDays (gte)","schema":{"type":"number"}},{"name":"filter[numberOfDays][lt]","in":"query","required":false,"description":"Filter numberOfDays (lt)","schema":{"type":"number"}},{"name":"filter[numberOfDays][lte]","in":"query","required":false,"description":"Filter numberOfDays (lte)","schema":{"type":"number"}},{"name":"filter[numberOfDays][in]","in":"query","required":false,"description":"Filter numberOfDays (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[numberOfDays][notIn]","in":"query","required":false,"description":"Filter numberOfDays (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[numberOfDays][between]","in":"query","required":false,"description":"Filter numberOfDays (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[discountPercentage]","in":"query","required":false,"description":"Filter discountPercentage (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[discountPercentage][ne]","in":"query","required":false,"description":"Filter discountPercentage (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[discountPercentage][gt]","in":"query","required":false,"description":"Filter discountPercentage (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[discountPercentage][gte]","in":"query","required":false,"description":"Filter discountPercentage (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[discountPercentage][lt]","in":"query","required":false,"description":"Filter discountPercentage (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[discountPercentage][lte]","in":"query","required":false,"description":"Filter discountPercentage (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[discountPercentage][in]","in":"query","required":false,"description":"Filter discountPercentage (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[discountPercentage][notIn]","in":"query","required":false,"description":"Filter discountPercentage (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[discountPercentage][between]","in":"query","required":false,"description":"Filter discountPercentage (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[discountValidityDays]","in":"query","required":false,"description":"Filter discountValidityDays (equality)","schema":{"type":"number"}},{"name":"filter[discountValidityDays][ne]","in":"query","required":false,"description":"Filter discountValidityDays (ne)","schema":{"type":"number"}},{"name":"filter[discountValidityDays][gt]","in":"query","required":false,"description":"Filter discountValidityDays (gt)","schema":{"type":"number"}},{"name":"filter[discountValidityDays][gte]","in":"query","required":false,"description":"Filter discountValidityDays (gte)","schema":{"type":"number"}},{"name":"filter[discountValidityDays][lt]","in":"query","required":false,"description":"Filter discountValidityDays (lt)","schema":{"type":"number"}},{"name":"filter[discountValidityDays][lte]","in":"query","required":false,"description":"Filter discountValidityDays (lte)","schema":{"type":"number"}},{"name":"filter[discountValidityDays][in]","in":"query","required":false,"description":"Filter discountValidityDays (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[discountValidityDays][notIn]","in":"query","required":false,"description":"Filter discountValidityDays (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[discountValidityDays][between]","in":"query","required":false,"description":"Filter discountValidityDays (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","code","-code","label","-label","numberOfDays","-numberOfDays","discountPercentage","-discountPercentage","discountValidityDays","-discountValidityDays","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","code","label","description","numberOfDays","discountPercentage","discountValidityDays","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/paymentTermsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List payment terms","description":"Lists payment terms. The list includes every payment term in your tenant. Each legal entity has its own list of these terms, managed under Settings & Policies > Feature Settings > Quote to Cash > Invoice Configuration. Only the terms on a legal entity's list can be used for its customers, sales orders, and invoice policies.\n\nNo endpoint returns a legal entity's list. On POST accounting/customers and PATCH accounting/customers/:id, the request fails with UNKNOWN_REFERENCE when paymentTermCode isn't on the customer's legal entity's list.","tags":["accountingPaymentTerms"]}},"/accounting/product-lines/{id}":{"get":{"operationId":"getAccountingProductLine","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountingProductLineOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product line you want to retrieve."}],"summary":"Retrieve a product line","description":"Retrieves a product line. Use the product line's id, not its productLineNumber.\n\nThe response includes the product line's tax records, its pricing headers with their price book entries, and its external identifiers.","tags":["accounting/products/productLines"]}},"/accounting/invoice-runs/{id}":{"get":{"operationId":"getInvoiceRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInvoiceRunOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"settledClean":{"value":{"data":{"data":{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completed","invoicesCreated":1,"startedAt":"2026-09-30T08:14:22.000Z","finishedAt":"2026-09-30T08:14:41.000Z","scope":["all"],"invoices":[{"id":"a2c5e881-4f37-4b09-9d16-8e3b0c7a5d24","invoiceNumber":"INV-20841","totalAmount":"1210.00","currency":"EUR"}],"errors":[]}}},"summary":"A run that billed everything it selected"},"stillRunning":{"value":{"data":{"data":{"id":"5e2a9c81-7f43-4b60-8d19-3c6b0a4e8f52","invoiceRunNumber":"ISR-1044","status":"running","invoicesCreated":0,"startedAt":"2026-09-30T08:20:01.000Z","scope":["oneTimeAndRecurring"],"progress":{"title":"Creating invoices","progress":18,"total":64},"invoices":[],"errors":[]}}},"summary":"A run still working, with its own progress reporting"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice run you want to retrieve.","examples":{"settledClean":{"value":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15"},"stillRunning":{"value":"5e2a9c81-7f43-4b60-8d19-3c6b0a4e8f52"}}}],"summary":"Retrieve an invoice run","description":"Retrieves an invoice run. Use the invoice run's id, not its invoiceRunNumber.\n\nThe response shows what the run covered, its status, the invoices it created and the lines that failed.\n\n'completed' means every selected line was invoiced. 'error' means the run failed, and 'errors' lists the lines that failed. Check 'status' rather than 'invoicesCreated', because a 'completeAndError' run has created invoices and also has failed lines.\n\nIf the run's job stops without finishing, for example because it was canceled or lost, this endpoint reports 'error'. The saved status stays 'running', and GET accounting/invoice-runs returns that saved status.\n\nTo start a run, use POST accounting/invoice-runs.","tags":["accountingInvoiceRuns"]}},"/accounting/journal-entries/search":{"post":{"operationId":"searchJournalEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchJournalEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchJournalEntriesInput"}}}},"summary":"Search journal entries","description":"Searches journal entries. Each journal entry in the response includes its lines.","tags":["accountingJournalEntries"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/books/entity-assignments":{"post":{"operationId":"createBookEntityAssignment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBookEntityAssignmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_ALLOWED, DUPLICATE_ASSIGNMENT, ENTITY_HAS_TRANSACTIONS, ENTITY_HIERARCHY_INCOMPLETE, ASSIGNMENT_INCOMPLETE, CHART_OF_ACCOUNTS_INCOMPATIBLE, ENTITY_NOT_IN_BASE_BOOK","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["entityId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"},"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["bookId","missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityId","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_INCOMPATIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"chartOfAccountsId":{"type":"string"},"parentEntityId":{"type":"string"}},"additionalProperties":false,"required":["chartOfAccountsId","parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_BASE_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"baseBookId":{"type":"string"}},"additionalProperties":false,"required":["entityId","baseBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["entityId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"},"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["bookId","missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityId","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_INCOMPATIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"chartOfAccountsId":{"type":"string"},"parentEntityId":{"type":"string"}},"additionalProperties":false,"required":["chartOfAccountsId","parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_BASE_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"baseBookId":{"type":"string"}},"additionalProperties":false,"required":["entityId","baseBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["entityId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HAS_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_HIERARCHY_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"},"missingEntityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["bookId","missingEntityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityId","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHART_OF_ACCOUNTS_INCOMPATIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"chartOfAccountsId":{"type":"string"},"parentEntityId":{"type":"string"}},"additionalProperties":false,"required":["chartOfAccountsId","parentEntityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_BASE_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"baseBookId":{"type":"string"}},"additionalProperties":false,"required":["entityId","baseBookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBookEntityAssignmentInput"}}}},"summary":"Assign a legal entity to an accounting book","description":"Assigns a legal entity to an accounting book, with the chart of accounts, fiscal calendar and currency the entity uses in that book. An entity is assigned to a book at most once. An active entity needs all three properties, in this book and in every other book it is assigned to. Non-legal reporting entities cannot be assigned through this API.\n\nAssigning a fiscal calendar creates the entity's accounting period statuses in the book. While multi-book is off, the currency also becomes the legal entity's currency.\n\nAn adjustment book holds only entities of its base book, with the same properties: send bookId and entityId only, and the three properties are copied from the entity's assignment to the base book. An entity that has posted to a full book cannot join another full book. In a consolidating book (an adjustment book copies consolidation from its base book), assign an entity's subsidiaries before the entity, and use a chart of accounts compatible with its parent's.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingBooks"]}},"/accounting/account-external-identifier-fields":{"get":{"operationId":"accountExternalIdentifierFields","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[fieldName]","in":"query","required":false,"description":"Filter fieldName (equality)","schema":{"type":"string"}},{"name":"filter[fieldName][ne]","in":"query","required":false,"description":"Filter fieldName (ne)","schema":{"type":"string"}},{"name":"filter[fieldName][gt]","in":"query","required":false,"description":"Filter fieldName (gt)","schema":{"type":"string"}},{"name":"filter[fieldName][gte]","in":"query","required":false,"description":"Filter fieldName (gte)","schema":{"type":"string"}},{"name":"filter[fieldName][lt]","in":"query","required":false,"description":"Filter fieldName (lt)","schema":{"type":"string"}},{"name":"filter[fieldName][lte]","in":"query","required":false,"description":"Filter fieldName (lte)","schema":{"type":"string"}},{"name":"filter[fieldName][in]","in":"query","required":false,"description":"Filter fieldName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fieldName][notIn]","in":"query","required":false,"description":"Filter fieldName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fieldName][between]","in":"query","required":false,"description":"Filter fieldName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fieldName][like]","in":"query","required":false,"description":"Filter fieldName (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["fieldName","-fieldName","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","fieldName","source","instanceName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/accountExternalIdentifierFieldsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List the external-identifier keys accounts accept","description":"Lists the external-identifier keys accounts accept: every active account external-identifier configuration. Send its fieldName in externalIdentifiers on POST accounting/accounts and POST accounting/accounts/bulk, and in createExternalIdentifiers on PATCH accounting/accounts/:id and PATCH accounting/accounts/bulk. A fieldName not listed here is rejected with UNKNOWN_EXTERNAL_IDENTIFIER. A deactivated configuration is not listed; identifiers an account already has under it can still be updated and deleted.\n\nEvery request must carry the Api-Version header: a missing or empty header, or one naming no API version, is answered 400; a route that exists but not in the requested version is answered 404.","tags":["accountingAccounts"]}},"/banking/bank-accounts/search":{"post":{"operationId":"searchBankAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBankAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBankAccountInput"}}}},"summary":"Search bank accounts","description":"Searches bank accounts. Only this endpoint can match a bank account by a name or an account number. GET banking/bank-accounts returns names and account numbers but can't filter on them.\n\nBank accounts deleted with DELETE banking/bank-accounts/:id are never returned.","tags":["bankingBankAccounts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/subscriptions/{id}/modify":{"post":{"operationId":"modifySubscription","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/modifySubscriptionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: SUBSCRIPTION_NOT_FOUND, SUBSCRIPTION_LINE_NOT_FOUND, MODIFICATION_DATE_OUTSIDE_SERVICE_PERIOD, QUANTITY_DECREASE_NOT_SUPPORTED, CHANGE_QUANTITY_UNSUPPORTED_LINE_TYPE, CHANGE_LINE_NO_CHANGES, REPLACED_LINE_NOT_ACTIVE, REPLACE_GROUP_INCOMPLETE, REPLACE_GROUP_START_DATE_MISMATCH, DUPLICATE_EXTERNAL_ORDER_ID, DUPLICATE_CANCEL_TARGET, SUBSCRIPTION_NOT_RENEWABLE, EARLY_RENEWAL_DATE_INVALID, SUBSCRIPTION_NOT_EARLY_RENEWABLE, EARLY_RENEWAL_ALREADY_PENDING, CHANGE_KIND_NOT_SUPPORTED, RENEWAL_TERM_MISSING, RENEWAL_ALREADY_PENDING, NOTHING_TO_MODIFY, SUBSCRIPTION_LINE_NOT_ACTIVE, MODIFICATION_DATE_REQUIRED, UNSUPPORTED_FIELDS, PRICE_CHANGE_PERCENTAGE_NEGATIVE, VALIDATION_FAILED, REPLACE_GROUP_RAMP_NOT_SUPPORTED, TOTAL_PRICE_REQUIRED, DUPLICATE_ADD_PRODUCT_LINE, ADD_LINE_ALREADY_RENEWED, ADD_LINE_TERM_MISMATCH, CHANGE_LINE_TOTAL_PRICE_REQUIRED, EXTERNALIZED_RAMP_CHANGE_NOT_SUPPORTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MODIFICATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"modificationDate":{"type":"string"}},"additionalProperties":false,"required":["id","modificationDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUANTITY_DECREASE_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_QUANTITY_UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_LINE_NO_CHANGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACED_LINE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_START_DATE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ORDER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalOrderId":{"type":"string"},"existingSalesOrderId":{"type":"string"}},"additionalProperties":false,"required":["externalOrderId","existingSalesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CANCEL_TARGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_RENEWABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EARLY_RENEWAL_DATE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"modificationDate":{"type":"string"}},"additionalProperties":false,"required":["id","modificationDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_EARLY_RENEWABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EARLY_RENEWAL_ALREADY_PENDING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_KIND_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RENEWAL_TERM_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RENEWAL_ALREADY_PENDING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_TO_MODIFY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_LINE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MODIFICATION_DATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FIELDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_CHANGE_PERCENTAGE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_RAMP_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOTAL_PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ADD_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADD_LINE_ALREADY_RENEWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADD_LINE_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_LINE_TOTAL_PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNALIZED_RAMP_CHANGE_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MODIFICATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"modificationDate":{"type":"string"}},"additionalProperties":false,"required":["id","modificationDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUANTITY_DECREASE_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_QUANTITY_UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_LINE_NO_CHANGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACED_LINE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_START_DATE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ORDER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalOrderId":{"type":"string"},"existingSalesOrderId":{"type":"string"}},"additionalProperties":false,"required":["externalOrderId","existingSalesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CANCEL_TARGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_RENEWABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EARLY_RENEWAL_DATE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"modificationDate":{"type":"string"}},"additionalProperties":false,"required":["id","modificationDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_EARLY_RENEWABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EARLY_RENEWAL_ALREADY_PENDING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_KIND_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RENEWAL_TERM_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RENEWAL_ALREADY_PENDING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_TO_MODIFY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_LINE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MODIFICATION_DATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FIELDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_CHANGE_PERCENTAGE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_RAMP_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOTAL_PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ADD_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADD_LINE_ALREADY_RENEWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADD_LINE_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_LINE_TOTAL_PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNALIZED_RAMP_CHANGE_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MODIFICATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"modificationDate":{"type":"string"}},"additionalProperties":false,"required":["id","modificationDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"QUANTITY_DECREASE_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_QUANTITY_UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_LINE_NO_CHANGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACED_LINE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_START_DATE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_ORDER_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalOrderId":{"type":"string"},"existingSalesOrderId":{"type":"string"}},"additionalProperties":false,"required":["externalOrderId","existingSalesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CANCEL_TARGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_RENEWABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EARLY_RENEWAL_DATE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"modificationDate":{"type":"string"}},"additionalProperties":false,"required":["id","modificationDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_EARLY_RENEWABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EARLY_RENEWAL_ALREADY_PENDING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_KIND_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RENEWAL_TERM_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RENEWAL_ALREADY_PENDING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_TO_MODIFY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_LINE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MODIFICATION_DATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FIELDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_CHANGE_PERCENTAGE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPLACE_GROUP_RAMP_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupIndex":{"type":"number"}},"additionalProperties":false,"required":["groupIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOTAL_PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ADD_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADD_LINE_ALREADY_RENEWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADD_LINE_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string"}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHANGE_LINE_TOTAL_PRICE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNALIZED_RAMP_CHANGE_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"subscriptionLineId":{"type":"string"}},"additionalProperties":false,"required":["subscriptionLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id of the subscription to modify (a UUID); bound from the :id path segment. Must belong to customerId."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/modifySubscriptionInput"}}}},"summary":"Modify or renew a subscription","description":"Modifies or renews a subscription. When modificationType is 'midTermModification', the changes to lines take effect on modificationDate. You can add products, including tiered, rate-card and ramp pricing, increase quantities, cancel lines, and replace products.\n\nEach 'midTermModification' request creates one subscription modification, whose id is subscriptionModificationId in the response. The request also creates one modification sales order, unless it only cancels lines.\n\nWhen modificationType is 'renew', the whole subscription renews for another term that starts the day after the current service end date. The request creates one renewal sales order that copies the subscription's active lines, plus any addLines, which run for the new term and join the subscription when the order is approved. Set renewExistingLines to false to send the whole new term instead: the order then carries only the addLines, like New Configuration on the subscription page.\n\nWhen modificationType is 'earlyRenew', the new term starts early, on modificationDate, which must fall after the current term's start. The request creates one early-renewal sales order that copies the lines active the day before, plus any addLines; with renewExistingLines false it carries only the addLines. On approval the current term ends on that date: its un-invoiced overlap is billed and its invoiced overlap is credited.\n\nTo cancel the whole subscription, use POST accounting/subscriptions/:id/cancel.","tags":["accountingSubscriptions"]}},"/accounting/price-books":{"get":{"operationId":"priceBooks","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isStandard]","in":"query","required":false,"description":"Filter isStandard (equality)","schema":{"type":"boolean"}},{"name":"filter[isStandard][ne]","in":"query","required":false,"description":"Filter isStandard (ne)","schema":{"type":"boolean"}},{"name":"filter[isStandard][gt]","in":"query","required":false,"description":"Filter isStandard (gt)","schema":{"type":"boolean"}},{"name":"filter[isStandard][gte]","in":"query","required":false,"description":"Filter isStandard (gte)","schema":{"type":"boolean"}},{"name":"filter[isStandard][lt]","in":"query","required":false,"description":"Filter isStandard (lt)","schema":{"type":"boolean"}},{"name":"filter[isStandard][lte]","in":"query","required":false,"description":"Filter isStandard (lte)","schema":{"type":"boolean"}},{"name":"filter[isStandard][in]","in":"query","required":false,"description":"Filter isStandard (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isStandard][notIn]","in":"query","required":false,"description":"Filter isStandard (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isStandard][between]","in":"query","required":false,"description":"Filter isStandard (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource]","in":"query","required":false,"description":"Filter dataSource (equality)","schema":{"type":"string"}},{"name":"filter[dataSource][ne]","in":"query","required":false,"description":"Filter dataSource (ne)","schema":{"type":"string"}},{"name":"filter[dataSource][gt]","in":"query","required":false,"description":"Filter dataSource (gt)","schema":{"type":"string"}},{"name":"filter[dataSource][gte]","in":"query","required":false,"description":"Filter dataSource (gte)","schema":{"type":"string"}},{"name":"filter[dataSource][lt]","in":"query","required":false,"description":"Filter dataSource (lt)","schema":{"type":"string"}},{"name":"filter[dataSource][lte]","in":"query","required":false,"description":"Filter dataSource (lte)","schema":{"type":"string"}},{"name":"filter[dataSource][in]","in":"query","required":false,"description":"Filter dataSource (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][notIn]","in":"query","required":false,"description":"Filter dataSource (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][between]","in":"query","required":false,"description":"Filter dataSource (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource][like]","in":"query","required":false,"description":"Filter dataSource (like)","schema":{"type":"string"}},{"name":"filter[createdDate]","in":"query","required":false,"description":"Filter createdDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][ne]","in":"query","required":false,"description":"Filter createdDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gt]","in":"query","required":false,"description":"Filter createdDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gte]","in":"query","required":false,"description":"Filter createdDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lt]","in":"query","required":false,"description":"Filter createdDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lte]","in":"query","required":false,"description":"Filter createdDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][in]","in":"query","required":false,"description":"Filter createdDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][notIn]","in":"query","required":false,"description":"Filter createdDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][between]","in":"query","required":false,"description":"Filter createdDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","priceBookName","-priceBookName","isStandard","-isStandard","active","-active","dataSource","-dataSource","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","priceBookName","priceBookNumber","description","active","isStandard","dataSource","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/priceBooksRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List price books","description":"Lists price books. To match on name or price book number, use POST accounting/price-books/search.","tags":["accountingPriceBooks"]},"post":{"operationId":"createPriceBook","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPriceBookOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"PRICE_BOOK_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookName":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["priceBookName","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRICE_BOOK_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPriceBookInput"}}}},"summary":"Create a price book","description":"Creates a price book. A price book created here always has isStandard set to false. Your tenant has exactly one standard price book, set up by seed data. This endpoint can't make another price book the standard.\n\nYou don't send priceBookNumber. The number comes from a number range.\n\nThe response contains only the new price book's id. Read the record with GET accounting/price-books/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPriceBooks"]}},"/accounting/customers/search":{"post":{"operationId":"searchCustomer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchCustomerOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchCustomerInput"}}}},"summary":"Search customers","description":"Searches customers.","tags":["accountingCustomers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/invoice-milestones/bulk":{"patch":{"operationId":"bulkUpdateInvoiceMilestones","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkUpdateInvoiceMilestonesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: MILESTONE_NOT_FOUND, DUPLICATE_MILESTONE, MILESTONE_LOCKED, PRODUCT_LINE_NOT_FOUND, PRODUCT_LINE_NOT_MILESTONE_BILLED, NO_MILESTONES, INVALID_AMOUNT, NO_PRODUCT_LINES, SALES_ORDER_NOT_EDITABLE, MILESTONES_NOT_FULLY_ALLOCATED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MILESTONE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone named twice."},"index":{"type":"number","description":"The position of the second row, from 0."}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that can't be changed."},"status":{"type":"string","description":"The milestone's status, 'released' or 'invoiced'."}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line identifier that matched no line of the order."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_MILESTONE_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line that is not invoiced by milestones."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_MILESTONES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order that was not changed."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MILESTONE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone named twice."},"index":{"type":"number","description":"The position of the second row, from 0."}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that can't be changed."},"status":{"type":"string","description":"The milestone's status, 'released' or 'invoiced'."}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line identifier that matched no line of the order."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_MILESTONE_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line that is not invoiced by milestones."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_MILESTONES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order that was not changed."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MILESTONE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone named twice."},"index":{"type":"number","description":"The position of the second row, from 0."}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that can't be changed."},"status":{"type":"string","description":"The milestone's status, 'released' or 'invoiced'."}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line identifier that matched no line of the order."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_MILESTONE_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line that is not invoiced by milestones."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_MILESTONES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order that was not changed."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkUpdateInvoiceMilestonesInput"}}}},"summary":"Update invoice milestones in bulk","description":"Changes open invoice milestones, all or nothing. Omit a field to leave it unchanged; salesOrderProductLineIds replaces the milestone's product lines when sent.\n\nAfter the call, each sales order's milestones must still cover the full amount of every product line they bill, so change all the amounts of an order that move together in one call.\n\nA released or invoiced milestone can't be changed. Unrelease a released one first with POST accounting/invoice-milestones/:id/unrelease.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingInvoiceMilestones"]},"post":{"operationId":"bulkCreateInvoiceMilestones","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateInvoiceMilestonesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: SALES_ORDER_NOT_FOUND, PRODUCT_LINE_NOT_FOUND, PRODUCT_LINE_NOT_MILESTONE_BILLED, NO_MILESTONES, INVALID_AMOUNT, NO_PRODUCT_LINES, SALES_ORDER_NOT_EDITABLE, MILESTONES_NOT_FULLY_ALLOCATED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order identifier that matched nothing."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line identifier that matched no line of the order."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_MILESTONE_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line that is not invoiced by milestones."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_MILESTONES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order that was not changed."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order identifier that matched nothing."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line identifier that matched no line of the order."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_MILESTONE_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line that is not invoiced by milestones."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_MILESTONES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order that was not changed."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order identifier that matched nothing."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line identifier that matched no line of the order."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_MILESTONE_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The product line that is not invoiced by milestones."},"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["salesOrderProductLineId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_MILESTONES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PRODUCT_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The row's position in the request, from 0."}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order that was not changed."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONES_NOT_FULLY_ALLOCATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose milestones don't add up."}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateInvoiceMilestonesInput"}}}},"summary":"Create invoice milestones in bulk","description":"Creates invoice milestones, all or nothing. Each row names its sales order and the Milestone-invoiced product lines it bills; its amount is spread over those lines in proportion to their totals.\n\nAfter the call, each sales order's milestones must cover the full amount of every product line they bill, so create all of an order's milestones in one call. The milestones an order already has are kept and count towards that total.\n\nNew milestones are open. Release one for invoicing with POST accounting/invoice-milestones/:id/release.\n\nThe response lists the new ids in the order of the rows.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingInvoiceMilestones"]}},"/banking/fund-transfers":{"post":{"operationId":"createFundTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createFundTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, SAME_ACCOUNT, TRANSFER_AMOUNT_NOT_POSITIVE, INVALID_EXCHANGE_RATE, GROUPING_ACCOUNT_NOT_ALLOWED, ACCOUNT_CURRENCY_MISSING, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, POSTING_PERIOD_NOT_OPEN","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account named on both sides."}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSFER_AMOUNT_NOT_POSITIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferAmount":{"type":"string","description":"The amount that was rejected."}},"additionalProperties":false,"required":["transferAmount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXCHANGE_RATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exchangeRate":{"type":"string","description":"The rate that was rejected."}},"additionalProperties":false,"required":["exchangeRate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the grouping account."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_CURRENCY_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account with no currency."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent."},"accountCurrency":{"type":"string","description":"The currency the from-account is denominated in."},"accountId":{"type":"string","description":"The identifier of the account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account."},"lineIndex":{"type":"number","description":"Which side of the transfer it is on. 0 is from and 1 is to."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferDate":{"type":"string","description":"The transfer date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The identifier of the legal entity whose books were checked."},"detail":{"type":"string","description":"What the period check reported."}},"additionalProperties":false,"required":["transferDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account named on both sides."}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSFER_AMOUNT_NOT_POSITIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferAmount":{"type":"string","description":"The amount that was rejected."}},"additionalProperties":false,"required":["transferAmount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXCHANGE_RATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exchangeRate":{"type":"string","description":"The rate that was rejected."}},"additionalProperties":false,"required":["exchangeRate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the grouping account."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_CURRENCY_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account with no currency."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent."},"accountCurrency":{"type":"string","description":"The currency the from-account is denominated in."},"accountId":{"type":"string","description":"The identifier of the account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account."},"lineIndex":{"type":"number","description":"Which side of the transfer it is on. 0 is from and 1 is to."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferDate":{"type":"string","description":"The transfer date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The identifier of the legal entity whose books were checked."},"detail":{"type":"string","description":"What the period check reported."}},"additionalProperties":false,"required":["transferDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account named on both sides."}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSFER_AMOUNT_NOT_POSITIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferAmount":{"type":"string","description":"The amount that was rejected."}},"additionalProperties":false,"required":["transferAmount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXCHANGE_RATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"exchangeRate":{"type":"string","description":"The rate that was rejected."}},"additionalProperties":false,"required":["exchangeRate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the grouping account."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_CURRENCY_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account with no currency."},"side":{"type":"string","description":"Which side of the transfer it is on. Possible values: 'from', 'to'."}},"additionalProperties":false,"required":["accountId","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency you sent."},"accountCurrency":{"type":"string","description":"The currency the from-account is denominated in."},"accountId":{"type":"string","description":"The identifier of the account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The identifier of the account."},"lineIndex":{"type":"number","description":"Which side of the transfer it is on. 0 is from and 1 is to."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transferDate":{"type":"string","description":"The transfer date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The identifier of the legal entity whose books were checked."},"detail":{"type":"string","description":"What the period check reported."}},"additionalProperties":false,"required":["transferDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createFundTransferInput"}}}},"summary":"Create a fund transfer","description":"Creates a fund transfer. The transfer's two lines are created from the request, so you don't send lines. The 'from' line is for fromAccountId and has transferAmount as a negative amount. The 'to' line is for toAccountId and has toAmount, or transferAmount when you leave toAmount out.\n\nThe response contains only the new transfer's id. To read the transfer and its lines, use GET banking/fund-transfers/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingFundTransfers"]},"get":{"operationId":"fundTransfers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[fundTransferNumber]","in":"query","required":false,"description":"Filter fundTransferNumber (equality)","schema":{"type":"string"}},{"name":"filter[fundTransferNumber][ne]","in":"query","required":false,"description":"Filter fundTransferNumber (ne)","schema":{"type":"string"}},{"name":"filter[fundTransferNumber][gt]","in":"query","required":false,"description":"Filter fundTransferNumber (gt)","schema":{"type":"string"}},{"name":"filter[fundTransferNumber][gte]","in":"query","required":false,"description":"Filter fundTransferNumber (gte)","schema":{"type":"string"}},{"name":"filter[fundTransferNumber][lt]","in":"query","required":false,"description":"Filter fundTransferNumber (lt)","schema":{"type":"string"}},{"name":"filter[fundTransferNumber][lte]","in":"query","required":false,"description":"Filter fundTransferNumber (lte)","schema":{"type":"string"}},{"name":"filter[fundTransferNumber][in]","in":"query","required":false,"description":"Filter fundTransferNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fundTransferNumber][notIn]","in":"query","required":false,"description":"Filter fundTransferNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fundTransferNumber][between]","in":"query","required":false,"description":"Filter fundTransferNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fundTransferNumber][like]","in":"query","required":false,"description":"Filter fundTransferNumber (like)","schema":{"type":"string"}},{"name":"filter[transferDate]","in":"query","required":false,"description":"Filter transferDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transferDate][ne]","in":"query","required":false,"description":"Filter transferDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transferDate][gt]","in":"query","required":false,"description":"Filter transferDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transferDate][gte]","in":"query","required":false,"description":"Filter transferDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transferDate][lt]","in":"query","required":false,"description":"Filter transferDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transferDate][lte]","in":"query","required":false,"description":"Filter transferDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transferDate][in]","in":"query","required":false,"description":"Filter transferDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transferDate][notIn]","in":"query","required":false,"description":"Filter transferDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transferDate][between]","in":"query","required":false,"description":"Filter transferDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[isVoided]","in":"query","required":false,"description":"Filter isVoided (equality)","schema":{"type":"boolean"}},{"name":"filter[isVoided][ne]","in":"query","required":false,"description":"Filter isVoided (ne)","schema":{"type":"boolean"}},{"name":"filter[isVoided][gt]","in":"query","required":false,"description":"Filter isVoided (gt)","schema":{"type":"boolean"}},{"name":"filter[isVoided][gte]","in":"query","required":false,"description":"Filter isVoided (gte)","schema":{"type":"boolean"}},{"name":"filter[isVoided][lt]","in":"query","required":false,"description":"Filter isVoided (lt)","schema":{"type":"boolean"}},{"name":"filter[isVoided][lte]","in":"query","required":false,"description":"Filter isVoided (lte)","schema":{"type":"boolean"}},{"name":"filter[isVoided][in]","in":"query","required":false,"description":"Filter isVoided (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isVoided][notIn]","in":"query","required":false,"description":"Filter isVoided (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isVoided][between]","in":"query","required":false,"description":"Filter isVoided (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isIntercompany]","in":"query","required":false,"description":"Filter isIntercompany (equality)","schema":{"type":"boolean"}},{"name":"filter[isIntercompany][ne]","in":"query","required":false,"description":"Filter isIntercompany (ne)","schema":{"type":"boolean"}},{"name":"filter[isIntercompany][gt]","in":"query","required":false,"description":"Filter isIntercompany (gt)","schema":{"type":"boolean"}},{"name":"filter[isIntercompany][gte]","in":"query","required":false,"description":"Filter isIntercompany (gte)","schema":{"type":"boolean"}},{"name":"filter[isIntercompany][lt]","in":"query","required":false,"description":"Filter isIntercompany (lt)","schema":{"type":"boolean"}},{"name":"filter[isIntercompany][lte]","in":"query","required":false,"description":"Filter isIntercompany (lte)","schema":{"type":"boolean"}},{"name":"filter[isIntercompany][in]","in":"query","required":false,"description":"Filter isIntercompany (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isIntercompany][notIn]","in":"query","required":false,"description":"Filter isIntercompany (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isIntercompany][between]","in":"query","required":false,"description":"Filter isIntercompany (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[externalPaymentId]","in":"query","required":false,"description":"Filter externalPaymentId (equality)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][ne]","in":"query","required":false,"description":"Filter externalPaymentId (ne)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][gt]","in":"query","required":false,"description":"Filter externalPaymentId (gt)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][gte]","in":"query","required":false,"description":"Filter externalPaymentId (gte)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][lt]","in":"query","required":false,"description":"Filter externalPaymentId (lt)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][lte]","in":"query","required":false,"description":"Filter externalPaymentId (lte)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][in]","in":"query","required":false,"description":"Filter externalPaymentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalPaymentId][notIn]","in":"query","required":false,"description":"Filter externalPaymentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalPaymentId][between]","in":"query","required":false,"description":"Filter externalPaymentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalPaymentId][like]","in":"query","required":false,"description":"Filter externalPaymentId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","fundTransferNumber","-fundTransferNumber","transferDate","-transferDate","transferAmount","-transferAmount","currency","-currency","isVoided","-isVoided","isIntercompany","-isIntercompany","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","fundTransferNumber","name","description","transferDate","transferAmount","currency","isVoided","isIntercompany","origin","externalPaymentId","fromAccountName","toAccountName","entityName","toEntityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/fundTransfersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List fund transfers","description":"Lists fund transfers. The collection doesn't include lines, exchangeRate, externalUrl, journalEntryNumber, or the account and legal entity ids. To get these fields, use GET banking/fund-transfers/:id or POST banking/fund-transfers/search. To filter by fromAccountId, toAccountId, entityId, entityName, or journalEntryNumber, use POST banking/fund-transfers/search.","tags":["bankingFundTransfers"]}},"/accounting/products/{id}/product-lines/{productLineId}/pricing":{"post":{"operationId":"createAccountingProductLinePricing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAccountingProductLinePricingOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND, UNKNOWN_PRICE_BOOK_IDS, UNKNOWN_BILLABLE_COMPONENT_IDS, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product the product line belongs to."},{"name":"productLineId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product line you want to add pricing to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAccountingProductLinePricingInput"}}}},"summary":"Add pricing headers to a product line","description":"Adds pricing headers to a product line. A pricing header sets a product line's prices for one price book and currency over a date range. Each price is a price book entry on the pricing header.\n\nA pricing header's validFrom and validTo must fall within the product's effective dates. Pricing headers on the same product line with the same price book and currency can't overlap in dates. A request that breaks either condition fails with VALIDATION_FAILED.\n\nIf any pricing header can't be created, none are. The response contains only the new pricing headers' ids. Read a pricing header with GET accounting/pricing/:id.","tags":["accounting/products/productLines"]}},"/accounting/invoices/import":{"post":{"operationId":"importInvoices","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/importInvoicesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"INVOICES_IMPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"taxExempt":{"value":{"data":{"ids":["f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"],"paymentIds":[]}},"summary":"A tax-exempt line — empty taxLines, not omitted"},"withPayment":{"value":{"data":{"ids":["f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"],"paymentIds":["4e2a7c90-1b3d-4f58-a6e1-7d9c2b5f0a83"]}},"summary":"An invoice and the card payment that already settled it"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: SALES_ORDER_NOT_FOUND, SALES_ORDER_NOT_EXTERNALISED, SALES_ORDER_NOT_APPROVED, NO_INVOICES_REQUESTED, NO_LINES, PAYMENT_DUPLICATE_EXTERNAL_ID, PAYMENT_NO_APPLICATIONS, PAYMENT_NON_POSITIVE_AMOUNT, PAYMENT_APPLICATIONS_EXCEED_AMOUNT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_INVOICES_REQUESTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_DUPLICATE_EXTERNAL_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NON_POSITIVE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_APPLICATIONS_EXCEED_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"},"applied":{"type":"string","format":"decimal"},"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["externalId","applied","amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICES_IMPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_INVOICES_REQUESTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_DUPLICATE_EXTERNAL_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NON_POSITIVE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_APPLICATIONS_EXCEED_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"},"applied":{"type":"string","format":"decimal"},"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["externalId","applied","amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICES_IMPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_INVOICES_REQUESTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_DUPLICATE_EXTERNAL_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NON_POSITIVE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"}},"additionalProperties":false,"required":["externalId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_APPLICATIONS_EXCEED_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalId":{"type":"string"},"applied":{"type":"string","format":"decimal"},"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["externalId","applied","amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICES_IMPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/importInvoicesInput"},"examples":{"taxExempt":{"value":{"salesOrderId":"8c1f4a92-3e77-4d21-9b05-6a2f1c8e4d33","invoices":[{"externalInvoiceId":"NS-INV-88214","invoiceDate":"2026-09-01","lines":[{"salesOrderProductLineId":"b2d7f309-6c14-4a85-9f37-0e8c5d1b7a26","plannedDate":"2026-09-01","totalPrice":"1000.00","taxExemptCode":"EXEMPT-EDU","taxLines":[]}]}]},"summary":"A tax-exempt line — empty taxLines, not omitted"},"withPayment":{"value":{"salesOrderId":"8c1f4a92-3e77-4d21-9b05-6a2f1c8e4d33","invoices":[{"externalInvoiceId":"NS-INV-88215","invoiceDate":"2026-09-01","lines":[{"salesOrderProductLineId":"b2d7f309-6c14-4a85-9f37-0e8c5d1b7a26","plannedDate":"2026-09-01","totalPrice":"1000.00","taxLines":[]}]}],"payments":[{"externalId":"pi_3Q0xK2LkdIwHu7ix0Z4m9cVb","paymentDate":"2026-09-03","amount":"1000.00","paymentType":"creditCard","applications":[{"externalInvoiceId":"NS-INV-88215","amount":"1000.00"}]}]},"summary":"An invoice and the card payment that already settled it"}}}}},"summary":"Import invoices","description":"Imports invoices from another system. Use it for sales orders that another system invoices, where externalizedInvoicing is true on GET accounting/sales-orders/:id.\n\nEach invoice is created exactly as you send it. It doesn't group lines into invoices, calculate tax, or apply one-time discounts for these orders.\n\nFor each line, send its total and its tax. For a tax-exempt line, send an empty taxLines array. Include any one-time discount in the line's totalPrice.\n\nEach line is matched to its planned invoicing line on the sales order by salesOrderProductLineId and plannedDate. If the sales order has no planned line for that date and its invoicing schedule is still open, one is created.\n\nTo record payments the source system already collected, send them in payments. Each payment states how much goes to which invoice; this system never decides the split. A payment can go to an invoice in the same request or to one imported for the sales order by an earlier call. Any part of a payment not applied stays unapplied on it.\n\nIf any invoice or payment can't be recorded, none are. The response lists the new invoices' ids and the new payments' ids, each in the order you sent them. To read an invoice, use GET accounting/invoices/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingInvoices"]}},"/accounting/subscriptions/search":{"post":{"operationId":"searchSubscription","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSubscriptionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSubscriptionInput"}}}},"summary":"Search subscriptions","description":"Searches subscriptions. Each subscription in the response is the full record, with its customer, legal entity, and lines. The response also includes cancellationNote and suspensionNote, which GET accounting/subscriptions doesn't return.","tags":["accountingSubscriptions"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/sales-orders":{"get":{"operationId":"salesOrders","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[orderNumber]","in":"query","required":false,"description":"Filter orderNumber (equality)","schema":{"type":"string"}},{"name":"filter[orderNumber][ne]","in":"query","required":false,"description":"Filter orderNumber (ne)","schema":{"type":"string"}},{"name":"filter[orderNumber][gt]","in":"query","required":false,"description":"Filter orderNumber (gt)","schema":{"type":"string"}},{"name":"filter[orderNumber][gte]","in":"query","required":false,"description":"Filter orderNumber (gte)","schema":{"type":"string"}},{"name":"filter[orderNumber][lt]","in":"query","required":false,"description":"Filter orderNumber (lt)","schema":{"type":"string"}},{"name":"filter[orderNumber][lte]","in":"query","required":false,"description":"Filter orderNumber (lte)","schema":{"type":"string"}},{"name":"filter[orderNumber][in]","in":"query","required":false,"description":"Filter orderNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[orderNumber][notIn]","in":"query","required":false,"description":"Filter orderNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[orderNumber][between]","in":"query","required":false,"description":"Filter orderNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[orderNumber][like]","in":"query","required":false,"description":"Filter orderNumber (like)","schema":{"type":"string"}},{"name":"filter[orderType]","in":"query","required":false,"description":"Filter orderType (equality)","schema":{"type":"string"}},{"name":"filter[orderType][ne]","in":"query","required":false,"description":"Filter orderType (ne)","schema":{"type":"string"}},{"name":"filter[orderType][gt]","in":"query","required":false,"description":"Filter orderType (gt)","schema":{"type":"string"}},{"name":"filter[orderType][gte]","in":"query","required":false,"description":"Filter orderType (gte)","schema":{"type":"string"}},{"name":"filter[orderType][lt]","in":"query","required":false,"description":"Filter orderType (lt)","schema":{"type":"string"}},{"name":"filter[orderType][lte]","in":"query","required":false,"description":"Filter orderType (lte)","schema":{"type":"string"}},{"name":"filter[orderType][in]","in":"query","required":false,"description":"Filter orderType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[orderType][notIn]","in":"query","required":false,"description":"Filter orderType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[orderType][between]","in":"query","required":false,"description":"Filter orderType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[orderType][like]","in":"query","required":false,"description":"Filter orderType (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[invoiceStatus]","in":"query","required":false,"description":"Filter invoiceStatus (equality)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][ne]","in":"query","required":false,"description":"Filter invoiceStatus (ne)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][gt]","in":"query","required":false,"description":"Filter invoiceStatus (gt)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][gte]","in":"query","required":false,"description":"Filter invoiceStatus (gte)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][lt]","in":"query","required":false,"description":"Filter invoiceStatus (lt)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][lte]","in":"query","required":false,"description":"Filter invoiceStatus (lte)","schema":{"type":"string"}},{"name":"filter[invoiceStatus][in]","in":"query","required":false,"description":"Filter invoiceStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceStatus][notIn]","in":"query","required":false,"description":"Filter invoiceStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceStatus][between]","in":"query","required":false,"description":"Filter invoiceStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceStatus][like]","in":"query","required":false,"description":"Filter invoiceStatus (like)","schema":{"type":"string"}},{"name":"filter[bookDate]","in":"query","required":false,"description":"Filter bookDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[bookDate][ne]","in":"query","required":false,"description":"Filter bookDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[bookDate][gt]","in":"query","required":false,"description":"Filter bookDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[bookDate][gte]","in":"query","required":false,"description":"Filter bookDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[bookDate][lt]","in":"query","required":false,"description":"Filter bookDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[bookDate][lte]","in":"query","required":false,"description":"Filter bookDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[bookDate][in]","in":"query","required":false,"description":"Filter bookDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookDate][notIn]","in":"query","required":false,"description":"Filter bookDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookDate][between]","in":"query","required":false,"description":"Filter bookDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceStartDate]","in":"query","required":false,"description":"Filter serviceStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][ne]","in":"query","required":false,"description":"Filter serviceStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][gt]","in":"query","required":false,"description":"Filter serviceStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][gte]","in":"query","required":false,"description":"Filter serviceStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][lt]","in":"query","required":false,"description":"Filter serviceStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][lte]","in":"query","required":false,"description":"Filter serviceStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceStartDate][in]","in":"query","required":false,"description":"Filter serviceStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceStartDate][notIn]","in":"query","required":false,"description":"Filter serviceStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceStartDate][between]","in":"query","required":false,"description":"Filter serviceStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceEndDate]","in":"query","required":false,"description":"Filter serviceEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][ne]","in":"query","required":false,"description":"Filter serviceEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][gt]","in":"query","required":false,"description":"Filter serviceEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][gte]","in":"query","required":false,"description":"Filter serviceEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][lt]","in":"query","required":false,"description":"Filter serviceEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][lte]","in":"query","required":false,"description":"Filter serviceEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceEndDate][in]","in":"query","required":false,"description":"Filter serviceEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceEndDate][notIn]","in":"query","required":false,"description":"Filter serviceEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceEndDate][between]","in":"query","required":false,"description":"Filter serviceEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[isEvergreen]","in":"query","required":false,"description":"Filter isEvergreen (equality)","schema":{"type":"boolean"}},{"name":"filter[isEvergreen][ne]","in":"query","required":false,"description":"Filter isEvergreen (ne)","schema":{"type":"boolean"}},{"name":"filter[isEvergreen][gt]","in":"query","required":false,"description":"Filter isEvergreen (gt)","schema":{"type":"boolean"}},{"name":"filter[isEvergreen][gte]","in":"query","required":false,"description":"Filter isEvergreen (gte)","schema":{"type":"boolean"}},{"name":"filter[isEvergreen][lt]","in":"query","required":false,"description":"Filter isEvergreen (lt)","schema":{"type":"boolean"}},{"name":"filter[isEvergreen][lte]","in":"query","required":false,"description":"Filter isEvergreen (lte)","schema":{"type":"boolean"}},{"name":"filter[isEvergreen][in]","in":"query","required":false,"description":"Filter isEvergreen (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isEvergreen][notIn]","in":"query","required":false,"description":"Filter isEvergreen (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isEvergreen][between]","in":"query","required":false,"description":"Filter isEvergreen (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[salesChannel]","in":"query","required":false,"description":"Filter salesChannel (equality)","schema":{"type":"string"}},{"name":"filter[salesChannel][ne]","in":"query","required":false,"description":"Filter salesChannel (ne)","schema":{"type":"string"}},{"name":"filter[salesChannel][gt]","in":"query","required":false,"description":"Filter salesChannel (gt)","schema":{"type":"string"}},{"name":"filter[salesChannel][gte]","in":"query","required":false,"description":"Filter salesChannel (gte)","schema":{"type":"string"}},{"name":"filter[salesChannel][lt]","in":"query","required":false,"description":"Filter salesChannel (lt)","schema":{"type":"string"}},{"name":"filter[salesChannel][lte]","in":"query","required":false,"description":"Filter salesChannel (lte)","schema":{"type":"string"}},{"name":"filter[salesChannel][in]","in":"query","required":false,"description":"Filter salesChannel (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesChannel][notIn]","in":"query","required":false,"description":"Filter salesChannel (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesChannel][between]","in":"query","required":false,"description":"Filter salesChannel (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[salesChannel][like]","in":"query","required":false,"description":"Filter salesChannel (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","orderNumber","-orderNumber","orderType","-orderType","approvalStatus","-approvalStatus","bookDate","-bookDate","serviceStartDate","-serviceStartDate","serviceEndDate","-serviceEndDate","currency","-currency","isEvergreen","-isEvergreen","term","-term","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","orderNumber","orderType","approvalStatus","invoiceStatus","bookDate","signDate","salesEffectiveDate","serviceStartDate","serviceEndDate","currency","isEvergreen","isPayAsYouGoOnly","term","totalContract","invoicedAmount","oneTimeDiscountAmount","oneTimeDiscountAllocation","exchangeRate","functionalCurrency","functionalTotalContract","functionalInvoicedAmount","purchaseOrder","salesChannel","customerId","customerName","customerNumber","entityId","entityName","entityNumber","salesArrangement","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/salesOrdersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List sales orders","description":"Lists sales orders. Each sales order is returned with its header fields, amounts, and customer and entity ids. For the customer record, the addresses, and the external identifiers, use GET accounting/sales-orders/:id. The products and their priced lines are the salesOrderProducts and salesOrderProductLines collections. To filter by purchase order or external identifier, use POST accounting/sales-orders/search.","tags":["accountingSalesOrders"]},"post":{"operationId":"createSalesOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSalesOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_PRODUCT_LINE, INVALID_SUBSCRIPTION_PRODUCT, UNKNOWN_EXTERNAL_IDENTIFIER, UNKNOWN_REFERENCE, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"The referenced product line that does not exist — or is not a UUID at all.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION_PRODUCT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"The product line placed under a subscription although its line type is not subscription-based. Move it to `nonSubscriptionProducts`.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entity":{"type":"string","description":"Which kind of record could not be resolved: `Entity`, `Customer`, `PriceBook` or `SalesArrangement`.","examples":["Customer"]},"id":{"type":"string","description":"The id that did not resolve. A value that is not a UUID is reported here too, rather than being passed to the database.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]}},"additionalProperties":false,"required":["entity","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every `externalIdentifiers[].fieldName` in the request, on the order or on a product line, that is not configured for that level in your tenant. Nothing is created.","examples":[["netsuiteInternalId"]]}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"Which field of `customer` named nothing: `paymentTermCode`, `parentId` or `partnerId`.","examples":["parentId"]},"uuid":{"type":"string","description":"The identifier that was sent. For `paymentTermCode` it is the code rather than a uuid, and names a term the customer's entity has not been assigned.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it.","examples":["quantity is required for product line type 'oneTime'. No changes applied."]}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"The referenced product line that does not exist — or is not a UUID at all.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION_PRODUCT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"The product line placed under a subscription although its line type is not subscription-based. Move it to `nonSubscriptionProducts`.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entity":{"type":"string","description":"Which kind of record could not be resolved: `Entity`, `Customer`, `PriceBook` or `SalesArrangement`.","examples":["Customer"]},"id":{"type":"string","description":"The id that did not resolve. A value that is not a UUID is reported here too, rather than being passed to the database.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]}},"additionalProperties":false,"required":["entity","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every `externalIdentifiers[].fieldName` in the request, on the order or on a product line, that is not configured for that level in your tenant. Nothing is created.","examples":[["netsuiteInternalId"]]}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"Which field of `customer` named nothing: `paymentTermCode`, `parentId` or `partnerId`.","examples":["parentId"]},"uuid":{"type":"string","description":"The identifier that was sent. For `paymentTermCode` it is the code rather than a uuid, and names a term the customer's entity has not been assigned.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it.","examples":["quantity is required for product line type 'oneTime'. No changes applied."]}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_PRODUCT_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"The referenced product line that does not exist — or is not a UUID at all.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SUBSCRIPTION_PRODUCT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineId":{"type":"string","description":"The product line placed under a subscription although its line type is not subscription-based. Move it to `nonSubscriptionProducts`.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]}},"additionalProperties":false,"required":["productLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entity":{"type":"string","description":"Which kind of record could not be resolved: `Entity`, `Customer`, `PriceBook` or `SalesArrangement`.","examples":["Customer"]},"id":{"type":"string","description":"The id that did not resolve. A value that is not a UUID is reported here too, rather than being passed to the database.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]}},"additionalProperties":false,"required":["entity","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every `externalIdentifiers[].fieldName` in the request, on the order or on a product line, that is not configured for that level in your tenant. Nothing is created.","examples":[["netsuiteInternalId"]]}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"Which field of `customer` named nothing: `paymentTermCode`, `parentId` or `partnerId`.","examples":["parentId"]},"uuid":{"type":"string","description":"The identifier that was sent. For `paymentTermCode` it is the code rather than a uuid, and names a term the customer's entity has not been assigned.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]}},"additionalProperties":false,"required":["field","uuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it.","examples":["quantity is required for product line type 'oneTime'. No changes applied."]}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSalesOrderInput"}}}},"summary":"Create a sales order","description":"Creates a sales order with its products, subscriptions and pricing in one transaction. Attach to an existing customer with `customerId`, or create one inline with `customer`. Products are grouped as `subscriptions[]` (recurring, each with its own product lines) and `nonSubscriptionProducts[]` (one-time). Line pricing is reconciled from listPrice: supply `unitPrice`, or `discountAmount`, or `discountPercentage` (precedence in that order) and the rest is derived; tiered/volume/stairstep/rateCard lines carry their prices on `tiers`/`rateCardEntries` instead. A Prepaid line goes under a subscription with its credits as `quantity` and optional `prepaidConfiguration`; its usage line is added from the catalog unless the caller lists it. Rolled back atomically on any validation failure.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingSalesOrders"]}},"/accounting/invoice-milestones/{id}/unrelease":{"post":{"operationId":"unreleaseInvoiceMilestone","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/unreleaseInvoiceMilestoneOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_RELEASED, ALREADY_INVOICED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_RELEASED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that is open."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The invoiced milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_RELEASED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that is open."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The invoiced milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_RELEASED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The milestone that is open."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The invoiced milestone."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice milestone whose release you want to undo.","example":"4b8f2d61-0c3e-4f7a-9a15-6e2d8c90b7a4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/unreleaseInvoiceMilestoneInput"}}}},"summary":"Undo the release of an invoice milestone","description":"Undoes the release of an invoice milestone that is not invoiced yet. The invoice plan lines the release created are deleted, and the milestone is open again: it can be changed, and released again later.\n\nA milestone that is invoiced can't be unreleased.\n\nThe response is empty. Read the milestone with GET accounting/invoice-milestones/:id to see its status 'open'.","tags":["accountingInvoiceMilestones"]}},"/accounting/products/{id}":{"get":{"operationId":"getAccountingProduct","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountingProductOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product you want to retrieve."}],"summary":"Retrieve a product","description":"Retrieves a product. Use the product's id, not its productNumber or productCode.\n\nThe response doesn't include the product's product lines. To get the product lines, use GET accounting/product-lines and filter by productId.","tags":["accounting/products"]},"patch":{"operationId":"updateAccountingProduct","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAccountingProductOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND, DUPLICATE_PRODUCT_CODE, UNKNOWN_ITEM_IDS, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PRODUCT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["productCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ITEM_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["itemIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAccountingProductInput"}}}},"summary":"Update a product","description":"Updates a product with the fields you send. A field you leave out keeps its current value.\n\nUse the product's id, not its productNumber or productCode.\n\nAn itemIds list you send replaces the whole list of linked inventory items, so include every item you want to keep.\n\nYou can't change the product's legal entity with this endpoint. If the request fails, the product is left unchanged.\n\nThe response is empty. Read the updated record with GET accounting/products/:id.","tags":["accounting/products"]}},"/accounting/accounts/search":{"post":{"operationId":"searchAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAccountOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_PAGE_SIZE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PAGE_SIZE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The page size you sent."}},"additionalProperties":false,"required":["provided"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PAGE_SIZE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number","description":"The page size you sent."}},"additionalProperties":false,"required":["provided"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAccountInput"}}}},"summary":"Search accounts","description":"Searches accounts.","tags":["accountingAccounts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/products/{id}/product-lines":{"post":{"operationId":"addAccountingProductLines","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/addAccountingProductLinesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND, UNKNOWN_PRICE_BOOK_IDS, UNKNOWN_BILLABLE_COMPONENT_IDS, UNKNOWN_TAX_ENTITY_IDS, UNSUPPORTED_LINE_TYPE, USAGE_PRICING_NOT_APPLICABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TAX_ENTITY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entityIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_LINE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"}},"additionalProperties":false,"required":["lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USAGE_PRICING_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineType":{"type":"string"},"priceModel":{"type":"string"}},"additionalProperties":false,"required":["lineType","priceModel"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product you want to add product lines to."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/addAccountingProductLinesInput"}}}},"summary":"Add product lines to a product","description":"Adds one or more product lines, each with optional pricing and tax records, to an existing product in a single request. If any product line can't be added, none are.\n\nThe response contains only the ids of the created product lines, in the order you sent them. Read each product line with GET accounting/product-lines/:id.\n\nA 'prepaid' line, a 'recurring' line priced 'thresholdBased', or a 'recurring' line with a trueUpEstimationMethod also creates a paired 'usage' line whose id is not returned. To find the paired 'usage' line, use POST accounting/product-lines/search with filters.parentProductLineId set to the parent line's id.","tags":["accounting/products/productLines"]}},"/accounting/revenue-scheduling-templates/{id}":{"get":{"operationId":"getRevenueSchedulingTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getRevenueSchedulingTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revenue scheduling template you want to retrieve."}],"summary":"Retrieve a revenue scheduling template","description":"Retrieves a revenue scheduling template. Use the revenue scheduling template's id, not its revenueSchedulingTemplateNumber.","tags":["accountingRevenueSchedulingTemplates"]}},"/accounting/invoice-runs":{"post":{"operationId":"startInvoiceRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/startInvoiceRunOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"INVOICE_RUN_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_HELD_BACK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unresolvedRunId":{"type":"string"}},"additionalProperties":false,"required":["unresolvedRunId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false},"examples":{"chosenInstalments":{"value":{"data":{"data":{"id":"b3f7a219-8d64-4c05-9e42-1a8f0b5d6c27","invoiceRunNumber":"ISR-1043","status":"running","invoicesCreated":0}}},"summary":"Bill two named installments of one order and nothing else"},"customerUpTo":{"value":{"data":{"data":{"id":"5e2a9c81-7f43-4b60-8d19-3c6b0a4e8f52","invoiceRunNumber":"ISR-1044","status":"running","invoicesCreated":0}}},"summary":"Bill a whole customer up to a cut-off, asynchronously"},"heldBackByEarlierFailure":{"value":{"data":{"data":{"id":"9a7c4e12-6b58-4d03-8f27-2e5a1b9c0d46","invoiceRunNumber":"ISR-1045","status":"completed","invoicesCreated":0,"unresolvedRunId":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91"}}},"summary":"The selection produced nothing because an earlier run's failures are held back"},"wholeEntityUpTo":{"value":{"data":{"data":{"id":"7c4d1e93-2a58-4f16-b073-5e9a2c8b4d61","invoiceRunNumber":"ISR-1046","status":"running","invoicesCreated":0}}},"summary":"Bill every approved order in a legal entity up to a cut-off — the scope the scheduled nightly run uses"},"wholeOrder":{"value":{"data":{"data":{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completed","invoicesCreated":3}}},"summary":"Bill everything a sales order has pending, waiting for the result"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_TARGET_GIVEN, MULTIPLE_TARGETS_GIVEN, SALES_ORDER_NOT_FOUND, CUSTOMER_NOT_FOUND, ENTITY_NOT_FOUND, SALES_ORDER_EXTERNALISED, SALES_ORDER_NOT_APPROVED, BILL_UP_TO_NOT_APPLICABLE, BILLING_DATES_NOT_APPLICABLE, BILL_UP_TO_REQUIRED, ACCOUNTING_PERIOD_CLOSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_TARGET_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_TARGETS_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"given":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["given"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_DATES_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_HELD_BACK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unresolvedRunId":{"type":"string"}},"additionalProperties":false,"required":["unresolvedRunId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_TARGET_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_TARGETS_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"given":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["given"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_DATES_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_HELD_BACK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unresolvedRunId":{"type":"string"}},"additionalProperties":false,"required":["unresolvedRunId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_TARGET_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_TARGETS_GIVEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"given":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["given"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_EXTERNALISED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderId":{"type":"string"},"approvalStatus":{"type":"string"}},"additionalProperties":false,"required":["salesOrderId","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_DATES_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_UP_TO_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_HELD_BACK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unresolvedRunId":{"type":"string"}},"additionalProperties":false,"required":["unresolvedRunId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/startInvoiceRunInput"},"examples":{"chosenInstalments":{"value":{"salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","billingDates":["2026-09-01","2026-10-01"]},"summary":"Bill two named installments of one order and nothing else"},"customerUpTo":{"value":{"customerId":"d41d8cd9-8f00-4b20-a204-9800998ecf84","billUpTo":"2026-09-30","scope":["oneTimeAndRecurring"]},"summary":"Bill a whole customer up to a cut-off, asynchronously"},"heldBackByEarlierFailure":{"value":{"salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","sync":true},"summary":"The selection produced nothing because an earlier run's failures are held back"},"wholeEntityUpTo":{"value":{"entityId":"6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53","billUpTo":"2026-09-30"},"summary":"Bill every approved order in a legal entity up to a cut-off — the scope the scheduled nightly run uses"},"wholeOrder":{"value":{"salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","sync":true},"summary":"Bill everything a sales order has pending, waiting for the result"}}}}},"summary":"Start an invoice run","description":"Starts an invoice run for a sales order, customer, or legal entity. A run links each invoice it creates to itself and saves an error for each line that fails. The response contains the run's id.\n\nSend exactly one of 'salesOrderId', 'customerId', or 'entityId'. The date field you send depends on that choice. A sales order run takes 'billingDates', the exact planned dates to invoice, and a customer or legal entity run needs 'billUpTo', which invoices everything planned on or before that date.\n\nBy default the request returns while the run is working, and you poll GET accounting/invoice-runs/:id. Set 'sync' to true to wait for the final status instead. A customer or legal entity run can take minutes, so use 'sync' for a single sales order.\n\nA new run leaves out lines that failed in an earlier run. For a sales order run with 'sync' set to true, if that leaves nothing to invoice, the response includes 'unresolvedRunId'. Send POST accounting/invoice-runs/:id/rerun for that run instead of repeating this request.\n\nWhile an asynchronous run is working, another request with the same target, 'scope', dates, and 'invoiceDate' joins that run and doesn't invoice the same lines twice. The response then has 'deduplicated' set to true, so you can retry a request that timed out. After the run finishes, the same request starts a new run.\n\nThis protection doesn't apply when 'sync' is true, so two identical requests with 'sync' set to true can both invoice the same lines.\n\nFor a sales order that another system invoices, the request fails with SALES_ORDER_EXTERNALISED. Import its invoices with POST accounting/invoices/import.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingInvoiceRuns"]},"get":{"operationId":"invoiceRuns","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber]","in":"query","required":false,"description":"Filter invoiceRunNumber (equality)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][ne]","in":"query","required":false,"description":"Filter invoiceRunNumber (ne)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][gt]","in":"query","required":false,"description":"Filter invoiceRunNumber (gt)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][gte]","in":"query","required":false,"description":"Filter invoiceRunNumber (gte)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][lt]","in":"query","required":false,"description":"Filter invoiceRunNumber (lt)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][lte]","in":"query","required":false,"description":"Filter invoiceRunNumber (lte)","schema":{"type":"string"}},{"name":"filter[invoiceRunNumber][in]","in":"query","required":false,"description":"Filter invoiceRunNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceRunNumber][notIn]","in":"query","required":false,"description":"Filter invoiceRunNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceRunNumber][between]","in":"query","required":false,"description":"Filter invoiceRunNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceRunNumber][like]","in":"query","required":false,"description":"Filter invoiceRunNumber (like)","schema":{"type":"string"}},{"name":"filter[trigger]","in":"query","required":false,"description":"Filter trigger (equality)","schema":{"type":"string"}},{"name":"filter[trigger][ne]","in":"query","required":false,"description":"Filter trigger (ne)","schema":{"type":"string"}},{"name":"filter[trigger][gt]","in":"query","required":false,"description":"Filter trigger (gt)","schema":{"type":"string"}},{"name":"filter[trigger][gte]","in":"query","required":false,"description":"Filter trigger (gte)","schema":{"type":"string"}},{"name":"filter[trigger][lt]","in":"query","required":false,"description":"Filter trigger (lt)","schema":{"type":"string"}},{"name":"filter[trigger][lte]","in":"query","required":false,"description":"Filter trigger (lte)","schema":{"type":"string"}},{"name":"filter[trigger][in]","in":"query","required":false,"description":"Filter trigger (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[trigger][notIn]","in":"query","required":false,"description":"Filter trigger (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[trigger][between]","in":"query","required":false,"description":"Filter trigger (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[trigger][like]","in":"query","required":false,"description":"Filter trigger (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[salesOrderId]","in":"query","required":false,"description":"Filter salesOrderId (equality)","schema":{"type":"string"}},{"name":"filter[salesOrderId][ne]","in":"query","required":false,"description":"Filter salesOrderId (ne)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gt]","in":"query","required":false,"description":"Filter salesOrderId (gt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][gte]","in":"query","required":false,"description":"Filter salesOrderId (gte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lt]","in":"query","required":false,"description":"Filter salesOrderId (lt)","schema":{"type":"string"}},{"name":"filter[salesOrderId][lte]","in":"query","required":false,"description":"Filter salesOrderId (lte)","schema":{"type":"string"}},{"name":"filter[salesOrderId][in]","in":"query","required":false,"description":"Filter salesOrderId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][notIn]","in":"query","required":false,"description":"Filter salesOrderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[salesOrderId][between]","in":"query","required":false,"description":"Filter salesOrderId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[salesOrderId][like]","in":"query","required":false,"description":"Filter salesOrderId (like)","schema":{"type":"string"}},{"name":"filter[startedAt]","in":"query","required":false,"description":"Filter startedAt (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][ne]","in":"query","required":false,"description":"Filter startedAt (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][gt]","in":"query","required":false,"description":"Filter startedAt (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][gte]","in":"query","required":false,"description":"Filter startedAt (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][lt]","in":"query","required":false,"description":"Filter startedAt (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][lte]","in":"query","required":false,"description":"Filter startedAt (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startedAt][in]","in":"query","required":false,"description":"Filter startedAt (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startedAt][notIn]","in":"query","required":false,"description":"Filter startedAt (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startedAt][between]","in":"query","required":false,"description":"Filter startedAt (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[finishedAt]","in":"query","required":false,"description":"Filter finishedAt (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][ne]","in":"query","required":false,"description":"Filter finishedAt (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][gt]","in":"query","required":false,"description":"Filter finishedAt (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][gte]","in":"query","required":false,"description":"Filter finishedAt (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][lt]","in":"query","required":false,"description":"Filter finishedAt (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][lte]","in":"query","required":false,"description":"Filter finishedAt (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[finishedAt][in]","in":"query","required":false,"description":"Filter finishedAt (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[finishedAt][notIn]","in":"query","required":false,"description":"Filter finishedAt (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[finishedAt][between]","in":"query","required":false,"description":"Filter finishedAt (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["invoiceRunNumber","-invoiceRunNumber","startedAt","-startedAt","finishedAt","-finishedAt","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","invoiceRunNumber","status","invoicesCreated","trigger","scope","entityId","salesOrderId","startedAt","finishedAt","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceRunsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completed","invoicesCreated":3,"trigger":"immediately","scope":"all","entityId":"6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53","salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","startedAt":"2026-09-30T08:14:22.000Z","finishedAt":"2026-09-30T08:14:41.000Z","lastModifiedDate":"2026-09-30T08:14:41.000Z"},{"id":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91","invoiceRunNumber":"ISR-1039","status":"completeAndError","invoicesCreated":12,"trigger":"monthly","scope":"oneTimeAndRecurring;usageInArrears","entityId":"6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53","startedAt":"2026-09-01T02:00:00.000Z","finishedAt":"2026-09-01T02:07:33.000Z","lastModifiedDate":"2026-09-01T02:07:33.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List invoice runs","description":"Lists invoice runs. The collection doesn't include customerId, invoices, errors, or progress. To see a run's invoices and errors, use GET accounting/invoice-runs/:id.\n\nIf a run shows 'running' for much longer than a run usually takes, read the run with GET accounting/invoice-runs/:id to get its corrected 'status'. 'scope' here is one text value, where GET accounting/invoice-runs/:id returns an array.\n\nTo find a customer's invoices, use GET accounting/invoices filtered by customerId.","tags":["accountingInvoiceRuns"]}},"/accounting/product-lines":{"get":{"operationId":"productLines","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[productId]","in":"query","required":false,"description":"Filter productId (equality)","schema":{"type":"string"}},{"name":"filter[productId][ne]","in":"query","required":false,"description":"Filter productId (ne)","schema":{"type":"string"}},{"name":"filter[productId][gt]","in":"query","required":false,"description":"Filter productId (gt)","schema":{"type":"string"}},{"name":"filter[productId][gte]","in":"query","required":false,"description":"Filter productId (gte)","schema":{"type":"string"}},{"name":"filter[productId][lt]","in":"query","required":false,"description":"Filter productId (lt)","schema":{"type":"string"}},{"name":"filter[productId][lte]","in":"query","required":false,"description":"Filter productId (lte)","schema":{"type":"string"}},{"name":"filter[productId][in]","in":"query","required":false,"description":"Filter productId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productId][notIn]","in":"query","required":false,"description":"Filter productId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[productId][between]","in":"query","required":false,"description":"Filter productId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[productId][like]","in":"query","required":false,"description":"Filter productId (like)","schema":{"type":"string"}},{"name":"filter[lineType]","in":"query","required":false,"description":"Filter lineType (equality)","schema":{"type":"string"}},{"name":"filter[lineType][ne]","in":"query","required":false,"description":"Filter lineType (ne)","schema":{"type":"string"}},{"name":"filter[lineType][gt]","in":"query","required":false,"description":"Filter lineType (gt)","schema":{"type":"string"}},{"name":"filter[lineType][gte]","in":"query","required":false,"description":"Filter lineType (gte)","schema":{"type":"string"}},{"name":"filter[lineType][lt]","in":"query","required":false,"description":"Filter lineType (lt)","schema":{"type":"string"}},{"name":"filter[lineType][lte]","in":"query","required":false,"description":"Filter lineType (lte)","schema":{"type":"string"}},{"name":"filter[lineType][in]","in":"query","required":false,"description":"Filter lineType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lineType][notIn]","in":"query","required":false,"description":"Filter lineType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lineType][between]","in":"query","required":false,"description":"Filter lineType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lineType][like]","in":"query","required":false,"description":"Filter lineType (like)","schema":{"type":"string"}},{"name":"filter[priceModel]","in":"query","required":false,"description":"Filter priceModel (equality)","schema":{"type":"string"}},{"name":"filter[priceModel][ne]","in":"query","required":false,"description":"Filter priceModel (ne)","schema":{"type":"string"}},{"name":"filter[priceModel][gt]","in":"query","required":false,"description":"Filter priceModel (gt)","schema":{"type":"string"}},{"name":"filter[priceModel][gte]","in":"query","required":false,"description":"Filter priceModel (gte)","schema":{"type":"string"}},{"name":"filter[priceModel][lt]","in":"query","required":false,"description":"Filter priceModel (lt)","schema":{"type":"string"}},{"name":"filter[priceModel][lte]","in":"query","required":false,"description":"Filter priceModel (lte)","schema":{"type":"string"}},{"name":"filter[priceModel][in]","in":"query","required":false,"description":"Filter priceModel (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priceModel][notIn]","in":"query","required":false,"description":"Filter priceModel (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priceModel][between]","in":"query","required":false,"description":"Filter priceModel (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[priceModel][like]","in":"query","required":false,"description":"Filter priceModel (like)","schema":{"type":"string"}},{"name":"filter[pricingTerm]","in":"query","required":false,"description":"Filter pricingTerm (equality)","schema":{"type":"string"}},{"name":"filter[pricingTerm][ne]","in":"query","required":false,"description":"Filter pricingTerm (ne)","schema":{"type":"string"}},{"name":"filter[pricingTerm][gt]","in":"query","required":false,"description":"Filter pricingTerm (gt)","schema":{"type":"string"}},{"name":"filter[pricingTerm][gte]","in":"query","required":false,"description":"Filter pricingTerm (gte)","schema":{"type":"string"}},{"name":"filter[pricingTerm][lt]","in":"query","required":false,"description":"Filter pricingTerm (lt)","schema":{"type":"string"}},{"name":"filter[pricingTerm][lte]","in":"query","required":false,"description":"Filter pricingTerm (lte)","schema":{"type":"string"}},{"name":"filter[pricingTerm][in]","in":"query","required":false,"description":"Filter pricingTerm (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[pricingTerm][notIn]","in":"query","required":false,"description":"Filter pricingTerm (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[pricingTerm][between]","in":"query","required":false,"description":"Filter pricingTerm (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[pricingTerm][like]","in":"query","required":false,"description":"Filter pricingTerm (like)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency]","in":"query","required":false,"description":"Filter invoiceFrequency (equality)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][ne]","in":"query","required":false,"description":"Filter invoiceFrequency (ne)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][gt]","in":"query","required":false,"description":"Filter invoiceFrequency (gt)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][gte]","in":"query","required":false,"description":"Filter invoiceFrequency (gte)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][lt]","in":"query","required":false,"description":"Filter invoiceFrequency (lt)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][lte]","in":"query","required":false,"description":"Filter invoiceFrequency (lte)","schema":{"type":"string"}},{"name":"filter[invoiceFrequency][in]","in":"query","required":false,"description":"Filter invoiceFrequency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceFrequency][notIn]","in":"query","required":false,"description":"Filter invoiceFrequency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceFrequency][between]","in":"query","required":false,"description":"Filter invoiceFrequency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiceFrequency][like]","in":"query","required":false,"description":"Filter invoiceFrequency (like)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure]","in":"query","required":false,"description":"Filter unitOfMeasure (equality)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][ne]","in":"query","required":false,"description":"Filter unitOfMeasure (ne)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][gt]","in":"query","required":false,"description":"Filter unitOfMeasure (gt)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][gte]","in":"query","required":false,"description":"Filter unitOfMeasure (gte)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][lt]","in":"query","required":false,"description":"Filter unitOfMeasure (lt)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][lte]","in":"query","required":false,"description":"Filter unitOfMeasure (lte)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][in]","in":"query","required":false,"description":"Filter unitOfMeasure (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitOfMeasure][notIn]","in":"query","required":false,"description":"Filter unitOfMeasure (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitOfMeasure][between]","in":"query","required":false,"description":"Filter unitOfMeasure (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitOfMeasure][like]","in":"query","required":false,"description":"Filter unitOfMeasure (like)","schema":{"type":"string"}},{"name":"filter[taxMode]","in":"query","required":false,"description":"Filter taxMode (equality)","schema":{"type":"string"}},{"name":"filter[taxMode][ne]","in":"query","required":false,"description":"Filter taxMode (ne)","schema":{"type":"string"}},{"name":"filter[taxMode][gt]","in":"query","required":false,"description":"Filter taxMode (gt)","schema":{"type":"string"}},{"name":"filter[taxMode][gte]","in":"query","required":false,"description":"Filter taxMode (gte)","schema":{"type":"string"}},{"name":"filter[taxMode][lt]","in":"query","required":false,"description":"Filter taxMode (lt)","schema":{"type":"string"}},{"name":"filter[taxMode][lte]","in":"query","required":false,"description":"Filter taxMode (lte)","schema":{"type":"string"}},{"name":"filter[taxMode][in]","in":"query","required":false,"description":"Filter taxMode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxMode][notIn]","in":"query","required":false,"description":"Filter taxMode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxMode][between]","in":"query","required":false,"description":"Filter taxMode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[taxMode][like]","in":"query","required":false,"description":"Filter taxMode (like)","schema":{"type":"string"}},{"name":"filter[enforceListPrice]","in":"query","required":false,"description":"Filter enforceListPrice (equality)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][ne]","in":"query","required":false,"description":"Filter enforceListPrice (ne)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][gt]","in":"query","required":false,"description":"Filter enforceListPrice (gt)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][gte]","in":"query","required":false,"description":"Filter enforceListPrice (gte)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][lt]","in":"query","required":false,"description":"Filter enforceListPrice (lt)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][lte]","in":"query","required":false,"description":"Filter enforceListPrice (lte)","schema":{"type":"boolean"}},{"name":"filter[enforceListPrice][in]","in":"query","required":false,"description":"Filter enforceListPrice (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[enforceListPrice][notIn]","in":"query","required":false,"description":"Filter enforceListPrice (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[enforceListPrice][between]","in":"query","required":false,"description":"Filter enforceListPrice (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hasUsage]","in":"query","required":false,"description":"Filter hasUsage (equality)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][ne]","in":"query","required":false,"description":"Filter hasUsage (ne)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][gt]","in":"query","required":false,"description":"Filter hasUsage (gt)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][gte]","in":"query","required":false,"description":"Filter hasUsage (gte)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][lt]","in":"query","required":false,"description":"Filter hasUsage (lt)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][lte]","in":"query","required":false,"description":"Filter hasUsage (lte)","schema":{"type":"boolean"}},{"name":"filter[hasUsage][in]","in":"query","required":false,"description":"Filter hasUsage (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasUsage][notIn]","in":"query","required":false,"description":"Filter hasUsage (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasUsage][between]","in":"query","required":false,"description":"Filter hasUsage (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hasBeenUsed]","in":"query","required":false,"description":"Filter hasBeenUsed (equality)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][ne]","in":"query","required":false,"description":"Filter hasBeenUsed (ne)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][gt]","in":"query","required":false,"description":"Filter hasBeenUsed (gt)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][gte]","in":"query","required":false,"description":"Filter hasBeenUsed (gte)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][lt]","in":"query","required":false,"description":"Filter hasBeenUsed (lt)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][lte]","in":"query","required":false,"description":"Filter hasBeenUsed (lte)","schema":{"type":"boolean"}},{"name":"filter[hasBeenUsed][in]","in":"query","required":false,"description":"Filter hasBeenUsed (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasBeenUsed][notIn]","in":"query","required":false,"description":"Filter hasBeenUsed (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasBeenUsed][between]","in":"query","required":false,"description":"Filter hasBeenUsed (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentProductLineId]","in":"query","required":false,"description":"Filter parentProductLineId (equality)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][ne]","in":"query","required":false,"description":"Filter parentProductLineId (ne)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][gt]","in":"query","required":false,"description":"Filter parentProductLineId (gt)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][gte]","in":"query","required":false,"description":"Filter parentProductLineId (gte)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][lt]","in":"query","required":false,"description":"Filter parentProductLineId (lt)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][lte]","in":"query","required":false,"description":"Filter parentProductLineId (lte)","schema":{"type":"string"}},{"name":"filter[parentProductLineId][in]","in":"query","required":false,"description":"Filter parentProductLineId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentProductLineId][notIn]","in":"query","required":false,"description":"Filter parentProductLineId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentProductLineId][between]","in":"query","required":false,"description":"Filter parentProductLineId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentProductLineId][like]","in":"query","required":false,"description":"Filter parentProductLineId (like)","schema":{"type":"string"}},{"name":"filter[dataSource]","in":"query","required":false,"description":"Filter dataSource (equality)","schema":{"type":"string"}},{"name":"filter[dataSource][ne]","in":"query","required":false,"description":"Filter dataSource (ne)","schema":{"type":"string"}},{"name":"filter[dataSource][gt]","in":"query","required":false,"description":"Filter dataSource (gt)","schema":{"type":"string"}},{"name":"filter[dataSource][gte]","in":"query","required":false,"description":"Filter dataSource (gte)","schema":{"type":"string"}},{"name":"filter[dataSource][lt]","in":"query","required":false,"description":"Filter dataSource (lt)","schema":{"type":"string"}},{"name":"filter[dataSource][lte]","in":"query","required":false,"description":"Filter dataSource (lte)","schema":{"type":"string"}},{"name":"filter[dataSource][in]","in":"query","required":false,"description":"Filter dataSource (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][notIn]","in":"query","required":false,"description":"Filter dataSource (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dataSource][between]","in":"query","required":false,"description":"Filter dataSource (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dataSource][like]","in":"query","required":false,"description":"Filter dataSource (like)","schema":{"type":"string"}},{"name":"filter[createdDate]","in":"query","required":false,"description":"Filter createdDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][ne]","in":"query","required":false,"description":"Filter createdDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gt]","in":"query","required":false,"description":"Filter createdDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][gte]","in":"query","required":false,"description":"Filter createdDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lt]","in":"query","required":false,"description":"Filter createdDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][lte]","in":"query","required":false,"description":"Filter createdDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[createdDate][in]","in":"query","required":false,"description":"Filter createdDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][notIn]","in":"query","required":false,"description":"Filter createdDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[createdDate][between]","in":"query","required":false,"description":"Filter createdDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","productId","-productId","productName","-productName","name","-name","lineType","-lineType","priceModel","-priceModel","pricingTerm","-pricingTerm","invoiceFrequency","-invoiceFrequency","unitOfMeasure","-unitOfMeasure","taxMode","-taxMode","enforceListPrice","-enforceListPrice","hasUsage","-hasUsage","hasBeenUsed","-hasBeenUsed","parentProductLineId","-parentProductLineId","dataSource","-dataSource","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","productId","productName","productLineNumber","name","lineType","priceModel","pricingTerm","invoiceFrequency","unitOfMeasure","taxMode","enforceListPrice","hasUsage","hasBeenUsed","commitInvoicing","trueUpEstimationMethod","prepaidBalanceOverConsumptionBehavior","prepaidBalanceRolloverAtRenewal","parentProductLineId","crmProductId","dataSource","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/productLinesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List product lines","description":"Lists product lines. Each item is the product line without its tax records, pricing, and external identifiers. To get the tax records, pricing, and external identifiers, use GET accounting/product-lines/:id or POST accounting/product-lines/search. To filter by free text, product line number, CRM identifier, or external identifier, use POST accounting/product-lines/search.","tags":["accounting/products/productLines"]}},"/accounting/reports/general-ledger":{"post":{"operationId":"readGeneralLedger","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/readGeneralLedgerOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"RESULT_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedFilters":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["appliedFilters"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_TRANSACTION_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"affectedLineCount":{"type":"number"}},"additionalProperties":false,"required":["affectedLineCount"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: RESULT_TOO_LARGE, WINDOW_TOO_LONG, DATE_RANGE_REQUIRED, AMBIGUOUS_DATE_FILTER, ENTITY_NOT_FOUND, BOOK_NOT_FOUND, PERIOD_NOT_FOUND, CONSOLIDATION_ACCOUNTS_NOT_CONFIGURED, CONSOLIDATION_ACCOUNT_MAPPING_MISSING, CONSOLIDATION_RATES_NOT_CONFIGURED, EXCHANGE_RATE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RESULT_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number"},"maximumLineCount":{"type":"number"}},"additionalProperties":false,"required":["lineCount","maximumLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WINDOW_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requestedDays":{"type":"number"},"maximumDays":{"type":"number"}},"additionalProperties":false,"required":["requestedDays","maximumDays"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_RANGE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMBIGUOUS_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"periodId":{"type":"string"}},"additionalProperties":false,"required":["periodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNTS_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingProcess":{"type":"string"}},"additionalProperties":false,"required":["accountingProcess"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNT_MAPPING_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_RATES_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESULT_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedFilters":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["appliedFilters"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_TRANSACTION_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"affectedLineCount":{"type":"number"}},"additionalProperties":false,"required":["affectedLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RESULT_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number"},"maximumLineCount":{"type":"number"}},"additionalProperties":false,"required":["lineCount","maximumLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WINDOW_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requestedDays":{"type":"number"},"maximumDays":{"type":"number"}},"additionalProperties":false,"required":["requestedDays","maximumDays"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATE_RANGE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMBIGUOUS_DATE_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"periodId":{"type":"string"}},"additionalProperties":false,"required":["periodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNTS_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingProcess":{"type":"string"}},"additionalProperties":false,"required":["accountingProcess"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_ACCOUNT_MAPPING_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONSOLIDATION_RATES_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESULT_DOES_NOT_TIE_OUT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedFilters":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["appliedFilters"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_TRANSACTION_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"affectedLineCount":{"type":"number"}},"additionalProperties":false,"required":["affectedLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/readGeneralLedgerInput"}}}},"summary":"Retrieve a general ledger report","description":"Retrieves a general ledger report. The response has the journal entry lines posted to the general ledger in the date range. The response also has the calculated lines that make the financial statements balance, such as retained earnings lines. When consolidated is true, these include elimination and currency translation lines.\n\nThe report shows movements only, with no opening, closing, or running balance.\n\nThe report is not paginated. One response can have at most 250,000 lines, and a request with more fails with RESULT_TOO_LARGE. Narrow the request until it returns in one response.","tags":["accounting/reports/generalLedger"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/products/{id}/product-lines/{productLineId}/pricing/{pricingId}":{"delete":{"operationId":"deleteAccountingProductLinePricing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAccountingProductLinePricingOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"},"pricingId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId","pricingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"},"pricingId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId","pricingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"},"pricingId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId","pricingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product the product line belongs to."},{"name":"productLineId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product line the pricing header belongs to."},{"name":"pricingId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the pricing header you want to delete."}],"summary":"Delete a pricing header","description":"Deletes a pricing header together with its price book entries and their rate-card entries.\n\nYou can't delete a pricing header that a sales order line uses. If you try, the request fails with VALIDATION_FAILED.","tags":["accounting/products/productLines"]},"patch":{"operationId":"updateAccountingProductLinePricing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAccountingProductLinePricingOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND, UNKNOWN_PRICE_BOOK_IDS, UNKNOWN_BILLABLE_COMPONENT_IDS, UNKNOWN_PRICE_BOOK_ENTRY_IDS, UNKNOWN_RATE_CARD_ENTRY_IDS, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"},"pricingId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId","pricingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_ENTRY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entryIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entryIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_RATE_CARD_ENTRY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rateCardEntryIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["rateCardEntryIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"},"pricingId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId","pricingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_ENTRY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entryIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entryIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_RATE_CARD_ENTRY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rateCardEntryIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["rateCardEntryIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"productLineId":{"type":"string"},"pricingId":{"type":"string"}},"additionalProperties":false,"required":["id","productLineId","pricingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"priceBookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["priceBookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BILLABLE_COMPONENT_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billableComponentIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["billableComponentIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PRICE_BOOK_ENTRY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entryIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["entryIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_RATE_CARD_ENTRY_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rateCardEntryIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["rateCardEntryIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product the product line belongs to."},{"name":"productLineId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the product line the pricing header belongs to."},{"name":"pricingId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the pricing header you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAccountingProductLinePricingInput"}}}},"summary":"Update a pricing header","description":"Updates a pricing header and its entries with the fields you send. A field you leave out keeps its current value. Entries change one by one: priceBookEntriesToCreate adds entries, priceBookEntriesToUpdate changes existing entries, and priceBookEntriesToDelete removes entries.\n\nUse the pricing header's id, not its headerNumber.\n\nA pricing header sets a product line's prices for one price book and currency over a date range. Each price is a price book entry on the pricing header.\n\nA pricing header's validFrom and validTo must fall within the product's effective dates. Pricing headers on the same product line with the same price book and currency can't overlap in dates. You can't update a pricing header that a sales order line uses.\n\nA request that breaks any of these conditions fails with VALIDATION_FAILED. The response is empty. Read the updated record with GET accounting/pricing/:id.","tags":["accounting/products/productLines"]}},"/accounting/accounting-periods":{"get":{"operationId":"accountingPeriods","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId]","in":"query","required":false,"description":"Filter accountingPeriodId (equality)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][ne]","in":"query","required":false,"description":"Filter accountingPeriodId (ne)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gt]","in":"query","required":false,"description":"Filter accountingPeriodId (gt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gte]","in":"query","required":false,"description":"Filter accountingPeriodId (gte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lt]","in":"query","required":false,"description":"Filter accountingPeriodId (lt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lte]","in":"query","required":false,"description":"Filter accountingPeriodId (lte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][in]","in":"query","required":false,"description":"Filter accountingPeriodId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][notIn]","in":"query","required":false,"description":"Filter accountingPeriodId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][between]","in":"query","required":false,"description":"Filter accountingPeriodId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountingPeriodId][like]","in":"query","required":false,"description":"Filter accountingPeriodId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId]","in":"query","required":false,"description":"Filter fiscalCalendarId (equality)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][ne]","in":"query","required":false,"description":"Filter fiscalCalendarId (ne)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][gt]","in":"query","required":false,"description":"Filter fiscalCalendarId (gt)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][gte]","in":"query","required":false,"description":"Filter fiscalCalendarId (gte)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][lt]","in":"query","required":false,"description":"Filter fiscalCalendarId (lt)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][lte]","in":"query","required":false,"description":"Filter fiscalCalendarId (lte)","schema":{"type":"string"}},{"name":"filter[fiscalCalendarId][in]","in":"query","required":false,"description":"Filter fiscalCalendarId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalCalendarId][notIn]","in":"query","required":false,"description":"Filter fiscalCalendarId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalCalendarId][between]","in":"query","required":false,"description":"Filter fiscalCalendarId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalCalendarId][like]","in":"query","required":false,"description":"Filter fiscalCalendarId (like)","schema":{"type":"string"}},{"name":"filter[periodName]","in":"query","required":false,"description":"Filter periodName (equality)","schema":{"type":"string"}},{"name":"filter[periodName][ne]","in":"query","required":false,"description":"Filter periodName (ne)","schema":{"type":"string"}},{"name":"filter[periodName][gt]","in":"query","required":false,"description":"Filter periodName (gt)","schema":{"type":"string"}},{"name":"filter[periodName][gte]","in":"query","required":false,"description":"Filter periodName (gte)","schema":{"type":"string"}},{"name":"filter[periodName][lt]","in":"query","required":false,"description":"Filter periodName (lt)","schema":{"type":"string"}},{"name":"filter[periodName][lte]","in":"query","required":false,"description":"Filter periodName (lte)","schema":{"type":"string"}},{"name":"filter[periodName][in]","in":"query","required":false,"description":"Filter periodName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][notIn]","in":"query","required":false,"description":"Filter periodName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][between]","in":"query","required":false,"description":"Filter periodName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[periodName][like]","in":"query","required":false,"description":"Filter periodName (like)","schema":{"type":"string"}},{"name":"filter[fiscalYear]","in":"query","required":false,"description":"Filter fiscalYear (equality)","schema":{"type":"string"}},{"name":"filter[fiscalYear][ne]","in":"query","required":false,"description":"Filter fiscalYear (ne)","schema":{"type":"string"}},{"name":"filter[fiscalYear][gt]","in":"query","required":false,"description":"Filter fiscalYear (gt)","schema":{"type":"string"}},{"name":"filter[fiscalYear][gte]","in":"query","required":false,"description":"Filter fiscalYear (gte)","schema":{"type":"string"}},{"name":"filter[fiscalYear][lt]","in":"query","required":false,"description":"Filter fiscalYear (lt)","schema":{"type":"string"}},{"name":"filter[fiscalYear][lte]","in":"query","required":false,"description":"Filter fiscalYear (lte)","schema":{"type":"string"}},{"name":"filter[fiscalYear][in]","in":"query","required":false,"description":"Filter fiscalYear (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYear][notIn]","in":"query","required":false,"description":"Filter fiscalYear (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYear][between]","in":"query","required":false,"description":"Filter fiscalYear (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalYear][like]","in":"query","required":false,"description":"Filter fiscalYear (like)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter]","in":"query","required":false,"description":"Filter fiscalQuarter (equality)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][ne]","in":"query","required":false,"description":"Filter fiscalQuarter (ne)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][gt]","in":"query","required":false,"description":"Filter fiscalQuarter (gt)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][gte]","in":"query","required":false,"description":"Filter fiscalQuarter (gte)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][lt]","in":"query","required":false,"description":"Filter fiscalQuarter (lt)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][lte]","in":"query","required":false,"description":"Filter fiscalQuarter (lte)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][in]","in":"query","required":false,"description":"Filter fiscalQuarter (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalQuarter][notIn]","in":"query","required":false,"description":"Filter fiscalQuarter (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalQuarter][between]","in":"query","required":false,"description":"Filter fiscalQuarter (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalQuarter][like]","in":"query","required":false,"description":"Filter fiscalQuarter (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[reopenedByCascade]","in":"query","required":false,"description":"Filter reopenedByCascade (equality)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][ne]","in":"query","required":false,"description":"Filter reopenedByCascade (ne)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][gt]","in":"query","required":false,"description":"Filter reopenedByCascade (gt)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][gte]","in":"query","required":false,"description":"Filter reopenedByCascade (gte)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][lt]","in":"query","required":false,"description":"Filter reopenedByCascade (lt)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][lte]","in":"query","required":false,"description":"Filter reopenedByCascade (lte)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][in]","in":"query","required":false,"description":"Filter reopenedByCascade (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reopenedByCascade][notIn]","in":"query","required":false,"description":"Filter reopenedByCascade (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reopenedByCascade][between]","in":"query","required":false,"description":"Filter reopenedByCascade (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[durationDays]","in":"query","required":false,"description":"Filter durationDays (equality)","schema":{"type":"number"}},{"name":"filter[durationDays][ne]","in":"query","required":false,"description":"Filter durationDays (ne)","schema":{"type":"number"}},{"name":"filter[durationDays][gt]","in":"query","required":false,"description":"Filter durationDays (gt)","schema":{"type":"number"}},{"name":"filter[durationDays][gte]","in":"query","required":false,"description":"Filter durationDays (gte)","schema":{"type":"number"}},{"name":"filter[durationDays][lt]","in":"query","required":false,"description":"Filter durationDays (lt)","schema":{"type":"number"}},{"name":"filter[durationDays][lte]","in":"query","required":false,"description":"Filter durationDays (lte)","schema":{"type":"number"}},{"name":"filter[durationDays][in]","in":"query","required":false,"description":"Filter durationDays (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[durationDays][notIn]","in":"query","required":false,"description":"Filter durationDays (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[durationDays][between]","in":"query","required":false,"description":"Filter durationDays (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hasTransactions]","in":"query","required":false,"description":"Filter hasTransactions (equality)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][ne]","in":"query","required":false,"description":"Filter hasTransactions (ne)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][gt]","in":"query","required":false,"description":"Filter hasTransactions (gt)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][gte]","in":"query","required":false,"description":"Filter hasTransactions (gte)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][lt]","in":"query","required":false,"description":"Filter hasTransactions (lt)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][lte]","in":"query","required":false,"description":"Filter hasTransactions (lte)","schema":{"type":"boolean"}},{"name":"filter[hasTransactions][in]","in":"query","required":false,"description":"Filter hasTransactions (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasTransactions][notIn]","in":"query","required":false,"description":"Filter hasTransactions (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasTransactions][between]","in":"query","required":false,"description":"Filter hasTransactions (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[postable]","in":"query","required":false,"description":"Filter postable (equality)","schema":{"type":"boolean"}},{"name":"filter[postable][ne]","in":"query","required":false,"description":"Filter postable (ne)","schema":{"type":"boolean"}},{"name":"filter[postable][gt]","in":"query","required":false,"description":"Filter postable (gt)","schema":{"type":"boolean"}},{"name":"filter[postable][gte]","in":"query","required":false,"description":"Filter postable (gte)","schema":{"type":"boolean"}},{"name":"filter[postable][lt]","in":"query","required":false,"description":"Filter postable (lt)","schema":{"type":"boolean"}},{"name":"filter[postable][lte]","in":"query","required":false,"description":"Filter postable (lte)","schema":{"type":"boolean"}},{"name":"filter[postable][in]","in":"query","required":false,"description":"Filter postable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postable][notIn]","in":"query","required":false,"description":"Filter postable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postable][between]","in":"query","required":false,"description":"Filter postable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","periodName","-periodName","fiscalYear","-fiscalYear","fiscalQuarter","-fiscalQuarter","startDate","-startDate","endDate","-endDate","status","-status","durationDays","-durationDays","postable","-postable","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","accountingPeriodId","entityId","entityName","bookId","bookName","fiscalCalendarId","fiscalCalendarName","periodName","fiscalYear","fiscalQuarter","startDate","endDate","status","reopeningReason","reopenedByCascade","durationDays","hasTransactions","postable","postableReason","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/accountingPeriodsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List accounting periods, one row per period per entity and book: the same fiscal-calendar period appears once for every entity and book that uses the calendar. A join from postingPeriodId on journal entry lines or plannedPeriodId on revenue plan lines therefore matches accountingPeriodId together with entityId and bookId; matching on accountingPeriodId alone repeats every amount once per matching row. Periods follow the fiscal calendar, not calendar months: resolve 'this fiscal year' or 'this quarter' through fiscalYear and fiscalQuarter.","description":"Lists accounting periods. Each item is one period for one legal entity and one accounting book.\n\nTo read an item with its period-close checklist, use GET accounting/accounting-periods/:id.","tags":["accountingAccountingPeriods"]}},"/banking/bank-entries":{"post":{"operationId":"createBankEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBankEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, REPORTING_TAG_CONFLICT, TAG_VALIDATION_FAILED, TAGS_DISABLED, POSTING_PERIOD_NOT_OPEN, CURRENCY_MISMATCH, ACCOUNT_ENTITY_MISMATCH, GROUPING_ACCOUNT_NOT_ALLOWED, BUSINESS_PARTNER_REQUIRED_FOR_VAT, TAX_CODE_NOT_FOUND, TAX_CODE_AMBIGUOUS, TAX_CODE_ACCOUNT_NOT_CONFIGURED, NO_LINES, ZERO_LINE_AMOUNT, ZERO_TOTAL_AMOUNT, ATTACHMENT_REQUIRED, CROSS_CHARGE_INVALID, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the line."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported, naming the blocking books where it can identify them."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_LINE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_TOTAL_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the line."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported, naming the blocking books where it can identify them."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_LINE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_TOTAL_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Possible values: 'entity', 'account', 'department', 'businessUnit', 'businessPartner', 'vatAccount', 'reverseVatAccount', 'crossChargeEntity', 'taxCode', 'reportingTag'."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the value. Absent for a header field or a lineType."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REPORTING_TAG_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the line."},"dimensionCode":{"type":"string","description":"The reporting dimension in conflict."},"field":{"type":"string","description":"The line field the tag disagrees with. Absent when the line carries two tags for one dimension."}},"additionalProperties":false,"required":["lineIndex","dimensionCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAG_VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the first line that sent reportingTags."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionDate":{"type":"string","description":"The transaction date that could not be posted. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity whose books were evaluated."},"detail":{"type":"string","description":"What the period resolver reported, naming the blocking books where it can identify them."}},"additionalProperties":false,"required":["transactionDate","entityId","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string","description":"The currency supplied on the request."},"accountCurrency":{"type":"string","description":"The currency the account is denominated in."},"accountId":{"type":"string","description":"The account whose currency governs."}},"additionalProperties":false,"required":["currency","accountCurrency","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUPING_ACCOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The offending grouping account."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED_FOR_VAT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_LINE_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ZERO_TOTAL_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBankEntryInput"}}}},"summary":"Create a bank entry","description":"Creates a bank entry with its lines. The bank entry creates a journal entry in the general ledger. The journal entry goes into the accounting period of transactionDate when that period is open in every full accounting book of the legal entity.\n\nIf the period is closed or locked in every book, the journal entry goes into the next period that is open in all of them, up to 11 periods later. If none of those periods is open in every book, or a period is open in some books and closed in others, the request fails with POSTING_PERIOD_NOT_OPEN.\n\nThe response contains only the new bank entry's id. Read the record with GET banking/bank-entries/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingBankEntries"]},"get":{"operationId":"bankEntries","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber]","in":"query","required":false,"description":"Filter bankEntryNumber (equality)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][ne]","in":"query","required":false,"description":"Filter bankEntryNumber (ne)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][gt]","in":"query","required":false,"description":"Filter bankEntryNumber (gt)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][gte]","in":"query","required":false,"description":"Filter bankEntryNumber (gte)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][lt]","in":"query","required":false,"description":"Filter bankEntryNumber (lt)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][lte]","in":"query","required":false,"description":"Filter bankEntryNumber (lte)","schema":{"type":"string"}},{"name":"filter[bankEntryNumber][in]","in":"query","required":false,"description":"Filter bankEntryNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bankEntryNumber][notIn]","in":"query","required":false,"description":"Filter bankEntryNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bankEntryNumber][between]","in":"query","required":false,"description":"Filter bankEntryNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bankEntryNumber][like]","in":"query","required":false,"description":"Filter bankEntryNumber (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceDate]","in":"query","required":false,"description":"Filter serviceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][ne]","in":"query","required":false,"description":"Filter serviceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gt]","in":"query","required":false,"description":"Filter serviceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gte]","in":"query","required":false,"description":"Filter serviceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lt]","in":"query","required":false,"description":"Filter serviceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lte]","in":"query","required":false,"description":"Filter serviceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][in]","in":"query","required":false,"description":"Filter serviceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][notIn]","in":"query","required":false,"description":"Filter serviceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][between]","in":"query","required":false,"description":"Filter serviceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber]","in":"query","required":false,"description":"Filter journalEntryNumber (equality)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][ne]","in":"query","required":false,"description":"Filter journalEntryNumber (ne)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][gt]","in":"query","required":false,"description":"Filter journalEntryNumber (gt)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][gte]","in":"query","required":false,"description":"Filter journalEntryNumber (gte)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][lt]","in":"query","required":false,"description":"Filter journalEntryNumber (lt)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][lte]","in":"query","required":false,"description":"Filter journalEntryNumber (lte)","schema":{"type":"string"}},{"name":"filter[journalEntryNumber][in]","in":"query","required":false,"description":"Filter journalEntryNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryNumber][notIn]","in":"query","required":false,"description":"Filter journalEntryNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryNumber][between]","in":"query","required":false,"description":"Filter journalEntryNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[journalEntryNumber][like]","in":"query","required":false,"description":"Filter journalEntryNumber (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","bankEntryNumber","-bankEntryNumber","transactionDate","-transactionDate","serviceDate","-serviceDate","currency","-currency","status","-status","journalEntryNumber","-journalEntryNumber","origin","-origin","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","bankEntryNumber","name","description","transactionDate","serviceDate","currency","status","journalEntryNumber","origin","bankAccountName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/bankEntriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List bank entries","description":"Lists bank entries. Each item is a bank entry without its lines.\n\nTo read the lines, use GET banking/bank-entries/:id. To match on the bank account, use POST banking/bank-entries/search.","tags":["bankingBankEntries"]}},"/banking/bank-entries/{id}/void":{"post":{"operationId":"voidBankEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidBankEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VOID_REASON_REQUIRED, BANK_ENTRY_ALREADY_VOIDED, POSTING_PERIOD_NOT_OPEN, MISSING_POSTING_CONTEXT, VOID_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BANK_ENTRY_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_NOT_OPEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bankEntryNumber":{"type":"string","description":"The bank entry number."}},"additionalProperties":false,"required":["bankEntryNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_POSTING_CONTEXT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"field":{"type":"string","description":"Which field is missing. Possible values: 'entityId', 'postingPeriodId'."}},"additionalProperties":false,"required":["id","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entry that was not voided."},"detail":{"type":"string","description":"The reason reported by the void cascade."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank entry you want to void.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidBankEntryInput"}}}},"summary":"Void a bank entry","description":"Voids a bank entry. Voiding also voids the bank entry's journal entry in the general ledger. No reversing journal entry is created, and voiding can't be undone.\n\nThe bank entry, its number, and the audit trail stay. Its lines and attachments don't change. There is no endpoint to delete a bank entry.\n\nThe journal entries of the bank entry's amortization schedules are voided too. A pending approval on the journal entry becomes rejected, and bank transactions matched to the bank entry are unmatched.\n\nvoidReason is saved on the bank entry and in the audit trail. No read endpoint returns voidReason.\n\nThe response is empty. Read the result with GET banking/bank-entries/:id.","tags":["bankingBankEntries"]}},"/accounting/fiscal-calendars":{"get":{"operationId":"fiscalCalendars","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[periodFormat]","in":"query","required":false,"description":"Filter periodFormat (equality)","schema":{"type":"string"}},{"name":"filter[periodFormat][ne]","in":"query","required":false,"description":"Filter periodFormat (ne)","schema":{"type":"string"}},{"name":"filter[periodFormat][gt]","in":"query","required":false,"description":"Filter periodFormat (gt)","schema":{"type":"string"}},{"name":"filter[periodFormat][gte]","in":"query","required":false,"description":"Filter periodFormat (gte)","schema":{"type":"string"}},{"name":"filter[periodFormat][lt]","in":"query","required":false,"description":"Filter periodFormat (lt)","schema":{"type":"string"}},{"name":"filter[periodFormat][lte]","in":"query","required":false,"description":"Filter periodFormat (lte)","schema":{"type":"string"}},{"name":"filter[periodFormat][in]","in":"query","required":false,"description":"Filter periodFormat (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodFormat][notIn]","in":"query","required":false,"description":"Filter periodFormat (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodFormat][between]","in":"query","required":false,"description":"Filter periodFormat (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[periodFormat][like]","in":"query","required":false,"description":"Filter periodFormat (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[fiscalYearsCount]","in":"query","required":false,"description":"Filter fiscalYearsCount (equality)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][ne]","in":"query","required":false,"description":"Filter fiscalYearsCount (ne)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][gt]","in":"query","required":false,"description":"Filter fiscalYearsCount (gt)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][gte]","in":"query","required":false,"description":"Filter fiscalYearsCount (gte)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][lt]","in":"query","required":false,"description":"Filter fiscalYearsCount (lt)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][lte]","in":"query","required":false,"description":"Filter fiscalYearsCount (lte)","schema":{"type":"number"}},{"name":"filter[fiscalYearsCount][in]","in":"query","required":false,"description":"Filter fiscalYearsCount (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYearsCount][notIn]","in":"query","required":false,"description":"Filter fiscalYearsCount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYearsCount][between]","in":"query","required":false,"description":"Filter fiscalYearsCount (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[anchorDate]","in":"query","required":false,"description":"Filter anchorDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][ne]","in":"query","required":false,"description":"Filter anchorDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][gt]","in":"query","required":false,"description":"Filter anchorDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][gte]","in":"query","required":false,"description":"Filter anchorDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][lt]","in":"query","required":false,"description":"Filter anchorDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][lte]","in":"query","required":false,"description":"Filter anchorDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[anchorDate][in]","in":"query","required":false,"description":"Filter anchorDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[anchorDate][notIn]","in":"query","required":false,"description":"Filter anchorDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[anchorDate][between]","in":"query","required":false,"description":"Filter anchorDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","calendarName","-calendarName","periodFormat","-periodFormat","status","-status","fiscalYearsCount","-fiscalYearsCount","anchorDate","-anchorDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","calendarName","description","periodFormat","status","fiscalYearsCount","anchorDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/fiscalCalendarsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List fiscal calendars","description":"Lists fiscal calendars. To read a calendar's fiscal years and assigned legal entities, use GET accounting/fiscal-calendars/:id.","tags":["accountingFiscalCalendars"]}},"/accounting/debit-memos":{"post":{"operationId":"createDebitMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createDebitMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"approvedOnCreate":{"value":{"data":{"id":"8e70b13a-45f6-4d80-9c6d-2e8f70b13a45","debitMemoNumber":"DM-1043","creditMemoId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","debitMemoDate":"2026-01-15","dueDate":"2026-02-14","approvalStatus":"approved","debitMemoType":"writeOff","currency":"USD","isMigrated":true,"customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","entityId":"1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45","paymentTerm":"net30","billToAddressId":"9f3e6d81-b7d0-4aec-8c3f-2e8f70b13a45","soldToAddressId":"b7d0aec3-9f3e-4d81-8c3f-6d81b7d0aec3","totalAmount":"1200.00","lastModifiedDate":"2026-01-15T09:12:44.000Z"}},"summary":"Loading a migrated debit memo. isMigrated skips the open-period check on debitMemoDate and marks the journal entry for auto-reversal."},"standaloneDraft":{"value":{"data":{"id":"c41e9a72-5d0b-4f36-8e1a-7b29d6f0c583","debitMemoDate":"2026-08-01","dueDate":"2026-08-31","approvalStatus":"draft","debitMemoType":"standaloneCharge","currency":"USD","customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","entityId":"1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45","paymentTerm":"net30","billToAddressId":"9f3e6d81-b7d0-4aec-8c3f-2e8f70b13a45","soldToAddressId":"b7d0aec3-9f3e-4d81-8c3f-6d81b7d0aec3","totalAmount":"250.00","lastModifiedDate":"2026-08-01T09:12:44.000Z"}},"summary":"Raising a standalone debit memo with no source credit memo. It's created as a draft, with its entity, currency and addresses taken from the customer."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CREDIT_MEMO_NOT_FOUND, CREDIT_MEMO_LINE_NOT_FOUND, CUSTOMER_NOT_FOUND, PAYMENT_TERM_NOT_FOUND, ACCOUNTING_PERIOD_NOT_FOUND, ACCOUNTING_PERIOD_CLOSED, DUE_DATE_BEFORE_DEBIT_MEMO_DATE, PRODUCT_NOT_FOUND, PRODUCT_LINE_NOT_FOUND, FIELD_NOT_ALLOWED, ACCOUNT_NOT_FOUND, ADDRESS_NOT_FOUND, INVALID_AMOUNT, INVALID_ENUM_VALUE, NO_LINES, MISSING_REQUIRED_FIELD, UNKNOWN_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoId":{"type":"string"}},"additionalProperties":false,"required":["creditMemoId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["creditMemoLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTerm":{"type":"string"}},"additionalProperties":false,"required":["paymentTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_BEFORE_DEBIT_MEMO_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dueDate":{"type":"string","format":"date"},"debitMemoDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["dueDate","debitMemoDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoId":{"type":"string"}},"additionalProperties":false,"required":["creditMemoId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["creditMemoLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTerm":{"type":"string"}},"additionalProperties":false,"required":["paymentTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_BEFORE_DEBIT_MEMO_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dueDate":{"type":"string","format":"date"},"debitMemoDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["dueDate","debitMemoDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoId":{"type":"string"}},"additionalProperties":false,"required":["creditMemoId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CREDIT_MEMO_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"creditMemoLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["creditMemoLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customerId":{"type":"string"}},"additionalProperties":false,"required":["customerId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_TERM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentTerm":{"type":"string"}},"additionalProperties":false,"required":["paymentTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_BEFORE_DEBIT_MEMO_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dueDate":{"type":"string","format":"date"},"debitMemoDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["dueDate","debitMemoDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PRODUCT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"productLineIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["productLineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["accountIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADDRESS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"addressIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["addressIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ENUM_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_REQUIRED_FIELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDebitMemoInput"},"examples":{"approvedOnCreate":{"value":{"creditMemoId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","debitMemoDate":"2026-01-15","paymentTerm":"net30","isMigrated":true,"lines":[{"creditMemoLineId":"7d34c8e9-b21f-4a5c-9f3e-6d81b7d0aec3","description":"Opening balance carry-over","totalPrice":"1200.00"}]},"summary":"Loading a migrated debit memo. isMigrated skips the open-period check on debitMemoDate and marks the journal entry for auto-reversal."},"standaloneDraft":{"value":{"customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","debitMemoDate":"2026-08-01","paymentTerm":"net30","lines":[{"description":"Late delivery surcharge","totalPrice":"250.00","creditGlAccountId":"4b1d7e20-93c5-4f8a-b6d2-0e7a5c9f1d38"}]},"summary":"Raising a standalone debit memo with no source credit memo. It's created as a draft, with its entity, currency and addresses taken from the customer."}}}}},"summary":"Create a debit memo","description":"Creates a debit memo, either to settle a source credit memo or standalone.\n\nTo settle a credit memo, send creditMemoId. The customer, legal entity, and currency come from that credit memo, not from the request, and every line names the credit memo line it debits in creditMemoLineId. debitMemoType, billToAddressId, and soldToAddressId default to the credit memo's values when you leave them out. The debit memo is approved as it's created, and its journal entry is created in the general ledger in the same request.\n\nFor a standalone debit memo, leave out creditMemoId and send customerId instead. The legal entity and currency come from the customer, and billToAddressId and soldToAddressId default to the customer's default addresses. Its type is always 'standaloneCharge'. A line that names a product, through productId or productLineId, needs quantity and unitPrice; any other line needs description and creditGlAccountId. On a legal entity that has VAT enabled and no tax engine, every line also needs vatAccountingType. A standalone debit memo is created as a draft: it has no number and no journal entry until it's approved.\n\nThe response contains the created debit memo, including its lines.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingDebitMemos"]},"get":{"operationId":"debitMemos","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[creditMemoId]","in":"query","required":false,"description":"Filter creditMemoId (equality)","schema":{"type":"string"}},{"name":"filter[creditMemoId][ne]","in":"query","required":false,"description":"Filter creditMemoId (ne)","schema":{"type":"string"}},{"name":"filter[creditMemoId][gt]","in":"query","required":false,"description":"Filter creditMemoId (gt)","schema":{"type":"string"}},{"name":"filter[creditMemoId][gte]","in":"query","required":false,"description":"Filter creditMemoId (gte)","schema":{"type":"string"}},{"name":"filter[creditMemoId][lt]","in":"query","required":false,"description":"Filter creditMemoId (lt)","schema":{"type":"string"}},{"name":"filter[creditMemoId][lte]","in":"query","required":false,"description":"Filter creditMemoId (lte)","schema":{"type":"string"}},{"name":"filter[creditMemoId][in]","in":"query","required":false,"description":"Filter creditMemoId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoId][notIn]","in":"query","required":false,"description":"Filter creditMemoId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditMemoId][between]","in":"query","required":false,"description":"Filter creditMemoId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[creditMemoId][like]","in":"query","required":false,"description":"Filter creditMemoId (like)","schema":{"type":"string"}},{"name":"filter[debitMemoDate]","in":"query","required":false,"description":"Filter debitMemoDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][ne]","in":"query","required":false,"description":"Filter debitMemoDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][gt]","in":"query","required":false,"description":"Filter debitMemoDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][gte]","in":"query","required":false,"description":"Filter debitMemoDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][lt]","in":"query","required":false,"description":"Filter debitMemoDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][lte]","in":"query","required":false,"description":"Filter debitMemoDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[debitMemoDate][in]","in":"query","required":false,"description":"Filter debitMemoDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoDate][notIn]","in":"query","required":false,"description":"Filter debitMemoDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoDate][between]","in":"query","required":false,"description":"Filter debitMemoDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[taxDate]","in":"query","required":false,"description":"Filter taxDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][ne]","in":"query","required":false,"description":"Filter taxDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][gt]","in":"query","required":false,"description":"Filter taxDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][gte]","in":"query","required":false,"description":"Filter taxDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][lt]","in":"query","required":false,"description":"Filter taxDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][lte]","in":"query","required":false,"description":"Filter taxDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[taxDate][in]","in":"query","required":false,"description":"Filter taxDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxDate][notIn]","in":"query","required":false,"description":"Filter taxDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[taxDate][between]","in":"query","required":false,"description":"Filter taxDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus]","in":"query","required":false,"description":"Filter debitMemoStatus (equality)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][ne]","in":"query","required":false,"description":"Filter debitMemoStatus (ne)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][gt]","in":"query","required":false,"description":"Filter debitMemoStatus (gt)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][gte]","in":"query","required":false,"description":"Filter debitMemoStatus (gte)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][lt]","in":"query","required":false,"description":"Filter debitMemoStatus (lt)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][lte]","in":"query","required":false,"description":"Filter debitMemoStatus (lte)","schema":{"type":"string"}},{"name":"filter[debitMemoStatus][in]","in":"query","required":false,"description":"Filter debitMemoStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoStatus][notIn]","in":"query","required":false,"description":"Filter debitMemoStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoStatus][between]","in":"query","required":false,"description":"Filter debitMemoStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[debitMemoStatus][like]","in":"query","required":false,"description":"Filter debitMemoStatus (like)","schema":{"type":"string"}},{"name":"filter[debitMemoType]","in":"query","required":false,"description":"Filter debitMemoType (equality)","schema":{"type":"string"}},{"name":"filter[debitMemoType][ne]","in":"query","required":false,"description":"Filter debitMemoType (ne)","schema":{"type":"string"}},{"name":"filter[debitMemoType][gt]","in":"query","required":false,"description":"Filter debitMemoType (gt)","schema":{"type":"string"}},{"name":"filter[debitMemoType][gte]","in":"query","required":false,"description":"Filter debitMemoType (gte)","schema":{"type":"string"}},{"name":"filter[debitMemoType][lt]","in":"query","required":false,"description":"Filter debitMemoType (lt)","schema":{"type":"string"}},{"name":"filter[debitMemoType][lte]","in":"query","required":false,"description":"Filter debitMemoType (lte)","schema":{"type":"string"}},{"name":"filter[debitMemoType][in]","in":"query","required":false,"description":"Filter debitMemoType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoType][notIn]","in":"query","required":false,"description":"Filter debitMemoType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitMemoType][between]","in":"query","required":false,"description":"Filter debitMemoType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[debitMemoType][like]","in":"query","required":false,"description":"Filter debitMemoType (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[paymentTerm]","in":"query","required":false,"description":"Filter paymentTerm (equality)","schema":{"type":"string"}},{"name":"filter[paymentTerm][ne]","in":"query","required":false,"description":"Filter paymentTerm (ne)","schema":{"type":"string"}},{"name":"filter[paymentTerm][gt]","in":"query","required":false,"description":"Filter paymentTerm (gt)","schema":{"type":"string"}},{"name":"filter[paymentTerm][gte]","in":"query","required":false,"description":"Filter paymentTerm (gte)","schema":{"type":"string"}},{"name":"filter[paymentTerm][lt]","in":"query","required":false,"description":"Filter paymentTerm (lt)","schema":{"type":"string"}},{"name":"filter[paymentTerm][lte]","in":"query","required":false,"description":"Filter paymentTerm (lte)","schema":{"type":"string"}},{"name":"filter[paymentTerm][in]","in":"query","required":false,"description":"Filter paymentTerm (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerm][notIn]","in":"query","required":false,"description":"Filter paymentTerm (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerm][between]","in":"query","required":false,"description":"Filter paymentTerm (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerm][like]","in":"query","required":false,"description":"Filter paymentTerm (like)","schema":{"type":"string"}},{"name":"filter[isMigrated]","in":"query","required":false,"description":"Filter isMigrated (equality)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][ne]","in":"query","required":false,"description":"Filter isMigrated (ne)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][gt]","in":"query","required":false,"description":"Filter isMigrated (gt)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][gte]","in":"query","required":false,"description":"Filter isMigrated (gte)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][lt]","in":"query","required":false,"description":"Filter isMigrated (lt)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][lte]","in":"query","required":false,"description":"Filter isMigrated (lte)","schema":{"type":"boolean"}},{"name":"filter[isMigrated][in]","in":"query","required":false,"description":"Filter isMigrated (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isMigrated][notIn]","in":"query","required":false,"description":"Filter isMigrated (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isMigrated][between]","in":"query","required":false,"description":"Filter isMigrated (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[debitGlAccountId]","in":"query","required":false,"description":"Filter debitGlAccountId (equality)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][ne]","in":"query","required":false,"description":"Filter debitGlAccountId (ne)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][gt]","in":"query","required":false,"description":"Filter debitGlAccountId (gt)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][gte]","in":"query","required":false,"description":"Filter debitGlAccountId (gte)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][lt]","in":"query","required":false,"description":"Filter debitGlAccountId (lt)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][lte]","in":"query","required":false,"description":"Filter debitGlAccountId (lte)","schema":{"type":"string"}},{"name":"filter[debitGlAccountId][in]","in":"query","required":false,"description":"Filter debitGlAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitGlAccountId][notIn]","in":"query","required":false,"description":"Filter debitGlAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[debitGlAccountId][between]","in":"query","required":false,"description":"Filter debitGlAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[debitGlAccountId][like]","in":"query","required":false,"description":"Filter debitGlAccountId (like)","schema":{"type":"string"}},{"name":"filter[billToAddressId]","in":"query","required":false,"description":"Filter billToAddressId (equality)","schema":{"type":"string"}},{"name":"filter[billToAddressId][ne]","in":"query","required":false,"description":"Filter billToAddressId (ne)","schema":{"type":"string"}},{"name":"filter[billToAddressId][gt]","in":"query","required":false,"description":"Filter billToAddressId (gt)","schema":{"type":"string"}},{"name":"filter[billToAddressId][gte]","in":"query","required":false,"description":"Filter billToAddressId (gte)","schema":{"type":"string"}},{"name":"filter[billToAddressId][lt]","in":"query","required":false,"description":"Filter billToAddressId (lt)","schema":{"type":"string"}},{"name":"filter[billToAddressId][lte]","in":"query","required":false,"description":"Filter billToAddressId (lte)","schema":{"type":"string"}},{"name":"filter[billToAddressId][in]","in":"query","required":false,"description":"Filter billToAddressId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billToAddressId][notIn]","in":"query","required":false,"description":"Filter billToAddressId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billToAddressId][between]","in":"query","required":false,"description":"Filter billToAddressId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billToAddressId][like]","in":"query","required":false,"description":"Filter billToAddressId (like)","schema":{"type":"string"}},{"name":"filter[soldToAddressId]","in":"query","required":false,"description":"Filter soldToAddressId (equality)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][ne]","in":"query","required":false,"description":"Filter soldToAddressId (ne)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][gt]","in":"query","required":false,"description":"Filter soldToAddressId (gt)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][gte]","in":"query","required":false,"description":"Filter soldToAddressId (gte)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][lt]","in":"query","required":false,"description":"Filter soldToAddressId (lt)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][lte]","in":"query","required":false,"description":"Filter soldToAddressId (lte)","schema":{"type":"string"}},{"name":"filter[soldToAddressId][in]","in":"query","required":false,"description":"Filter soldToAddressId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[soldToAddressId][notIn]","in":"query","required":false,"description":"Filter soldToAddressId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[soldToAddressId][between]","in":"query","required":false,"description":"Filter soldToAddressId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[soldToAddressId][like]","in":"query","required":false,"description":"Filter soldToAddressId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","creditMemoId","-creditMemoId","customerId","-customerId","entityId","-entityId","debitMemoDate","-debitMemoDate","dueDate","-dueDate","taxDate","-taxDate","approvalStatus","-approvalStatus","debitMemoStatus","-debitMemoStatus","debitMemoType","-debitMemoType","currency","-currency","paymentTerm","-paymentTerm","isMigrated","-isMigrated","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","debitMemoNumber","creditMemoId","creditMemoNumber","debitMemoDate","dueDate","taxDate","approvalStatus","debitMemoStatus","debitMemoType","currency","customerId","customerName","customerNumber","entityId","entityName","paymentTerm","purchaseOrder","customerMessage","externalDebitMemoId","isMigrated","debitGlAccountId","billToAddressId","soldToAddressId","subtotal","totalAmount","totalTax","totalAmountDebited","lineDiscounts","unappliedCreditAmount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/debitMemosRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List debit memos","description":"Lists debit memos. To filter by debit memo number, customer name or number, purchase order, customer message, or external identifier, use POST accounting/debit-memos/search.","tags":["accountingDebitMemos"]}},"/accounting/vendors/search":{"post":{"operationId":"searchVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchVendorInput"}}}},"summary":"Search vendors","description":"Searches vendors. You can filter by name, number, type, status, legal entity, contact email, or external identifier. The vendorName, mainContactEmail, and entityId filters are available here and not on GET accounting/vendors.","tags":["accountingVendors"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/expense-reports/{id}/reject":{"post":{"operationId":"rejectExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense report you want to reject.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectExpenseReportInput"}}}},"summary":"Reject an expense report","description":"Rejects an expense report. reviewMessage is recorded with the decision, and the response is the status that results.\n\nFor a report that is already rejected, the request fails with STATUS_CONFLICT.\n\nA rejected report is kept, with its number and audit trail. To withdraw a submission and delete the report, use POST accounting/expense-reports/:id/cancel-submission.","tags":["accountingExpenseReports"]}},"/accounting/vendor-credits/search":{"post":{"operationId":"searchVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchVendorCreditInput"}}}},"summary":"Search vendor credits","description":"Searches vendor credits. Each match is the same full record that GET accounting/vendor-credits/:id returns, with its line items and their amortization schedules.","tags":["accountingVendorCredits"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/expense-reports/{id}":{"get":{"operationId":"getExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense report you want to retrieve.","example":"3f8c5a91-7b2e-4d16-9c4a-8e1f2b6d5307"}],"summary":"Retrieve an expense report","description":"Retrieves an expense report. Use the report's id, not its expenseNumber.\n\nThe response has the report's main fields, every expense item on it and the files on the report.\n\nPOST accounting/expense-reports/search returns the same record for each report. GET accounting/expense-reports returns the main fields only.\n\nThe report totals are in reimbursementCurrency, and each item's amount is in the item's own currency.","tags":["accountingExpenseReports"]},"delete":{"operationId":"deleteExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, POSTING_PERIOD_CLOSED, POSTED_AMORTIZATION","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report that could not be deleted."},"periodName":{"type":"string","description":"The name of the period blocking the delete."}},"additionalProperties":false,"required":["expenseNumber","periodName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report that could not be deleted."}},"additionalProperties":false,"required":["expenseNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report that could not be deleted."},"periodName":{"type":"string","description":"The name of the period blocking the delete."}},"additionalProperties":false,"required":["expenseNumber","periodName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report that could not be deleted."}},"additionalProperties":false,"required":["expenseNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report that could not be deleted."},"periodName":{"type":"string","description":"The name of the period blocking the delete."}},"additionalProperties":false,"required":["expenseNumber","periodName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report that could not be deleted."}},"additionalProperties":false,"required":["expenseNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense report you want to delete.","example":"c7d2e910-3b45-4f68-8a91-2d3e4f5a6b78"}],"summary":"Delete an expense report","description":"Deletes an expense report. The report's expense items, their attachments, and any business-trip details are deleted with it.\n\nAn approved report can't be deleted while the accounting period of its submitted date is closed or locked. It also can't be deleted while an amortization schedule on one of its items has created a journal entry. A report that isn't approved has neither check.\n\nTo keep the report and its audit trail, reject it with POST accounting/expense-reports/:id/reject instead.","tags":["accountingExpenseReports"]},"patch":{"operationId":"updateExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, ATTACHMENT_REMOVAL_LOCKED, NOT_FOUND, REFERENCE_NOT_FOUND, ITEM_NOT_FOUND, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID, CROSS_CHARGE_INVALID, TOO_MANY_LINES, CATEGORY_REQUIREMENT_UNMET, CATEGORY_INACTIVE, ITEM_NEEDS_CATEGORY_OR_ACCOUNT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to, within the list named by itemList. Absent for a report-level attachment."},"itemList":{"type":"string","description":"The list the expense item is in: createExpenseItems or updateExpenseItems."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to, within the list named by itemList. Absent for a report-level attachment."},"itemList":{"type":"string","description":"The list the expense item is in: createExpenseItems or updateExpenseItems."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REMOVAL_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the expense report."},"fileNames":{"type":"array","items":{"type":"string"},"description":"The names of the files the request would have removed."}},"additionalProperties":false,"required":["expenseNumber","fileNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string","description":"The item id that does not belong to this report."}},"additionalProperties":false,"required":["itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The account sub-type the item resolved to, which refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of items the request touched."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_REQUIREMENT_UNMET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category that imposes the requirement."},"requirement":{"type":"string","description":"What is missing. Either 'attachment' or 'attendees'."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","requirement","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the inactive category."},"referenceId":{"type":"string","description":"The identifier of the inactive category."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NEEDS_CATEGORY_OR_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"source":{"type":"string","description":"Where the item came from. Either 'new', supplied by this request, or 'existing', already on the report."},"lineIndex":{"type":"number","description":"The zero-based position of the item, within the array that carried it or within the report's stored items."}},"additionalProperties":false,"required":["source","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to, within the list named by itemList. Absent for a report-level attachment."},"itemList":{"type":"string","description":"The list the expense item is in: createExpenseItems or updateExpenseItems."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to, within the list named by itemList. Absent for a report-level attachment."},"itemList":{"type":"string","description":"The list the expense item is in: createExpenseItems or updateExpenseItems."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REMOVAL_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the expense report."},"fileNames":{"type":"array","items":{"type":"string"},"description":"The names of the files the request would have removed."}},"additionalProperties":false,"required":["expenseNumber","fileNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string","description":"The item id that does not belong to this report."}},"additionalProperties":false,"required":["itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The account sub-type the item resolved to, which refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of items the request touched."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_REQUIREMENT_UNMET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category that imposes the requirement."},"requirement":{"type":"string","description":"What is missing. Either 'attachment' or 'attendees'."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","requirement","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the inactive category."},"referenceId":{"type":"string","description":"The identifier of the inactive category."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NEEDS_CATEGORY_OR_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"source":{"type":"string","description":"Where the item came from. Either 'new', supplied by this request, or 'existing', already on the report."},"lineIndex":{"type":"number","description":"The zero-based position of the item, within the array that carried it or within the report's stored items."}},"additionalProperties":false,"required":["source","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to, within the list named by itemList. Absent for a report-level attachment."},"itemList":{"type":"string","description":"The list the expense item is in: createExpenseItems or updateExpenseItems."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to, within the list named by itemList. Absent for a report-level attachment."},"itemList":{"type":"string","description":"The list the expense item is in: createExpenseItems or updateExpenseItems."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REMOVAL_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the expense report."},"fileNames":{"type":"array","items":{"type":"string"},"description":"The names of the files the request would have removed."}},"additionalProperties":false,"required":["expenseNumber","fileNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string","description":"The item id that does not belong to this report."}},"additionalProperties":false,"required":["itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The account sub-type the item resolved to, which refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of items the request touched."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_REQUIREMENT_UNMET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category that imposes the requirement."},"requirement":{"type":"string","description":"What is missing. Either 'attachment' or 'attendees'."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","requirement","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the inactive category."},"referenceId":{"type":"string","description":"The identifier of the inactive category."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NEEDS_CATEGORY_OR_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"source":{"type":"string","description":"Where the item came from. Either 'new', supplied by this request, or 'existing', already on the report."},"lineIndex":{"type":"number","description":"The zero-based position of the item, within the array that carried it or within the report's stored items."}},"additionalProperties":false,"required":["source","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense report you want to update.","example":"c7d2e910-3b45-4f68-8a91-2d3e4f5a6b78"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateExpenseReportInput"}}}},"summary":"Update an expense report","description":"Updates an expense report with the fields you send. A field you leave out keeps its current value.\n\nUse the report's id, not its expenseNumber.\n\nThis is true on the report and on each item in updateExpenseItems. Expense items change through three separate arrays, applied in this order: deleteExpenseItems, updateExpenseItems, createExpenseItems. Leave out all three to keep the items as they are.\n\nOn an updateExpenseItems item, amortization schedules change through createAmortizationSchedules, updateAmortizationSchedules, and deleteAmortizationSchedules. An attachments list you send on an item replaces that item's attachments, so include every attachment you want to keep. Leave attachments out to keep them. The report's own files work the same way through the top-level attachments, which keeps a file by its id.\n\nThe report's main fields and its expense items can change in one request.\n\nOne request can remove an item and add its replacement.\n\nupdateExpenseItems and deleteExpenseItems name items by their id on GET accounting/expense-reports/:id. For an item of another report, the request fails with ITEM_NOT_FOUND.\n\nAfter the update, the report is reimbursable unless an item left on it sets reimbursable to false. The response is empty. Read the record with GET accounting/expense-reports/:id.","tags":["accountingExpenseReports"]}},"/accounting/payroll-templates":{"get":{"operationId":"payrollTemplates","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[groupBy]","in":"query","required":false,"description":"Filter groupBy (equality)","schema":{"type":"string"}},{"name":"filter[groupBy][ne]","in":"query","required":false,"description":"Filter groupBy (ne)","schema":{"type":"string"}},{"name":"filter[groupBy][gt]","in":"query","required":false,"description":"Filter groupBy (gt)","schema":{"type":"string"}},{"name":"filter[groupBy][gte]","in":"query","required":false,"description":"Filter groupBy (gte)","schema":{"type":"string"}},{"name":"filter[groupBy][lt]","in":"query","required":false,"description":"Filter groupBy (lt)","schema":{"type":"string"}},{"name":"filter[groupBy][lte]","in":"query","required":false,"description":"Filter groupBy (lte)","schema":{"type":"string"}},{"name":"filter[groupBy][in]","in":"query","required":false,"description":"Filter groupBy (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupBy][notIn]","in":"query","required":false,"description":"Filter groupBy (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupBy][between]","in":"query","required":false,"description":"Filter groupBy (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[groupBy][like]","in":"query","required":false,"description":"Filter groupBy (like)","schema":{"type":"string"}},{"name":"filter[journalEntryDate]","in":"query","required":false,"description":"Filter journalEntryDate (equality)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][ne]","in":"query","required":false,"description":"Filter journalEntryDate (ne)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][gt]","in":"query","required":false,"description":"Filter journalEntryDate (gt)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][gte]","in":"query","required":false,"description":"Filter journalEntryDate (gte)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][lt]","in":"query","required":false,"description":"Filter journalEntryDate (lt)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][lte]","in":"query","required":false,"description":"Filter journalEntryDate (lte)","schema":{"type":"string"}},{"name":"filter[journalEntryDate][in]","in":"query","required":false,"description":"Filter journalEntryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryDate][notIn]","in":"query","required":false,"description":"Filter journalEntryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryDate][between]","in":"query","required":false,"description":"Filter journalEntryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[journalEntryDate][like]","in":"query","required":false,"description":"Filter journalEntryDate (like)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy]","in":"query","required":false,"description":"Filter journalEntryGroupBy (equality)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][ne]","in":"query","required":false,"description":"Filter journalEntryGroupBy (ne)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][gt]","in":"query","required":false,"description":"Filter journalEntryGroupBy (gt)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][gte]","in":"query","required":false,"description":"Filter journalEntryGroupBy (gte)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][lt]","in":"query","required":false,"description":"Filter journalEntryGroupBy (lt)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][lte]","in":"query","required":false,"description":"Filter journalEntryGroupBy (lte)","schema":{"type":"string"}},{"name":"filter[journalEntryGroupBy][in]","in":"query","required":false,"description":"Filter journalEntryGroupBy (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryGroupBy][notIn]","in":"query","required":false,"description":"Filter journalEntryGroupBy (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryGroupBy][between]","in":"query","required":false,"description":"Filter journalEntryGroupBy (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[journalEntryGroupBy][like]","in":"query","required":false,"description":"Filter journalEntryGroupBy (like)","schema":{"type":"string"}},{"name":"filter[deductionsType]","in":"query","required":false,"description":"Filter deductionsType (equality)","schema":{"type":"string"}},{"name":"filter[deductionsType][ne]","in":"query","required":false,"description":"Filter deductionsType (ne)","schema":{"type":"string"}},{"name":"filter[deductionsType][gt]","in":"query","required":false,"description":"Filter deductionsType (gt)","schema":{"type":"string"}},{"name":"filter[deductionsType][gte]","in":"query","required":false,"description":"Filter deductionsType (gte)","schema":{"type":"string"}},{"name":"filter[deductionsType][lt]","in":"query","required":false,"description":"Filter deductionsType (lt)","schema":{"type":"string"}},{"name":"filter[deductionsType][lte]","in":"query","required":false,"description":"Filter deductionsType (lte)","schema":{"type":"string"}},{"name":"filter[deductionsType][in]","in":"query","required":false,"description":"Filter deductionsType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deductionsType][notIn]","in":"query","required":false,"description":"Filter deductionsType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deductionsType][between]","in":"query","required":false,"description":"Filter deductionsType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deductionsType][like]","in":"query","required":false,"description":"Filter deductionsType (like)","schema":{"type":"string"}},{"name":"filter[source]","in":"query","required":false,"description":"Filter source (equality)","schema":{"type":"string"}},{"name":"filter[source][ne]","in":"query","required":false,"description":"Filter source (ne)","schema":{"type":"string"}},{"name":"filter[source][gt]","in":"query","required":false,"description":"Filter source (gt)","schema":{"type":"string"}},{"name":"filter[source][gte]","in":"query","required":false,"description":"Filter source (gte)","schema":{"type":"string"}},{"name":"filter[source][lt]","in":"query","required":false,"description":"Filter source (lt)","schema":{"type":"string"}},{"name":"filter[source][lte]","in":"query","required":false,"description":"Filter source (lte)","schema":{"type":"string"}},{"name":"filter[source][in]","in":"query","required":false,"description":"Filter source (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[source][notIn]","in":"query","required":false,"description":"Filter source (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[source][between]","in":"query","required":false,"description":"Filter source (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[source][like]","in":"query","required":false,"description":"Filter source (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","groupBy","-groupBy","journalEntryDate","-journalEntryDate","journalEntryGroupBy","-journalEntryGroupBy","deductionsType","-deductionsType","source","-source","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","groupBy","journalEntryDate","journalEntryGroupBy","deductionsType","source","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/payrollTemplatesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List payroll templates","description":"Lists payroll templates, without their categories. To get the categories, use GET accounting/payroll-templates/:id or POST accounting/payroll-templates/search.","tags":["accountingPayrollTemplates"]},"post":{"operationId":"createPayrollTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPayrollTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DUPLICATE_NAME, NO_CATEGORIES, DUPLICATE_CATEGORY_NAME, MULTIPLE_NET_PAY_CATEGORIES, AGGREGATION_REQUIRES_EMPLOYEE_GROUPING, NO_ENTITIES, NO_CATEGORY_ACCOUNTS, TAGS_REQUIRE_CATEGORY_AGGREGATION, INVALID_CATEGORY_TAG","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPayrollTemplateInput"}}}},"summary":"Create a payroll template","description":"Creates a payroll template with its categories and entity assignments. The template serves the legal entities in entityIds, and each category names the debit and credit accounts for one kind of payroll amount.\n\nThe name must be unique within the tenant, or the request fails with DUPLICATE_NAME. Send at least one category and at least one legal entity. Category names must be unique within the template, and at least one category must name a debit or credit account.\n\nstatus isn't an input. The template is 'active' when it has an active netPay category and an active grossPay category, and 'inactive' otherwise.\n\nThe response contains only the new template's id. To see the template, use GET accounting/payroll-templates/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPayrollTemplates"]}},"/accounting/purchase-requests/search":{"post":{"operationId":"searchPurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPurchaseRequestInput"}}}},"summary":"Search purchase requests","description":"Searches purchase requests. Each match is the full purchase request with its lines. The vendorId, vendorName, entityId, entityName, and departmentId filters are available here and not on GET accounting/purchase-requests.","tags":["accountingPurchaseRequests"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/vendors/{id}/activate":{"post":{"operationId":"activateVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/activateVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_IS_DRAFT, ALREADY_IN_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the vendor to activate; bound from the :id path segment.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activateVendorInput"}}}},"summary":"Activate a vendor","description":"Activates a vendor. The vendor appears again when you choose a vendor in the application.\n\nThe response is empty. To see the vendor, use GET accounting/vendors/:id.","tags":["accountingVendors"]}},"/accounting/invoice-frequency-templates":{"get":{"operationId":"invoiceFrequencyTemplates","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[isEvenInvoicing]","in":"query","required":false,"description":"Filter isEvenInvoicing (equality)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][ne]","in":"query","required":false,"description":"Filter isEvenInvoicing (ne)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][gt]","in":"query","required":false,"description":"Filter isEvenInvoicing (gt)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][gte]","in":"query","required":false,"description":"Filter isEvenInvoicing (gte)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][lt]","in":"query","required":false,"description":"Filter isEvenInvoicing (lt)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][lte]","in":"query","required":false,"description":"Filter isEvenInvoicing (lte)","schema":{"type":"boolean"}},{"name":"filter[isEvenInvoicing][in]","in":"query","required":false,"description":"Filter isEvenInvoicing (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isEvenInvoicing][notIn]","in":"query","required":false,"description":"Filter isEvenInvoicing (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isEvenInvoicing][between]","in":"query","required":false,"description":"Filter isEvenInvoicing (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","isEvenInvoicing","-isEvenInvoicing","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","rule","isEvenInvoicing","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/invoiceFrequencyTemplatesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List invoice frequency templates","description":"Lists invoice frequency templates.","tags":["accountingInvoiceFrequencyTemplates"]}},"/accounting/period-status/{id}/execute-task":{"post":{"operationId":"executeAccountingPeriodTask","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/executeAccountingPeriodTaskOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNKNOWN_TASK, TASK_NOT_EXECUTABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TASK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"task":{"type":"string","description":"The task code you sent."},"allowedTasks":{"type":"string","description":"A comma-separated list of the task codes this endpoint accepts."}},"additionalProperties":false,"required":["task","allowedTasks"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_NOT_EXECUTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the period status row the task was attempted against."},"task":{"type":"string","description":"The task code that could not run."},"reason":{"type":"string","description":"Why the task cannot run now, from the close process's precondition check, for example 'Close task may only be executed after Lock Journals.'"}},"additionalProperties":false,"required":["id","task","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TASK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"task":{"type":"string","description":"The task code you sent."},"allowedTasks":{"type":"string","description":"A comma-separated list of the task codes this endpoint accepts."}},"additionalProperties":false,"required":["task","allowedTasks"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_NOT_EXECUTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the period status row the task was attempted against."},"task":{"type":"string","description":"The task code that could not run."},"reason":{"type":"string","description":"Why the task cannot run now, from the close process's precondition check, for example 'Close task may only be executed after Lock Journals.'"}},"additionalProperties":false,"required":["id","task","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TASK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"task":{"type":"string","description":"The task code you sent."},"allowedTasks":{"type":"string","description":"A comma-separated list of the task codes this endpoint accepts."}},"additionalProperties":false,"required":["task","allowedTasks"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_NOT_EXECUTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the period status row the task was attempted against."},"task":{"type":"string","description":"The task code that could not run."},"reason":{"type":"string","description":"Why the task cannot run now, from the close process's precondition check, for example 'Close task may only be executed after Lock Journals.'"}},"additionalProperties":false,"required":["id","task","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the entity-book period status row to run the task against. This is the id of a record from GET accounting/period-status, not the shared accountingPeriodId."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/executeAccountingPeriodTaskInput"}}}},"summary":"Run a period-close task","description":"Runs a period-close task. A task runs on one accounting period status. For example, it opens, closes, or reopens the period, or locks or unlocks accounts payable (AP), accounts receivable (AR), journals, or revenue.\n\nSome tasks also change related periods. 'open' also opens earlier periods of the same legal entity and accounting book that aren't open yet. 'reopen' and the unlock tasks also reopen later closed periods, and the parent legal entity's period if it is closed. 'lockAR', 'unlockAR', 'lockAP', and 'unlockAP' also apply to the legal entity's other accounting books.\n\nBefore you send the request, read closeTasks on GET accounting/period-status/:id. For a task in the list, check isExecutable. For 'reopen' or an unlock task, check isReversible on the task it undoes.\n\nThe response is empty. Read the result with GET accounting/period-status/:id.","tags":["accountingAccountingPeriodStatuses"]}},"/accounting/revenue-contracts/{id}":{"get":{"operationId":"getRevenueContract","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getRevenueContractOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revenue contract you want to retrieve."}],"summary":"Retrieve a revenue contract","description":"Retrieves a revenue contract. Use the revenue contract's id, not its revenueContractNumber.\n\nThe response includes the contract's revenue lines, each with its revenue plan and the plan's periods. POST accounting/revenue-contracts/search returns the same fields for each revenue contract.","tags":["accountingRevenueContracts"]}},"/accounting/performance-obligations":{"get":{"operationId":"performanceObligations","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber]","in":"query","required":false,"description":"Filter performanceObligationNumber (equality)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][ne]","in":"query","required":false,"description":"Filter performanceObligationNumber (ne)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][gt]","in":"query","required":false,"description":"Filter performanceObligationNumber (gt)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][gte]","in":"query","required":false,"description":"Filter performanceObligationNumber (gte)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][lt]","in":"query","required":false,"description":"Filter performanceObligationNumber (lt)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][lte]","in":"query","required":false,"description":"Filter performanceObligationNumber (lte)","schema":{"type":"string"}},{"name":"filter[performanceObligationNumber][in]","in":"query","required":false,"description":"Filter performanceObligationNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[performanceObligationNumber][notIn]","in":"query","required":false,"description":"Filter performanceObligationNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[performanceObligationNumber][between]","in":"query","required":false,"description":"Filter performanceObligationNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[performanceObligationNumber][like]","in":"query","required":false,"description":"Filter performanceObligationNumber (like)","schema":{"type":"string"}},{"name":"filter[effectiveStartDate]","in":"query","required":false,"description":"Filter effectiveStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][ne]","in":"query","required":false,"description":"Filter effectiveStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][gt]","in":"query","required":false,"description":"Filter effectiveStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][gte]","in":"query","required":false,"description":"Filter effectiveStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][lt]","in":"query","required":false,"description":"Filter effectiveStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][lte]","in":"query","required":false,"description":"Filter effectiveStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveStartDate][in]","in":"query","required":false,"description":"Filter effectiveStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveStartDate][notIn]","in":"query","required":false,"description":"Filter effectiveStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveStartDate][between]","in":"query","required":false,"description":"Filter effectiveStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[effectiveEndDate]","in":"query","required":false,"description":"Filter effectiveEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][ne]","in":"query","required":false,"description":"Filter effectiveEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][gt]","in":"query","required":false,"description":"Filter effectiveEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][gte]","in":"query","required":false,"description":"Filter effectiveEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][lt]","in":"query","required":false,"description":"Filter effectiveEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][lte]","in":"query","required":false,"description":"Filter effectiveEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[effectiveEndDate][in]","in":"query","required":false,"description":"Filter effectiveEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveEndDate][notIn]","in":"query","required":false,"description":"Filter effectiveEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[effectiveEndDate][between]","in":"query","required":false,"description":"Filter effectiveEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[allocationStartDate]","in":"query","required":false,"description":"Filter allocationStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][ne]","in":"query","required":false,"description":"Filter allocationStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][gt]","in":"query","required":false,"description":"Filter allocationStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][gte]","in":"query","required":false,"description":"Filter allocationStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][lt]","in":"query","required":false,"description":"Filter allocationStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][lte]","in":"query","required":false,"description":"Filter allocationStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationStartDate][in]","in":"query","required":false,"description":"Filter allocationStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allocationStartDate][notIn]","in":"query","required":false,"description":"Filter allocationStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allocationStartDate][between]","in":"query","required":false,"description":"Filter allocationStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isAllocationExcluded]","in":"query","required":false,"description":"Filter isAllocationExcluded (equality)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][ne]","in":"query","required":false,"description":"Filter isAllocationExcluded (ne)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][gt]","in":"query","required":false,"description":"Filter isAllocationExcluded (gt)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][gte]","in":"query","required":false,"description":"Filter isAllocationExcluded (gte)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][lt]","in":"query","required":false,"description":"Filter isAllocationExcluded (lt)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][lte]","in":"query","required":false,"description":"Filter isAllocationExcluded (lte)","schema":{"type":"boolean"}},{"name":"filter[isAllocationExcluded][in]","in":"query","required":false,"description":"Filter isAllocationExcluded (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isAllocationExcluded][notIn]","in":"query","required":false,"description":"Filter isAllocationExcluded (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isAllocationExcluded][between]","in":"query","required":false,"description":"Filter isAllocationExcluded (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isNetAccounting]","in":"query","required":false,"description":"Filter isNetAccounting (equality)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][ne]","in":"query","required":false,"description":"Filter isNetAccounting (ne)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][gt]","in":"query","required":false,"description":"Filter isNetAccounting (gt)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][gte]","in":"query","required":false,"description":"Filter isNetAccounting (gte)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][lt]","in":"query","required":false,"description":"Filter isNetAccounting (lt)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][lte]","in":"query","required":false,"description":"Filter isNetAccounting (lte)","schema":{"type":"boolean"}},{"name":"filter[isNetAccounting][in]","in":"query","required":false,"description":"Filter isNetAccounting (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isNetAccounting][notIn]","in":"query","required":false,"description":"Filter isNetAccounting (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isNetAccounting][between]","in":"query","required":false,"description":"Filter isNetAccounting (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[defaultAmortizationMethod]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (equality)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][ne]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (ne)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][gt]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (gt)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][gte]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (gte)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][lt]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (lt)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][lte]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (lte)","schema":{"type":"string"}},{"name":"filter[defaultAmortizationMethod][in]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultAmortizationMethod][notIn]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultAmortizationMethod][between]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[defaultAmortizationMethod][like]","in":"query","required":false,"description":"Filter defaultAmortizationMethod (like)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (equality)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][ne]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (ne)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][gt]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (gt)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][gte]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (gte)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][lt]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (lt)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][lte]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (lte)","schema":{"type":"string"}},{"name":"filter[standaloneSellingPriceRangeType][in]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[standaloneSellingPriceRangeType][notIn]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[standaloneSellingPriceRangeType][between]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[standaloneSellingPriceRangeType][like]","in":"query","required":false,"description":"Filter standaloneSellingPriceRangeType (like)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (equality)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][ne]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (ne)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][gt]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (gt)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][gte]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (gte)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][lt]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (lt)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][lte]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (lte)","schema":{"type":"string"}},{"name":"filter[revenueSchedulingTemplateName][in]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateName][notIn]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateName][between]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[revenueSchedulingTemplateName][like]","in":"query","required":false,"description":"Filter revenueSchedulingTemplateName (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","performanceObligationNumber","-performanceObligationNumber","name","-name","effectiveStartDate","-effectiveStartDate","effectiveEndDate","-effectiveEndDate","allocationStartDate","-allocationStartDate","isAllocationExcluded","-isAllocationExcluded","isNetAccounting","-isNetAccounting","defaultAmortizationMethod","-defaultAmortizationMethod","standaloneSellingPriceRangeType","-standaloneSellingPriceRangeType","revenueSchedulingTemplateName","-revenueSchedulingTemplateName","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","performanceObligationNumber","name","description","effectiveStartDate","effectiveEndDate","allocationStartDate","isAllocationExcluded","isNetAccounting","defaultAmortizationMethod","standaloneSellingPriceRangeType","revenueSchedulingTemplateName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/performanceObligationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List performance obligations","description":"Lists performance obligations. The collection doesn't include standaloneSellingPriceRanges, revenueSchedulingTemplateId, or standaloneSellingPriceStratificationConfigurationId. To get these fields, use GET accounting/performance-obligations/:id or POST accounting/performance-obligations/search.","tags":["accountingPerformanceObligations"]}},"/accounting/sales-orders/{id}/approve":{"post":{"operationId":"approveSalesOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveSalesOrderOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"SALES_ORDER_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was not approved."},"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was not approved."},"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was not approved."},"reason":{"type":"string","description":"What made the order unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved sales order."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the sales order that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the sales order to approve; bound from the :id path segment.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveSalesOrderInput"}}}},"summary":"Approve a sales order","description":"Approves a sales order. Runs the same pre-approval validations the UI gates on and then the full approval cascade — subscription activation, invoice-plan generation, prepaid balances, early-renewal invoicing, draft cleanup, business versioning and metrics. Idempotent: an already-approved order is a no-op success. Does not approve the order's revenue contract. Returns an empty output. Every request must carry the Api-Version header.\n\n```\nPOST accounting/sales-orders/3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45/approve\n```\n\n**The body is empty and so is the response.** Read the order back with `GET accounting/sales-orders/{id}` to see its approved state.\n\nUntil now the only way to approve an order over the api was to send `approvalStatus: \"approved\"` when **creating** it. An order created without that, or one raised in the UI, had no api route to approval at all. This is that route.\n\n**Approval is what makes an order real.** It runs the same pre-approval validations the UI gates on — milestone configuration, custom invoice plans, VAT estimation, the one-time discount account, subscription status — and then the whole cascade behind them: subscriptions activate, the invoice plan is generated, prepaid balances are created, early renewals are invoiced, superseded draft modifications are cleaned up, business-version logs and metrics are written. An order refused by a validation rule is left **entirely** untouched; the call runs in a transaction, so a failure part-way leaves nothing behind.\n\n**Approving is idempotent.** An order that is already approved returns success and changes nothing — the cascade is deliberately not re-run, since it creates prepaid balances and deletes drafts. The `SALES_ORDER_ALREADY_APPROVED` information diagnostic is how a caller tells that case from a fresh approval (`SALES_ORDER_APPROVED`), so a retry after a timeout is safe.\n\n**It does NOT approve the order's revenue contract.** That is a separate, explicit call: `POST accounting/revenue-contracts/{id}/approve`. The order must be approved first — the contract's own route refuses it otherwise.\n\nApproving an id that does not exist is `NOT_FOUND`, not a silent success.","tags":["accountingSalesOrders"]}},"/accounting/pricing/{id}":{"get":{"operationId":"getAccountingPricing","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountingPricingOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ID, NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the pricing header you want to retrieve."}],"summary":"Retrieve a pricing header","description":"Retrieves a pricing header. Use the pricing header's id, not its headerNumber.\n\nThe response includes the pricing header's price book entries, with their rate-card entries and external identifiers.","tags":["accounting/products/productLines"]}},"/accounting/debit-memos/search":{"post":{"operationId":"searchDebitMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchDebitMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_TIMESTAMP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchDebitMemoInput"}}}},"summary":"Search debit memos","description":"Searches debit memos. Each debit memo in the results includes its lines.","tags":["accountingDebitMemos"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/period-status":{"get":{"operationId":"accountingPeriodStatuses","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId]","in":"query","required":false,"description":"Filter accountingPeriodId (equality)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][ne]","in":"query","required":false,"description":"Filter accountingPeriodId (ne)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gt]","in":"query","required":false,"description":"Filter accountingPeriodId (gt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gte]","in":"query","required":false,"description":"Filter accountingPeriodId (gte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lt]","in":"query","required":false,"description":"Filter accountingPeriodId (lt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lte]","in":"query","required":false,"description":"Filter accountingPeriodId (lte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][in]","in":"query","required":false,"description":"Filter accountingPeriodId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][notIn]","in":"query","required":false,"description":"Filter accountingPeriodId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][between]","in":"query","required":false,"description":"Filter accountingPeriodId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountingPeriodId][like]","in":"query","required":false,"description":"Filter accountingPeriodId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[periodName]","in":"query","required":false,"description":"Filter periodName (equality)","schema":{"type":"string"}},{"name":"filter[periodName][ne]","in":"query","required":false,"description":"Filter periodName (ne)","schema":{"type":"string"}},{"name":"filter[periodName][gt]","in":"query","required":false,"description":"Filter periodName (gt)","schema":{"type":"string"}},{"name":"filter[periodName][gte]","in":"query","required":false,"description":"Filter periodName (gte)","schema":{"type":"string"}},{"name":"filter[periodName][lt]","in":"query","required":false,"description":"Filter periodName (lt)","schema":{"type":"string"}},{"name":"filter[periodName][lte]","in":"query","required":false,"description":"Filter periodName (lte)","schema":{"type":"string"}},{"name":"filter[periodName][in]","in":"query","required":false,"description":"Filter periodName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][notIn]","in":"query","required":false,"description":"Filter periodName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][between]","in":"query","required":false,"description":"Filter periodName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[periodName][like]","in":"query","required":false,"description":"Filter periodName (like)","schema":{"type":"string"}},{"name":"filter[fiscalYear]","in":"query","required":false,"description":"Filter fiscalYear (equality)","schema":{"type":"string"}},{"name":"filter[fiscalYear][ne]","in":"query","required":false,"description":"Filter fiscalYear (ne)","schema":{"type":"string"}},{"name":"filter[fiscalYear][gt]","in":"query","required":false,"description":"Filter fiscalYear (gt)","schema":{"type":"string"}},{"name":"filter[fiscalYear][gte]","in":"query","required":false,"description":"Filter fiscalYear (gte)","schema":{"type":"string"}},{"name":"filter[fiscalYear][lt]","in":"query","required":false,"description":"Filter fiscalYear (lt)","schema":{"type":"string"}},{"name":"filter[fiscalYear][lte]","in":"query","required":false,"description":"Filter fiscalYear (lte)","schema":{"type":"string"}},{"name":"filter[fiscalYear][in]","in":"query","required":false,"description":"Filter fiscalYear (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYear][notIn]","in":"query","required":false,"description":"Filter fiscalYear (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalYear][between]","in":"query","required":false,"description":"Filter fiscalYear (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalYear][like]","in":"query","required":false,"description":"Filter fiscalYear (like)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter]","in":"query","required":false,"description":"Filter fiscalQuarter (equality)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][ne]","in":"query","required":false,"description":"Filter fiscalQuarter (ne)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][gt]","in":"query","required":false,"description":"Filter fiscalQuarter (gt)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][gte]","in":"query","required":false,"description":"Filter fiscalQuarter (gte)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][lt]","in":"query","required":false,"description":"Filter fiscalQuarter (lt)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][lte]","in":"query","required":false,"description":"Filter fiscalQuarter (lte)","schema":{"type":"string"}},{"name":"filter[fiscalQuarter][in]","in":"query","required":false,"description":"Filter fiscalQuarter (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalQuarter][notIn]","in":"query","required":false,"description":"Filter fiscalQuarter (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fiscalQuarter][between]","in":"query","required":false,"description":"Filter fiscalQuarter (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fiscalQuarter][like]","in":"query","required":false,"description":"Filter fiscalQuarter (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[reopenedByCascade]","in":"query","required":false,"description":"Filter reopenedByCascade (equality)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][ne]","in":"query","required":false,"description":"Filter reopenedByCascade (ne)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][gt]","in":"query","required":false,"description":"Filter reopenedByCascade (gt)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][gte]","in":"query","required":false,"description":"Filter reopenedByCascade (gte)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][lt]","in":"query","required":false,"description":"Filter reopenedByCascade (lt)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][lte]","in":"query","required":false,"description":"Filter reopenedByCascade (lte)","schema":{"type":"boolean"}},{"name":"filter[reopenedByCascade][in]","in":"query","required":false,"description":"Filter reopenedByCascade (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reopenedByCascade][notIn]","in":"query","required":false,"description":"Filter reopenedByCascade (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reopenedByCascade][between]","in":"query","required":false,"description":"Filter reopenedByCascade (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[postable]","in":"query","required":false,"description":"Filter postable (equality)","schema":{"type":"boolean"}},{"name":"filter[postable][ne]","in":"query","required":false,"description":"Filter postable (ne)","schema":{"type":"boolean"}},{"name":"filter[postable][gt]","in":"query","required":false,"description":"Filter postable (gt)","schema":{"type":"boolean"}},{"name":"filter[postable][gte]","in":"query","required":false,"description":"Filter postable (gte)","schema":{"type":"boolean"}},{"name":"filter[postable][lt]","in":"query","required":false,"description":"Filter postable (lt)","schema":{"type":"boolean"}},{"name":"filter[postable][lte]","in":"query","required":false,"description":"Filter postable (lte)","schema":{"type":"boolean"}},{"name":"filter[postable][in]","in":"query","required":false,"description":"Filter postable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postable][notIn]","in":"query","required":false,"description":"Filter postable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postable][between]","in":"query","required":false,"description":"Filter postable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","periodName","-periodName","fiscalYear","-fiscalYear","fiscalQuarter","-fiscalQuarter","startDate","-startDate","endDate","-endDate","status","-status","postable","-postable","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","accountingPeriodId","entityId","entityName","bookId","bookName","periodName","fiscalYear","fiscalQuarter","startDate","endDate","status","reopeningReason","reopenedByCascade","postable","postableReason","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/accountingPeriodStatusesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List accounting period statuses","description":"Lists accounting period statuses. Each item is one period for one legal entity and one accounting book.\n\nTo read an item with its period-close checklist, use GET accounting/period-status/:id.","tags":["accountingAccountingPeriodStatuses"]}},"/accounting/invoices/{id}/pay":{"post":{"operationId":"payInvoice","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/payInvoiceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"PAYMENT_RECORDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"full":{"value":{"data":{"paymentId":"7d41e9b2-58c6-4a03-9e17-2b8f0c5d6a39"}},"summary":"Settle an invoice in full by wire"},"partial":{"value":{"data":{"paymentId":"b6902f18-3d47-4c85-a0e2-1f7c8b4d5309"}},"summary":"A part payment by check, with the processor fee recorded beside it"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVOICE_NOT_FOUND, INVALID_AMOUNT, AMOUNT_EXCEEDS_DUE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_EXCEEDS_DUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","format":"decimal"},"amountDue":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["id","amount","amountDue"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_RECORDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_EXCEEDS_DUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","format":"decimal"},"amountDue":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["id","amount","amountDue"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_RECORDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVOICE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"amount":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["amount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_EXCEEDS_DUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","format":"decimal"},"amountDue":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["id","amount","amountDue"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_RECORDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentId":{"type":"string"}},"additionalProperties":false,"required":["paymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice you want to settle.","examples":{"full":{"value":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"},"partial":{"value":"f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payInvoiceInput"},"examples":{"full":{"value":{"amount":"1210.00","paymentDate":"2026-09-15","paymentType":"wire"},"summary":"Settle an invoice in full by wire"},"partial":{"value":{"amount":"500.00","paymentDate":"2026-09-15","paymentType":"check","paymentNote":"Cheque 004312","bankFeeAmount":"3.00"},"summary":"A part payment by check, with the processor fee recorded beside it"}}}}},"summary":"Record a payment against an invoice","description":"Records a payment against an invoice. The payment is created for the invoice's customer and legal entity, using the entity's default electronic payment account. The payment is applied to the invoice and creates a journal entry in the general ledger. The response contains the new payment's id.\n\nYou can pay part of the amount due. For installments, send one request for each payment.\n\nSend an Idempotency-Key header. If you retry with the same key and body, you get the original response and no second payment is created. Without the header, retrying a request that succeeded creates a second payment.\n\nTo see the reduced totalAmountDue and the increased paymentsApplied, use GET accounting/invoices/:id. To read the payment, use GET accounting/payments/:id.","tags":["accountingInvoices"]}},"/accounting/subscriptions/{id}":{"get":{"operationId":"getSubscription","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSubscriptionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the subscription you want to retrieve."}],"summary":"Retrieve a subscription","description":"Retrieves a subscription. Use the subscription's id, not its subscriptionNumber.\n\nThe response includes the subscription's customer, legal entity, and lines. POST accounting/subscriptions/search returns the same fields for each subscription.","tags":["accountingSubscriptions"]}},"/accounting/revenue-contracts/{id}/approve":{"post":{"operationId":"approveRevenueContract","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveRevenueContractOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SALES_ORDER_NOT_APPROVED, NOT_APPROVABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"salesOrderApprovalStatus":{"type":"string","description":"Approval status the originating sales order is in — one of draft, pendingApproval or revise, or `unknown` when the contract has no reachable sales order at all."}},"additionalProperties":false,"required":["id","salesOrderApprovalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"reason":{"type":"string","description":"What made the contract unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"salesOrderApprovalStatus":{"type":"string","description":"Approval status the originating sales order is in — one of draft, pendingApproval or revise, or `unknown` when the contract has no reachable sales order at all."}},"additionalProperties":false,"required":["id","salesOrderApprovalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"reason":{"type":"string","description":"What made the contract unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"salesOrderApprovalStatus":{"type":"string","description":"Approval status the originating sales order is in — one of draft, pendingApproval or revise, or `unknown` when the contract has no reachable sales order at all."}},"additionalProperties":false,"required":["id","salesOrderApprovalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was not approved."},"reason":{"type":"string","description":"What made the contract unacceptable, in the words of the rule that rejected it."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the approved revenue contract."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REVENUE_CONTRACT_ALREADY_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the revenue contract that was already approved."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the revenue contract to approve; bound from the :id path segment.","example":"7c41e9a2-58d6-4b03-9f17-2ae6c085d3b4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveRevenueContractInput"}}}},"summary":"Approve a revenue contract","description":"Approves a revenue contract.\n\n```\nPOST accounting/revenue-contracts/7c41e9a2-58d6-4b03-9f17-2ae6c085d3b4/approve\n```\n\n**The body is empty and so is the response.** Read the contract back with `GET accounting/revenue-contracts/{id}` to see its approved state.\n\nThis is the **first write route on revenue contracts** — until now the api could read them and nothing more, so a contract raised by an approved order could only be approved through the UI.\n\n**Approving a contract is what releases it for revenue recognition.** An approved contract's revenue plan lines become postable; an unapproved one recognises nothing. The call re-syncs the contract's business object and writes the activity trail on both the contract and the sales order it came from.\n\n**The sales order must be approved first.** A contract recognises revenue for the obligations its order fixes, so approving it ahead of the order is refused with `SALES_ORDER_NOT_APPROVED` and nothing is written. Approve the order with `POST accounting/sales-orders/{id}/approve`, then call this. Approving an order does **not** approve its contract — the two are deliberately separate calls.\n\n**Approving is idempotent.** A contract that is already approved returns success and changes nothing; the `REVENUE_CONTRACT_ALREADY_APPROVED` information diagnostic is how a caller tells that case from a fresh approval (`REVENUE_CONTRACT_APPROVED`), so a retry after a timeout is safe.\n\nApproving an id that does not exist is `NOT_FOUND`, not a silent success. The call runs in a transaction, so a failure part-way leaves the contract untouched.","tags":["accountingRevenueContracts"]}},"/accounting/revenue-scheduling-templates/search":{"post":{"operationId":"searchRevenueSchedulingTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchRevenueSchedulingTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchRevenueSchedulingTemplateInput"}}}},"summary":"Search revenue scheduling templates","description":"Searches revenue scheduling templates.","tags":["accountingRevenueSchedulingTemplates"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/credit-memos/search":{"post":{"operationId":"searchCreditMemo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchCreditMemoOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_TIMESTAMP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchCreditMemoInput"}}}},"summary":"Search credit memos","description":"Searches credit memos.","tags":["accountingCreditMemos"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/subscriptions/{id}/cancel":{"post":{"operationId":"cancelSubscription","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/cancelSubscriptionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: SUBSCRIPTION_NOT_FOUND, ALREADY_CANCELLED, CANCELLATION_DATE_WITHIN_BILLING_PERIOD, CANCELLATION_DATE_BEFORE_INVOICED_PERIOD, CANCELLATION_DATE_OUTSIDE_SERVICE_PERIOD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_CANCELLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_WITHIN_BILLING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"periodStartDate":{"type":"string"},"periodEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_BEFORE_INVOICED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"lastInvoicedServiceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","lastInvoicedServiceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"serviceStartDate":{"type":"string"},"serviceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","serviceStartDate","serviceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_CANCELLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_WITHIN_BILLING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"periodStartDate":{"type":"string"},"periodEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_BEFORE_INVOICED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"lastInvoicedServiceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","lastInvoicedServiceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"serviceStartDate":{"type":"string"},"serviceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","serviceStartDate","serviceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SUBSCRIPTION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_CANCELLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_WITHIN_BILLING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"periodStartDate":{"type":"string"},"periodEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_BEFORE_INVOICED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"lastInvoicedServiceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","lastInvoicedServiceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CANCELLATION_DATE_OUTSIDE_SERVICE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cancellationDate":{"type":"string"},"serviceStartDate":{"type":"string"},"serviceEndDate":{"type":"string"}},"additionalProperties":false,"required":["cancellationDate","serviceStartDate","serviceEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id of the subscription to cancel (a UUID); bound from the :id path segment."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cancelSubscriptionInput"}}}},"summary":"Cancel a subscription","description":"Cancels a subscription. Every line of the subscription ends on cancellationDate, and the subscription ends in a canceled state.\n\nFor a termed subscription, every planned invoice dated on or after cancellationDate is created at once, with cancellationDate as the invoice date. Pay-as-you-go invoices are the exception. For an evergreen subscription, the planned invoices after cancellationDate are removed, and a final prorated invoice up to cancellationDate is planned. That invoice is created at once only when invoiceImmediately is true.\n\nTo cancel only some lines, or to combine a cancellation with other changes, use POST accounting/subscriptions/:id/modify.","tags":["accountingSubscriptions"]}},"/base/entities/search":{"post":{"operationId":"searchEntities","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchEntitiesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"},"description":"Every unrecognized fieldName from the request."}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchEntitiesInput"}}}},"summary":"Search entities","description":"Searches entities. Every filter you send must match. entityName matches a case-insensitive substring; entityNumber, status, entityType, country and parentEntityId match exactly; externalIdentifier matches one identifier exactly and needs both fieldName and value. Results are ordered by creation and paged with an opaque forward cursor: pass pagination.nextCursor back as page.cursor until hasMore is false. Every call sends the Api-Version header: a missing or empty header, or an unknown version, answers 400; a route the requested version does not contain answers 404.","tags":["accountingEntities"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/usages/ingestions":{"get":{"operationId":"getIngestionStatus","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getIngestionStatusOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: MULTIPLE_UPLOADS_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MULTIPLE_UPLOADS_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dataExtractionId":{"type":"number"},"matchCount":{"type":"number"}},"additionalProperties":false,"required":["dataExtractionId","matchCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MULTIPLE_UPLOADS_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dataExtractionId":{"type":"number"},"matchCount":{"type":"number"}},"additionalProperties":false,"required":["dataExtractionId","matchCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"dataExtractionId","in":"query","required":true,"schema":{"type":"number"},"description":"The identifier of the ingestion job to check, returned by POST accounting/usages/ingest."}],"summary":"Retrieve a usage ingestion's status","description":"Retrieves a usage ingestion job's status. Send the dataExtractionId that POST accounting/usages/ingest returned. The response has the outcome of each usage record in the job, in extractedData.","tags":["accountingUsages"]}},"/accounting/invoice-runs/{id}/rerun":{"post":{"operationId":"rerunInvoiceRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rerunInvoiceRunOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"INVOICE_RUN_RERUN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"resolved":{"value":{"data":{"id":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91","status":"completed","invoicesCreated":2}},"summary":"The underlying cause was fixed, so the retry billed the held-back lines"},"stillFailing":{"value":{"data":{"id":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91","status":"error","invoicesCreated":0}},"summary":"The retry hit the same problem; the run keeps its failures and can be rerun again"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: RUN_NOT_FOUND, RUN_NOT_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RUN_NOT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_RERUN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RUN_NOT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_RERUN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RUN_NOT_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_RUN_RERUN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the invoice run you want to retry.","examples":{"resolved":{"value":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91"},"stillFailing":{"value":"3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rerunInvoiceRunInput"},"examples":{"resolved":{"value":{},"summary":"The underlying cause was fixed, so the retry billed the held-back lines"},"stillFailing":{"value":{},"summary":"The retry hit the same problem; the run keeps its failures and can be rerun again"}}}}},"summary":"Retry an invoice run's failed lines","description":"Retries the failed lines of an invoice run. The rerun selects the lines that failed in this run, removes their old errors, and tries to invoice them again. Only a run whose saved status is 'error' or 'completeAndError' can be rerun. A run that GET accounting/invoice-runs/:id reports as 'error' only because its job stopped fails with RUN_NOT_FAILED.\n\nStarting a new run doesn't retry these lines. A new run leaves out any line that already failed, so repeating POST accounting/invoice-runs after a failure invoices nothing.\n\nThe request returns once the rerun has finished, so you don't need to poll. A successful rerun sets the run's status to 'completed'. If a line fails again, the request fails with an error. Fix the cause, such as a missing tax code or an incomplete customer setup, and then send the rerun request again.","tags":["accountingInvoiceRuns"]}},"/accounting/amortization-schedule-lines":{"get":{"operationId":"amortizationScheduleLines","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (equality)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][ne]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (ne)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][gt]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (gt)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][gte]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (gte)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][lt]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (lt)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][lte]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (lte)","schema":{"type":"string"}},{"name":"filter[amortizationScheduleHeaderId][in]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationScheduleHeaderId][notIn]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationScheduleHeaderId][between]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[amortizationScheduleHeaderId][like]","in":"query","required":false,"description":"Filter amortizationScheduleHeaderId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId]","in":"query","required":false,"description":"Filter scheduledPeriodId (equality)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][ne]","in":"query","required":false,"description":"Filter scheduledPeriodId (ne)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][gt]","in":"query","required":false,"description":"Filter scheduledPeriodId (gt)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][gte]","in":"query","required":false,"description":"Filter scheduledPeriodId (gte)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][lt]","in":"query","required":false,"description":"Filter scheduledPeriodId (lt)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][lte]","in":"query","required":false,"description":"Filter scheduledPeriodId (lte)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodId][in]","in":"query","required":false,"description":"Filter scheduledPeriodId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodId][notIn]","in":"query","required":false,"description":"Filter scheduledPeriodId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodId][between]","in":"query","required":false,"description":"Filter scheduledPeriodId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[scheduledPeriodId][like]","in":"query","required":false,"description":"Filter scheduledPeriodId (like)","schema":{"type":"string"}},{"name":"filter[scheduledPeriodStartDate]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][ne]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][gt]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][gte]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][lt]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][lte]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodStartDate][in]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodStartDate][notIn]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodStartDate][between]","in":"query","required":false,"description":"Filter scheduledPeriodStartDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[scheduledPeriodEndDate]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][ne]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][gt]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][gte]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][lt]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][lte]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[scheduledPeriodEndDate][in]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodEndDate][notIn]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduledPeriodEndDate][between]","in":"query","required":false,"description":"Filter scheduledPeriodEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[transactionCurrency]","in":"query","required":false,"description":"Filter transactionCurrency (equality)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][ne]","in":"query","required":false,"description":"Filter transactionCurrency (ne)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][gt]","in":"query","required":false,"description":"Filter transactionCurrency (gt)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][gte]","in":"query","required":false,"description":"Filter transactionCurrency (gte)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][lt]","in":"query","required":false,"description":"Filter transactionCurrency (lt)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][lte]","in":"query","required":false,"description":"Filter transactionCurrency (lte)","schema":{"type":"string"}},{"name":"filter[transactionCurrency][in]","in":"query","required":false,"description":"Filter transactionCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionCurrency][notIn]","in":"query","required":false,"description":"Filter transactionCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionCurrency][between]","in":"query","required":false,"description":"Filter transactionCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[transactionCurrency][like]","in":"query","required":false,"description":"Filter transactionCurrency (like)","schema":{"type":"string"}},{"name":"filter[amortizationMethod]","in":"query","required":false,"description":"Filter amortizationMethod (equality)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][ne]","in":"query","required":false,"description":"Filter amortizationMethod (ne)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][gt]","in":"query","required":false,"description":"Filter amortizationMethod (gt)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][gte]","in":"query","required":false,"description":"Filter amortizationMethod (gte)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][lt]","in":"query","required":false,"description":"Filter amortizationMethod (lt)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][lte]","in":"query","required":false,"description":"Filter amortizationMethod (lte)","schema":{"type":"string"}},{"name":"filter[amortizationMethod][in]","in":"query","required":false,"description":"Filter amortizationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationMethod][notIn]","in":"query","required":false,"description":"Filter amortizationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[amortizationMethod][between]","in":"query","required":false,"description":"Filter amortizationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[amortizationMethod][like]","in":"query","required":false,"description":"Filter amortizationMethod (like)","schema":{"type":"string"}},{"name":"filter[isJournalEntryPosted]","in":"query","required":false,"description":"Filter isJournalEntryPosted (equality)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][ne]","in":"query","required":false,"description":"Filter isJournalEntryPosted (ne)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][gt]","in":"query","required":false,"description":"Filter isJournalEntryPosted (gt)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][gte]","in":"query","required":false,"description":"Filter isJournalEntryPosted (gte)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][lt]","in":"query","required":false,"description":"Filter isJournalEntryPosted (lt)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][lte]","in":"query","required":false,"description":"Filter isJournalEntryPosted (lte)","schema":{"type":"boolean"}},{"name":"filter[isJournalEntryPosted][in]","in":"query","required":false,"description":"Filter isJournalEntryPosted (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isJournalEntryPosted][notIn]","in":"query","required":false,"description":"Filter isJournalEntryPosted (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isJournalEntryPosted][between]","in":"query","required":false,"description":"Filter isJournalEntryPosted (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isConfirmedZero]","in":"query","required":false,"description":"Filter isConfirmedZero (equality)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][ne]","in":"query","required":false,"description":"Filter isConfirmedZero (ne)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][gt]","in":"query","required":false,"description":"Filter isConfirmedZero (gt)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][gte]","in":"query","required":false,"description":"Filter isConfirmedZero (gte)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][lt]","in":"query","required":false,"description":"Filter isConfirmedZero (lt)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][lte]","in":"query","required":false,"description":"Filter isConfirmedZero (lte)","schema":{"type":"boolean"}},{"name":"filter[isConfirmedZero][in]","in":"query","required":false,"description":"Filter isConfirmedZero (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isConfirmedZero][notIn]","in":"query","required":false,"description":"Filter isConfirmedZero (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isConfirmedZero][between]","in":"query","required":false,"description":"Filter isConfirmedZero (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[outstanding]","in":"query","required":false,"description":"Filter outstanding (equality)","schema":{"type":"boolean"}},{"name":"filter[outstanding][ne]","in":"query","required":false,"description":"Filter outstanding (ne)","schema":{"type":"boolean"}},{"name":"filter[outstanding][gt]","in":"query","required":false,"description":"Filter outstanding (gt)","schema":{"type":"boolean"}},{"name":"filter[outstanding][gte]","in":"query","required":false,"description":"Filter outstanding (gte)","schema":{"type":"boolean"}},{"name":"filter[outstanding][lt]","in":"query","required":false,"description":"Filter outstanding (lt)","schema":{"type":"boolean"}},{"name":"filter[outstanding][lte]","in":"query","required":false,"description":"Filter outstanding (lte)","schema":{"type":"boolean"}},{"name":"filter[outstanding][in]","in":"query","required":false,"description":"Filter outstanding (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[outstanding][notIn]","in":"query","required":false,"description":"Filter outstanding (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[outstanding][between]","in":"query","required":false,"description":"Filter outstanding (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","scheduledPeriodStartDate","-scheduledPeriodStartDate","scheduledPeriodEndDate","-scheduledPeriodEndDate","amount","-amount","amortizationStartDate","-amortizationStartDate","amortizationEndDate","-amortizationEndDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","amortizationScheduleHeaderId","entityId","entityName","bookId","bookName","scheduledPeriodId","scheduledPeriodName","scheduledPeriodStartDate","scheduledPeriodEndDate","amount","transactionCurrency","amortizationMethod","amortizationStartDate","amortizationEndDate","isJournalEntryPosted","isConfirmedZero","outstanding","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/amortizationScheduleLinesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List amortization schedule lines","description":"Lists amortization schedule lines. Each line is one amortization schedule's amount for one accounting period.\n\nTo see what is still outstanding before you close a period, filter on outstanding=true for one entityId and one bookId.","tags":["accountingAmortizationScheduleLines"]}},"/accounting/refunds/search":{"post":{"operationId":"searchRefunds","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchRefundsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchRefundsInput"}}}},"summary":"Search refunds","description":"Searches refunds. A refund must match every filter you send. Unlike GET accounting/refunds, which takes one status, this endpoint takes several approval statuses at once and can filter by the refund's id.\n\nGET accounting/refunds and GET accounting/refunds/:id return the same fields for each refund.","tags":["accountingRefunds"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/vendors/{id}/deactivate":{"post":{"operationId":"deactivateVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deactivateVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_IS_DRAFT, ALREADY_IN_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"Number of the vendor."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["vendorNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the vendor to deactivate; bound from the :id path segment.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deactivateVendorInput"}}}},"summary":"Deactivate a vendor","description":"Deactivates a vendor. The vendor's bills, vendor credits, and payments stay as they are, and the vendor no longer appears when you choose a vendor in the application.\n\nA vendor with history can't be deleted with DELETE accounting/vendors/:id. Deactivating is the alternative.\n\nThe response is empty. To see the vendor, use GET accounting/vendors/:id.","tags":["accountingVendors"]}},"/accounting/vendors":{"post":{"operationId":"createVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, INVALID_COUNTRY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account, department or entity."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COUNTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"country":{"type":"string","description":"The country you sent, returned unchanged."}},"additionalProperties":false,"required":["country"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account, department or entity."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COUNTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"country":{"type":"string","description":"The country you sent, returned unchanged."}},"additionalProperties":false,"required":["country"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account, department or entity."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COUNTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"country":{"type":"string","description":"The country you sent, returned unchanged."}},"additionalProperties":false,"required":["country"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVendorInput"}}}},"summary":"Create a vendor","description":"Creates a vendor. A business partner with the same name is created with the vendor. Journal entries record the business partner, and you don't create the business partner yourself.\n\nThe response contains only the new vendor's id. vendorNumber is assigned from a gapless number range. To see the vendor, use GET accounting/vendors/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingVendors"]},"get":{"operationId":"vendors","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[vendorNumber]","in":"query","required":false,"description":"Filter vendorNumber (equality)","schema":{"type":"string"}},{"name":"filter[vendorNumber][ne]","in":"query","required":false,"description":"Filter vendorNumber (ne)","schema":{"type":"string"}},{"name":"filter[vendorNumber][gt]","in":"query","required":false,"description":"Filter vendorNumber (gt)","schema":{"type":"string"}},{"name":"filter[vendorNumber][gte]","in":"query","required":false,"description":"Filter vendorNumber (gte)","schema":{"type":"string"}},{"name":"filter[vendorNumber][lt]","in":"query","required":false,"description":"Filter vendorNumber (lt)","schema":{"type":"string"}},{"name":"filter[vendorNumber][lte]","in":"query","required":false,"description":"Filter vendorNumber (lte)","schema":{"type":"string"}},{"name":"filter[vendorNumber][in]","in":"query","required":false,"description":"Filter vendorNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorNumber][notIn]","in":"query","required":false,"description":"Filter vendorNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorNumber][between]","in":"query","required":false,"description":"Filter vendorNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorNumber][like]","in":"query","required":false,"description":"Filter vendorNumber (like)","schema":{"type":"string"}},{"name":"filter[vendorType]","in":"query","required":false,"description":"Filter vendorType (equality)","schema":{"type":"string"}},{"name":"filter[vendorType][ne]","in":"query","required":false,"description":"Filter vendorType (ne)","schema":{"type":"string"}},{"name":"filter[vendorType][gt]","in":"query","required":false,"description":"Filter vendorType (gt)","schema":{"type":"string"}},{"name":"filter[vendorType][gte]","in":"query","required":false,"description":"Filter vendorType (gte)","schema":{"type":"string"}},{"name":"filter[vendorType][lt]","in":"query","required":false,"description":"Filter vendorType (lt)","schema":{"type":"string"}},{"name":"filter[vendorType][lte]","in":"query","required":false,"description":"Filter vendorType (lte)","schema":{"type":"string"}},{"name":"filter[vendorType][in]","in":"query","required":false,"description":"Filter vendorType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorType][notIn]","in":"query","required":false,"description":"Filter vendorType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorType][between]","in":"query","required":false,"description":"Filter vendorType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorType][like]","in":"query","required":false,"description":"Filter vendorType (like)","schema":{"type":"string"}},{"name":"filter[vendorSubType]","in":"query","required":false,"description":"Filter vendorSubType (equality)","schema":{"type":"string"}},{"name":"filter[vendorSubType][ne]","in":"query","required":false,"description":"Filter vendorSubType (ne)","schema":{"type":"string"}},{"name":"filter[vendorSubType][gt]","in":"query","required":false,"description":"Filter vendorSubType (gt)","schema":{"type":"string"}},{"name":"filter[vendorSubType][gte]","in":"query","required":false,"description":"Filter vendorSubType (gte)","schema":{"type":"string"}},{"name":"filter[vendorSubType][lt]","in":"query","required":false,"description":"Filter vendorSubType (lt)","schema":{"type":"string"}},{"name":"filter[vendorSubType][lte]","in":"query","required":false,"description":"Filter vendorSubType (lte)","schema":{"type":"string"}},{"name":"filter[vendorSubType][in]","in":"query","required":false,"description":"Filter vendorSubType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorSubType][notIn]","in":"query","required":false,"description":"Filter vendorSubType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorSubType][between]","in":"query","required":false,"description":"Filter vendorSubType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorSubType][like]","in":"query","required":false,"description":"Filter vendorSubType (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[paymentTerms]","in":"query","required":false,"description":"Filter paymentTerms (equality)","schema":{"type":"string"}},{"name":"filter[paymentTerms][ne]","in":"query","required":false,"description":"Filter paymentTerms (ne)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gt]","in":"query","required":false,"description":"Filter paymentTerms (gt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gte]","in":"query","required":false,"description":"Filter paymentTerms (gte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lt]","in":"query","required":false,"description":"Filter paymentTerms (lt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lte]","in":"query","required":false,"description":"Filter paymentTerms (lte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][in]","in":"query","required":false,"description":"Filter paymentTerms (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][notIn]","in":"query","required":false,"description":"Filter paymentTerms (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][between]","in":"query","required":false,"description":"Filter paymentTerms (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms][like]","in":"query","required":false,"description":"Filter paymentTerms (like)","schema":{"type":"string"}},{"name":"filter[preferredCurrency]","in":"query","required":false,"description":"Filter preferredCurrency (equality)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][ne]","in":"query","required":false,"description":"Filter preferredCurrency (ne)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][gt]","in":"query","required":false,"description":"Filter preferredCurrency (gt)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][gte]","in":"query","required":false,"description":"Filter preferredCurrency (gte)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][lt]","in":"query","required":false,"description":"Filter preferredCurrency (lt)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][lte]","in":"query","required":false,"description":"Filter preferredCurrency (lte)","schema":{"type":"string"}},{"name":"filter[preferredCurrency][in]","in":"query","required":false,"description":"Filter preferredCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[preferredCurrency][notIn]","in":"query","required":false,"description":"Filter preferredCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[preferredCurrency][between]","in":"query","required":false,"description":"Filter preferredCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[preferredCurrency][like]","in":"query","required":false,"description":"Filter preferredCurrency (like)","schema":{"type":"string"}},{"name":"filter[independentContractor]","in":"query","required":false,"description":"Filter independentContractor (equality)","schema":{"type":"string"}},{"name":"filter[independentContractor][ne]","in":"query","required":false,"description":"Filter independentContractor (ne)","schema":{"type":"string"}},{"name":"filter[independentContractor][gt]","in":"query","required":false,"description":"Filter independentContractor (gt)","schema":{"type":"string"}},{"name":"filter[independentContractor][gte]","in":"query","required":false,"description":"Filter independentContractor (gte)","schema":{"type":"string"}},{"name":"filter[independentContractor][lt]","in":"query","required":false,"description":"Filter independentContractor (lt)","schema":{"type":"string"}},{"name":"filter[independentContractor][lte]","in":"query","required":false,"description":"Filter independentContractor (lte)","schema":{"type":"string"}},{"name":"filter[independentContractor][in]","in":"query","required":false,"description":"Filter independentContractor (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[independentContractor][notIn]","in":"query","required":false,"description":"Filter independentContractor (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[independentContractor][between]","in":"query","required":false,"description":"Filter independentContractor (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[independentContractor][like]","in":"query","required":false,"description":"Filter independentContractor (like)","schema":{"type":"string"}},{"name":"filter[externalVendorId]","in":"query","required":false,"description":"Filter externalVendorId (equality)","schema":{"type":"string"}},{"name":"filter[externalVendorId][ne]","in":"query","required":false,"description":"Filter externalVendorId (ne)","schema":{"type":"string"}},{"name":"filter[externalVendorId][gt]","in":"query","required":false,"description":"Filter externalVendorId (gt)","schema":{"type":"string"}},{"name":"filter[externalVendorId][gte]","in":"query","required":false,"description":"Filter externalVendorId (gte)","schema":{"type":"string"}},{"name":"filter[externalVendorId][lt]","in":"query","required":false,"description":"Filter externalVendorId (lt)","schema":{"type":"string"}},{"name":"filter[externalVendorId][lte]","in":"query","required":false,"description":"Filter externalVendorId (lte)","schema":{"type":"string"}},{"name":"filter[externalVendorId][in]","in":"query","required":false,"description":"Filter externalVendorId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalVendorId][notIn]","in":"query","required":false,"description":"Filter externalVendorId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalVendorId][between]","in":"query","required":false,"description":"Filter externalVendorId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalVendorId][like]","in":"query","required":false,"description":"Filter externalVendorId (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","vendorNumber","-vendorNumber","vendorType","-vendorType","vendorSubType","-vendorSubType","status","-status","paymentTerms","-paymentTerms","preferredCurrency","-preferredCurrency","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","vendorName","vendorNumber","vendorType","vendorSubType","status","paymentTerms","preferredCurrency","independentContractor","externalVendorId","origin","mainContactEmail","mainContactName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/vendorsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List vendors","description":"Lists vendors. To filter by name, contact email, or legal entity, use POST accounting/vendors/search.","tags":["accountingVendors"]}},"/accounting/vendor-credits/{id}":{"delete":{"operationId":"deleteVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_CREDIT_APPLIED, POSTING_PERIOD_CLOSED, AMORTIZATION_IN_PROGRESS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_CREDIT_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."},"status":{"type":"string","description":"The application status blocking the delete."}},"additionalProperties":false,"required":["vendorCreditNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_CREDIT_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."},"status":{"type":"string","description":"The application status blocking the delete."}},"additionalProperties":false,"required":["vendorCreditNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_CREDIT_APPLIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."},"status":{"type":"string","description":"The application status blocking the delete."}},"additionalProperties":false,"required":["vendorCreditNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the credit that could not be deleted."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor credit you want to delete.","example":"d52e1c69-3fa8-4b17-9e24-8c6fa0315bd7"}],"summary":"Delete a vendor credit","description":"Deletes a vendor credit. Only a credit that isn't applied to any vendor bill can be deleted. To delete a credit that is applied, even in part, first use POST accounting/vendor-credits/:id/unapply.\n\nA credit also can't be deleted once one of its amortization schedules has started, or when the accounting period of its journal entry is closed or locked.\n\nThe response is empty.","tags":["accountingVendorCredits"]},"patch":{"operationId":"updateVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, LINE_NOT_FOUND, REFERENCE_NUMBER_NOT_UNIQUE, CROSS_CHARGE_INVALID, TOO_MANY_LINES, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED, TAX_CODE_NOT_FOUND, TAX_CODE_AMBIGUOUS, TAX_CODE_ACCOUNT_NOT_CONFIGURED, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this credit."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NUMBER_NOT_UNIQUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The reference number you sent, returned unchanged."}},"additionalProperties":false,"required":["referenceNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule, after the patch is applied."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this credit."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NUMBER_NOT_UNIQUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The reference number you sent, returned unchanged."}},"additionalProperties":false,"required":["referenceNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule, after the patch is applied."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this credit."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NUMBER_NOT_UNIQUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The reference number you sent, returned unchanged."}},"additionalProperties":false,"required":["referenceNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule, after the patch is applied."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor credit you want to update.","example":"d52e1c69-3fa8-4b17-9e24-8c6fa0315bd7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateVendorCreditInput"}}}},"summary":"Update a vendor credit","description":"Updates a vendor credit with the fields you send. A field you leave out keeps its current value. Line items change through three separate arrays, applied in this order: deleteLines, updateLines, createLines.\n\nLeave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value, and amortization schedules change through createAmortizationSchedules, updateAmortizationSchedules and deleteAmortizationSchedules.\n\nThe credit's main fields and its line items can change in one request. The vendor and the legal entity can't be changed. To move a credit to another vendor or legal entity, create a new credit.\n\nOne request can remove a line and add its replacement.\n\nupdateLines and deleteLines name each line by the id that GET accounting/vendor-credits/:id returns for it. Each line must belong to this credit.\n\nThe response is empty. To see the updated credit, use GET accounting/vendor-credits/:id.","tags":["accountingVendorCredits"]},"get":{"operationId":"getVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor credit you want to retrieve.","example":"bf4853fb-b692-4b4a-b4a4-c8fee3819f9a"}],"summary":"Retrieve a vendor credit","description":"Retrieves a vendor credit. A vendor credit is a credit memo from a vendor that can be applied against vendor bills in the same currency. The response has the credit's main fields and its line items with their amortization schedules.\n\nPOST accounting/vendor-credits/search returns the same record for each match. GET accounting/vendor-credits returns the main fields only.","tags":["accountingVendorCredits"]}},"/accounting/vendor-bills/{id}/reject":{"post":{"operationId":"rejectVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED, BILL_ALREADY_VOIDED, BILL_ALREADY_REVERSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to reject.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectVendorBillInput"}}}},"summary":"Reject a vendor bill","description":"Rejects a vendor bill. The rejection goes through your tenant's approval policy. You can send an optional reviewMessage, and the response is the bill's status afterward.\n\nRejecting doesn't void or delete the bill, and the bill keeps its number and its audit trail. A bill rejected from 'pendingApproval' has no journal entry. Rejecting pending changes to an approved bill undoes the changes, and the bill stays 'approved' with its journal entry.\n\nWhether you may reject the bill depends on your approval policy. When the policy refuses, the request fails with APPROVAL_FAILED, and reason has the policy's message.","tags":["accountingVendorBills"]}},"/accounting/vendors/{id}":{"patch":{"operationId":"updateVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_COUNTRY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account, department or entity."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COUNTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"country":{"type":"string","description":"The country you sent, returned unchanged."}},"additionalProperties":false,"required":["country"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account, department or entity."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COUNTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"country":{"type":"string","description":"The country you sent, returned unchanged."}},"additionalProperties":false,"required":["country"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, account, department or entity."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_COUNTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"country":{"type":"string","description":"The country you sent, returned unchanged."}},"additionalProperties":false,"required":["country"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor you want to update.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateVendorInput"}}}},"summary":"Update a vendor","description":"Updates a vendor with the fields you send. A field you leave out keeps its current value.\n\nUse the vendor's id, not its vendorNumber.\n\nInside bankDetails and remittanceAddress, a field you leave out also keeps its current value. An attachments list you send replaces the whole list, so include every attachment you want to keep. To remove every attachment, send attachments as null or as an empty array.\n\nThe vendor's details, contacts, defaults, bank details, and remittance address can change. Renaming the vendor also renames its business partner.\n\nvendorType and externalVendorId can't be changed, so this endpoint doesn't accept them.\n\nWhen you send bank details or a remittance address for a vendor that has none, they are created.\n\nThe response is empty. To see the updated vendor, use GET accounting/vendors/:id.","tags":["accountingVendors"]},"get":{"operationId":"getVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor you want to retrieve.","example":"c47f1a08-5e93-42b7-8d61-0fa9b3c8e254"}],"summary":"Retrieve a vendor","description":"Retrieves a vendor. Use the vendor's id, not its vendorNumber.\n\nThe response has the vendor's details, contacts, and defaults. It doesn't include the vendor's tax identifiers, bank details, remittance address, or custom field values.\n\nTo find a vendor by vendorNumber or externalVendorId, neither of which is unique, use POST accounting/vendors/search.","tags":["accountingVendors"]},"delete":{"operationId":"deleteVendor","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteVendorOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_IN_USE, VENDOR_HAS_JOURNAL_ENTRIES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"vendorBillCount":{"type":"number","description":"How many vendor bills still reference it."},"vendorCreditCount":{"type":"number","description":"How many vendor credits still reference it."},"payrollPaymentCount":{"type":"number","description":"How many payroll payment applications still reference it."}},"additionalProperties":false,"required":["vendorNumber","vendorBillCount","vendorCreditCount","payrollPaymentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"journalEntryCount":{"type":"number","description":"How many journal entry lines reference its business partner."}},"additionalProperties":false,"required":["vendorNumber","journalEntryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"vendorBillCount":{"type":"number","description":"How many vendor bills still reference it."},"vendorCreditCount":{"type":"number","description":"How many vendor credits still reference it."},"payrollPaymentCount":{"type":"number","description":"How many payroll payment applications still reference it."}},"additionalProperties":false,"required":["vendorNumber","vendorBillCount","vendorCreditCount","payrollPaymentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"journalEntryCount":{"type":"number","description":"How many journal entry lines reference its business partner."}},"additionalProperties":false,"required":["vendorNumber","journalEntryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"vendorBillCount":{"type":"number","description":"How many vendor bills still reference it."},"vendorCreditCount":{"type":"number","description":"How many vendor credits still reference it."},"payrollPaymentCount":{"type":"number","description":"How many payroll payment applications still reference it."}},"additionalProperties":false,"required":["vendorNumber","vendorBillCount","vendorCreditCount","payrollPaymentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_HAS_JOURNAL_ENTRIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorNumber":{"type":"string","description":"The number of the vendor that could not be deleted."},"journalEntryCount":{"type":"number","description":"How many journal entry lines reference its business partner."}},"additionalProperties":false,"required":["vendorNumber","journalEntryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor you want to delete.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"summary":"Delete a vendor","description":"Deletes a vendor. The vendor's bank details and remittance address are deleted with it. Its business partner is deleted too, unless a customer uses the same business partner.\n\nA vendor with history can't be deleted. While vendor bills, vendor credits, or payroll payments refer to the vendor, the request fails with VENDOR_IN_USE. When journal entries exist for its business partner, the request fails with VENDOR_HAS_JOURNAL_ENTRIES.\n\nThe response is empty. To keep the history and hide the vendor, use POST accounting/vendors/:id/deactivate.","tags":["accountingVendors"]}},"/accounting/employee-advances/{id}/approve":{"post":{"operationId":"approveEmployeeAdvanceRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveEmployeeAdvanceRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"approvalStatus":{"type":"string","description":"The status it is currently in."}},"additionalProperties":false,"required":["advanceRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"reason":{"type":"string","description":"The approval framework's own message, verbatim."}},"additionalProperties":false,"required":["advanceRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"approvalStatus":{"type":"string","description":"The status it is currently in."}},"additionalProperties":false,"required":["advanceRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"reason":{"type":"string","description":"The approval framework's own message, verbatim."}},"additionalProperties":false,"required":["advanceRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"approvalStatus":{"type":"string","description":"The status it is currently in."}},"additionalProperties":false,"required":["advanceRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"reason":{"type":"string","description":"The approval framework's own message, verbatim."}},"additionalProperties":false,"required":["advanceRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the advance request; bound from the :id path segment.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveEmployeeAdvanceRequestInput"}}}},"summary":"Approve an employee advance request","description":"Approves an employee advance request. The approval goes through your tenant's approval policy, and the response is the status that results.\n\nWith no approvers configured, the request goes straight to 'approved'. With a multi-step policy, it moves on one step.\n\nOnly a request in 'pendingApproval' can be approved. For any other status, the request fails with STATUS_CONFLICT.\n\nApproval doesn't pay the advance. To pay it, use POST accounting/employee-advances/:id/issue.","tags":["accountingEmployeeAdvances"]}},"/accounting/purchase-orders/{id}":{"patch":{"operationId":"updatePurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, PURCHASE_TYPES_DISABLED, PURCHASE_TYPE_NOT_ACTIVE, LINE_NOT_FOUND, NO_LINES, TOO_MANY_LINES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this order."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order that would have been left empty."}},"additionalProperties":false,"required":["poNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the order would have had."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this order."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order that would have been left empty."}},"additionalProperties":false,"required":["poNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the order would have had."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this order."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order that would have been left empty."}},"additionalProperties":false,"required":["poNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the order would have had."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase order you want to update.","example":"9c4e1b70-8d25-4a63-b19f-5e7c02da3846"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePurchaseOrderInput"}}}},"summary":"Update a purchase order","description":"Updates a purchase order with the fields you send. A field you leave out keeps its current value.\n\nUse the purchase order's id, not its poNumber.\n\nLines change through three separate arrays, applied in this order: deleteLines, updateLines, createLines. Lines you don't name stay as they are. Every update also removes the order's attachments and clears its bill-to and ship-to addresses, because this endpoint can't send them.\n\nEvery change sets approvalStatus and budgetStatus back to 'pendingApproval', even a change to the description. The order then goes through your tenant's approval policy again, which approves it at once when no approvers are configured.\n\nThe legal entity that owns the order can't be changed.\n\nOne request can remove a line and add its replacement.\n\nupdateLines and deleteLines name each line by the id that GET accounting/purchase-orders/:id returns for it. The order must keep at least one line.\n\nThe response is empty. To see the updated order, use GET accounting/purchase-orders/:id.","tags":["accountingPurchaseOrders"]},"delete":{"operationId":"deletePurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, LINES_NOT_DELETABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the order you asked to delete."},"lineNumbers":{"type":"string","description":"The line numbers blocking the delete, comma-separated. A line with no number is given by its id."}},"additionalProperties":false,"required":["id","lineNumbers"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the order you asked to delete."},"lineNumbers":{"type":"string","description":"The line numbers blocking the delete, comma-separated. A line with no number is given by its id."}},"additionalProperties":false,"required":["id","lineNumbers"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_DELETABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the order you asked to delete."},"lineNumbers":{"type":"string","description":"The line numbers blocking the delete, comma-separated. A line with no number is given by its id."}},"additionalProperties":false,"required":["id","lineNumbers"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase order you want to delete.","example":"9c4e1b70-8d25-4a63-b19f-5e7c02da3846"}],"summary":"Delete a purchase order","description":"Deletes a purchase order. The order's lines are deleted with it. The purchase requests the order was created from are released, so their lines can go on a new order.\n\nAn order with a line that already has a committed goods receipt or a matched vendor bill can't be deleted. Change the order with PATCH accounting/purchase-orders/:id instead.\n\nThe response is empty.","tags":["accountingPurchaseOrders"]},"get":{"operationId":"getPurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase order you want to retrieve.","example":"3d910e5e-0cd0-4b42-a477-1085bcc97fe7"}],"summary":"Retrieve a purchase order","description":"Retrieves a purchase order. Use the purchase order's id, not its poNumber.\n\nThe response has the order's lines and approval decisions.\n\nPOST accounting/purchase-orders/search returns the same fields for many orders, except approvals. GET accounting/purchase-orders returns orders without their lines.","tags":["accountingPurchaseOrders"]}},"/accounting/payroll-payments/search":{"post":{"operationId":"searchPayrollPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPayrollPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPayrollPaymentInput"}}}},"summary":"Search payroll payments","description":"Searches payroll payments, with their applications. Only outbound payments that pay payroll details are searched, so the results are a subset of what POST accounting/outbound-payments/search returns.","tags":["accountingPayrollPayments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/payroll-templates/{id}":{"delete":{"operationId":"deletePayrollTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePayrollTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, TEMPLATE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TEMPLATE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the template that could not be deleted."},"payrollDetailCount":{"type":"number","description":"How many payroll details reference it, drafts included."}},"additionalProperties":false,"required":["name","payrollDetailCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TEMPLATE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the template that could not be deleted."},"payrollDetailCount":{"type":"number","description":"How many payroll details reference it, drafts included."}},"additionalProperties":false,"required":["name","payrollDetailCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TEMPLATE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the template that could not be deleted."},"payrollDetailCount":{"type":"number","description":"How many payroll details reference it, drafts included."}},"additionalProperties":false,"required":["name","payrollDetailCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll template you want to delete.","example":"d4a1c7e0-2b93-4f56-8071-9e3a5c8b1d42"}],"summary":"Delete a payroll template","description":"Deletes a payroll template. The template's categories, account mappings, and legal entity assignments are deleted with it.\n\nWhile any payroll detail uses the template, including a draft, the request fails with TEMPLATE_IN_USE.\n\nThe response is empty.","tags":["accountingPayrollTemplates"]},"patch":{"operationId":"updatePayrollTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePayrollTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, CATEGORY_NOT_FOUND, REFERENCE_NOT_FOUND, DUPLICATE_NAME, NO_CATEGORIES, DUPLICATE_CATEGORY_NAME, MULTIPLE_NET_PAY_CATEGORIES, AGGREGATION_REQUIRES_EMPLOYEE_GROUPING, NO_ENTITIES, NO_CATEGORY_ACCOUNTS, TAGS_REQUIRE_CATEGORY_AGGREGATION, INVALID_CATEGORY_TAG","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to this template."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to this template."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to this template."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found: entity, account, or a tag dimension such as vendor."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"categoryIndex":{"type":"number","description":"The zero-based position of the category with the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the template that already uses the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name used more than once."}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_NET_PAY_CATEGORIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string"},"description":"The names of the netPay categories that were sent."}},"additionalProperties":false,"required":["names"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AGGREGATION_REQUIRES_EMPLOYEE_GROUPING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupBy":{"type":"string","description":"The template's grouping."}},"additionalProperties":false,"required":["groupBy"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CATEGORY_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAGS_REQUIRE_CATEGORY_AGGREGATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category with the tags."},"side":{"type":"string","description":"The side the tags are on, debit or credit."}},"additionalProperties":false,"required":["categoryName","side"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CATEGORY_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryIndex":{"type":"number","description":"The zero-based position of the category with the tag."},"dimension":{"type":"string","description":"The dimension of the tag."},"problem":{"type":"string","description":"Why it was refused: unsupported-dimension or duplicate-dimension."}},"additionalProperties":false,"required":["categoryIndex","dimension","problem"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll template you want to update.","example":"d4a1c7e0-2b93-4f56-8071-9e3a5c8b1d42"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePayrollTemplateInput"}}}},"summary":"Update a payroll template","description":"Updates a payroll template with the fields you send. A field you leave out keeps its current value. categories and entityIds are lists.\n\nA list you send replaces the whole list, so include every item you want to keep. Leave a list out to keep it as it is.\n\nSend categories or entityIds to change the template's categories or legal entities.\n\nTo keep an existing category, include it with its id. To add one, include it without an id. An existing category you leave out is deleted, and the request is refused while any payroll item still uses that category.\n\nstatus isn't an input. On every update, the template is 'active' when it has an active netPay category and an active grossPay category, and 'inactive' otherwise.\n\nThe response is empty. To see the updated template, use GET accounting/payroll-templates/:id.","tags":["accountingPayrollTemplates"]},"get":{"operationId":"getPayrollTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPayrollTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll template you want to retrieve.","example":"f6a1c0d2-7b45-4e39-8c1a-90de2b47f513"}],"summary":"Retrieve a payroll template","description":"Retrieves a payroll template. A payroll template sets how a payroll detail becomes a journal entry, including the debit and credit account for each payroll category. The response includes the categories, which GET accounting/payroll-templates doesn't return. To find a template by name, use POST accounting/payroll-templates/search.","tags":["accountingPayrollTemplates"]}},"/accounting/vendor-bills/{id}/void":{"post":{"operationId":"voidVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, BILL_NOT_APPROVED, BILL_ALREADY_VOIDED, BILL_PAID, WITHHOLDING_REMITTED, BILL_NOT_POSTED, POSTING_PERIOD_CLOSED, BILL_ALREADY_REVERSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to void.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidVendorBillInput"}}}},"summary":"Void a vendor bill","description":"Voids a vendor bill. Backs the vendor bill out of the general ledger by voiding its journal entry. No reversing journal entry is created. Voiding isn't deleting: the bill keeps its number and its audit trail.\n\nOnly an approved bill with a journal entry and no payments can be voided, and its accounting period must be open. To back a bill out on a date you choose, for example when its period is closed, use POST accounting/vendor-bills/:id/reverse.\n\nA voided bill can't be approved, rejected, voided again or reversed. The response is empty.","tags":["accountingVendorBills"]}},"/accounting/employee-advances/search":{"post":{"operationId":"searchEmployeeAdvanceRequests","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchEmployeeAdvanceRequestsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchEmployeeAdvanceRequestsInput"}}}},"summary":"Search employee advance requests","description":"Searches employee advance requests. The filters are status, employee, legal entity, category, and request number. Each match is returned in full, newest first.\n\nUnlike GET accounting/employee-advances, each item includes employeeName, the trip dates, notes, the decision note, and the issued payment.","tags":["accountingEmployeeAdvances"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/advance-payment-categories":{"get":{"operationId":"advancePaymentCategories","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[allowManualPayment]","in":"query","required":false,"description":"Filter allowManualPayment (equality)","schema":{"type":"boolean"}},{"name":"filter[allowManualPayment][ne]","in":"query","required":false,"description":"Filter allowManualPayment (ne)","schema":{"type":"boolean"}},{"name":"filter[allowManualPayment][gt]","in":"query","required":false,"description":"Filter allowManualPayment (gt)","schema":{"type":"boolean"}},{"name":"filter[allowManualPayment][gte]","in":"query","required":false,"description":"Filter allowManualPayment (gte)","schema":{"type":"boolean"}},{"name":"filter[allowManualPayment][lt]","in":"query","required":false,"description":"Filter allowManualPayment (lt)","schema":{"type":"boolean"}},{"name":"filter[allowManualPayment][lte]","in":"query","required":false,"description":"Filter allowManualPayment (lte)","schema":{"type":"boolean"}},{"name":"filter[allowManualPayment][in]","in":"query","required":false,"description":"Filter allowManualPayment (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allowManualPayment][notIn]","in":"query","required":false,"description":"Filter allowManualPayment (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allowManualPayment][between]","in":"query","required":false,"description":"Filter allowManualPayment (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","entityId","name","allowManualPayment","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/advancePaymentCategoriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List advance payment categories","description":"Lists advance payment categories.","tags":["accountingAdvancePaymentCategories"]},"post":{"operationId":"createAdvancePaymentCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAdvancePaymentCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, CATEGORY_ALREADY_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Always 'entity' for this endpoint."},"referenceId":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_ALREADY_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"Id (a UUID) of the entity that already has a category."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Always 'entity' for this endpoint."},"referenceId":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_ALREADY_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"Id (a UUID) of the entity that already has a category."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Always 'entity' for this endpoint."},"referenceId":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_ALREADY_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"Id (a UUID) of the entity that already has a category."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAdvancePaymentCategoryInput"}}}},"summary":"Create an advance payment category","description":"Creates an advance payment category for a legal entity. A legal entity can have only one category. The response is only the new category's id.\n\nThe category's bank and offset accounts for each chart of accounts can't be set through this endpoint. Until they're set in the application, employee advances in this category can't be issued.\n\nRead the new record with GET accounting/advance-payment-categories/:id. To change a legal entity's existing category, use PATCH accounting/advance-payment-categories/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingAdvancePaymentCategories"]}},"/accounting/expense-reports":{"get":{"operationId":"expenseReports","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[expenseNumber]","in":"query","required":false,"description":"Filter expenseNumber (equality)","schema":{"type":"string"}},{"name":"filter[expenseNumber][ne]","in":"query","required":false,"description":"Filter expenseNumber (ne)","schema":{"type":"string"}},{"name":"filter[expenseNumber][gt]","in":"query","required":false,"description":"Filter expenseNumber (gt)","schema":{"type":"string"}},{"name":"filter[expenseNumber][gte]","in":"query","required":false,"description":"Filter expenseNumber (gte)","schema":{"type":"string"}},{"name":"filter[expenseNumber][lt]","in":"query","required":false,"description":"Filter expenseNumber (lt)","schema":{"type":"string"}},{"name":"filter[expenseNumber][lte]","in":"query","required":false,"description":"Filter expenseNumber (lte)","schema":{"type":"string"}},{"name":"filter[expenseNumber][in]","in":"query","required":false,"description":"Filter expenseNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expenseNumber][notIn]","in":"query","required":false,"description":"Filter expenseNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expenseNumber][between]","in":"query","required":false,"description":"Filter expenseNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[expenseNumber][like]","in":"query","required":false,"description":"Filter expenseNumber (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[paymentStatus]","in":"query","required":false,"description":"Filter paymentStatus (equality)","schema":{"type":"string"}},{"name":"filter[paymentStatus][ne]","in":"query","required":false,"description":"Filter paymentStatus (ne)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gt]","in":"query","required":false,"description":"Filter paymentStatus (gt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gte]","in":"query","required":false,"description":"Filter paymentStatus (gte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lt]","in":"query","required":false,"description":"Filter paymentStatus (lt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lte]","in":"query","required":false,"description":"Filter paymentStatus (lte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][in]","in":"query","required":false,"description":"Filter paymentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][notIn]","in":"query","required":false,"description":"Filter paymentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][between]","in":"query","required":false,"description":"Filter paymentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentStatus][like]","in":"query","required":false,"description":"Filter paymentStatus (like)","schema":{"type":"string"}},{"name":"filter[submittedDate]","in":"query","required":false,"description":"Filter submittedDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][ne]","in":"query","required":false,"description":"Filter submittedDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][gt]","in":"query","required":false,"description":"Filter submittedDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][gte]","in":"query","required":false,"description":"Filter submittedDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][lt]","in":"query","required":false,"description":"Filter submittedDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][lte]","in":"query","required":false,"description":"Filter submittedDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[submittedDate][in]","in":"query","required":false,"description":"Filter submittedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submittedDate][notIn]","in":"query","required":false,"description":"Filter submittedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submittedDate][between]","in":"query","required":false,"description":"Filter submittedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reimbursementCurrency]","in":"query","required":false,"description":"Filter reimbursementCurrency (equality)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][ne]","in":"query","required":false,"description":"Filter reimbursementCurrency (ne)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][gt]","in":"query","required":false,"description":"Filter reimbursementCurrency (gt)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][gte]","in":"query","required":false,"description":"Filter reimbursementCurrency (gte)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][lt]","in":"query","required":false,"description":"Filter reimbursementCurrency (lt)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][lte]","in":"query","required":false,"description":"Filter reimbursementCurrency (lte)","schema":{"type":"string"}},{"name":"filter[reimbursementCurrency][in]","in":"query","required":false,"description":"Filter reimbursementCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reimbursementCurrency][notIn]","in":"query","required":false,"description":"Filter reimbursementCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reimbursementCurrency][between]","in":"query","required":false,"description":"Filter reimbursementCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reimbursementCurrency][like]","in":"query","required":false,"description":"Filter reimbursementCurrency (like)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId]","in":"query","required":false,"description":"Filter externalExpenseReportId (equality)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][ne]","in":"query","required":false,"description":"Filter externalExpenseReportId (ne)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][gt]","in":"query","required":false,"description":"Filter externalExpenseReportId (gt)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][gte]","in":"query","required":false,"description":"Filter externalExpenseReportId (gte)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][lt]","in":"query","required":false,"description":"Filter externalExpenseReportId (lt)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][lte]","in":"query","required":false,"description":"Filter externalExpenseReportId (lte)","schema":{"type":"string"}},{"name":"filter[externalExpenseReportId][in]","in":"query","required":false,"description":"Filter externalExpenseReportId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalExpenseReportId][notIn]","in":"query","required":false,"description":"Filter externalExpenseReportId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalExpenseReportId][between]","in":"query","required":false,"description":"Filter externalExpenseReportId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalExpenseReportId][like]","in":"query","required":false,"description":"Filter externalExpenseReportId (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","expenseNumber","-expenseNumber","status","-status","paymentStatus","-paymentStatus","submittedDate","-submittedDate","reimbursementCurrency","-reimbursementCurrency","reimbursableTotal","-reimbursableTotal","openAmount","-openAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","expenseNumber","status","paymentStatus","submittedDate","reimbursementCurrency","reimbursableTotal","reimbursableTotalNetAmount","amountPaid","openAmount","pendingAmount","containsBillableItem","pendingPayment","externalExpenseReportId","origin","employeeName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/expenseReportsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List expense reports","description":"Lists expense reports, without their expense items. To get the items, use GET accounting/expense-reports/:id or POST accounting/expense-reports/search.","tags":["accountingExpenseReports"]},"post":{"operationId":"createExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED, CROSS_CHARGE_INVALID, TOO_MANY_LINES, CATEGORY_REQUIREMENT_UNMET, CATEGORY_INACTIVE, ITEM_NEEDS_CATEGORY_OR_ACCOUNT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to. Absent for a report-level attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to. Absent for a report-level attachment."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"lineType":{"type":"string","description":"The account sub-type the item resolved to, which refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of items the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_REQUIREMENT_UNMET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category that imposes the requirement."},"requirement":{"type":"string","description":"What is missing. Either 'attachment' or 'attendees'."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","requirement","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the inactive category."},"referenceId":{"type":"string","description":"The identifier of the inactive category."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NEEDS_CATEGORY_OR_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"source":{"type":"string","description":"Where the item came from. Either 'new', supplied by this request, or 'existing', already on the report."},"lineIndex":{"type":"number","description":"The zero-based position of the item, within the array that carried it or within the report's stored items."}},"additionalProperties":false,"required":["source","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to. Absent for a report-level attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to. Absent for a report-level attachment."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"lineType":{"type":"string","description":"The account sub-type the item resolved to, which refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of items the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_REQUIREMENT_UNMET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category that imposes the requirement."},"requirement":{"type":"string","description":"What is missing. Either 'attachment' or 'attendees'."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","requirement","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the inactive category."},"referenceId":{"type":"string","description":"The identifier of the inactive category."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NEEDS_CATEGORY_OR_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"source":{"type":"string","description":"Where the item came from. Either 'new', supplied by this request, or 'existing', already on the report."},"lineIndex":{"type":"number","description":"The zero-based position of the item, within the array that carried it or within the report's stored items."}},"additionalProperties":false,"required":["source","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to. Absent for a report-level attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."},"itemIndex":{"type":"number","description":"The zero-based position of the expense item the attachment belongs to. Absent for a report-level attachment."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"lineType":{"type":"string","description":"The account sub-type the item resolved to, which refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending item in the expenseItems array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of items the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_REQUIREMENT_UNMET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the category that imposes the requirement."},"requirement":{"type":"string","description":"What is missing. Either 'attachment' or 'attendees'."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","requirement","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the inactive category."},"referenceId":{"type":"string","description":"The identifier of the inactive category."},"lineIndex":{"type":"number","description":"The zero-based position of the expense item, within the array that carried it."}},"additionalProperties":false,"required":["categoryName","referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NEEDS_CATEGORY_OR_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"source":{"type":"string","description":"Where the item came from. Either 'new', supplied by this request, or 'existing', already on the report."},"lineIndex":{"type":"number","description":"The zero-based position of the item, within the array that carried it or within the report's stored items."}},"additionalProperties":false,"required":["source","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createExpenseReportInput"}}}},"summary":"Create an expense report","description":"Creates an expense report. The report is created with its expense items and starts in status 'pendingApproval'.\n\nThe response contains only the new report's id. Read the record with GET accounting/expense-reports/:id, where expenseNumber appears once it is assigned.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingExpenseReports"]}},"/accounting/employee-advances/{id}":{"get":{"operationId":"getEmployeeAdvanceRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getEmployeeAdvanceRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id of the advance request to fetch (a UUID); bound from the :id path segment.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"summary":"Retrieve an employee advance request","description":"Retrieves an employee advance request. Use the request's id, not its advanceRequestNumber.\n\nThe response has the request's amount, status, and the approver's decision note. Once the request has been issued, it also has the payment made for it.\n\nPOST accounting/employee-advances/search returns the same fields for each request.","tags":["accountingEmployeeAdvances"]},"patch":{"operationId":"updateEmployeeAdvanceRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateEmployeeAdvanceRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REQUEST_NOT_FOUND, NOT_OWNER, NOT_EDITABLE, CATEGORY_NOT_FOUND, CATEGORY_WRONG_ENTITY, NO_FUNCTIONAL_CURRENCY, INVALID_AMOUNT, MISSING_PURPOSE, PURPOSE_NOT_FOUND, INVALID_TRIP_DATES, ATTACHMENT_REQUIRED, ADVANCE_LIMIT_EXCEEDED, UNEXPECTED_ERROR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that was not found."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_WRONG_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that belongs to another entity."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_FUNCTIONAL_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_PURPOSE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURPOSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purpose":{"type":"string","description":"The purpose text that did not resolve."}},"additionalProperties":false,"required":["purpose"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TRIP_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADVANCE_LIMIT_EXCEEDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_ERROR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"The action's raw failure message."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that was not found."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_WRONG_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that belongs to another entity."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_FUNCTIONAL_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_PURPOSE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURPOSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purpose":{"type":"string","description":"The purpose text that did not resolve."}},"additionalProperties":false,"required":["purpose"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TRIP_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADVANCE_LIMIT_EXCEEDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_ERROR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"The action's raw failure message."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that was not found."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_WRONG_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that belongs to another entity."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_FUNCTIONAL_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_PURPOSE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURPOSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purpose":{"type":"string","description":"The purpose text that did not resolve."}},"additionalProperties":false,"required":["purpose"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TRIP_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADVANCE_LIMIT_EXCEEDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_ERROR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"The action's raw failure message."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the advance request to update.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateEmployeeAdvanceRequestInput"}}}},"summary":"Update and resubmit an employee advance request","description":"Updates and resubmits an employee advance request. Use the request's id, not its advanceRequestNumber. This replaces the whole advance request. categoryId, amount, and purpose are required.\n\nA field you leave out goes back to its default: tripStart, tripEnd, and notes are cleared. attachments works differently: leave it out to keep the current attachments. An attachments list you send replaces the whole list, so include every attachment you want to keep.\n\nThe request's status returns to 'pendingApproval', and any approval progress is reset.\n\nOnly the employee who made the request can change it. For anyone else, the update fails with NOT_OWNER.\n\nA request in 'draft', 'pendingApproval', or 'rejected' can be changed. An 'approved' or 'issued' request can't, and the update fails with NOT_EDITABLE.\n\nThe response is empty. The resubmitted request can already be approved by the time the response arrives, so read its status with GET accounting/employee-advances/:id.","tags":["accountingEmployeeAdvances"]},"delete":{"operationId":"deleteEmployeeAdvanceRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteEmployeeAdvanceRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REQUEST_NOT_FOUND, REQUEST_ISSUED, HAS_SETTLEMENT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUEST_ISSUED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the issued request that blocked the delete."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_SETTLEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the request with a linked settlement."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUEST_ISSUED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the issued request that blocked the delete."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_SETTLEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the request with a linked settlement."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUEST_ISSUED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the issued request that blocked the delete."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_SETTLEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the request with a linked settlement."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the advance request to delete; bound from the :id path segment.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"summary":"Delete an employee advance request","description":"Deletes an employee advance request. The request's attachments, approval actions, policy snapshot, and approver notification log are deleted with it.\n\nAn issued request, or one with a payment linked to it, can't be deleted. Neither can a request linked to an expense report that settles it.","tags":["accountingEmployeeAdvances"]}},"/accounting/payroll-details":{"get":{"operationId":"payrollDetails","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber]","in":"query","required":false,"description":"Filter payrollDetailNumber (equality)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][ne]","in":"query","required":false,"description":"Filter payrollDetailNumber (ne)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][gt]","in":"query","required":false,"description":"Filter payrollDetailNumber (gt)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][gte]","in":"query","required":false,"description":"Filter payrollDetailNumber (gte)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][lt]","in":"query","required":false,"description":"Filter payrollDetailNumber (lt)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][lte]","in":"query","required":false,"description":"Filter payrollDetailNumber (lte)","schema":{"type":"string"}},{"name":"filter[payrollDetailNumber][in]","in":"query","required":false,"description":"Filter payrollDetailNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollDetailNumber][notIn]","in":"query","required":false,"description":"Filter payrollDetailNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollDetailNumber][between]","in":"query","required":false,"description":"Filter payrollDetailNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[payrollDetailNumber][like]","in":"query","required":false,"description":"Filter payrollDetailNumber (like)","schema":{"type":"string"}},{"name":"filter[periodName]","in":"query","required":false,"description":"Filter periodName (equality)","schema":{"type":"string"}},{"name":"filter[periodName][ne]","in":"query","required":false,"description":"Filter periodName (ne)","schema":{"type":"string"}},{"name":"filter[periodName][gt]","in":"query","required":false,"description":"Filter periodName (gt)","schema":{"type":"string"}},{"name":"filter[periodName][gte]","in":"query","required":false,"description":"Filter periodName (gte)","schema":{"type":"string"}},{"name":"filter[periodName][lt]","in":"query","required":false,"description":"Filter periodName (lt)","schema":{"type":"string"}},{"name":"filter[periodName][lte]","in":"query","required":false,"description":"Filter periodName (lte)","schema":{"type":"string"}},{"name":"filter[periodName][in]","in":"query","required":false,"description":"Filter periodName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][notIn]","in":"query","required":false,"description":"Filter periodName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[periodName][between]","in":"query","required":false,"description":"Filter periodName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[periodName][like]","in":"query","required":false,"description":"Filter periodName (like)","schema":{"type":"string"}},{"name":"filter[payrollDate]","in":"query","required":false,"description":"Filter payrollDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][ne]","in":"query","required":false,"description":"Filter payrollDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][gt]","in":"query","required":false,"description":"Filter payrollDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][gte]","in":"query","required":false,"description":"Filter payrollDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][lt]","in":"query","required":false,"description":"Filter payrollDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][lte]","in":"query","required":false,"description":"Filter payrollDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[payrollDate][in]","in":"query","required":false,"description":"Filter payrollDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollDate][notIn]","in":"query","required":false,"description":"Filter payrollDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollDate][between]","in":"query","required":false,"description":"Filter payrollDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[grouping]","in":"query","required":false,"description":"Filter grouping (equality)","schema":{"type":"string"}},{"name":"filter[grouping][ne]","in":"query","required":false,"description":"Filter grouping (ne)","schema":{"type":"string"}},{"name":"filter[grouping][gt]","in":"query","required":false,"description":"Filter grouping (gt)","schema":{"type":"string"}},{"name":"filter[grouping][gte]","in":"query","required":false,"description":"Filter grouping (gte)","schema":{"type":"string"}},{"name":"filter[grouping][lt]","in":"query","required":false,"description":"Filter grouping (lt)","schema":{"type":"string"}},{"name":"filter[grouping][lte]","in":"query","required":false,"description":"Filter grouping (lte)","schema":{"type":"string"}},{"name":"filter[grouping][in]","in":"query","required":false,"description":"Filter grouping (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[grouping][notIn]","in":"query","required":false,"description":"Filter grouping (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[grouping][between]","in":"query","required":false,"description":"Filter grouping (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[grouping][like]","in":"query","required":false,"description":"Filter grouping (like)","schema":{"type":"string"}},{"name":"filter[paymentStatus]","in":"query","required":false,"description":"Filter paymentStatus (equality)","schema":{"type":"string"}},{"name":"filter[paymentStatus][ne]","in":"query","required":false,"description":"Filter paymentStatus (ne)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gt]","in":"query","required":false,"description":"Filter paymentStatus (gt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gte]","in":"query","required":false,"description":"Filter paymentStatus (gte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lt]","in":"query","required":false,"description":"Filter paymentStatus (lt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lte]","in":"query","required":false,"description":"Filter paymentStatus (lte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][in]","in":"query","required":false,"description":"Filter paymentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][notIn]","in":"query","required":false,"description":"Filter paymentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][between]","in":"query","required":false,"description":"Filter paymentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentStatus][like]","in":"query","required":false,"description":"Filter paymentStatus (like)","schema":{"type":"string"}},{"name":"filter[isImported]","in":"query","required":false,"description":"Filter isImported (equality)","schema":{"type":"boolean"}},{"name":"filter[isImported][ne]","in":"query","required":false,"description":"Filter isImported (ne)","schema":{"type":"boolean"}},{"name":"filter[isImported][gt]","in":"query","required":false,"description":"Filter isImported (gt)","schema":{"type":"boolean"}},{"name":"filter[isImported][gte]","in":"query","required":false,"description":"Filter isImported (gte)","schema":{"type":"boolean"}},{"name":"filter[isImported][lt]","in":"query","required":false,"description":"Filter isImported (lt)","schema":{"type":"boolean"}},{"name":"filter[isImported][lte]","in":"query","required":false,"description":"Filter isImported (lte)","schema":{"type":"boolean"}},{"name":"filter[isImported][in]","in":"query","required":false,"description":"Filter isImported (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isImported][notIn]","in":"query","required":false,"description":"Filter isImported (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isImported][between]","in":"query","required":false,"description":"Filter isImported (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","payrollDetailNumber","-payrollDetailNumber","periodName","-periodName","payrollDate","-payrollDate","startDate","-startDate","endDate","-endDate","currency","-currency","grouping","-grouping","paymentStatus","-paymentStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","payrollDetailNumber","description","periodName","payrollDate","startDate","endDate","currency","grouping","paymentStatus","isImported","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/payrollDetailsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List payroll details","description":"Lists payroll details, without their lines. To get the lines, use GET accounting/payroll-details/:id or POST accounting/payroll-details/search.","tags":["accountingPayrollDetails"]},"post":{"operationId":"createPayrollDetail","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPayrollDetailOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, CATEGORY_NOT_IN_TEMPLATE, INVALID_DATE_RANGE, AMOUNT_NOT_BALANCED, NO_ACCOUNTING_BOOK, NO_ACCOUNTING_PERIOD, POSTING_PERIOD_CLOSED, TOO_MANY_LINES, ATTACHMENT_REQUIRED, CROSS_CHARGE_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_IN_TEMPLATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to the template."},"lineIndex":{"type":"number","description":"The zero-based position of the line that referenced it."}},"additionalProperties":false,"required":["categoryId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","description":"The start date that was in effect."},"endDate":{"type":"string","description":"The end date that was in effect."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_BALANCED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"totalDebit":{"type":"string","description":"The sum of the gross-pay amounts."},"totalCredit":{"type":"string","description":"The sum of the deduction and net-pay amounts."}},"additionalProperties":false,"required":["totalDebit","totalCredit"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that has no book."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date that no period covers."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of rows the request would have written, one per line plus one per line item."},"maxLineCount":{"type":"number","description":"The tenant's configured maximum."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_IN_TEMPLATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to the template."},"lineIndex":{"type":"number","description":"The zero-based position of the line that referenced it."}},"additionalProperties":false,"required":["categoryId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","description":"The start date that was in effect."},"endDate":{"type":"string","description":"The end date that was in effect."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_BALANCED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"totalDebit":{"type":"string","description":"The sum of the gross-pay amounts."},"totalCredit":{"type":"string","description":"The sum of the deduction and net-pay amounts."}},"additionalProperties":false,"required":["totalDebit","totalCredit"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that has no book."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date that no period covers."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of rows the request would have written, one per line plus one per line item."},"maxLineCount":{"type":"number","description":"The tenant's configured maximum."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_IN_TEMPLATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to the template."},"lineIndex":{"type":"number","description":"The zero-based position of the line that referenced it."}},"additionalProperties":false,"required":["categoryId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","description":"The start date that was in effect."},"endDate":{"type":"string","description":"The end date that was in effect."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_BALANCED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"totalDebit":{"type":"string","description":"The sum of the gross-pay amounts."},"totalCredit":{"type":"string","description":"The sum of the deduction and net-pay amounts."}},"additionalProperties":false,"required":["totalDebit","totalCredit"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that has no book."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date that no period covers."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of rows the request would have written, one per line plus one per line item."},"maxLineCount":{"type":"number","description":"The tenant's configured maximum."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPayrollDetailInput"}}}},"summary":"Create a payroll detail","description":"Creates a payroll detail. The payroll detail belongs to one legal entity and takes its categories, journal entry date rule, and clearing account from the payroll template you name.\n\nGross pay must equal deductions plus net pay across all lines, or the request fails with AMOUNT_NOT_BALANCED.\n\nThe journal entry date comes from the template's journal entry date rule, either payrollDate or endDate. The legal entity must have a default transactions book (NO_ACCOUNTING_BOOK). A period in that book must cover the journal entry date (NO_ACCOUNTING_PERIOD), and that period must be open (POSTING_PERIOD_CLOSED).\n\nThe response contains only the new payroll detail's id. To see it, use GET accounting/payroll-details/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPayrollDetails"]}},"/accounting/outbound-payments/{id}/void":{"post":{"operationId":"voidOutboundPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidOutboundPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VOID_REASON_REQUIRED, PAYMENT_ALREADY_VOIDED, PAYMENT_NOT_VOIDABLE, POSTING_PERIOD_CLOSED, VOID_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_VOIDABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."},"status":{"type":"string","description":"The status blocking the void."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment that was not voided."},"detail":{"type":"string","description":"The reason reported by the void."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_VOIDABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."},"status":{"type":"string","description":"The status blocking the void."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment that was not voided."},"detail":{"type":"string","description":"The reason reported by the void."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_REASON_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment that was not voided."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_VOIDABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."},"status":{"type":"string","description":"The status blocking the void."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the outbound payment."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VOID_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment that was not voided."},"detail":{"type":"string","description":"The reason reported by the void."}},"additionalProperties":false,"required":["id","detail"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the outbound payment you want to void.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidOutboundPaymentInput"}}}},"summary":"Void an outbound payment","description":"Voids an outbound payment. The payment's journal entry is voided with it, and the vendor bills or expense reports it paid become open again.\n\nOnly a payment whose status is 'successful', 'partiallySuccessful', 'manuallyRecorded', or 'processing' can be voided. For a payment that is already voided, the request fails with PAYMENT_ALREADY_VOIDED, and for any other status with PAYMENT_NOT_VOIDABLE. The accounting period of the payment's journal entry must be open for the payment's legal entity.\n\nA payment that hasn't been executed can be deleted with DELETE accounting/outbound-payments/:id instead, and a 'manuallyRecorded' payment can be either voided or deleted.\n\nThe response is empty. To see the voided payment, use GET accounting/outbound-payments/:id.","tags":["accountingOutboundPayments"]}},"/accounting/purchase-requests/{id}":{"get":{"operationId":"getPurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase request you want to retrieve.","example":"c464128b-71f9-4de8-973c-14e2c8b3eaac"}],"summary":"Retrieve a purchase request","description":"Retrieves a purchase request. Use the purchase request's id, not its purchaseRequestNumber.\n\nA purchase request is an internal request to buy. The response has the request's lines and approval decisions.\n\nPOST accounting/purchase-requests/search returns the same fields for many requests, except approvals. GET accounting/purchase-requests returns requests without their lines.","tags":["accountingPurchaseRequests"]},"patch":{"operationId":"updatePurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, LINE_NOT_FOUND, LINE_LINKED_TO_PURCHASE_ORDER, NO_LINES, TOO_MANY_LINES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this request."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_LINKED_TO_PURCHASE_ORDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"},"description":"The ids of the lines that are already on a purchase order."}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request that would have been left empty."}},"additionalProperties":false,"required":["purchaseRequestNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request would have carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this request."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_LINKED_TO_PURCHASE_ORDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"},"description":"The ids of the lines that are already on a purchase order."}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request that would have been left empty."}},"additionalProperties":false,"required":["purchaseRequestNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request would have carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line id that does not belong to this request."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_LINKED_TO_PURCHASE_ORDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"string"},"description":"The ids of the lines that are already on a purchase order."}},"additionalProperties":false,"required":["lineIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request that would have been left empty."}},"additionalProperties":false,"required":["purchaseRequestNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request would have carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase request you want to update.","example":"5f8a2c31-6b07-4d92-a4e8-1c93b0f7d254"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePurchaseRequestInput"}}}},"summary":"Update a purchase request","description":"Updates a purchase request with the fields you send. A field you leave out keeps its current value.\n\nUse the purchase request's id, not its purchaseRequestNumber.\n\nLines change through three separate arrays, applied in this order: deleteLines, updateLines, createLines. Lines you don't name stay as they are. A new line in createLines that leaves out isItem is an expense line. On an updateLines item, a field you leave out keeps its current value.\n\nAfter the update, the purchase request goes through your tenant's approval policy again. An approved or rejected request goes back to 'pendingApproval' first.\n\nentityId and currency can't be changed, and status isn't an input. To approve or reject a request, use POST accounting/purchase-requests/:id/approve or POST accounting/purchase-requests/:id/reject.\n\nupdateLines and deleteLines name each line by the id that GET accounting/purchase-requests/:id returns for it.\n\ndeleteLines is always refused, even for lines that are not on any purchase order.\n\nThe response is empty. To see the updated request, use GET accounting/purchase-requests/:id.","tags":["accountingPurchaseRequests"]}},"/accounting/payroll-payments":{"post":{"operationId":"createPayrollPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPayrollPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_APPLICATIONS, UNSUPPORTED_PAYMENT_TYPE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The payment number. Always empty here, since a create assigns no number."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The payment number. Always empty here, since a create assigns no number."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The payment number. Always empty here, since a create assigns no number."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPayrollPaymentInput"}}}},"summary":"Create a payroll payment","description":"Creates a payroll payment. Each application names a payroll detail, the payee, and the amount paid.\n\nA payment that would overpay a payroll detail, for one payee or in total, is refused with an error that has no code in the error list.\n\nThe response contains only the new payment's id. To see the payment, use GET accounting/payroll-payments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPayrollPayments"]},"get":{"operationId":"payrollPayments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber]","in":"query","required":false,"description":"Filter payrollPaymentNumber (equality)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][ne]","in":"query","required":false,"description":"Filter payrollPaymentNumber (ne)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][gt]","in":"query","required":false,"description":"Filter payrollPaymentNumber (gt)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][gte]","in":"query","required":false,"description":"Filter payrollPaymentNumber (gte)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][lt]","in":"query","required":false,"description":"Filter payrollPaymentNumber (lt)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][lte]","in":"query","required":false,"description":"Filter payrollPaymentNumber (lte)","schema":{"type":"string"}},{"name":"filter[payrollPaymentNumber][in]","in":"query","required":false,"description":"Filter payrollPaymentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollPaymentNumber][notIn]","in":"query","required":false,"description":"Filter payrollPaymentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[payrollPaymentNumber][between]","in":"query","required":false,"description":"Filter payrollPaymentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[payrollPaymentNumber][like]","in":"query","required":false,"description":"Filter payrollPaymentNumber (like)","schema":{"type":"string"}},{"name":"filter[paymentDate]","in":"query","required":false,"description":"Filter paymentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][ne]","in":"query","required":false,"description":"Filter paymentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gt]","in":"query","required":false,"description":"Filter paymentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gte]","in":"query","required":false,"description":"Filter paymentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lt]","in":"query","required":false,"description":"Filter paymentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lte]","in":"query","required":false,"description":"Filter paymentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][in]","in":"query","required":false,"description":"Filter paymentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][notIn]","in":"query","required":false,"description":"Filter paymentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][between]","in":"query","required":false,"description":"Filter paymentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentCurrency]","in":"query","required":false,"description":"Filter paymentCurrency (equality)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][ne]","in":"query","required":false,"description":"Filter paymentCurrency (ne)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][gt]","in":"query","required":false,"description":"Filter paymentCurrency (gt)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][gte]","in":"query","required":false,"description":"Filter paymentCurrency (gte)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][lt]","in":"query","required":false,"description":"Filter paymentCurrency (lt)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][lte]","in":"query","required":false,"description":"Filter paymentCurrency (lte)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][in]","in":"query","required":false,"description":"Filter paymentCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentCurrency][notIn]","in":"query","required":false,"description":"Filter paymentCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentCurrency][between]","in":"query","required":false,"description":"Filter paymentCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentCurrency][like]","in":"query","required":false,"description":"Filter paymentCurrency (like)","schema":{"type":"string"}},{"name":"filter[paymentType]","in":"query","required":false,"description":"Filter paymentType (equality)","schema":{"type":"string"}},{"name":"filter[paymentType][ne]","in":"query","required":false,"description":"Filter paymentType (ne)","schema":{"type":"string"}},{"name":"filter[paymentType][gt]","in":"query","required":false,"description":"Filter paymentType (gt)","schema":{"type":"string"}},{"name":"filter[paymentType][gte]","in":"query","required":false,"description":"Filter paymentType (gte)","schema":{"type":"string"}},{"name":"filter[paymentType][lt]","in":"query","required":false,"description":"Filter paymentType (lt)","schema":{"type":"string"}},{"name":"filter[paymentType][lte]","in":"query","required":false,"description":"Filter paymentType (lte)","schema":{"type":"string"}},{"name":"filter[paymentType][in]","in":"query","required":false,"description":"Filter paymentType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][notIn]","in":"query","required":false,"description":"Filter paymentType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][between]","in":"query","required":false,"description":"Filter paymentType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentType][like]","in":"query","required":false,"description":"Filter paymentType (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[externalId]","in":"query","required":false,"description":"Filter externalId (equality)","schema":{"type":"string"}},{"name":"filter[externalId][ne]","in":"query","required":false,"description":"Filter externalId (ne)","schema":{"type":"string"}},{"name":"filter[externalId][gt]","in":"query","required":false,"description":"Filter externalId (gt)","schema":{"type":"string"}},{"name":"filter[externalId][gte]","in":"query","required":false,"description":"Filter externalId (gte)","schema":{"type":"string"}},{"name":"filter[externalId][lt]","in":"query","required":false,"description":"Filter externalId (lt)","schema":{"type":"string"}},{"name":"filter[externalId][lte]","in":"query","required":false,"description":"Filter externalId (lte)","schema":{"type":"string"}},{"name":"filter[externalId][in]","in":"query","required":false,"description":"Filter externalId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][notIn]","in":"query","required":false,"description":"Filter externalId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][between]","in":"query","required":false,"description":"Filter externalId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalId][like]","in":"query","required":false,"description":"Filter externalId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","payrollPaymentNumber","-payrollPaymentNumber","paymentDate","-paymentDate","paymentCurrency","-paymentCurrency","paymentType","-paymentType","status","-status","totalPaid","-totalPaid","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","payrollPaymentNumber","paymentDate","paymentCurrency","paymentType","status","approvalStatus","description","totalPaid","externalId","paymentAccountName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/payrollPaymentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List payroll payments","description":"Lists payroll payments, without their applications. To get the applications, use GET accounting/payroll-payments/:id or POST accounting/payroll-payments/search.","tags":["accountingPayrollPayments"]}},"/accounting/outbound-payments/search":{"post":{"operationId":"searchOutboundPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchOutboundPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchOutboundPaymentInput"}}}},"summary":"Search outbound payments","description":"Searches outbound payments, with their lines. Each match is the same record that GET accounting/outbound-payments/:id returns.","tags":["accountingOutboundPayments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/purchase-types/{id}":{"get":{"operationId":"getPurchaseType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPurchaseTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase type you want to retrieve.","example":"9c1b7e40-3a6d-4f52-8f0b-1d2c7a5e93b1"}],"summary":"Retrieve a purchase type","description":"Retrieves a purchase type. Use its id as the purchase type of a purchase order. Only an active type can be chosen for a new order.\n\nTo find a type by name, use POST accounting/purchase-types/search.","tags":["accountingPurchaseTypes"]},"delete":{"operationId":"deletePurchaseType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePurchaseTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PURCHASE_TYPE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type that could not be deleted."},"approvalPolicyCount":{"type":"number","description":"How many approval policies, whatever their status, name the type in a criterion or exclusion."},"purchaseOrderCount":{"type":"number","description":"How many active purchase orders carry the type, drafts included. Counting stops at 100."}},"additionalProperties":false,"required":["name","approvalPolicyCount","purchaseOrderCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type that could not be deleted."},"approvalPolicyCount":{"type":"number","description":"How many approval policies, whatever their status, name the type in a criterion or exclusion."},"purchaseOrderCount":{"type":"number","description":"How many active purchase orders carry the type, drafts included. Counting stops at 100."}},"additionalProperties":false,"required":["name","approvalPolicyCount","purchaseOrderCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type that could not be deleted."},"approvalPolicyCount":{"type":"number","description":"How many approval policies, whatever their status, name the type in a criterion or exclusion."},"purchaseOrderCount":{"type":"number","description":"How many active purchase orders carry the type, drafts included. Counting stops at 100."}},"additionalProperties":false,"required":["name","approvalPolicyCount","purchaseOrderCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase type you want to delete.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"summary":"Delete a purchase type","description":"Deletes a purchase type.\n\nWhile an approval policy of any status names the type in a criterion or exclusion, or an active purchase order carries it (drafts included), the request fails with PURCHASE_TYPE_IN_USE. To retire a type that is in use, set its status to 'inactive' with POST accounting/purchase-types/:id/deactivate instead.","tags":["accountingPurchaseTypes"]},"patch":{"operationId":"updatePurchaseType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePurchaseTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PURCHASE_TYPES_DISABLED, NOT_FOUND, NAME_REQUIRED, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the purchase type that already has this name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the purchase type that already has this name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the purchase type that already has this name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase type you want to update.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePurchaseTypeInput"}}}},"summary":"Update a purchase type","description":"Updates a purchase type with the fields you send. A field you leave out keeps its current value.\n\nThe name must stay unique within the tenant, ignoring case and surrounding spaces. Set status to 'inactive' to stop offering the type for new purchase orders. Orders that already carry it keep it. Set status to 'active' to offer it again.\n\nThe response is empty. Read the updated record with GET accounting/purchase-types/:id.","tags":["accountingPurchaseTypes"]}},"/accounting/expense-categories/{id}":{"patch":{"operationId":"updateExpenseCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateExpenseCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_CATEGORY, DUPLICATE_DISTANCE_CATEGORY, REFERENCE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense category you want to update.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateExpenseCategoryInput"}}}},"summary":"Update an expense category","description":"Updates an expense category with the fields you send. A field you leave out keeps its current value. entityIds and accountIds are lists.\n\nA list you send replaces the whole list, so include every item you want to keep.\n\nA reimbursable category must keep at least one account, so an empty accountIds fails. Every linked account must have an account subtype that is enabled for expense reports, even when you leave accountIds out. Both failures return an error that has no code in the error list.\n\nSend entityIds or accountIds to change the category's legal entities or general ledger accounts.\n\nThe name must stay unique within the tenant. At most one active distance ('Dis') category can exist for each reimbursable value.\n\nWhen the update leaves the category with no prepaid account, draft amortization schedules on its expense items are deleted.\n\nThe response is empty. Read the updated record with GET accounting/expense-categories/:id.","tags":["accountingExpenseCategories"]},"delete":{"operationId":"deleteExpenseCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteExpenseCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, EXPENSE_CATEGORY_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXPENSE_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name of the category that could not be deleted."},"expenseItemCount":{"type":"number","description":"How many expense items still reference it, drafts included."}},"additionalProperties":false,"required":["category","expenseItemCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXPENSE_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name of the category that could not be deleted."},"expenseItemCount":{"type":"number","description":"How many expense items still reference it, drafts included."}},"additionalProperties":false,"required":["category","expenseItemCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXPENSE_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name of the category that could not be deleted."},"expenseItemCount":{"type":"number","description":"How many expense items still reference it, drafts included."}},"additionalProperties":false,"required":["category","expenseItemCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense category you want to delete.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"summary":"Delete an expense category","description":"Deletes an expense category. The category's links to general ledger accounts are deleted with it.\n\nWhile any expense item refers to the category, drafts included, the request fails with EXPENSE_CATEGORY_IN_USE. To retire a category that is in use, set its status to 'inactive' with PATCH accounting/expense-categories/:id instead.","tags":["accountingExpenseCategories"]},"get":{"operationId":"getExpenseCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getExpenseCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense category you want to retrieve.","example":"9c1b7e40-3a6d-4f52-8f0b-1d2c7a5e93b1"}],"summary":"Retrieve an expense category","description":"Retrieves an expense category. The response has the category's name, kind, status, reimbursement setting, and receipt and attendee requirements. Its legal entities and general ledger accounts are not included.\n\nTo find a category by its external identifier, which is not unique, use POST accounting/expense-categories/search.","tags":["accountingExpenseCategories"]}},"/accounting/vendor-credits/{id}/apply":{"post":{"operationId":"applyVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/applyVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, NO_APPLICATIONS, APPLICATION_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that was refused."},"reason":{"type":"string","description":"The reason the application was refused."}},"additionalProperties":false,"required":["vendorCreditNumber","applicationIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that was refused."},"reason":{"type":"string","description":"The reason the application was refused."}},"additionalProperties":false,"required":["vendorCreditNumber","applicationIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that was refused."},"reason":{"type":"string","description":"The reason the application was refused."}},"additionalProperties":false,"required":["vendorCreditNumber","applicationIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor credit you want to apply.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyVendorCreditInput"}}}},"summary":"Apply a vendor credit to vendor bills","description":"Applies a vendor credit to vendor bills. Part or all of the credit can go to each bill, which lowers what the bill still owes. The response gives the number of applications recorded.\n\nTo undo an application, use POST accounting/vendor-credits/:id/unapply. A bill with credits applied to it can't be reversed until they are unapplied.","tags":["accountingVendorCredits"]}},"/accounting/payroll-details/search":{"post":{"operationId":"searchPayrollDetail","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPayrollDetailOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPayrollDetailInput"}}}},"summary":"Search payroll details","description":"Searches payroll details, with their lines. Each match is the same record that GET accounting/payroll-details/:id returns.","tags":["accountingPayrollDetails"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/vendor-credits":{"get":{"operationId":"vendorCredits","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[vendorCreditNumber]","in":"query","required":false,"description":"Filter vendorCreditNumber (equality)","schema":{"type":"string"}},{"name":"filter[vendorCreditNumber][ne]","in":"query","required":false,"description":"Filter vendorCreditNumber (ne)","schema":{"type":"string"}},{"name":"filter[vendorCreditNumber][gt]","in":"query","required":false,"description":"Filter vendorCreditNumber (gt)","schema":{"type":"string"}},{"name":"filter[vendorCreditNumber][gte]","in":"query","required":false,"description":"Filter vendorCreditNumber (gte)","schema":{"type":"string"}},{"name":"filter[vendorCreditNumber][lt]","in":"query","required":false,"description":"Filter vendorCreditNumber (lt)","schema":{"type":"string"}},{"name":"filter[vendorCreditNumber][lte]","in":"query","required":false,"description":"Filter vendorCreditNumber (lte)","schema":{"type":"string"}},{"name":"filter[vendorCreditNumber][in]","in":"query","required":false,"description":"Filter vendorCreditNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorCreditNumber][notIn]","in":"query","required":false,"description":"Filter vendorCreditNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorCreditNumber][between]","in":"query","required":false,"description":"Filter vendorCreditNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorCreditNumber][like]","in":"query","required":false,"description":"Filter vendorCreditNumber (like)","schema":{"type":"string"}},{"name":"filter[referenceNumber]","in":"query","required":false,"description":"Filter referenceNumber (equality)","schema":{"type":"string"}},{"name":"filter[referenceNumber][ne]","in":"query","required":false,"description":"Filter referenceNumber (ne)","schema":{"type":"string"}},{"name":"filter[referenceNumber][gt]","in":"query","required":false,"description":"Filter referenceNumber (gt)","schema":{"type":"string"}},{"name":"filter[referenceNumber][gte]","in":"query","required":false,"description":"Filter referenceNumber (gte)","schema":{"type":"string"}},{"name":"filter[referenceNumber][lt]","in":"query","required":false,"description":"Filter referenceNumber (lt)","schema":{"type":"string"}},{"name":"filter[referenceNumber][lte]","in":"query","required":false,"description":"Filter referenceNumber (lte)","schema":{"type":"string"}},{"name":"filter[referenceNumber][in]","in":"query","required":false,"description":"Filter referenceNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[referenceNumber][notIn]","in":"query","required":false,"description":"Filter referenceNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[referenceNumber][between]","in":"query","required":false,"description":"Filter referenceNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[referenceNumber][like]","in":"query","required":false,"description":"Filter referenceNumber (like)","schema":{"type":"string"}},{"name":"filter[creditDate]","in":"query","required":false,"description":"Filter creditDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[creditDate][ne]","in":"query","required":false,"description":"Filter creditDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[creditDate][gt]","in":"query","required":false,"description":"Filter creditDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[creditDate][gte]","in":"query","required":false,"description":"Filter creditDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[creditDate][lt]","in":"query","required":false,"description":"Filter creditDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[creditDate][lte]","in":"query","required":false,"description":"Filter creditDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[creditDate][in]","in":"query","required":false,"description":"Filter creditDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditDate][notIn]","in":"query","required":false,"description":"Filter creditDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[creditDate][between]","in":"query","required":false,"description":"Filter creditDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[externalId]","in":"query","required":false,"description":"Filter externalId (equality)","schema":{"type":"string"}},{"name":"filter[externalId][ne]","in":"query","required":false,"description":"Filter externalId (ne)","schema":{"type":"string"}},{"name":"filter[externalId][gt]","in":"query","required":false,"description":"Filter externalId (gt)","schema":{"type":"string"}},{"name":"filter[externalId][gte]","in":"query","required":false,"description":"Filter externalId (gte)","schema":{"type":"string"}},{"name":"filter[externalId][lt]","in":"query","required":false,"description":"Filter externalId (lt)","schema":{"type":"string"}},{"name":"filter[externalId][lte]","in":"query","required":false,"description":"Filter externalId (lte)","schema":{"type":"string"}},{"name":"filter[externalId][in]","in":"query","required":false,"description":"Filter externalId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][notIn]","in":"query","required":false,"description":"Filter externalId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][between]","in":"query","required":false,"description":"Filter externalId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalId][like]","in":"query","required":false,"description":"Filter externalId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","vendorCreditNumber","-vendorCreditNumber","referenceNumber","-referenceNumber","creditDate","-creditDate","currency","-currency","status","-status","totalAmount","-totalAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","vendorCreditNumber","referenceNumber","creditDate","currency","status","totalAmount","externalId","vendorName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/vendorCreditsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List vendor credits","description":"Lists vendor credits, without their line items. To filter by vendor or legal entity, or to read line items, use POST accounting/vendor-credits/search.","tags":["accountingVendorCredits"]},"post":{"operationId":"createVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, REFERENCE_NUMBER_NOT_UNIQUE, CROSS_CHARGE_INVALID, TOO_MANY_LINES, TAX_CODE_NOT_FOUND, TAX_CODE_AMBIGUOUS, TAX_CODE_ACCOUNT_NOT_CONFIGURED, PAYABLE_ACCOUNT_NOT_CONFIGURED, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NUMBER_NOT_UNIQUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The reference number you sent, returned unchanged."}},"additionalProperties":false,"required":["referenceNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYABLE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity identifier you sent."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts missing the assignment. See id on GET accounting/charts-of-accounts/:id. Empty when only the default book's lookup failed."}},"additionalProperties":false,"required":["entityId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NUMBER_NOT_UNIQUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The reference number you sent, returned unchanged."}},"additionalProperties":false,"required":["referenceNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYABLE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity identifier you sent."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts missing the assignment. See id on GET accounting/charts-of-accounts/:id. Empty when only the default book's lookup failed."}},"additionalProperties":false,"required":["entityId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NUMBER_NOT_UNIQUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The reference number you sent, returned unchanged."}},"additionalProperties":false,"required":["referenceNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYABLE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity identifier you sent."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts missing the assignment. See id on GET accounting/charts-of-accounts/:id. Empty when only the default book's lookup failed."}},"additionalProperties":false,"required":["entityId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVendorCreditInput"}}}},"summary":"Create a vendor credit","description":"Creates a vendor credit. The credit is created with its line items, and the response contains only its id. A new credit is always 'unapplied'. To apply it to a vendor bill, use POST accounting/vendor-credits/:id/apply.\n\nTo see the credit, including its vendorCreditNumber once one is assigned, use GET accounting/vendor-credits/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingVendorCredits"]}},"/accounting/purchase-requests/{id}/approve":{"post":{"operationId":"approvePurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approvePurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase request you want to approve.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvePurchaseRequestInput"}}}},"summary":"Approve a purchase request","description":"Approves a purchase request. The approval goes through your tenant's approval policy, and the response is the purchase request's status afterward.\n\nWith no approvers configured, the request goes straight to 'approved'. With a multi-step policy, it moves on one step and stays 'pendingApproval'.","tags":["accountingPurchaseRequests"]}},"/accounting/purchase-types/{id}/activate":{"post":{"operationId":"activatePurchaseType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/activatePurchaseTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PURCHASE_TYPES_DISABLED, NOT_FOUND, ALREADY_IN_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["name","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["name","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["name","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase type you want to activate.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activatePurchaseTypeInput"}}}},"summary":"Activate a purchase type","description":"Activates a purchase type, so it can be chosen for new purchase orders again. Orders that carry it are not changed.\n\nThe response is empty. To see the type, use GET accounting/purchase-types/:id.","tags":["accountingPurchaseTypes"]}},"/accounting/employee-advances/{id}/issue":{"post":{"operationId":"issueEmployeeAdvanceRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/issueEmployeeAdvanceRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REQUEST_NOT_FOUND, NOT_APPROVED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REQUEST_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string","description":"The request's current status."}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the approved advance request to issue.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/issueEmployeeAdvanceRequestInput"}}}},"summary":"Issue an employee advance request","description":"Issues the payment for an approved employee advance request. Creates the outbound payment and its journal entry for an approved request, links the payment to the request, and sets the request's status to 'issued'.\n\nOnly a request in 'approved' status can be issued. For any other status, the request fails with NOT_APPROVED.\n\nThe accounts and currency come from the request's category and legal entity, not from the request body. The request fails if the category has no bank and offset account for the legal entity's leading book, with an error that has no code in the error list. The response contains the payment's id. To see the payment, use GET accounting/outbound-payments/:id.","tags":["accountingEmployeeAdvances"]}},"/accounting/expense-categories":{"get":{"operationId":"expenseCategories","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"filter[categoryType]","in":"query","required":false,"description":"Filter categoryType (equality)","schema":{"type":"string"}},{"name":"filter[categoryType][ne]","in":"query","required":false,"description":"Filter categoryType (ne)","schema":{"type":"string"}},{"name":"filter[categoryType][gt]","in":"query","required":false,"description":"Filter categoryType (gt)","schema":{"type":"string"}},{"name":"filter[categoryType][gte]","in":"query","required":false,"description":"Filter categoryType (gte)","schema":{"type":"string"}},{"name":"filter[categoryType][lt]","in":"query","required":false,"description":"Filter categoryType (lt)","schema":{"type":"string"}},{"name":"filter[categoryType][lte]","in":"query","required":false,"description":"Filter categoryType (lte)","schema":{"type":"string"}},{"name":"filter[categoryType][in]","in":"query","required":false,"description":"Filter categoryType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryType][notIn]","in":"query","required":false,"description":"Filter categoryType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryType][between]","in":"query","required":false,"description":"Filter categoryType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[categoryType][like]","in":"query","required":false,"description":"Filter categoryType (like)","schema":{"type":"string"}},{"name":"filter[reimbursable]","in":"query","required":false,"description":"Filter reimbursable (equality)","schema":{"type":"boolean"}},{"name":"filter[reimbursable][ne]","in":"query","required":false,"description":"Filter reimbursable (ne)","schema":{"type":"boolean"}},{"name":"filter[reimbursable][gt]","in":"query","required":false,"description":"Filter reimbursable (gt)","schema":{"type":"boolean"}},{"name":"filter[reimbursable][gte]","in":"query","required":false,"description":"Filter reimbursable (gte)","schema":{"type":"boolean"}},{"name":"filter[reimbursable][lt]","in":"query","required":false,"description":"Filter reimbursable (lt)","schema":{"type":"boolean"}},{"name":"filter[reimbursable][lte]","in":"query","required":false,"description":"Filter reimbursable (lte)","schema":{"type":"boolean"}},{"name":"filter[reimbursable][in]","in":"query","required":false,"description":"Filter reimbursable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reimbursable][notIn]","in":"query","required":false,"description":"Filter reimbursable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reimbursable][between]","in":"query","required":false,"description":"Filter reimbursable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[requireAttachment]","in":"query","required":false,"description":"Filter requireAttachment (equality)","schema":{"type":"boolean"}},{"name":"filter[requireAttachment][ne]","in":"query","required":false,"description":"Filter requireAttachment (ne)","schema":{"type":"boolean"}},{"name":"filter[requireAttachment][gt]","in":"query","required":false,"description":"Filter requireAttachment (gt)","schema":{"type":"boolean"}},{"name":"filter[requireAttachment][gte]","in":"query","required":false,"description":"Filter requireAttachment (gte)","schema":{"type":"boolean"}},{"name":"filter[requireAttachment][lt]","in":"query","required":false,"description":"Filter requireAttachment (lt)","schema":{"type":"boolean"}},{"name":"filter[requireAttachment][lte]","in":"query","required":false,"description":"Filter requireAttachment (lte)","schema":{"type":"boolean"}},{"name":"filter[requireAttachment][in]","in":"query","required":false,"description":"Filter requireAttachment (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requireAttachment][notIn]","in":"query","required":false,"description":"Filter requireAttachment (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requireAttachment][between]","in":"query","required":false,"description":"Filter requireAttachment (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[requireAttendees]","in":"query","required":false,"description":"Filter requireAttendees (equality)","schema":{"type":"boolean"}},{"name":"filter[requireAttendees][ne]","in":"query","required":false,"description":"Filter requireAttendees (ne)","schema":{"type":"boolean"}},{"name":"filter[requireAttendees][gt]","in":"query","required":false,"description":"Filter requireAttendees (gt)","schema":{"type":"boolean"}},{"name":"filter[requireAttendees][gte]","in":"query","required":false,"description":"Filter requireAttendees (gte)","schema":{"type":"boolean"}},{"name":"filter[requireAttendees][lt]","in":"query","required":false,"description":"Filter requireAttendees (lt)","schema":{"type":"boolean"}},{"name":"filter[requireAttendees][lte]","in":"query","required":false,"description":"Filter requireAttendees (lte)","schema":{"type":"boolean"}},{"name":"filter[requireAttendees][in]","in":"query","required":false,"description":"Filter requireAttendees (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requireAttendees][notIn]","in":"query","required":false,"description":"Filter requireAttendees (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requireAttendees][between]","in":"query","required":false,"description":"Filter requireAttendees (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalId]","in":"query","required":false,"description":"Filter externalId (equality)","schema":{"type":"string"}},{"name":"filter[externalId][ne]","in":"query","required":false,"description":"Filter externalId (ne)","schema":{"type":"string"}},{"name":"filter[externalId][gt]","in":"query","required":false,"description":"Filter externalId (gt)","schema":{"type":"string"}},{"name":"filter[externalId][gte]","in":"query","required":false,"description":"Filter externalId (gte)","schema":{"type":"string"}},{"name":"filter[externalId][lt]","in":"query","required":false,"description":"Filter externalId (lt)","schema":{"type":"string"}},{"name":"filter[externalId][lte]","in":"query","required":false,"description":"Filter externalId (lte)","schema":{"type":"string"}},{"name":"filter[externalId][in]","in":"query","required":false,"description":"Filter externalId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][notIn]","in":"query","required":false,"description":"Filter externalId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][between]","in":"query","required":false,"description":"Filter externalId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalId][like]","in":"query","required":false,"description":"Filter externalId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","category","-category","categoryType","-categoryType","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","category","categoryType","reimbursable","status","requireAttachment","requireAttendees","externalId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/expenseCategoriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List expense categories","description":"Lists expense categories.","tags":["accountingExpenseCategories"]},"post":{"operationId":"createExpenseCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createExpenseCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_CATEGORY, DUPLICATE_DISTANCE_CATEGORY, NO_ACCOUNT_SELECTED, REFERENCE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNT_SELECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNT_SELECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the category that already has this name."}},"additionalProperties":false,"required":["category","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DISTANCE_CATEGORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reimbursable":{"type":"boolean","description":"The reimbursable value that is already taken."},"existingId":{"type":"string","description":"The identifier of the category that already has it."}},"additionalProperties":false,"required":["reimbursable","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNT_SELECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found, entity or account."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createExpenseCategoryInput"}}}},"summary":"Create an expense category","description":"Creates an expense category. The category is available in the legal entities in entityIds, and journal entries for its expense items use the general ledger accounts in accountIds. The response contains only its id.\n\nThe name must be unique within the tenant. A reimbursable category must have at least one account in accountIds. At most one active distance ('Dis') category can exist for each reimbursable value, one reimbursable and one not.\n\nEvery account in accountIds must have an account subtype that is enabled for expense reports. Otherwise the request fails with an error that has no code in the error list.\n\nRead the new record with GET accounting/expense-categories/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingExpenseCategories"]}},"/accounting/advance-payment-categories/{id}":{"get":{"operationId":"getAdvancePaymentCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAdvancePaymentCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record, echoed back so a caller can log the miss without re-reading its own request."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record, echoed back so a caller can log the miss without re-reading its own request."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id of the advance payment category to fetch (a UUID); bound from the :id path segment.","example":"9c1b7e40-3a6d-4f52-8f0b-1d2c7a5e93b1"}],"summary":"Retrieve an advance payment category","description":"Retrieves an advance payment category. The response gives the category's name, status, and whether manual payment is allowed.\n\nA legal entity has at most one category. To find it by legal entity, filter GET accounting/advance-payment-categories on entityId.\n\nThe category's bank and offset accounts for each chart of accounts are not returned.","tags":["accountingAdvancePaymentCategories"]},"delete":{"operationId":"deleteAdvancePaymentCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAdvancePaymentCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CATEGORY_NOT_FOUND, CATEGORY_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name of the category that could not be deleted."},"employeeAdvanceRequestCount":{"type":"number","description":"How many EmployeeAdvanceRequest rows still reference it, drafts included."}},"additionalProperties":false,"required":["category","employeeAdvanceRequestCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name of the category that could not be deleted."},"employeeAdvanceRequestCount":{"type":"number","description":"How many EmployeeAdvanceRequest rows still reference it, drafts included."}},"additionalProperties":false,"required":["category","employeeAdvanceRequestCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string","description":"The name of the category that could not be deleted."},"employeeAdvanceRequestCount":{"type":"number","description":"How many EmployeeAdvanceRequest rows still reference it, drafts included."}},"additionalProperties":false,"required":["category","employeeAdvanceRequestCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the advance payment category to delete; bound from the :id path segment.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"summary":"Delete an advance payment category","description":"Deletes an advance payment category. The category's bank and offset accounts for each chart of accounts are deleted with it.\n\nA category that any employee advance request refers to, drafts included, can't be deleted. To retire it instead, set its status to 'inactive' with PATCH accounting/advance-payment-categories/:id.","tags":["accountingAdvancePaymentCategories"]},"patch":{"operationId":"updateAdvancePaymentCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAdvancePaymentCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CATEGORY_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that was not found."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the advance payment category to update; bound from the :id path segment.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAdvancePaymentCategoryInput"}}}},"summary":"Replace an advance payment category","description":"Replaces an advance payment category. A field you leave out goes back to its default: allowManualPayment goes back to true and status goes back to 'active'. name is required.\n\nEach request deletes all of the category's bank and offset accounts, and this endpoint can't set them again. Until they're set again in the application, employee advances in this category can't be issued.\n\nThe legal entity can't be changed.\n\nThe response is empty. Read the updated record with GET accounting/advance-payment-categories/:id.","tags":["accountingAdvancePaymentCategories"]}},"/accounting/purchase-requests/{id}/reject":{"post":{"operationId":"rejectPurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectPurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"approvalStatus":{"type":"string","description":"The status the request is already in."}},"additionalProperties":false,"required":["purchaseRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseRequestNumber":{"type":"string","description":"The number of the request."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["purchaseRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase request you want to reject.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectPurchaseRequestInput"}}}},"summary":"Reject a purchase request","description":"Rejects a purchase request. You can send an optional reviewMessage, and the response is the purchase request's status afterward.","tags":["accountingPurchaseRequests"]}},"/accounting/vendor-bills/{id}":{"patch":{"operationId":"updateVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, BILL_LOCKED, LINE_NOT_FOUND, ACCOUNT_ENTITY_MISMATCH, CROSS_CHARGE_INVALID, TOO_MANY_LINES, INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, FILE_TOO_LARGE, ATTACHMENT_REQUIRED, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED, TAX_CODE_NOT_FOUND, TAX_CODE_AMBIGUOUS, TAX_CODE_ACCOUNT_NOT_CONFIGURED, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"Why the bill is locked: voided, reversed, posting-period-locked or amortization-period-locked."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this bill."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account you sent that does not belong to the entity's chart of accounts."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The uploaded file's stored name."},"maxSizeMb":{"type":"number","description":"The largest file size accepted, in MB."}},"additionalProperties":false,"required":["attachmentIndex","fileName","maxSizeMb"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule, after the patch is applied."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"Why the bill is locked: voided, reversed, posting-period-locked or amortization-period-locked."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this bill."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account you sent that does not belong to the entity's chart of accounts."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The uploaded file's stored name."},"maxSizeMb":{"type":"number","description":"The largest file size accepted, in MB."}},"additionalProperties":false,"required":["attachmentIndex","fileName","maxSizeMb"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule, after the patch is applied."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"Why the bill is locked: voided, reversed, posting-period-locked or amortization-period-locked."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"The line identifier that does not belong to this bill."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account you sent that does not belong to the entity's chart of accounts."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The uploaded file's stored name."},"maxSizeMb":{"type":"number","description":"The largest file size accepted, in MB."}},"additionalProperties":false,"required":["attachmentIndex","fileName","maxSizeMb"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line, counting createLines then updateLines."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule, after the patch is applied."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the array it was sent in, counting from zero."},"term":{"type":"string","description":"The term in effect after the patch, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to update.","example":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateVendorBillInput"}}}},"summary":"Update a vendor bill","description":"Updates a vendor bill with the fields you send. A field you leave out keeps its current value. Line items change through three separate arrays, applied in this order: deleteLines, updateLines, createLines.\n\nLeave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value, and amortization schedules change through createAmortizationSchedules, updateAmortizationSchedules and deleteAmortizationSchedules.\n\nThe bill's main fields and its line items can change in one request.\n\nOne request can remove a line and add its replacement.\n\nupdateLines and deleteLines name each line by the id that GET accounting/vendor-bills/:id returns for it. Each line must belong to this bill. Amounts on the lines this request writes are in currency, or in the bill's current currency when currency is left out.\n\nattachments replaces the bill's whole set of files. To add an invoice PDF: upload it to `POST /public/files/{namespace}/updateVendorBill` (multipart/form-data), then send the attachments the bill already has by `id` plus the new one as `file`. `{namespace}` is the segment after `/public/api/` in your base URL.\n\nThe response is empty. To see the updated bill, use GET accounting/vendor-bills/:id.","tags":["accountingVendorBills"]},"get":{"operationId":"getVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a vendor bill","description":"Retrieves a vendor bill. The response has the bill's main fields, its line items with their amortization schedules, its attachments, and its approval decisions.\n\nPOST accounting/vendor-bills/search returns the same fields for each match, except approvals and attachments. GET accounting/vendor-bills returns the main fields only.","tags":["accountingVendorBills"]},"delete":{"operationId":"deleteVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_BILL_PAID, WITHHOLDING_REMITTED, POSTED_AMORTIZATION, POSTING_PERIOD_CLOSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."},"paymentStatus":{"type":"string","description":"The payment status blocking the delete."}},"additionalProperties":false,"required":["vendorBillNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."},"paymentStatus":{"type":"string","description":"The payment status blocking the delete."}},"additionalProperties":false,"required":["vendorBillNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."},"paymentStatus":{"type":"string","description":"The payment status blocking the delete."}},"additionalProperties":false,"required":["vendorBillNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillNumber":{"type":"string","description":"The number of the bill that could not be deleted."}},"additionalProperties":false,"required":["vendorBillNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to delete.","example":"62c06eff-ba85-461d-b4e7-7a3f1d3e2e4e"}],"summary":"Delete a vendor bill","description":"Deletes a vendor bill. The bill and its journal entry are deleted, not reversed. To keep a bill that has a journal entry, and its audit trail, use POST accounting/vendor-bills/:id/void instead.\n\nA bill can't be deleted when it is paid, even in part, when it has a pending payment, or when its withheld tax has been remitted. It also can't be deleted when it has amortization schedule lines with journal entries, or when the accounting period of its journal entry is closed or locked. A bill whose total is zero skips the payment and accounting-period checks.\n\nThe response is empty.","tags":["accountingVendorBills"]}},"/accounting/payroll-payments/{id}":{"get":{"operationId":"getPayrollPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPayrollPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll payment you want to retrieve.","example":"a71c3d09-58e4-4b12-90f7-2ce6810b45da"}],"summary":"Retrieve a payroll payment","description":"Retrieves a payroll payment. Use the payroll payment's id, not its payrollPaymentNumber.\n\nA payroll payment is an outbound payment that pays payroll details. Each application ties part of the payment to one payroll detail and one payee.\n\nThe same id also works on GET accounting/outbound-payments/:id, which returns the payment's lines instead of its applications.","tags":["accountingPayrollPayments"]},"delete":{"operationId":"deletePayrollPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePayrollPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PAYMENT_NOT_EDITABLE, POSTING_PERIOD_CLOSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."},"status":{"type":"string","description":"The status blocking the delete."}},"additionalProperties":false,"required":["payrollPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."},"status":{"type":"string","description":"The status blocking the delete."}},"additionalProperties":false,"required":["payrollPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."},"status":{"type":"string","description":"The status blocking the delete."}},"additionalProperties":false,"required":["payrollPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll payment you want to delete.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"summary":"Delete a payroll payment","description":"Deletes a payroll payment. The payroll details the payment paid become unpaid again.\n\nThe payment's status must be 'manuallyRecorded', 'scheduled', 'unknown', 'rejected', or 'cancelled', or the request fails with PAYMENT_NOT_EDITABLE. The accounting period of the payment's journal entry must also be open for the payment's legal entity and for the legal entity of every payment item. Only payroll payments can be deleted here. For an outbound payment that pays a vendor bill or expense report, the request fails with NOT_FOUND.\n\nThe response is empty.","tags":["accountingPayrollPayments"]},"patch":{"operationId":"updatePayrollPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePayrollPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, APPLICATION_NOT_FOUND, NO_APPLICATIONS, UNSUPPORTED_PAYMENT_TYPE, PAYMENT_NOT_EDITABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"applicationId":{"type":"string","description":"The application identifier that does not belong to this payment."}},"additionalProperties":false,"required":["applicationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that would have been left empty."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be changed."},"status":{"type":"string","description":"The status blocking the change."}},"additionalProperties":false,"required":["payrollPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"applicationId":{"type":"string","description":"The application identifier that does not belong to this payment."}},"additionalProperties":false,"required":["applicationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that would have been left empty."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be changed."},"status":{"type":"string","description":"The status blocking the change."}},"additionalProperties":false,"required":["payrollPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"applicationIndex":{"type":"number","description":"The zero-based position of the application that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"applicationId":{"type":"string","description":"The application identifier that does not belong to this payment."}},"additionalProperties":false,"required":["applicationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that would have been left empty."}},"additionalProperties":false,"required":["payrollPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_PAYMENT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"paymentType":{"type":"string","description":"The payment type you sent, which is not accepted."}},"additionalProperties":false,"required":["paymentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollPaymentNumber":{"type":"string","description":"The number of the payment that could not be changed."},"status":{"type":"string","description":"The status blocking the change."}},"additionalProperties":false,"required":["payrollPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll payment you want to update.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePayrollPaymentInput"}}}},"summary":"Update a payroll payment","description":"Updates a payroll payment with the fields you send. A field you leave out keeps its current value.\n\nUse the payroll payment's id, not its payrollPaymentNumber.\n\nApplications change through three separate arrays, applied in this order: deleteApplications, updateApplications, createApplications. Leave out all three to keep the applications as they are.\n\nThe payment's applications can change too. The legal entity can't be changed.\n\nThe payment's status must be 'manuallyRecorded', 'scheduled', 'unknown', 'rejected', or 'cancelled', or the request fails with PAYMENT_NOT_EDITABLE. An update that would overpay a payroll detail is refused with an error that has no code in the error list.\n\nThe payment must keep at least one application. To remove every application, delete the payment instead.\n\nThe response is empty. To see the updated payment, use GET accounting/payroll-payments/:id.","tags":["accountingPayrollPayments"]}},"/accounting/advance-payment-categories/search":{"post":{"operationId":"searchAdvancePaymentCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAdvancePaymentCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAdvancePaymentCategoriesInput"}}}},"summary":"Search advance payment categories","description":"Searches advance payment categories. The filters are legal entity, name, and status. Matching categories are returned newest first.\n\nA legal entity has at most one category, so filters.entityId returns at most one item.","tags":["accountingAdvancePaymentCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/payroll-templates/search":{"post":{"operationId":"searchPayrollTemplate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPayrollTemplateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPayrollTemplateInput"}}}},"summary":"Search payroll templates","description":"Searches payroll templates. Each match is the same record that GET accounting/payroll-templates/:id returns. Search here to find a template by name or by a legal entity it serves.","tags":["accountingPayrollTemplates"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/payroll-details/{id}":{"patch":{"operationId":"updatePayrollDetail","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePayrollDetailOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, NOT_FOUND, REFERENCE_NOT_FOUND, CATEGORY_NOT_IN_TEMPLATE, INVALID_DATE_RANGE, AMOUNT_NOT_BALANCED, NO_ACCOUNTING_BOOK, NO_ACCOUNTING_PERIOD, POSTING_PERIOD_CLOSED, TOO_MANY_LINES, ATTACHMENT_REQUIRED, CROSS_CHARGE_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_IN_TEMPLATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to the template."},"lineIndex":{"type":"number","description":"The zero-based position of the line that referenced it."}},"additionalProperties":false,"required":["categoryId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","description":"The start date that was in effect."},"endDate":{"type":"string","description":"The end date that was in effect."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_BALANCED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"totalDebit":{"type":"string","description":"The sum of the gross-pay amounts."},"totalCredit":{"type":"string","description":"The sum of the deduction and net-pay amounts."}},"additionalProperties":false,"required":["totalDebit","totalCredit"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that has no book."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date that no period covers."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of rows the request would have written, one per line plus one per line item."},"maxLineCount":{"type":"number","description":"The tenant's configured maximum."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_IN_TEMPLATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to the template."},"lineIndex":{"type":"number","description":"The zero-based position of the line that referenced it."}},"additionalProperties":false,"required":["categoryId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","description":"The start date that was in effect."},"endDate":{"type":"string","description":"The end date that was in effect."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_BALANCED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"totalDebit":{"type":"string","description":"The sum of the gross-pay amounts."},"totalCredit":{"type":"string","description":"The sum of the deduction and net-pay amounts."}},"additionalProperties":false,"required":["totalDebit","totalCredit"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that has no book."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date that no period covers."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of rows the request would have written, one per line plus one per line item."},"maxLineCount":{"type":"number","description":"The tenant's configured maximum."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_IN_TEMPLATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category identifier that does not belong to the template."},"lineIndex":{"type":"number","description":"The zero-based position of the line that referenced it."}},"additionalProperties":false,"required":["categoryId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","description":"The start date that was in effect."},"endDate":{"type":"string","description":"The end date that was in effect."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_BALANCED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"totalDebit":{"type":"string","description":"The sum of the gross-pay amounts."},"totalCredit":{"type":"string","description":"The sum of the deduction and net-pay amounts."}},"additionalProperties":false,"required":["totalDebit","totalCredit"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity that has no book."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date that no period covers."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The posting date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of rows the request would have written, one per line plus one per line item."},"maxLineCount":{"type":"number","description":"The tenant's configured maximum."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll detail you want to update.","example":"4d8f2b61-7a09-4c35-8e12-9b3d5f0a6c47"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePayrollDetailInput"}}}},"summary":"Update a payroll detail","description":"Updates a payroll detail with the fields you send. A field you leave out keeps its current value.\n\nUse the payroll detail's id, not its payrollDetailNumber.\n\nlines and attachments are lists. A list you send replaces the whole list, so include every item you want to keep. Send an empty array to remove them all.\n\nLeave a list out to keep it as it is. Every update creates the lines again, even when you leave lines out, so line ids change.\n\nThe payroll detail's main fields, lines, and attachments can change. The legal entity can't.\n\nThe same checks as on create apply to the result: the lines you send must balance, and the accounting period must be open for the resulting journal entry date. Each category must be an active category of the template or one the payroll detail already uses.\n\nThe response is empty. To see the updated payroll detail, use GET accounting/payroll-details/:id.","tags":["accountingPayrollDetails"]},"get":{"operationId":"getPayrollDetail","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPayrollDetailOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll detail you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a payroll detail","description":"Retrieves a payroll detail. Use the payroll detail's id, not its payrollDetailNumber.\n\nA payroll detail is a set of payroll lines, one per employee or department, recorded in a journal entry for one legal entity. The response includes the lines, which GET accounting/payroll-details doesn't return.\n\nPOST accounting/payroll-details/search returns the same record for each match.","tags":["accountingPayrollDetails"]},"delete":{"operationId":"deletePayrollDetail","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePayrollDetailOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PAYROLL_HAS_PAYMENTS, PAYROLL_HAS_PENDING_PAYMENT, POSTING_PERIOD_CLOSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYROLL_HAS_PAYMENTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollDetailNumber":{"type":"string","description":"The number of the payroll that could not be deleted."}},"additionalProperties":false,"required":["payrollDetailNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYROLL_HAS_PENDING_PAYMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollDetailNumber":{"type":"string","description":"The number of the payroll that could not be deleted."}},"additionalProperties":false,"required":["payrollDetailNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The payroll date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYROLL_HAS_PAYMENTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollDetailNumber":{"type":"string","description":"The number of the payroll that could not be deleted."}},"additionalProperties":false,"required":["payrollDetailNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYROLL_HAS_PENDING_PAYMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollDetailNumber":{"type":"string","description":"The number of the payroll that could not be deleted."}},"additionalProperties":false,"required":["payrollDetailNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The payroll date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYROLL_HAS_PAYMENTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollDetailNumber":{"type":"string","description":"The number of the payroll that could not be deleted."}},"additionalProperties":false,"required":["payrollDetailNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYROLL_HAS_PENDING_PAYMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"payrollDetailNumber":{"type":"string","description":"The number of the payroll that could not be deleted."}},"additionalProperties":false,"required":["payrollDetailNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"postingDate":{"type":"string","description":"The payroll date whose period is closed or locked."}},"additionalProperties":false,"required":["postingDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the payroll detail you want to delete.","example":"4d8f2b61-7a09-4c35-8e12-9b3d5f0a6c47"}],"summary":"Delete a payroll detail","description":"Deletes a payroll detail. The payroll detail's lines, line items, attachments, and account mappings are deleted with it. Any payroll payment applications that point at the payroll detail are deleted too, with their outbound payments.\n\nThe request fails with PAYROLL_HAS_PAYMENTS when any amount of the payroll detail has been paid, and with PAYROLL_HAS_PENDING_PAYMENT when any amount is pending payment. Delete those payments first.\n\nThe accounting period that contains the payroll date must be open, or the request fails with POSTING_PERIOD_CLOSED. A draft payroll detail skips the payment and period checks.\n\nThe response is empty.","tags":["accountingPayrollDetails"]}},"/accounting/vendor-bills/{id}/approve":{"post":{"operationId":"approveVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED, BILL_ALREADY_VOIDED, BILL_ALREADY_REVERSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"approvalStatus":{"type":"string","description":"The status the bill is already in."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to approve.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveVendorBillInput"}}}},"summary":"Approve a vendor bill","description":"Approves a vendor bill. The approval goes through your tenant's approval policy, and the response is the bill's status afterward. Approval makes the bill payable and creates its journal entry in the general ledger. No journal entry is created when the bill's total is zero or a line has no accountId.\n\nWith no approvers configured, the bill goes straight to 'approved'. With a multi-step policy, each request records your approval, and the bill stays 'pendingApproval' until every required approver has approved.\n\nWhether you may approve the bill depends on your approval policy. When the policy refuses, the request fails with APPROVAL_FAILED, and reason has the policy's message.","tags":["accountingVendorBills"]}},"/accounting/outbound-payments":{"post":{"operationId":"createOutboundPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createOutboundPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, DOCUMENT_NOT_PAYABLE, PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT, DOCUMENT_CURRENCY_MISMATCH","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createOutboundPaymentInput"}}}},"summary":"Create an outbound payment","description":"Creates an outbound payment. The payment pays vendor bills or expense reports. No money is sent, and the payment starts in status 'manuallyRecorded'.\n\nEach payment item pays one document. documentType sets the kind of document, and every item in the payment pays that kind. Every document must be approved and not voided, every item on an expense report must be reimbursable, all documents must be in one currency, and no payment item can pay more than its document's open amount.\n\nThe response contains only the new payment's id. To see the payment, use GET accounting/outbound-payments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingOutboundPayments"]},"get":{"operationId":"outboundPayments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber]","in":"query","required":false,"description":"Filter outboundPaymentNumber (equality)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][ne]","in":"query","required":false,"description":"Filter outboundPaymentNumber (ne)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][gt]","in":"query","required":false,"description":"Filter outboundPaymentNumber (gt)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][gte]","in":"query","required":false,"description":"Filter outboundPaymentNumber (gte)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][lt]","in":"query","required":false,"description":"Filter outboundPaymentNumber (lt)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][lte]","in":"query","required":false,"description":"Filter outboundPaymentNumber (lte)","schema":{"type":"string"}},{"name":"filter[outboundPaymentNumber][in]","in":"query","required":false,"description":"Filter outboundPaymentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[outboundPaymentNumber][notIn]","in":"query","required":false,"description":"Filter outboundPaymentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[outboundPaymentNumber][between]","in":"query","required":false,"description":"Filter outboundPaymentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[outboundPaymentNumber][like]","in":"query","required":false,"description":"Filter outboundPaymentNumber (like)","schema":{"type":"string"}},{"name":"filter[paymentDate]","in":"query","required":false,"description":"Filter paymentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][ne]","in":"query","required":false,"description":"Filter paymentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gt]","in":"query","required":false,"description":"Filter paymentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][gte]","in":"query","required":false,"description":"Filter paymentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lt]","in":"query","required":false,"description":"Filter paymentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][lte]","in":"query","required":false,"description":"Filter paymentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[paymentDate][in]","in":"query","required":false,"description":"Filter paymentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][notIn]","in":"query","required":false,"description":"Filter paymentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentDate][between]","in":"query","required":false,"description":"Filter paymentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentCurrency]","in":"query","required":false,"description":"Filter paymentCurrency (equality)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][ne]","in":"query","required":false,"description":"Filter paymentCurrency (ne)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][gt]","in":"query","required":false,"description":"Filter paymentCurrency (gt)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][gte]","in":"query","required":false,"description":"Filter paymentCurrency (gte)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][lt]","in":"query","required":false,"description":"Filter paymentCurrency (lt)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][lte]","in":"query","required":false,"description":"Filter paymentCurrency (lte)","schema":{"type":"string"}},{"name":"filter[paymentCurrency][in]","in":"query","required":false,"description":"Filter paymentCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentCurrency][notIn]","in":"query","required":false,"description":"Filter paymentCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentCurrency][between]","in":"query","required":false,"description":"Filter paymentCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentCurrency][like]","in":"query","required":false,"description":"Filter paymentCurrency (like)","schema":{"type":"string"}},{"name":"filter[paymentType]","in":"query","required":false,"description":"Filter paymentType (equality)","schema":{"type":"string"}},{"name":"filter[paymentType][ne]","in":"query","required":false,"description":"Filter paymentType (ne)","schema":{"type":"string"}},{"name":"filter[paymentType][gt]","in":"query","required":false,"description":"Filter paymentType (gt)","schema":{"type":"string"}},{"name":"filter[paymentType][gte]","in":"query","required":false,"description":"Filter paymentType (gte)","schema":{"type":"string"}},{"name":"filter[paymentType][lt]","in":"query","required":false,"description":"Filter paymentType (lt)","schema":{"type":"string"}},{"name":"filter[paymentType][lte]","in":"query","required":false,"description":"Filter paymentType (lte)","schema":{"type":"string"}},{"name":"filter[paymentType][in]","in":"query","required":false,"description":"Filter paymentType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][notIn]","in":"query","required":false,"description":"Filter paymentType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentType][between]","in":"query","required":false,"description":"Filter paymentType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentType][like]","in":"query","required":false,"description":"Filter paymentType (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[applicationStatus]","in":"query","required":false,"description":"Filter applicationStatus (equality)","schema":{"type":"string"}},{"name":"filter[applicationStatus][ne]","in":"query","required":false,"description":"Filter applicationStatus (ne)","schema":{"type":"string"}},{"name":"filter[applicationStatus][gt]","in":"query","required":false,"description":"Filter applicationStatus (gt)","schema":{"type":"string"}},{"name":"filter[applicationStatus][gte]","in":"query","required":false,"description":"Filter applicationStatus (gte)","schema":{"type":"string"}},{"name":"filter[applicationStatus][lt]","in":"query","required":false,"description":"Filter applicationStatus (lt)","schema":{"type":"string"}},{"name":"filter[applicationStatus][lte]","in":"query","required":false,"description":"Filter applicationStatus (lte)","schema":{"type":"string"}},{"name":"filter[applicationStatus][in]","in":"query","required":false,"description":"Filter applicationStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[applicationStatus][notIn]","in":"query","required":false,"description":"Filter applicationStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[applicationStatus][between]","in":"query","required":false,"description":"Filter applicationStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[applicationStatus][like]","in":"query","required":false,"description":"Filter applicationStatus (like)","schema":{"type":"string"}},{"name":"filter[externalId]","in":"query","required":false,"description":"Filter externalId (equality)","schema":{"type":"string"}},{"name":"filter[externalId][ne]","in":"query","required":false,"description":"Filter externalId (ne)","schema":{"type":"string"}},{"name":"filter[externalId][gt]","in":"query","required":false,"description":"Filter externalId (gt)","schema":{"type":"string"}},{"name":"filter[externalId][gte]","in":"query","required":false,"description":"Filter externalId (gte)","schema":{"type":"string"}},{"name":"filter[externalId][lt]","in":"query","required":false,"description":"Filter externalId (lt)","schema":{"type":"string"}},{"name":"filter[externalId][lte]","in":"query","required":false,"description":"Filter externalId (lte)","schema":{"type":"string"}},{"name":"filter[externalId][in]","in":"query","required":false,"description":"Filter externalId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][notIn]","in":"query","required":false,"description":"Filter externalId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][between]","in":"query","required":false,"description":"Filter externalId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalId][like]","in":"query","required":false,"description":"Filter externalId (like)","schema":{"type":"string"}},{"name":"filter[origin]","in":"query","required":false,"description":"Filter origin (equality)","schema":{"type":"string"}},{"name":"filter[origin][ne]","in":"query","required":false,"description":"Filter origin (ne)","schema":{"type":"string"}},{"name":"filter[origin][gt]","in":"query","required":false,"description":"Filter origin (gt)","schema":{"type":"string"}},{"name":"filter[origin][gte]","in":"query","required":false,"description":"Filter origin (gte)","schema":{"type":"string"}},{"name":"filter[origin][lt]","in":"query","required":false,"description":"Filter origin (lt)","schema":{"type":"string"}},{"name":"filter[origin][lte]","in":"query","required":false,"description":"Filter origin (lte)","schema":{"type":"string"}},{"name":"filter[origin][in]","in":"query","required":false,"description":"Filter origin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][notIn]","in":"query","required":false,"description":"Filter origin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[origin][between]","in":"query","required":false,"description":"Filter origin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[origin][like]","in":"query","required":false,"description":"Filter origin (like)","schema":{"type":"string"}},{"name":"filter[singlePayment]","in":"query","required":false,"description":"Filter singlePayment (equality)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][ne]","in":"query","required":false,"description":"Filter singlePayment (ne)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][gt]","in":"query","required":false,"description":"Filter singlePayment (gt)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][gte]","in":"query","required":false,"description":"Filter singlePayment (gte)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][lt]","in":"query","required":false,"description":"Filter singlePayment (lt)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][lte]","in":"query","required":false,"description":"Filter singlePayment (lte)","schema":{"type":"boolean"}},{"name":"filter[singlePayment][in]","in":"query","required":false,"description":"Filter singlePayment (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[singlePayment][notIn]","in":"query","required":false,"description":"Filter singlePayment (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[singlePayment][between]","in":"query","required":false,"description":"Filter singlePayment (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","outboundPaymentNumber","-outboundPaymentNumber","paymentDate","-paymentDate","paymentCurrency","-paymentCurrency","paymentType","-paymentType","status","-status","approvalStatus","-approvalStatus","applicationStatus","-applicationStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","outboundPaymentNumber","description","paymentDate","paymentCurrency","paymentType","status","approvalStatus","applicationStatus","paymentId","externalId","origin","singlePayment","paymentAccountName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/outboundPaymentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List outbound payments","description":"Lists outbound payments, without their lines. To get the lines, use GET accounting/outbound-payments/:id or POST accounting/outbound-payments/search.","tags":["accountingOutboundPayments"]}},"/inventory/warehouses/search":{"post":{"operationId":"searchWarehouses","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchWarehousesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"anEntitysRealSites":{"value":{"data":{"items":[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","entityId":"81e8beb1-1415-4012-9012-8138580f43dc","entityName":"Acme GmbH","name":"Rotterdam Distribution Centre","inventoryLocationType":"WAREHOUSE","isActive":true,"isPrimaryReceiving":true,"addressLine1":"Waalhaven 12","city":"Rotterdam","postalCode":"3087 BM","countryCode":"NL","region":"Benelux","lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every active stocking site an entity owns — the entity filter the collection route cannot offer"},"byCountry":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Warehouses in one country — an address filter, so it belongs in a body"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchWarehousesInput"},"examples":{"anEntitysRealSites":{"value":{"filters":{"entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","isActive":true,"inventoryLocationType":"WAREHOUSE"}},"summary":"Every active stocking site an entity owns — the entity filter the collection route cannot offer"},"byCountry":{"value":{"filters":{"countryCode":"NL"}},"summary":"Warehouses in one country — an address filter, so it belongs in a body"}}}}},"summary":"Search warehouses","description":"Searches warehouses. This endpoint can filter by name, city, countryCode, and region, which the collection GET inventory/warehouses can't. These filters match exactly, not on part of the text.\n\nThe fields are the same as on GET inventory/warehouses/:id.","tags":["inventoryWarehouses"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/position-skill-requirements":{"get":{"operationId":"positionSkillRequirements","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[positionId]","in":"query","required":false,"description":"Filter positionId (equality)","schema":{"type":"string"}},{"name":"filter[positionId][ne]","in":"query","required":false,"description":"Filter positionId (ne)","schema":{"type":"string"}},{"name":"filter[positionId][gt]","in":"query","required":false,"description":"Filter positionId (gt)","schema":{"type":"string"}},{"name":"filter[positionId][gte]","in":"query","required":false,"description":"Filter positionId (gte)","schema":{"type":"string"}},{"name":"filter[positionId][lt]","in":"query","required":false,"description":"Filter positionId (lt)","schema":{"type":"string"}},{"name":"filter[positionId][lte]","in":"query","required":false,"description":"Filter positionId (lte)","schema":{"type":"string"}},{"name":"filter[positionId][in]","in":"query","required":false,"description":"Filter positionId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionId][notIn]","in":"query","required":false,"description":"Filter positionId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionId][between]","in":"query","required":false,"description":"Filter positionId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[positionId][like]","in":"query","required":false,"description":"Filter positionId (like)","schema":{"type":"string"}},{"name":"filter[skillId]","in":"query","required":false,"description":"Filter skillId (equality)","schema":{"type":"string"}},{"name":"filter[skillId][ne]","in":"query","required":false,"description":"Filter skillId (ne)","schema":{"type":"string"}},{"name":"filter[skillId][gt]","in":"query","required":false,"description":"Filter skillId (gt)","schema":{"type":"string"}},{"name":"filter[skillId][gte]","in":"query","required":false,"description":"Filter skillId (gte)","schema":{"type":"string"}},{"name":"filter[skillId][lt]","in":"query","required":false,"description":"Filter skillId (lt)","schema":{"type":"string"}},{"name":"filter[skillId][lte]","in":"query","required":false,"description":"Filter skillId (lte)","schema":{"type":"string"}},{"name":"filter[skillId][in]","in":"query","required":false,"description":"Filter skillId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillId][notIn]","in":"query","required":false,"description":"Filter skillId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillId][between]","in":"query","required":false,"description":"Filter skillId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[skillId][like]","in":"query","required":false,"description":"Filter skillId (like)","schema":{"type":"string"}},{"name":"filter[skillLevelId]","in":"query","required":false,"description":"Filter skillLevelId (equality)","schema":{"type":"string"}},{"name":"filter[skillLevelId][ne]","in":"query","required":false,"description":"Filter skillLevelId (ne)","schema":{"type":"string"}},{"name":"filter[skillLevelId][gt]","in":"query","required":false,"description":"Filter skillLevelId (gt)","schema":{"type":"string"}},{"name":"filter[skillLevelId][gte]","in":"query","required":false,"description":"Filter skillLevelId (gte)","schema":{"type":"string"}},{"name":"filter[skillLevelId][lt]","in":"query","required":false,"description":"Filter skillLevelId (lt)","schema":{"type":"string"}},{"name":"filter[skillLevelId][lte]","in":"query","required":false,"description":"Filter skillLevelId (lte)","schema":{"type":"string"}},{"name":"filter[skillLevelId][in]","in":"query","required":false,"description":"Filter skillLevelId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillLevelId][notIn]","in":"query","required":false,"description":"Filter skillLevelId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillLevelId][between]","in":"query","required":false,"description":"Filter skillLevelId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[skillLevelId][like]","in":"query","required":false,"description":"Filter skillLevelId (like)","schema":{"type":"string"}},{"name":"filter[minimumSeniorityId]","in":"query","required":false,"description":"Filter minimumSeniorityId (equality)","schema":{"type":"string"}},{"name":"filter[minimumSeniorityId][ne]","in":"query","required":false,"description":"Filter minimumSeniorityId (ne)","schema":{"type":"string"}},{"name":"filter[minimumSeniorityId][gt]","in":"query","required":false,"description":"Filter minimumSeniorityId (gt)","schema":{"type":"string"}},{"name":"filter[minimumSeniorityId][gte]","in":"query","required":false,"description":"Filter minimumSeniorityId (gte)","schema":{"type":"string"}},{"name":"filter[minimumSeniorityId][lt]","in":"query","required":false,"description":"Filter minimumSeniorityId (lt)","schema":{"type":"string"}},{"name":"filter[minimumSeniorityId][lte]","in":"query","required":false,"description":"Filter minimumSeniorityId (lte)","schema":{"type":"string"}},{"name":"filter[minimumSeniorityId][in]","in":"query","required":false,"description":"Filter minimumSeniorityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[minimumSeniorityId][notIn]","in":"query","required":false,"description":"Filter minimumSeniorityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[minimumSeniorityId][between]","in":"query","required":false,"description":"Filter minimumSeniorityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[minimumSeniorityId][like]","in":"query","required":false,"description":"Filter minimumSeniorityId (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","positionId","-positionId","skillId","-skillId","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","positionId","skillId","skillLevelId","minimumSeniorityId","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/positionSkillRequirementsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List position skill requirements","description":"Lists position skill requirements in every status. Filter on positionId to read one position's needs. SBO contexts and external identifiers are on GET people/position-skill-requirements/:id and POST people/position-skill-requirements/search.","tags":["hrPositionSkillRequirements"]},"post":{"operationId":"createPositionSkillRequirement","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPositionSkillRequirementOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: POSITION_NOT_FOUND, SKILL_NOT_FOUND, SKILL_LEVEL_NOT_FOUND, SENIORITY_NOT_FOUND, SBO_CONTEXT_NOT_FOUND, DUPLICATE_REQUIREMENT, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPositionSkillRequirementInput"}}}},"summary":"Create a position skill requirement","description":"Creates a requirement: the position needs the skill at the level, optionally from a minimum seniority and only in some SBO contexts. A position can have one active requirement per skill; a second fails with DUPLICATE_REQUIREMENT and names the existing one. The response contains only the new id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPositionSkillRequirements"]}},"/people/employee-skill-assignments":{"get":{"operationId":"employeeSkillAssignments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[employeeId]","in":"query","required":false,"description":"Filter employeeId (equality)","schema":{"type":"string"}},{"name":"filter[employeeId][ne]","in":"query","required":false,"description":"Filter employeeId (ne)","schema":{"type":"string"}},{"name":"filter[employeeId][gt]","in":"query","required":false,"description":"Filter employeeId (gt)","schema":{"type":"string"}},{"name":"filter[employeeId][gte]","in":"query","required":false,"description":"Filter employeeId (gte)","schema":{"type":"string"}},{"name":"filter[employeeId][lt]","in":"query","required":false,"description":"Filter employeeId (lt)","schema":{"type":"string"}},{"name":"filter[employeeId][lte]","in":"query","required":false,"description":"Filter employeeId (lte)","schema":{"type":"string"}},{"name":"filter[employeeId][in]","in":"query","required":false,"description":"Filter employeeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][notIn]","in":"query","required":false,"description":"Filter employeeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][between]","in":"query","required":false,"description":"Filter employeeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId][like]","in":"query","required":false,"description":"Filter employeeId (like)","schema":{"type":"string"}},{"name":"filter[skillId]","in":"query","required":false,"description":"Filter skillId (equality)","schema":{"type":"string"}},{"name":"filter[skillId][ne]","in":"query","required":false,"description":"Filter skillId (ne)","schema":{"type":"string"}},{"name":"filter[skillId][gt]","in":"query","required":false,"description":"Filter skillId (gt)","schema":{"type":"string"}},{"name":"filter[skillId][gte]","in":"query","required":false,"description":"Filter skillId (gte)","schema":{"type":"string"}},{"name":"filter[skillId][lt]","in":"query","required":false,"description":"Filter skillId (lt)","schema":{"type":"string"}},{"name":"filter[skillId][lte]","in":"query","required":false,"description":"Filter skillId (lte)","schema":{"type":"string"}},{"name":"filter[skillId][in]","in":"query","required":false,"description":"Filter skillId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillId][notIn]","in":"query","required":false,"description":"Filter skillId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillId][between]","in":"query","required":false,"description":"Filter skillId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[skillId][like]","in":"query","required":false,"description":"Filter skillId (like)","schema":{"type":"string"}},{"name":"filter[skillLevelId]","in":"query","required":false,"description":"Filter skillLevelId (equality)","schema":{"type":"string"}},{"name":"filter[skillLevelId][ne]","in":"query","required":false,"description":"Filter skillLevelId (ne)","schema":{"type":"string"}},{"name":"filter[skillLevelId][gt]","in":"query","required":false,"description":"Filter skillLevelId (gt)","schema":{"type":"string"}},{"name":"filter[skillLevelId][gte]","in":"query","required":false,"description":"Filter skillLevelId (gte)","schema":{"type":"string"}},{"name":"filter[skillLevelId][lt]","in":"query","required":false,"description":"Filter skillLevelId (lt)","schema":{"type":"string"}},{"name":"filter[skillLevelId][lte]","in":"query","required":false,"description":"Filter skillLevelId (lte)","schema":{"type":"string"}},{"name":"filter[skillLevelId][in]","in":"query","required":false,"description":"Filter skillLevelId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillLevelId][notIn]","in":"query","required":false,"description":"Filter skillLevelId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillLevelId][between]","in":"query","required":false,"description":"Filter skillLevelId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[skillLevelId][like]","in":"query","required":false,"description":"Filter skillLevelId (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[recordStatus]","in":"query","required":false,"description":"Filter recordStatus (equality)","schema":{"type":"string"}},{"name":"filter[recordStatus][ne]","in":"query","required":false,"description":"Filter recordStatus (ne)","schema":{"type":"string"}},{"name":"filter[recordStatus][gt]","in":"query","required":false,"description":"Filter recordStatus (gt)","schema":{"type":"string"}},{"name":"filter[recordStatus][gte]","in":"query","required":false,"description":"Filter recordStatus (gte)","schema":{"type":"string"}},{"name":"filter[recordStatus][lt]","in":"query","required":false,"description":"Filter recordStatus (lt)","schema":{"type":"string"}},{"name":"filter[recordStatus][lte]","in":"query","required":false,"description":"Filter recordStatus (lte)","schema":{"type":"string"}},{"name":"filter[recordStatus][in]","in":"query","required":false,"description":"Filter recordStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recordStatus][notIn]","in":"query","required":false,"description":"Filter recordStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recordStatus][between]","in":"query","required":false,"description":"Filter recordStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[recordStatus][like]","in":"query","required":false,"description":"Filter recordStatus (like)","schema":{"type":"string"}},{"name":"filter[aiGenerated]","in":"query","required":false,"description":"Filter aiGenerated (equality)","schema":{"type":"boolean"}},{"name":"filter[aiGenerated][ne]","in":"query","required":false,"description":"Filter aiGenerated (ne)","schema":{"type":"boolean"}},{"name":"filter[aiGenerated][gt]","in":"query","required":false,"description":"Filter aiGenerated (gt)","schema":{"type":"boolean"}},{"name":"filter[aiGenerated][gte]","in":"query","required":false,"description":"Filter aiGenerated (gte)","schema":{"type":"boolean"}},{"name":"filter[aiGenerated][lt]","in":"query","required":false,"description":"Filter aiGenerated (lt)","schema":{"type":"boolean"}},{"name":"filter[aiGenerated][lte]","in":"query","required":false,"description":"Filter aiGenerated (lte)","schema":{"type":"boolean"}},{"name":"filter[aiGenerated][in]","in":"query","required":false,"description":"Filter aiGenerated (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[aiGenerated][notIn]","in":"query","required":false,"description":"Filter aiGenerated (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[aiGenerated][between]","in":"query","required":false,"description":"Filter aiGenerated (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","employeeId","-employeeId","skillId","-skillId","approvalStatus","-approvalStatus","recordStatus","-recordStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","employeeId","skillId","skillLevelId","approvalStatus","recordStatus","aiGenerated","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/employeeSkillAssignmentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List employee skill assignments","description":"Lists employee skill assignments in every status. For the skills employees hold today, filter on approvalStatus=Approved and recordStatus=Active. Filter on employeeId to read one employee's skills. For an incremental sync, filter on lastModifiedDate with gte and sort by it.","tags":["hrEmployeeSkillAssignments"]},"post":{"operationId":"createEmployeeSkillAssignment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createEmployeeSkillAssignmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: EMPLOYEE_NOT_FOUND, SKILL_NOT_FOUND, SKILL_LEVEL_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createEmployeeSkillAssignmentInput"}}}},"summary":"Create an employee skill assignment","description":"Assigns a skill at a level to an employee. An 'Approved' assignment becomes the employee's current one for the skill (recordStatus 'Active'), and the employee's previous approved assignment of that skill becomes 'Inactive'. A 'Pending' or 'Rejected' assignment is stored with recordStatus 'Inactive' until it is approved. The response contains only the new id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrEmployeeSkillAssignments"]}},"/people/sbo-contexts/{id}":{"get":{"operationId":"getSboContext","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSboContextOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the SBO context."}],"summary":"Get an SBO context","description":"Returns one SBO context by id.","tags":["hrSboContexts"]}},"/people/sbo-context-values/{id}":{"get":{"operationId":"getSboContextValue","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSboContextValueOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the SBO context value."}],"summary":"Get an SBO context value","description":"Returns one SBO context value by id, with its external identifiers.","tags":["hrSboContextValues"]},"delete":{"operationId":"deleteSboContextValue","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteSboContextValueOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, CONTEXT_VALUE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the SBO context value."}],"summary":"Delete an SBO context value","description":"Deletes an SBO context value and its links. It fails with CONTEXT_VALUE_IN_USE while a position skill requirement or team staffing requirement uses one of the links. Deleting is permanent.","tags":["hrSboContextValues"]},"patch":{"operationId":"updateSboContextValue","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSboContextValueOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, CONTEXT_VALUE_NAME_TAKEN, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the SBO context value."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSboContextValueInput"}}}},"summary":"Update an SBO context value","description":"Changes an SBO context value. Send only the fields you want to change. Add, change and remove external identifiers with createExternalIdentifiers, updateExternalIdentifiers and deleteExternalIdentifiers.","tags":["hrSboContextValues"]}},"/inventory/shipment-carriers/{id}":{"patch":{"operationId":"updateShipmentCarrier","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateShipmentCarrierOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"clearTheVendorLink":{"value":{"data":{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"}},"summary":"Unlink a carrier from its vendor — the one case where null is meaningful"},"retireACarrier":{"value":{"data":{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"}},"summary":"Stop a carrier being selectable without deleting it or touching its shipments"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, VENDOR_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment carrier you want to update.","examples":{"clearTheVendorLink":{"value":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"},"retireACarrier":{"value":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateShipmentCarrierInput"},"examples":{"clearTheVendorLink":{"value":{"vendorId":null},"summary":"Unlink a carrier from its vendor — the one case where null is meaningful"},"retireACarrier":{"value":{"active":false},"summary":"Stop a carrier being selectable without deleting it or touching its shipments"}}}}},"summary":"Update a shipment carrier","description":"Updates a shipment carrier with the fields you send. A field you leave out keeps its current value. To unlink the vendor, send vendorId as null.\n\nChanges a shipment carrier's name, whether it is active, or the vendor it bills through.\n\nSet active to false to mark a carrier as retired when DELETE inventory/shipment-carriers/:id can't delete it because shipments still reference it. A shipment can still name an inactive carrier.\n\nThe response contains only the id. To read the updated record, use GET inventory/shipment-carriers/:id.","tags":["inventoryShipmentCarriers"]},"delete":{"operationId":"deleteShipmentCarrier","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteShipmentCarrierOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714","name":"In-house fleet"}},"summary":"Removing a carrier no shipment has used"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SHIPMENT_CARRIER_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"shipmentCount":{"type":"number"}},"additionalProperties":false,"required":["id","shipmentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"shipmentCount":{"type":"number"}},"additionalProperties":false,"required":["id","shipmentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"shipmentCount":{"type":"number"}},"additionalProperties":false,"required":["id","shipmentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment carrier you want to delete.","examples":{"basic":{"value":"b81f4c60-27da-4e15-9f33-6c0a5d82e714"}}}],"summary":"Delete a shipment carrier","description":"Deletes a shipment carrier. The response gives the name the carrier had.\n\nA carrier that outbound shipments still reference can't be deleted. To retire the carrier instead, set active to false with PATCH inventory/shipment-carriers/:id.\n\nTo delete several carriers at once, use POST inventory/shipment-carriers/bulk-delete.","tags":["inventoryShipmentCarriers"]},"get":{"operationId":"getShipmentCarrier","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getShipmentCarrierOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"linkedToAVendor":{"value":{"data":{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332","name":"DHL Express","active":true,"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47","vendorName":"DHL International GmbH","lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A carrier that bills through a vendor record"},"withNoVendorLink":{"value":{"data":{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714","name":"In-house fleet","active":true,"lastModifiedDate":"2026-05-12T09:31:00.000Z"}},"summary":"A carrier with no vendor link omits vendorName entirely"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment carrier you want to retrieve.","examples":{"linkedToAVendor":{"value":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"},"withNoVendorLink":{"value":"b81f4c60-27da-4e15-9f33-6c0a5d82e714"}}}],"summary":"Retrieve a shipment carrier","description":"Retrieves a shipment carrier. The response gives the carrier's name, whether it is active, and the vendor it bills through.\n\nGET inventory/shipment-carriers and POST inventory/shipment-carriers/search return the same fields.","tags":["inventoryShipmentCarriers"]}},"/inventory/landed-costs":{"get":{"operationId":"landedCosts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentStatus","-documentStatus","documentDate","-documentDate","entityId","-entityId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","entityId","entityName","notes","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/landedCostsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","notes":"Sea freight on the August container","active":true,"createdDate":"2026-08-18T09:02:11.004Z","lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"a4f92c05-7b31-4e68-9d02-5c17e83b6a49","documentNumber":"LC-1006","documentStatus":"COMMITTED","documentDate":"2026-07-31","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","active":true,"createdDate":"2026-07-31T16:40:02.771Z","lastModifiedDate":"2026-07-31T16:58:47.220Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List landed costs","description":"Lists landed costs, with their main fields only. For their receipts, charges, and allocation, use POST inventory/landed-costs/search or GET inventory/landed-costs/:id. To find the landed costs for a receipt, a vendor bill, or an item, use POST inventory/landed-costs/search.","tags":["inventoryLandedCosts"]},"post":{"operationId":"createLandedCost","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createLandedCostOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"freightOnOneReceipt":{"value":{"data":{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","allocationLineCount":1}},"summary":"£240 of freight on one receipt, allocated by 'Quantity'."},"someLinesOnly":{"value":{"data":{"id":"a4f92c05-7b31-4e68-9d02-5c17e83b6a49","documentNumber":"LC-1008","documentStatus":"DRAFT","allocationLineCount":1}},"summary":"A charge on only the selected line of a receipt."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_RECEIPTS, NO_CHARGES, RECEIPT_NOT_COMMITTED, VENDOR_BILL_NOT_APPROVED, ENTITY_MISMATCH, CHARGE_NOT_LANDED_COST_ITEM, INVALID_AMOUNT, UNKNOWN_ALLOCATION_MODE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["receiptNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["billNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["receiptNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["billNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["receiptNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["billNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createLandedCostInput"},"examples":{"freightOnOneReceipt":{"value":{"entityId":"7039b992-696a-40c7-a181-51759304ef83","receipts":[{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}],"charges":[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"Quantity","amount":"240"}]},"summary":"£240 of freight on one receipt, allocated by 'Quantity'."},"someLinesOnly":{"value":{"entityId":"7039b992-696a-40c7-a181-51759304ef83","receipts":[{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","selectedLineIds":["2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4"]}],"charges":[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"Equal","amount":"120"}]},"summary":"A charge on only the selected line of a receipt."}}}}},"summary":"Create a landed cost","description":"Creates a landed cost as a draft and calculates its allocation. To find the vendor bill lines you can send as charges, use GET inventory/landed-costs/vendor-bill-lines.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCosts"]}},"/people/position-skill-requirements/{id}":{"get":{"operationId":"getPositionSkillRequirement","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPositionSkillRequirementOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the requirement."}],"summary":"Get a position skill requirement","description":"Returns one position skill requirement by id.","tags":["hrPositionSkillRequirements"]},"delete":{"operationId":"deletePositionSkillRequirement","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePositionSkillRequirementOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the requirement."}],"summary":"Delete a position skill requirement","description":"Deletes a requirement and its external identifiers. The delete is permanent.","tags":["hrPositionSkillRequirements"]},"patch":{"operationId":"updatePositionSkillRequirement","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePositionSkillRequirementOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, POSITION_NOT_FOUND, SKILL_NOT_FOUND, SKILL_LEVEL_NOT_FOUND, SENIORITY_NOT_FOUND, SBO_CONTEXT_NOT_FOUND, DUPLICATE_REQUIREMENT, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the requirement."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePositionSkillRequirementInput"}}}},"summary":"Update a position skill requirement","description":"Changes a requirement. Send only the fields you want to change; a field you leave out keeps its value. Send minimumSeniorityId or sboContextIds as null to clear them. sboContextIds replaces the full set.","tags":["hrPositionSkillRequirements"]}},"/inventory/batch-numbers/{id}":{"get":{"operationId":"getBatchNumber","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBatchNumberOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"onHand":{"value":{"data":{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchNumber":"LOT-2026-0448","manufacturerBatchNumber":"MFG-8842-C","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","quantity":"400","inStock":"260","cost":"12.5","originalCost":"12","currency":"GBP","expirationDate":"2027-03-31","batchStatus":"ACTIVE","temperatureBreach":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"A batch that received 400 units and still has 260 in stock."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the batch number you want to retrieve. Format: UUID.","examples":{"onHand":{"value":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19"}}}],"summary":"Retrieve a batch number","description":"Retrieves a batch number, with its costs.","tags":["inventoryBatchNumbers"]},"patch":{"operationId":"updateBatchNumber","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBatchNumberOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"coldChain":{"value":{"data":{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchStatus":"QUARANTINED"}},"summary":"Record a temperature breach and quarantine the batch."},"correctExpiry":{"value":{"data":{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchStatus":"ACTIVE"}},"summary":"Correct the expiry date to match the supplier's certificate."},"quarantine":{"value":{"data":{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchStatus":"QUARANTINED"}},"summary":"Quarantine a batch until a lab result arrives. The batch's stock and cost do not change."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNKNOWN_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the batch number you want to update. Format: UUID.","examples":{"coldChain":{"value":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19"},"correctExpiry":{"value":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19"},"quarantine":{"value":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBatchNumberInput"},"examples":{"coldChain":{"value":{"temperatureBreach":true,"batchStatus":"QUARANTINED"},"summary":"Record a temperature breach and quarantine the batch."},"correctExpiry":{"value":{"expirationDate":"2027-06-30"},"summary":"Correct the expiry date to match the supplier's certificate."},"quarantine":{"value":{"batchStatus":"QUARANTINED","qcStatus":"Awaiting lab result"},"summary":"Quarantine a batch until a lab result arrives. The batch's stock and cost do not change."}}}}},"summary":"Update a batch number","description":"Updates a batch number with the fields you send. A field you leave out keeps its current value. You cannot remove a field's value, because null is not accepted.\n\nThe `manufactureDate` and `bestBeforeDate` cannot be after the `expirationDate`.\n\nThe response contains the batch's `id` and its `batchStatus` after the update.","tags":["inventoryBatchNumbers"]}},"/inventory/sales-returns/{id}":{"get":{"operationId":"getSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDraftReturn":{"value":{"data":{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}},"summary":"A return raised from a customer's RMA, not yet approved"},"afterInspection":{"value":{"data":{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"INSPECTED","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-19T15:10:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"0.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit","inspectedQuantity":"6.00","approvedQuantity":"2.00","rejectedQuantity":"4.00","inspectedDate":"2026-08-19","qualityGrade":"C","rejectionReason":"Water ingress","inspectionDetails":[{"approvalStatus":"APPROVED","inspectedQuantity":"2.00","condition":"GOOD","disposition":"RETURN_TO_STOCK"},{"approvalStatus":"REJECTED","inspectedQuantity":"4.00","condition":"DAMAGED","disposition":"SCRAP","rejectionReason":"Water ingress"}]}]}},"summary":"The same return once inspected: two units back to stock, four scrapped"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales return you want to retrieve.","examples":{"aDraftReturn":{"value":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"},"afterInspection":{"value":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"}}}],"summary":"Retrieve a sales return","description":"Retrieves a sales return. Use the sales return's id, not its documentNumber.\n\nThe return comes back with all of its lines, including their batches, serials, bins, and inspection details. POST inventory/sales-returns/search returns the same fields, and GET inventory/sales-returns returns each return without its lines.\n\nA return in 'DRAFT' status can be updated, committed, or deleted. After the commit, its status is 'RECEIVED'.","tags":["inventorySalesReturns"]},"patch":{"operationId":"updateSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"correctTheTrackingNumber":{"value":{"data":{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD7654321","currency":"EUR","totalAmount":"96.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T09:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"4.00","inventoryQuantity":"4.00","openQuantity":"4.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}},"summary":"The customer sent a corrected tracking number and is returning two fewer units"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales return you want to update.","examples":{"correctTheTrackingNumber":{"value":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSalesReturnInput"},"examples":{"correctTheTrackingNumber":{"value":{"trackingNumber":"3SABCD7654321","updateLines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"4.00"}]},"summary":"The customer sent a corrected tracking number and is returning two fewer units"}}}}},"summary":"Update a sales return","description":"Updates a sales return with the fields you send. A field you leave out keeps its current value.\n\nUse the sales return's id, not its documentNumber.\n\nLines change through three separate arrays: deleteLines, updateLines, and createLines. You can send any combination in one request. Leave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value.\n\nOn an updateLines item, sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin entry the line should keep. Leave all three out to keep the line's tracking as it is.\n\nYou can change a draft return's main fields and its lines. A return that is not a draft can't be changed.\n\nA line id from another return is refused, not skipped.\n\nThe response is the updated return with its lines, in the same shape as GET inventory/sales-returns/:id.","tags":["inventorySalesReturns"]},"delete":{"operationId":"deleteSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"discardADraft":{"value":{"data":{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"}},"summary":"A return raised against the wrong customer"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the sales return you want to delete.","examples":{"discardADraft":{"value":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"}}}],"summary":"Delete a sales return","description":"Deletes a draft sales return. The return's lines and their tracking and inspection details are deleted with it. A return that is not a draft can't be deleted.\n\nThe response is the id of the deleted return.","tags":["inventorySalesReturns"]}},"/people/skill-categories/{id}/reactivate":{"post":{"operationId":"reactivateSkillCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reactivateSkillCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_DEPRECATED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the skill category."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reactivateSkillCategoryInput"}}}},"summary":"Reactivate a skill category","description":"Sets a deprecated skill category back to Active. Its external identifiers are kept. Fails with NOT_DEPRECATED when it is not deprecated.","tags":["hrSkillCategories"]}},"/inventory/purchase-returns/bulk-delete":{"post":{"operationId":"bulkDeletePurchaseReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeletePurchaseReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeletePurchaseReturnsInput"}}}},"summary":"Bulk delete purchase returns","description":"Deletes multiple purchase returns in one request, with their lines. Only purchase returns with the `documentStatus` 'DRAFT' can be deleted. If one purchase return cannot be deleted, the request fails and no purchase returns are deleted.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryPurchaseReturns"]}},"/people/skill-categories/{id}":{"delete":{"operationId":"deleteSkillCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteSkillCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, CATEGORY_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the skill category."}],"summary":"Delete a skill category","description":"Deprecates a skill category. It stays readable with status 'Deprecated' and can be reactivated. The request fails with CATEGORY_IN_USE while something active uses it. Deleting a deprecated record succeeds and changes nothing.","tags":["hrSkillCategories"]},"get":{"operationId":"getSkillCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSkillCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the skill category."}],"summary":"Get a skill category","description":"Returns one skill category by id, in any status, deprecated included.","tags":["hrSkillCategories"]},"patch":{"operationId":"updateSkillCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSkillCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, CATEGORY_NAME_TAKEN, NAME_BELONGS_TO_DEPRECATED, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the skill category."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSkillCategoryInput"}}}},"summary":"Update a skill category","description":"Changes a skill category. Send only the fields you want to change. Add, change and remove external identifiers with createExternalIdentifiers, updateExternalIdentifiers and deleteExternalIdentifiers.","tags":["hrSkillCategories"]}},"/inventory/unit-of-measures/{id}":{"delete":{"operationId":"deleteUnitOfMeasure","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteUnitOfMeasureOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"KG"}},"summary":"An unreferenced unit"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNIT_OF_MEASURE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"unitOfMeasureGroupLineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","unitOfMeasureGroupLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"unitOfMeasureGroupLineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","unitOfMeasureGroupLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"unitOfMeasureGroupLineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","unitOfMeasureGroupLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure you want to delete.","examples":{"basic":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"summary":"Delete a unit of measure","description":"Deletes a unit of measure. The response gives the code the unit of measure had.\n\nA unit of measure that items or unit of measure group lines still reference can't be deleted. Remove those references first.\n\nTo delete several at once, use POST inventory/unit-of-measures/bulk-delete.","tags":["inventoryUnitOfMeasures"]},"patch":{"operationId":"updateUnitOfMeasure","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateUnitOfMeasureOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"renameOnly":{"value":{"data":{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}},"summary":"Change the display name and leave the code untouched"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_UNIT_CODE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure you want to update.","examples":{"renameOnly":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateUnitOfMeasureInput"},"examples":{"renameOnly":{"value":{"unitName":"Kilograms"},"summary":"Change the display name and leave the code untouched"}}}}},"summary":"Update a unit of measure","description":"Updates a unit of measure with the fields you send. A field you leave out keeps its current value.\n\nUse the unit of measure's id, not its unitCode.\n\nChanges a unit of measure's code, its display name, or both.\n\nThe response contains only the id. To read the updated record, use GET inventory/unit-of-measures/:id.","tags":["inventoryUnitOfMeasures"]},"get":{"operationId":"getUnitOfMeasure","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getUnitOfMeasureOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"KG","unitName":"Kilogram","lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A weight unit from the standard set"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure you want to retrieve.","examples":{"basic":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"summary":"Retrieve a unit of measure","description":"Retrieves a unit of measure. Use the unit of measure's id, not its unitCode.\n\nThe response gives the unit of measure's code and display name.\n\nGET inventory/unit-of-measures and POST inventory/unit-of-measures/search return the same fields. To look up a unit of measure by its code, filter GET inventory/unit-of-measures on unitCode.","tags":["inventoryUnitOfMeasures"]}},"/inventory/shipments/{id}":{"delete":{"operationId":"deleteShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"discardADraft":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}},"summary":"A return raised against the wrong customer"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment you want to delete.","examples":{"discardADraft":{"value":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}}}],"summary":"Delete a shipment","description":"Deletes a shipment. Only a shipment in 'DRAFT' status can be deleted, before any stock has left or any journal entry has recorded the cost of sale. A 'PACKED' shipment can't be deleted either. No endpoint cancels a shipment once it has been shipped or delivered.","tags":["inventoryShipments"]},"patch":{"operationId":"updateShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"correctTheTrackingNumber":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD7654321","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"864.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T09:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"36.00","inventoryQuantity":"36.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}},"summary":"The carrier issued a new tracking number and four units were short-picked"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, SOURCE_LINE_NOT_PROJECTED, INVALID_QUANTITY, MIXED_LOCATIONS, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment you want to update.","examples":{"correctTheTrackingNumber":{"value":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateShipmentInput"},"examples":{"correctTheTrackingNumber":{"value":{"trackingNumber":"3SABCD7654321","updateLines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"36.00"}]},"summary":"The carrier issued a new tracking number and four units were short-picked"}}}}},"summary":"Update a shipment","description":"Updates a shipment with the fields you send. A field you leave out keeps its current value.\n\nUse the shipment's id, not its documentNumber.\n\nLines change through three separate arrays, applied in this order: updateLines, createLines, deleteLines. Leave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value.\n\nOn an updateLines item, sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin detail the line should keep. Leave all three out, or send them empty, to keep the line's tracking as it is.\n\nChanges a shipment in 'DRAFT' status, including its lines. A shipment in any other status, 'PACKED' included, can't be changed.\n\nOne request can remove a line and add its replacement. If a line id in deleteLines or updateLines is not on this shipment, the request fails with REFERENCE_NOT_FOUND.\n\nThe response is the updated shipment with its lines.","tags":["inventoryShipments"]},"get":{"operationId":"getShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDraftShipment":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}},"summary":"A shipment prepared against a sales order, not yet sent"},"afterShipping":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"SHIPPED","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-15T07:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}},"summary":"The same shipment once the goods have left — stock is in transit, the cost of sale not yet posted"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment you want to retrieve.","examples":{"aDraftShipment":{"value":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"},"afterShipping":{"value":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}}}],"summary":"Retrieve a shipment","description":"Retrieves a shipment. Use the shipment's id, not its documentNumber.\n\nThe response includes all of the shipment's lines. POST inventory/shipments/search returns the same fields. The collection GET inventory/shipments returns the shipment's main fields only, without the lines.","tags":["inventoryShipments"]}},"/inventory/bins/bulk-delete":{"post":{"operationId":"bulkDeleteBins","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteBinsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["detailRows","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["detailRows","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["detailRows","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteBinsInput"}}}},"summary":"Bulk delete bins","description":"Deletes multiple bins in one request. Only empty bins can be deleted. The response lists the deleted bins' ids in the order you sent them.\n\nIf any id matches no bin, or any bin still has stock, none are deleted. To close a bin that still has stock, set active to false with PATCH inventory/bins/:id.\n\nTo delete a single bin, use DELETE inventory/bins/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryBins"]}},"/inventory/receipts/{id}":{"delete":{"operationId":"deleteReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"discardADraft":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}},"summary":"A draft raised against the wrong vendor"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the receipt you want to delete.","examples":{"discardADraft":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}}}],"summary":"Delete a receipt","description":"Deletes a receipt. The receipt's lines and their batch, serial, and bin detail are deleted with it.\n\nOnly a receipt in draft status can be deleted. A committed receipt has already brought the stock in and created the journal entry for the accrual, and no endpoint cancels it.","tags":["inventoryReceipts"]},"patch":{"operationId":"updateReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"correctTheReferenceAndTrackingNumber":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77121","trackingNumber":"1Z999AA10123456784","currency":"EUR","totalAmount":"712.20","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:45:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"196.00","inventoryQuantity":"196.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"627.20","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}},"summary":"The vendor's delivery note number was corrected, the carrier's tracking number arrived after the goods, and the count came up short"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, LINE_TOTAL_MISMATCH, INCOMPLETE_LINE, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, LOCATION_ENTITY_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the receipt you want to update.","examples":{"correctTheReferenceAndTrackingNumber":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateReceiptInput"},"examples":{"correctTheReferenceAndTrackingNumber":{"value":{"referenceNumber":"DN-77121","trackingNumber":"1Z999AA10123456784","updateLines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"196.00"}]},"summary":"The vendor's delivery note number was corrected, the carrier's tracking number arrived after the goods, and the count came up short"}}}}},"summary":"Update a receipt","description":"Updates a receipt with the fields you send. A field you leave out keeps its current value.\n\nUse the receipt's id, not its documentNumber.\n\nLines change through three separate arrays. updateLines and createLines are applied first, then deleteLines. Leave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value.\n\nOn an updateLines item, sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin detail the line should keep. Leave all three out to keep the line's tracking as it is.\n\nChanges a draft receipt's details and its lines. A receipt in any other status can't be changed.\n\nOne request can remove a line and add its replacement. If a line id in deleteLines or updateLines is not on this receipt, the request fails with REFERENCE_NOT_FOUND.\n\nEvery line's warehouse must belong to the receipt's legal entity, including a line moved to another warehouse. Otherwise the request fails with LOCATION_ENTITY_MISMATCH.\n\nThe response is the updated receipt, with the same fields GET inventory/receipts/:id returns.","tags":["inventoryReceipts"]},"get":{"operationId":"getReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDraftReceipt":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}},"summary":"A receipt prepared against a sales order, not yet sent"},"afterCommitting":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"COMMITTED","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T10:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}},"summary":"The same receipt once posted — the stock is in and the accrual raised"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the receipt you want to retrieve.","examples":{"aDraftReceipt":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"},"afterCommitting":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}}}],"summary":"Retrieve a receipt","description":"Retrieves a receipt. Use the receipt's id, not its documentNumber.\n\nThe response includes all of the receipt's lines and their batch, serial, and bin detail. POST inventory/receipts/search returns the same fields. The collection GET inventory/receipts returns the receipt's main fields only, with lineCount instead of the lines.\n\nRead lineType before reading a line. An Inventory line has an item, a warehouse, and a quantity. A Service or Expense line has serviceDescription, an amount, and an expense account instead, and no item or warehouse.","tags":["inventoryReceipts"]}},"/inventory/unit-of-measures/bulk":{"post":{"operationId":"bulkCreateUnitOfMeasures","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateUnitOfMeasuresOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"created":[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]}},"summary":"Two weight units created together, echoed in input order"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_UNIT_CODE, DUPLICATE_UNIT_CODE_IN_REQUEST","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["unitCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["unitCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["unitCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateUnitOfMeasuresInput"},"examples":{"basic":{"value":{"unitOfMeasures":[{"unitCode":"KG","unitName":"Kilogram"},{"unitCode":"G","unitName":"Gram"}]},"summary":"Two weight units created together, echoed in input order"}}}}},"summary":"Bulk create units of measure","description":"Creates multiple units of measure in one request. Each unit of measure in the request takes the same fields as the body of POST inventory/unit-of-measures.\n\nIf any unit of measure can't be created, none are, and the error gives its position in the request.\n\nThe response lists the created units of measure in the order you sent them, each with only its id. To create a single unit of measure, use POST inventory/unit-of-measures.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasures"]}},"/inventory/warehouse-transfers/{id}":{"get":{"operationId":"getWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"anIntercompanyMove":{"value":{"data":{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","documentNumber":"WTR-2292","documentStatus":"COMMITTED","documentDate":"2026-08-18","transferType":"INTERCOMPANY","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","locationCode":"WH-CENTRAL","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","targetLocationCode":"WH-NORTH","currency":"EUR","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"7d2b48e1-95c3-4a06-8f17-3e5a9c06b2d4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","unitCode":"EA","quantity":"24","inventoryQuantity":"24","transferCost":"20","unitTransferValue":"22","totalTransferValue":"528"}],"toEntityId":"3d81b5f0-9c24-4e67-a015-7b2e8d3c9014","toEntityName":"Acme GmbH","billingStatus":"BILLED","intercompanyBillId":"884213","contractualCurrency":"EUR","sourceAmount":"480","destinationCurrency":"EUR","destinationAmount":"528"}},"summary":"A transfer that sells the goods to another entity, committed and billed"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer you want to retrieve.","examples":{"anIntercompanyMove":{"value":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279"}}}],"summary":"Retrieve a warehouse transfer","description":"Retrieves a warehouse transfer, with its lines. Each line includes its batch, serial and bin details. The collection GET inventory/warehouse-transfers returns the same fields without the lines.\n\nA draft has no costs yet. transferCost and the batch and serial unitCost are set when the transfer is committed, and so are sourceAmount and destinationAmount. On a normal transfer each amount is the value its side's stock transactions moved: sourceAmount what left the source warehouse, destinationAmount what entered the destination.","tags":["inventoryWarehouseTransfers"]},"delete":{"operationId":"deleteWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"abandonADraft":{"value":{"data":{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"}},"summary":"A draft raised in error"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer you want to delete.","examples":{"abandonADraft":{"value":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"}}}],"summary":"Delete a warehouse transfer","description":"Deletes a draft warehouse transfer. The transfer's lines are deleted with it. A committed transfer can't be deleted, and no endpoint cancels one.\n\nThe response is the id of the deleted transfer.","tags":["inventoryWarehouseTransfers"]},"patch":{"operationId":"updateWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"replaceALine":{"value":{"data":{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentStatus":"DRAFT","lineCount":1,"lastModifiedDate":"2026-08-18T11:20:04.219Z","warnings":[]}},"summary":"Retiring a line and adding its replacement in one call"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, INTERCOMPANY_CONFIG_MISSING, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer you want to update.","examples":{"replaceALine":{"value":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateWarehouseTransferInput"},"examples":{"replaceALine":{"value":{"deleteLines":["7d2b48e1-95c3-4a06-8f17-3e5a9c06b2d4"],"createLines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"30"}]},"summary":"Retiring a line and adding its replacement in one call"}}}}},"summary":"Update a warehouse transfer","description":"Updates a draft warehouse transfer with the fields you send. A field you leave out keeps its current value. transferType can't be changed.\n\nLines change through three separate arrays, all applied in one transaction, in this order: updateLines, createLines, deleteLines. Leave out all three to keep the lines as they are. One request can remove a line and add its replacement.\n\nupdateLines and deleteLines take the line ids returned by GET inventory/warehouse-transfers/:id, and a line id from another transfer is refused. createLines also needs locationId and targetLocationId in the same request.\n\nOn an updateLines item, a field you leave out keeps its current value. Sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin location the line should keep. Leave out batches, serials, and binLocations to keep the line's tracking as it is.\n\nA changed header locationId or targetLocationId moves every line that the request does not place in another warehouse, including lines you leave out of updateLines. A moved line loses its serials, batches, and bin locations, because they were picked in the warehouse it left, unless the same request sends new ones for it. The response then has a warning in warnings for each line whose tracking was cleared.\n\nThe response has the same fields as GET inventory/warehouse-transfers/:id, plus warnings.","tags":["inventoryWarehouseTransfers"]}},"/inventory/purchase-returns/search":{"post":{"operationId":"searchPurchaseReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPurchaseReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPurchaseReturnsInput"}}}},"summary":"Search purchase returns","description":"Searches purchase returns, with their lines and applications.","tags":["inventoryPurchaseReturns"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/position-seniorities/search":{"post":{"operationId":"searchPositionSeniorities","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPositionSenioritiesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPositionSenioritiesInput"}}}},"summary":"Search position seniorities","description":"Searches position seniority records in every status. A record must match every filter you send. To find the record another system knows, filter on externalIdentifier; several records can share one value, so check how many come back. Results are ordered by creation, oldest first.","tags":["hrPositionSeniorities"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/warehouse-transfer-orders/{id}":{"patch":{"operationId":"updateTransferOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateTransferOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"resolveTheSource":{"value":{"data":{"id":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6","documentStatus":"DRAFT","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T11:20:04.219Z","lines":[{"id":"9a4e2c76-1b38-4f05-8d92-6c7a3e15b204","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"12","inventoryQuantity":"12","openQuantity":"12","status":"NEEDS_SOURCE"}]}},"summary":"Giving a NEEDS_SOURCE line the warehouse it draws from, so the order can be converted"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, HEADER_SAME_LOCATION, HEADER_ENTITY_MISMATCH, ENTITY_MISMATCH, UNIT_NOT_CONVERTIBLE, WRITE_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["field","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["field","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["field","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer order you want to update.","examples":{"resolveTheSource":{"value":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateTransferOrderInput"},"examples":{"resolveTheSource":{"value":{"updateLines":[{"id":"9a4e2c76-1b38-4f05-8d92-6c7a3e15b204","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}]},"summary":"Giving a NEEDS_SOURCE line the warehouse it draws from, so the order can be converted"}}}}},"summary":"Update a warehouse transfer order","description":"Updates a draft warehouse transfer order with the fields you send. A field you leave out keeps its current value.\n\nOnly an order at 'DRAFT' can be changed. An order at 'IN_TRANSFER' can be changed again only if its draft transfer is deleted before anything on the order has been transferred.\n\nLines change through three separate arrays, applied in this order: deleteLines, updateLines, createLines. Leave out all three to keep the lines as they are. One request can remove a line and add its replacement. On an updateLines item, always send quantity.\n\nupdateLines and deleteLines take the line ids returned by GET inventory/warehouse-transfer-orders/:id, and a line id from another order is refused.\n\nSetting locationId on a 'NEEDS_SOURCE' line does not clear that status. To fix such a line, remove it with deleteLines and add a replacement with a locationId through createLines in the same request.\n\nThe response has the same fields as GET inventory/warehouse-transfer-orders/:id.","tags":["inventoryWarehouseTransferOrders"]},"get":{"operationId":"getTransferOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTransferOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"waitingOnASource":{"value":{"data":{"id":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6","documentNumber":"WTO-1044","documentStatus":"DRAFT","documentDate":"2026-08-18","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T10:02:41.883Z","lines":[{"id":"9a4e2c76-1b38-4f05-8d92-6c7a3e15b204","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"12","status":"NEEDS_SOURCE"}]}},"summary":"An order auto sourcing could not resolve — the line blocks conversion"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer order you want to retrieve.","examples":{"waitingOnASource":{"value":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6"}}}],"summary":"Retrieve a warehouse transfer order","description":"Retrieves a warehouse transfer order, with its lines. Each line includes its source warehouse, status, and open and processed quantities. The fields are the same as on POST inventory/warehouse-transfer-orders/search. The collection GET inventory/warehouse-transfer-orders returns them without the lines.\n\nCheck the lines before converting the order. A line at 'NEEDS_SOURCE', or without a locationId, has no warehouse to draw from, and POST inventory/warehouse-transfer-orders/:id/commit fails while any such line remains.\n\nTo look an order up by documentNumber, use POST inventory/warehouse-transfer-orders/search.","tags":["inventoryWarehouseTransferOrders"]},"delete":{"operationId":"deleteTransferOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteTransferOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"abandonADraft":{"value":{"data":{"id":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6"}},"summary":"A draft raised in error"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer order you want to delete.","examples":{"abandonADraft":{"value":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6"}}}],"summary":"Delete a warehouse transfer order","description":"Deletes a draft warehouse transfer order. The order's lines are deleted with it. Only an order at 'DRAFT' can be deleted, because every other state has a transfer created from the order.\n\nTo delete an order at 'IN_TRANSFER', first delete its draft transfer with DELETE inventory/warehouse-transfers/:id. If nothing on the order has been transferred yet, the order goes back to 'DRAFT' and can then be deleted.\n\nThe response is the id of the deleted order.","tags":["inventoryWarehouseTransferOrders"]}},"/people/position-seniorities":{"post":{"operationId":"createPositionSeniority","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPositionSeniorityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: SENIORITY_NAME_TAKEN, NAME_BELONGS_TO_DEPRECATED, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SENIORITY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SENIORITY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"SENIORITY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPositionSeniorityInput"}}}},"summary":"Create a position seniority","description":"Creates a position seniority. The name is unique across all records, deprecated ones included: if a deprecated record holds the name, the request fails with NAME_BELONGS_TO_DEPRECATED and names that record, so you can reactivate it with POST people/position-seniorities/:id/reactivate.\n\nThe response contains only the new id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPositionSeniorities"]},"get":{"operationId":"positionSeniorities","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[levelOrder]","in":"query","required":false,"description":"Filter levelOrder (equality)","schema":{"type":"number"}},{"name":"filter[levelOrder][ne]","in":"query","required":false,"description":"Filter levelOrder (ne)","schema":{"type":"number"}},{"name":"filter[levelOrder][gt]","in":"query","required":false,"description":"Filter levelOrder (gt)","schema":{"type":"number"}},{"name":"filter[levelOrder][gte]","in":"query","required":false,"description":"Filter levelOrder (gte)","schema":{"type":"number"}},{"name":"filter[levelOrder][lt]","in":"query","required":false,"description":"Filter levelOrder (lt)","schema":{"type":"number"}},{"name":"filter[levelOrder][lte]","in":"query","required":false,"description":"Filter levelOrder (lte)","schema":{"type":"number"}},{"name":"filter[levelOrder][in]","in":"query","required":false,"description":"Filter levelOrder (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[levelOrder][notIn]","in":"query","required":false,"description":"Filter levelOrder (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[levelOrder][between]","in":"query","required":false,"description":"Filter levelOrder (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","levelName","-levelName","levelOrder","-levelOrder","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","levelName","levelOrder","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/positionSenioritiesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List position seniorities","description":"Lists position seniority records in every status. Filter on status to leave out deprecated ones. External identifiers are on GET people/position-seniorities/:id and POST people/position-seniorities/search.","tags":["hrPositionSeniorities"]}},"/people/position-seniorities/{id}":{"patch":{"operationId":"updatePositionSeniority","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePositionSeniorityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SENIORITY_NAME_TAKEN, NAME_BELONGS_TO_DEPRECATED, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position seniority."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePositionSeniorityInput"}}}},"summary":"Update a position seniority","description":"Changes a position seniority. Send only the fields you want to change. Add, change and remove external identifiers with createExternalIdentifiers, updateExternalIdentifiers and deleteExternalIdentifiers.","tags":["hrPositionSeniorities"]},"get":{"operationId":"getPositionSeniority","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPositionSeniorityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position seniority."}],"summary":"Get a position seniority","description":"Returns one position seniority by id, in any status, deprecated included.","tags":["hrPositionSeniorities"]},"delete":{"operationId":"deletePositionSeniority","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePositionSeniorityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SENIORITY_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position seniority."}],"summary":"Delete a position seniority","description":"Deprecates a position seniority. It stays readable with status 'Deprecated' and can be reactivated. The request fails with SENIORITY_IN_USE while something active uses it. Deleting a deprecated record succeeds and changes nothing.","tags":["hrPositionSeniorities"]}},"/people/skills/{id}/reactivate":{"post":{"operationId":"reactivateSkill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reactivateSkillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_DEPRECATED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the skill."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reactivateSkillInput"}}}},"summary":"Reactivate a skill","description":"Sets a deprecated skill back to Active. Its external identifiers and translations are kept. Fails with NOT_DEPRECATED when the skill is not deprecated.","tags":["hrSkills"]}},"/inventory/shipments":{"post":{"operationId":"createShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"fromACustomerRma":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}},"summary":"Six damaged units coming back against a delivery line"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, SOURCE_LINE_NOT_PROJECTED, INVALID_QUANTITY, MIXED_LOCATIONS, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createShipmentInput"},"examples":{"fromACustomerRma":{"value":{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-19","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","currency":"EUR","notes":"Palletised","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","notes":"Ship complete"}]},"summary":"Six damaged units coming back against a delivery line"}}}}},"summary":"Create a shipment","description":"Creates a shipment as a draft. No stock leaves and no journal entry records the cost of sale until you commit the shipment with POST inventory/shipments/:id/commit.\n\nEvery line must leave from the same warehouse. Otherwise the request fails with MIXED_LOCATIONS before anything is written.\n\nThe response is the created shipment with its lines.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryShipments"]},"get":{"operationId":"shipments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryDate]","in":"query","required":false,"description":"Filter deliveryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][ne]","in":"query","required":false,"description":"Filter deliveryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gt]","in":"query","required":false,"description":"Filter deliveryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gte]","in":"query","required":false,"description":"Filter deliveryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lt]","in":"query","required":false,"description":"Filter deliveryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lte]","in":"query","required":false,"description":"Filter deliveryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][in]","in":"query","required":false,"description":"Filter deliveryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][notIn]","in":"query","required":false,"description":"Filter deliveryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][between]","in":"query","required":false,"description":"Filter deliveryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId]","in":"query","required":false,"description":"Filter shipmentCarrierId (equality)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][ne]","in":"query","required":false,"description":"Filter shipmentCarrierId (ne)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][gt]","in":"query","required":false,"description":"Filter shipmentCarrierId (gt)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][gte]","in":"query","required":false,"description":"Filter shipmentCarrierId (gte)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][lt]","in":"query","required":false,"description":"Filter shipmentCarrierId (lt)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][lte]","in":"query","required":false,"description":"Filter shipmentCarrierId (lte)","schema":{"type":"string"}},{"name":"filter[shipmentCarrierId][in]","in":"query","required":false,"description":"Filter shipmentCarrierId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[shipmentCarrierId][notIn]","in":"query","required":false,"description":"Filter shipmentCarrierId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[shipmentCarrierId][between]","in":"query","required":false,"description":"Filter shipmentCarrierId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[shipmentCarrierId][like]","in":"query","required":false,"description":"Filter shipmentCarrierId (like)","schema":{"type":"string"}},{"name":"filter[returnStatus]","in":"query","required":false,"description":"Filter returnStatus (equality)","schema":{"type":"string"}},{"name":"filter[returnStatus][ne]","in":"query","required":false,"description":"Filter returnStatus (ne)","schema":{"type":"string"}},{"name":"filter[returnStatus][gt]","in":"query","required":false,"description":"Filter returnStatus (gt)","schema":{"type":"string"}},{"name":"filter[returnStatus][gte]","in":"query","required":false,"description":"Filter returnStatus (gte)","schema":{"type":"string"}},{"name":"filter[returnStatus][lt]","in":"query","required":false,"description":"Filter returnStatus (lt)","schema":{"type":"string"}},{"name":"filter[returnStatus][lte]","in":"query","required":false,"description":"Filter returnStatus (lte)","schema":{"type":"string"}},{"name":"filter[returnStatus][in]","in":"query","required":false,"description":"Filter returnStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnStatus][notIn]","in":"query","required":false,"description":"Filter returnStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnStatus][between]","in":"query","required":false,"description":"Filter returnStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnStatus][like]","in":"query","required":false,"description":"Filter returnStatus (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","deliveryDate","-deliveryDate","documentStatus","-documentStatus","totalAmount","-totalAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","deliveryDate","entityId","entityName","businessPartnerId","businessPartnerName","shipmentCarrierId","shipmentCarrierName","returnStatus","referenceNumber","trackingNumber","currency","totalAmount","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/shipmentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","returnStatus":"OPEN","referenceNumber":"SO-4471","trackingNumber":"3STBJG7291043","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lineCount":1},{"id":"a4e81c07-52fb-4d93-8206-71b3fe0c9d54","documentNumber":"SD-8842","documentStatus":"SHIPPED","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","returnStatus":"OPEN","referenceNumber":"SO-4471","trackingNumber":"3STBJG7291043","currency":"EUR","totalAmount":"2400.00","notes":"Two pallets","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-16T11:45:00.000Z","lineCount":3}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List shipments","description":"Lists shipments. The response has each shipment's main fields, without its lines. lineCount is the number of lines. To get the lines, or to filter by customer, item, warehouse, reference number, or tracking number, use POST inventory/shipments/search.","tags":["inventoryShipments"]}},"/inventory/items/bulk-delete":{"post":{"operationId":"bulkDeleteItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","count","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","count","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","count","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteItemsInput"}}}},"summary":"Bulk delete items","description":"Deletes multiple items in one request. If any item can't be deleted, none are. The response lists the deleted items' ids in the order you sent them.\n\nAn item can't be deleted while it has stock or inventory transactions. Nor can it be deleted while a purchase order or warehouse transfer order for it is still awaiting receipt. 'index' on the error is the position of that item's id, counting from zero.\n\nTo delete one item at a time, use DELETE inventory/items/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItems"]}},"/inventory/unit-of-measure-groups/bulk":{"post":{"operationId":"bulkCreateUnitOfMeasureGroups","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateUnitOfMeasureGroupsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"seedingConversionTables":{"value":{"data":{"created":[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"},{"id":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"}]}},"summary":"Two groups created together, the first with a conversion line and the second with only its base unit"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: UNIT_NOT_FOUND, DUPLICATE_UNIT_IN_GROUP, INVALID_CONVERSION_FACTOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["unitOfMeasureId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateUnitOfMeasureGroupsInput"},"examples":{"seedingConversionTables":{"value":{"unitOfMeasureGroups":[{"name":"Packaging","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","lines":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"12.00"}]},{"name":"Weight","baseUnitOfMeasureId":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b"}]},"summary":"Two groups created together, the first with a conversion line and the second with only its base unit"}}}}},"summary":"Bulk create unit of measure groups","description":"Creates multiple unit of measure groups in one request. Each group in the request takes the same fields as the body of POST inventory/unit-of-measure-groups, including its conversion lines.\n\nIf any group can't be created, none are, and the error gives that group's position in the request.\n\nThe response lists the created groups in the order you sent them, each with only its id. To see the ids assigned to their lines, use GET inventory/unit-of-measure-groups/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasureGroups"]}},"/inventory/purchase-returns/{id}":{"delete":{"operationId":"deletePurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase return you want to delete. Format: UUID.","example":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}],"summary":"Delete a purchase return","description":"Deletes a purchase return, with its lines. Only a purchase return with the `documentStatus` 'DRAFT' can be deleted. To undo a purchase return that is approved or committed, cancel it with POST inventory/purchase-returns/:id/cancel.","tags":["inventoryPurchaseReturns"]},"get":{"operationId":"getPurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase return you want to retrieve. Format: UUID.","example":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}],"summary":"Retrieve a purchase return","description":"Retrieves a purchase return, with its lines and applications.","tags":["inventoryPurchaseReturns"]},"patch":{"operationId":"updatePurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, INVALID_QUANTITY, INCOMPLETE_LINE, UNSUPPORTED_SOURCE_TYPE, MULTIPLE_PURCHASE_ORDERS, MISSING_TRACKING_SELECTION, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase return you want to update. Format: UUID.","example":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePurchaseReturnInput"}}}},"summary":"Update a purchase return","description":"Updates a purchase return with the fields you send. A field you leave out keeps its current value. Only a purchase return with the `documentStatus` 'DRAFT' can be updated.\n\nTo change lines, use `updateLines`, `createLines`, and `deleteLines`. The response contains the whole purchase return.","tags":["inventoryPurchaseReturns"]}},"/people/position-seniorities/{id}/reactivate":{"post":{"operationId":"reactivatePositionSeniority","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reactivatePositionSeniorityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_DEPRECATED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position seniority."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reactivatePositionSeniorityInput"}}}},"summary":"Reactivate a position seniority","description":"Sets a deprecated position seniority back to Active. Its external identifiers are kept. Fails with NOT_DEPRECATED when it is not deprecated.","tags":["hrPositionSeniorities"]}},"/inventory/landed-costs/{id}":{"delete":{"operationId":"deleteLandedCost","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteLandedCostOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"abandonDraft":{"value":{"data":{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"}},"summary":"Deleting a draft created for the wrong receipt."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost you want to delete. Format: UUID.","examples":{"abandonDraft":{"value":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"}}}],"summary":"Delete a landed cost","description":"Deletes a draft landed cost, with its receipt selections, charges, and allocation lines. The receipts and vendor bills do not change.","tags":["inventoryLandedCosts"]},"get":{"operationId":"getLandedCost","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getLandedCostOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"draft":{"value":{"data":{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","currency":"GBP","totalChargeAmount":"240","receiptCount":1,"chargeCount":1,"allocationLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","receipts":[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40","unitPrice":"12","lineTotal":"480"}]}],"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}],"allocationLines":[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]}},"summary":"A draft with one receipt and a freight charge allocated by 'Quantity'."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost you want to retrieve. Format: UUID.","examples":{"draft":{"value":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"}}}],"summary":"Retrieve a landed cost","description":"Retrieves a landed cost, with its receipts, charges, and allocation.","tags":["inventoryLandedCosts"]},"patch":{"operationId":"updateLandedCost","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateLandedCostOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"allOfIt":{"value":{"data":{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","allocationLineCount":1}},"summary":"Use the whole £300 charge, and change its allocation mode from 'Quantity' to 'LineTotal'."},"justTheNote":{"value":{"data":{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","allocationLineCount":1}},"summary":"Change only the notes. The receipts and charges do not change, because the request leaves them out."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_RECEIPTS, NO_CHARGES, RECEIPT_NOT_COMMITTED, VENDOR_BILL_NOT_APPROVED, ENTITY_MISMATCH, CHARGE_NOT_LANDED_COST_ITEM, INVALID_AMOUNT, UNKNOWN_ALLOCATION_MODE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["receiptNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["billNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["receiptNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["billNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["receiptNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["billNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost you want to update. Format: UUID.","examples":{"allOfIt":{"value":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"},"justTheNote":{"value":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateLandedCostInput"},"examples":{"allOfIt":{"value":{"charges":[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"LineTotal","amount":"300"}]},"summary":"Use the whole £300 charge, and change its allocation mode from 'Quantity' to 'LineTotal'."},"justTheNote":{"value":{"notes":"Freight invoice VB-8842 agreed with the vendor"},"summary":"Change only the notes. The receipts and charges do not change, because the request leaves them out."}}}}},"summary":"Update a landed cost","description":"Updates a landed cost with the fields you send. A field you leave out keeps its current value.\n\nWhen you send receipts or charges, the list you send replaces the whole list, so include every receipt or charge you want to keep.\n\nThe response contains the `id` and the `allocationLineCount`. To see the new allocation, use GET inventory/landed-costs/:id.","tags":["inventoryLandedCosts"]}},"/inventory/serial-numbers/{id}":{"get":{"operationId":"getSerialNumber","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSerialNumberOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"onHand":{"value":{"data":{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","manufacturerSerialNumber":"MFG-77-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"cost":"250","originalCost":"250","currency":"GBP","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"A unit that is in stock."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the serial number you want to retrieve. Format: UUID.","examples":{"onHand":{"value":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"}}}],"summary":"Retrieve a serial number","description":"Retrieves a serial number, with its costs.","tags":["inventorySerialNumbers"]},"patch":{"operationId":"updateSerialNumber","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSerialNumberOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"recordManufacturerSerial":{"value":{"data":{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"}},"summary":"Record the manufacturer's serial number for a unit."},"retire":{"value":{"data":{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"}},"summary":"Turn off a unit without deleting it or its history."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the serial number you want to update. Format: UUID.","examples":{"recordManufacturerSerial":{"value":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"},"retire":{"value":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSerialNumberInput"},"examples":{"recordManufacturerSerial":{"value":{"manufacturerSerialNumber":"MFG-77-000418"},"summary":"Record the manufacturer's serial number for a unit."},"retire":{"value":{"active":false},"summary":"Turn off a unit without deleting it or its history."}}}}},"summary":"Update a serial number","description":"Updates a serial number with the fields you send. A field you leave out keeps its current value. You cannot remove a field's value, because null is not accepted.\n\nThe response contains only the `id`. To see the updated serial number, use GET inventory/serial-numbers/:id.","tags":["inventorySerialNumbers"]}},"/inventory/inventory-levels/{id}":{"get":{"operationId":"getInventoryLevel","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInventoryLevelOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aStockedItem":{"value":{"data":{"id":"0b6d4c93-71ea-4f28-9c05-83a1e7f6204d","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","onHandQuantity":"1200.00","availableQuantity":"1150.00","allocatedQuantity":"50.00","averageCost":"3.75","onHandValue":"4500.00","currency":"EUR","lastTransactionTimestamp":"2026-08-03T11:15:00","lastModifiedDate":"2026-08-03T11:15:00.000Z"}},"summary":"An item with stock at one warehouse, some of it allocated"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory level you want to retrieve.","examples":{"aStockedItem":{"value":"0b6d4c93-71ea-4f28-9c05-83a1e7f6204d"}}}],"summary":"Retrieve an inventory level","description":"Retrieves an inventory level. An inventory level is one item's stock at one location. The inventory level comes back with its quantities, cost, and value.\n\nThe collection GET inventory/inventory-levels and POST inventory/inventory-levels/search return the same fields. To find a level when you don't know its id, filter either endpoint on itemId and locationId. Together they identify at most one level.","tags":["inventoryInventoryLevels"]}},"/inventory/warehouse-transfers/search":{"post":{"operationId":"searchWarehouseTransfers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchWarehouseTransfersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"whatStillNeedsInvoicing":{"value":{"data":{"items":[{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","documentNumber":"WTR-2292","documentStatus":"COMMITTED","transferType":"INTERCOMPANY","billingStatus":"NOT_BILLED","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Committed intercompany transfers whose bill has not been raised"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchWarehouseTransfersInput"},"examples":{"whatStillNeedsInvoicing":{"value":{"filters":{"transferType":"INTERCOMPANY","documentStatus":"COMMITTED","billingStatus":"NOT_BILLED"},"page":{"size":25}},"summary":"Committed intercompany transfers whose bill has not been raised"}}}}},"summary":"Search warehouse transfers","description":"Searches warehouse transfers. Each transfer comes back in full, lines included, with the same fields as GET inventory/warehouse-transfers/:id.\n\nThis endpoint can filter by itemId and referenceNumber, which the collection GET inventory/warehouse-transfers can't. itemId matches transfers that have at least one line for the item.","tags":["inventoryWarehouseTransfers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/inventory-increases/bulk-delete":{"post":{"operationId":"bulkDeleteInventoryIncreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteInventoryIncreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteInventoryIncreasesInput"}}}},"summary":"Bulk delete inventory increases","description":"Deletes multiple inventory increases in one request. A draft or a canceled inventory increase can be deleted. A committed one can't. If any inventory increase can't be deleted, none are deleted.\n\nThe response lists the deleted ids in the order you sent them.\n\nTo delete a single inventory increase, use DELETE inventory/inventory-increases/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryIncreases"]}},"/inventory/inventory-increases":{"post":{"operationId":"createInventoryIncrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createInventoryIncreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aBatchTrackedCountCorrection":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"120 units of one new lot, landing in one bin"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, REASON_CODE_NOT_APPLICABLE, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createInventoryIncreaseInput"},"examples":{"aBatchTrackedCountCorrection":{"value":{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"August cycle count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]},"summary":"120 units of one new lot, landing in one bin"}}}}},"summary":"Create an inventory increase","description":"Creates an inventory increase as a draft, with its lines. The response is the whole document, in the same shape as GET inventory/inventory-increases/:id.\n\nNo stock moves and no journal entry is written until you commit the draft with POST inventory/inventory-increases/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryIncreases"]},"get":{"operationId":"inventoryIncreases","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[reasonCodeId]","in":"query","required":false,"description":"Filter reasonCodeId (equality)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][ne]","in":"query","required":false,"description":"Filter reasonCodeId (ne)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][gt]","in":"query","required":false,"description":"Filter reasonCodeId (gt)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][gte]","in":"query","required":false,"description":"Filter reasonCodeId (gte)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][lt]","in":"query","required":false,"description":"Filter reasonCodeId (lt)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][lte]","in":"query","required":false,"description":"Filter reasonCodeId (lte)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][in]","in":"query","required":false,"description":"Filter reasonCodeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCodeId][notIn]","in":"query","required":false,"description":"Filter reasonCodeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCodeId][between]","in":"query","required":false,"description":"Filter reasonCodeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reasonCodeId][like]","in":"query","required":false,"description":"Filter reasonCodeId (like)","schema":{"type":"string"}},{"name":"filter[reasonCode]","in":"query","required":false,"description":"Filter reasonCode (equality)","schema":{"type":"string"}},{"name":"filter[reasonCode][ne]","in":"query","required":false,"description":"Filter reasonCode (ne)","schema":{"type":"string"}},{"name":"filter[reasonCode][gt]","in":"query","required":false,"description":"Filter reasonCode (gt)","schema":{"type":"string"}},{"name":"filter[reasonCode][gte]","in":"query","required":false,"description":"Filter reasonCode (gte)","schema":{"type":"string"}},{"name":"filter[reasonCode][lt]","in":"query","required":false,"description":"Filter reasonCode (lt)","schema":{"type":"string"}},{"name":"filter[reasonCode][lte]","in":"query","required":false,"description":"Filter reasonCode (lte)","schema":{"type":"string"}},{"name":"filter[reasonCode][in]","in":"query","required":false,"description":"Filter reasonCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCode][notIn]","in":"query","required":false,"description":"Filter reasonCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCode][between]","in":"query","required":false,"description":"Filter reasonCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reasonCode][like]","in":"query","required":false,"description":"Filter reasonCode (like)","schema":{"type":"string"}},{"name":"filter[offsetAccountId]","in":"query","required":false,"description":"Filter offsetAccountId (equality)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][ne]","in":"query","required":false,"description":"Filter offsetAccountId (ne)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][gt]","in":"query","required":false,"description":"Filter offsetAccountId (gt)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][gte]","in":"query","required":false,"description":"Filter offsetAccountId (gte)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][lt]","in":"query","required":false,"description":"Filter offsetAccountId (lt)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][lte]","in":"query","required":false,"description":"Filter offsetAccountId (lte)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][in]","in":"query","required":false,"description":"Filter offsetAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[offsetAccountId][notIn]","in":"query","required":false,"description":"Filter offsetAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[offsetAccountId][between]","in":"query","required":false,"description":"Filter offsetAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[offsetAccountId][like]","in":"query","required":false,"description":"Filter offsetAccountId (like)","schema":{"type":"string"}},{"name":"filter[offsetKind]","in":"query","required":false,"description":"Filter offsetKind (equality)","schema":{"type":"string"}},{"name":"filter[offsetKind][ne]","in":"query","required":false,"description":"Filter offsetKind (ne)","schema":{"type":"string"}},{"name":"filter[offsetKind][gt]","in":"query","required":false,"description":"Filter offsetKind (gt)","schema":{"type":"string"}},{"name":"filter[offsetKind][gte]","in":"query","required":false,"description":"Filter offsetKind (gte)","schema":{"type":"string"}},{"name":"filter[offsetKind][lt]","in":"query","required":false,"description":"Filter offsetKind (lt)","schema":{"type":"string"}},{"name":"filter[offsetKind][lte]","in":"query","required":false,"description":"Filter offsetKind (lte)","schema":{"type":"string"}},{"name":"filter[offsetKind][in]","in":"query","required":false,"description":"Filter offsetKind (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[offsetKind][notIn]","in":"query","required":false,"description":"Filter offsetKind (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[offsetKind][between]","in":"query","required":false,"description":"Filter offsetKind (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[offsetKind][like]","in":"query","required":false,"description":"Filter offsetKind (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","documentStatus","-documentStatus","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","entityId","entityName","locationId","locationCode","locationName","reasonCodeId","reasonCode","reasonCodeDescription","offsetAccountId","offsetKind","currency","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/inventoryIncreasesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lineCount":1},{"id":"0f5c8a24-91b7-4e63-8d02-4a7e1b96c380","documentNumber":"INC-43","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Opening balance","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-15T14:20:00.000Z","lineCount":4}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List inventory increases","description":"Lists inventory increases. Each inventory increase comes back with its main fields and lineCount, but without the lines.\n\nTo read the lines, use GET inventory/inventory-increases/:id or POST inventory/inventory-increases/search. To filter by item, use POST inventory/inventory-increases/search.","tags":["inventoryInventoryIncreases"]}},"/inventory/warehouses/{id}":{"get":{"operationId":"getWarehouse","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getWarehouseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aStockingSite":{"value":{"data":{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","entityId":"81e8beb1-1415-4012-9012-8138580f43dc","entityName":"Acme GmbH","name":"Rotterdam Distribution Centre","inventoryLocationType":"WAREHOUSE","isActive":true,"isPrimaryReceiving":true,"addressLine1":"Waalhaven 12","city":"Rotterdam","postalCode":"3087 BM","countryCode":"NL","region":"Benelux","lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A real warehouse with a full address"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the warehouse you want to retrieve.","examples":{"aStockingSite":{"value":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}}}],"summary":"Retrieve a warehouse","description":"Retrieves a warehouse. Use the warehouse's id, not its locationCode.\n\nThe response includes the warehouse's address, its owning legal entity, and its warehouse type. The legal entity and the warehouse type each come back as both an id and a name.\n\nThe fields are the same as on GET inventory/warehouses and POST inventory/warehouses/search. To look a warehouse up by its location code, filter GET inventory/warehouses on locationCode.","tags":["inventoryWarehouses"]},"patch":{"operationId":"updateWarehouse","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateWarehouseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"clearTheWarehouseType":{"value":{"data":{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}},"summary":"Let the warehouse accept every document type again — the one case where null is meaningful"},"correctTheAddress":{"value":{"data":{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}},"summary":"Change part of the address and leave everything else untouched"},"retireAWarehouse":{"value":{"data":{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}},"summary":"Retire an empty site that no draft document names, without deleting it or touching its history"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_LOCATION_CODE, ENTITY_NOT_FOUND, WAREHOUSE_TYPE_NOT_FOUND, WAREHOUSE_DEACTIVATION_BLOCKED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_DEACTIVATION_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_DEACTIVATION_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_DEACTIVATION_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the warehouse you want to update.","examples":{"clearTheWarehouseType":{"value":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"},"correctTheAddress":{"value":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"},"retireAWarehouse":{"value":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateWarehouseInput"},"examples":{"clearTheWarehouseType":{"value":{"warehouseTypeId":null},"summary":"Let the warehouse accept every document type again — the one case where null is meaningful"},"correctTheAddress":{"value":{"addressLine1":"Waalhaven 14","postalCode":"3087 BN"},"summary":"Change part of the address and leave everything else untouched"},"retireAWarehouse":{"value":{"isActive":false},"summary":"Retire an empty site that no draft document names, without deleting it or touching its history"}}}}},"summary":"Update a warehouse","description":"Updates a warehouse with the fields you send. A field you leave out keeps its current value.\n\nUse the warehouse's id, not its locationCode.\n\nTo clear warehouseTypeId, send null.\n\nChanges a warehouse's code, name, kind, address, status, isPrimaryReceiving, legal entity, or warehouse type. Deactivating a warehouse (isActive false) fails with WAREHOUSE_DEACTIVATION_BLOCKED while it still holds stock or a draft document still names it. A warehouse that already has inventory transactions can't be moved to another legal entity, and the request fails with a validation error.\n\nThe response is only the warehouse's id. To see the updated warehouse, use GET inventory/warehouses/:id.","tags":["inventoryWarehouses"]},"delete":{"operationId":"deleteWarehouse","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteWarehouseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"b5390f6a-1c72-4e84-9a03-8f2d61c74e59","locationCode":"WH-02"}},"summary":"Removing a warehouse that never held stock"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WAREHOUSE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the warehouse you want to delete.","examples":{"basic":{"value":"b5390f6a-1c72-4e84-9a03-8f2d61c74e59"}}}],"summary":"Delete a warehouse","description":"Deletes a warehouse. The response gives the deleted warehouse's id and locationCode.\n\nA warehouse that has stock records, movement history, bins, inventory counts, or allocations can't be deleted. To retire it instead, set isActive to false with PATCH inventory/warehouses/:id.\n\nTo delete several warehouses at once, use POST inventory/warehouses/bulk-delete.","tags":["inventoryWarehouses"]}},"/inventory/unit-of-measures/search":{"post":{"operationId":"searchUnitOfMeasures","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchUnitOfMeasuresOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byCode":{"value":{"data":{"items":[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"KG","unitName":"Kilogram","lastModifiedDate":"2026-05-12T09:30:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Exact match on a unit code"},"incrementalSync":{"value":{"data":{"items":[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"KG","unitName":"Kilogram","lastModifiedDate":"2026-08-09T13:33:02.544Z"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"EA","unitName":"Each","lastModifiedDate":"2026-08-09T14:02:11.108Z"}],"pagination":{"nextCursor":"42","hasMore":true}}},"summary":"Everything changed since the last sync, one page at a time"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchUnitOfMeasuresInput"},"examples":{"byCode":{"value":{"filters":{"unitCode":"KG"}},"summary":"Exact match on a unit code"},"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-01T00:00:00.000Z"},"page":{"size":2}},"summary":"Everything changed since the last sync, one page at a time"}}}}},"summary":"Search units of measure","description":"Searches units of measure. The filters are the exact code and when the unit of measure last changed.","tags":["inventoryUnitOfMeasures"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/skills/bulk":{"patch":{"operationId":"bulkUpdateSkills","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkUpdateSkillsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, NOT_FOUND, CATEGORY_NOT_FOUND, SKILL_NAME_TAKEN, NAME_BELONGS_TO_DEPRECATED, DUPLICATE_SKILL_IN_REQUEST, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_SKILL_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"}},"additionalProperties":false,"required":["index","skillName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_SKILL_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"}},"additionalProperties":false,"required":["index","skillName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_SKILL_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"}},"additionalProperties":false,"required":["index","skillName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkUpdateSkillsInput"}}}},"summary":"Update skills in bulk","description":"Changes many skills in one call. All or nothing: if any row fails, nothing changes and the error names the row's index. Each row takes the same fields as PATCH people/skills/:id, plus the skill's id. A skill may appear in only one row.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrSkills"]},"post":{"operationId":"bulkCreateSkills","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateSkillsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, CATEGORY_NOT_FOUND, SKILL_NAME_TAKEN, NAME_BELONGS_TO_DEPRECATED, DUPLICATE_SKILL_IN_REQUEST, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_SKILL_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"}},"additionalProperties":false,"required":["index","skillName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_SKILL_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"}},"additionalProperties":false,"required":["index","skillName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_SKILL_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"skillName":{"type":"string"}},"additionalProperties":false,"required":["index","skillName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateSkillsInput"}}}},"summary":"Create skills in bulk","description":"Creates many skills in one call. All or nothing: if any row fails, nothing is created and the error names the row's index. Each row takes the same fields as POST people/skills. The response lists the new ids in the order of the rows.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrSkills"]}},"/inventory/inventory-transactions/{id}":{"get":{"operationId":"getInventoryTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInventoryTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aReceiptMovement":{"value":{"data":{"id":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-03","inQuantity":"500.00","outQuantity":"0.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-03T11:15:00.000Z"}},"summary":"500 units received into a warehouse on a receipt."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory transaction you want to retrieve. Format: UUID.","examples":{"aReceiptMovement":{"value":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"}}}],"summary":"Retrieve an inventory transaction","description":"Retrieves an inventory transaction.","tags":["inventoryInventoryTransactions"]}},"/inventory/item-categories":{"get":{"operationId":"itemCategories","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","description","-description","active","-active","idealTurnoverRatio","-idealTurnoverRatio","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","active","idealTurnoverRatio","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/itemCategoriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","name":"Hardware","description":"Fasteners, fittings and tooling","active":true,"idealTurnoverRatio":"6.50","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8","name":"Consumables","active":true,"idealTurnoverRatio":"12.00","lastModifiedDate":"2026-05-12T09:30:01.000Z"},{"id":"9d61b0af-3c58-4e17-b942-06ea8c73f215","name":"Discontinued","description":"Retained for reporting only","active":false,"lastModifiedDate":"2026-05-12T09:30:02.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List item categories","description":"Lists item categories. Each category comes back with every field except parentId, which GET inventory/item-categories/:id returns. To see where each category sits in the tree, with its parent, ancestors, and depth, use GET inventory/item-categories/tree.","tags":["inventoryItemCategories"]},"post":{"operationId":"createItemCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createItemCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"stagedInactive":{"value":{"data":{"id":"9d61b0af-3c58-4e17-b942-06ea8c73f215"}},"summary":"A category that exists but cannot yet be assigned to items"},"withATurnoverTarget":{"value":{"data":{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}},"summary":"A category created complete, with no follow-up update needed"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PARENT_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createItemCategoryInput"},"examples":{"stagedInactive":{"value":{"name":"Pilot programme","active":false},"summary":"A category that exists but cannot yet be assigned to items"},"withATurnoverTarget":{"value":{"name":"Hardware","description":"Fasteners, fittings and tooling","idealTurnoverRatio":"6.50"},"summary":"A category created complete, with no follow-up update needed"}}}}},"summary":"Create an item category","description":"Creates an item category. The category goes at the top level or under an existing parent. The response is only its id. Names don't have to be unique, so keep the id to find the category again.\n\nTo read the created category, use GET inventory/item-categories/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItemCategories"]}},"/inventory/inventory-levels":{"get":{"operationId":"inventoryLevels","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","itemCode","-itemCode","locationCode","-locationCode","onHandQuantity","-onHandQuantity","availableQuantity","-availableQuantity","onHandValue","-onHandValue","lastTransactionTimestamp","-lastTransactionTimestamp","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","itemId","itemCode","itemName","locationId","locationCode","locationName","onHandQuantity","availableQuantity","allocatedQuantity","reservedQuantity","inTransitQuantity","damagedQuantity","qualityHoldQuantity","averageCost","onHandValue","currency","lastTransactionTimestamp","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/inventoryLevelsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"0b6d4c93-71ea-4f28-9c05-83a1e7f6204d","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","onHandQuantity":"1200.00","availableQuantity":"1150.00","allocatedQuantity":"50.00","averageCost":"3.75","onHandValue":"4500.00","currency":"EUR","lastTransactionTimestamp":"2026-08-03T11:15:00","lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"c47f0a91-2e6b-4d83-95a0-1b7e6c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"7b2f9d51-c084-4e37-a615-9d0e4728cb63","locationCode":"WH-02","locationName":"Antwerp Overflow","onHandQuantity":"300.00","availableQuantity":"300.00","averageCost":"3.75","onHandValue":"1125.00","currency":"EUR","lastModifiedDate":"2026-08-03T11:16:00.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List inventory levels","description":"Lists inventory levels. Each inventory level is the stock of one item at one location, with the id, code, and name of both.\n\nTo read the stock of one item at one location, filter on itemId and locationId together. They identify at most one inventory level.","tags":["inventoryInventoryLevels"]}},"/people/position-skill-requirements/search":{"post":{"operationId":"searchPositionSkillRequirements","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPositionSkillRequirementsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPositionSkillRequirementsInput"}}}},"summary":"Search position skill requirements","description":"Searches position skill requirements in every status. A requirement must match every filter you send. To find the requirement another system knows, filter on externalIdentifier; several records can share one value, so check how many come back.","tags":["hrPositionSkillRequirements"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/unit-of-measure-groups/search":{"post":{"operationId":"searchUnitOfMeasureGroups","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchUnitOfMeasureGroupsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"whichGroupsConvertThisUnit":{"value":{"data":{"items":[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846","name":"Packaging","description":"Eaches, boxes and pallets","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","baseUnitCode":"EA","lines":[{"id":"9f1b60d4-27ac-4e53-b8f1-05d3e79a2c68","unitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","conversionFactor":"1.00","isBaseUnit":true},{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"BOX","unitName":"Box","conversionFactor":"12.00","isBaseUnit":false}],"lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"The question the collection route cannot answer — every group with a line for BOX"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchUnitOfMeasureGroupsInput"},"examples":{"whichGroupsConvertThisUnit":{"value":{"filters":{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}},"summary":"The question the collection route cannot answer — every group with a line for BOX"}}}}},"summary":"Search unit of measure groups","description":"Searches unit of measure groups. The filters are name, a unit of measure the group converts, and when the group last changed. Each group comes back whole, with its base unit and conversion lines.\n\nOnly this endpoint can find the groups that convert a given unit of measure, with filters.unitOfMeasureId.","tags":["inventoryUnitOfMeasureGroups"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/account-determination-rules":{"get":{"operationId":"accountDeterminationRules","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[priority]","in":"query","required":false,"description":"Filter priority (equality)","schema":{"type":"number"}},{"name":"filter[priority][ne]","in":"query","required":false,"description":"Filter priority (ne)","schema":{"type":"number"}},{"name":"filter[priority][gt]","in":"query","required":false,"description":"Filter priority (gt)","schema":{"type":"number"}},{"name":"filter[priority][gte]","in":"query","required":false,"description":"Filter priority (gte)","schema":{"type":"number"}},{"name":"filter[priority][lt]","in":"query","required":false,"description":"Filter priority (lt)","schema":{"type":"number"}},{"name":"filter[priority][lte]","in":"query","required":false,"description":"Filter priority (lte)","schema":{"type":"number"}},{"name":"filter[priority][in]","in":"query","required":false,"description":"Filter priority (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priority][notIn]","in":"query","required":false,"description":"Filter priority (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priority][between]","in":"query","required":false,"description":"Filter priority (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isActive]","in":"query","required":false,"description":"Filter isActive (equality)","schema":{"type":"boolean"}},{"name":"filter[isActive][ne]","in":"query","required":false,"description":"Filter isActive (ne)","schema":{"type":"boolean"}},{"name":"filter[isActive][gt]","in":"query","required":false,"description":"Filter isActive (gt)","schema":{"type":"boolean"}},{"name":"filter[isActive][gte]","in":"query","required":false,"description":"Filter isActive (gte)","schema":{"type":"boolean"}},{"name":"filter[isActive][lt]","in":"query","required":false,"description":"Filter isActive (lt)","schema":{"type":"boolean"}},{"name":"filter[isActive][lte]","in":"query","required":false,"description":"Filter isActive (lte)","schema":{"type":"boolean"}},{"name":"filter[isActive][in]","in":"query","required":false,"description":"Filter isActive (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][notIn]","in":"query","required":false,"description":"Filter isActive (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][between]","in":"query","required":false,"description":"Filter isActive (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","ruleName","-ruleName","priority","-priority","isActive","-isActive","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","ruleName","priority","isActive","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/accountDeterminationRulesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts","priority":10,"isActive":true,"lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"f70c2a94-8b51-4d63-90e8-247fa1b3c6d5","ruleName":"Whole entity","isActive":true,"lastModifiedDate":"2026-05-12T09:30:01.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List account determination rules","description":"Lists account determination rules, with their names, priorities, and status only.\n\nFor their dimensions, accounts, and reason-code overrides, or to filter by them, use POST inventory/account-determination-rules/search.","tags":["inventoryAccountDeterminationRules"]},"post":{"operationId":"createAccountDeterminationRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAccountDeterminationRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"ACCOUNT_DETERMINATION_RULE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aCategoryRule":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}},"summary":"Receipts of one item category in one accounting book. Every other dimension is a wildcard."},"anEntityCatchAll":{"value":{"data":{"id":"f70c2a94-8b51-4d63-90e8-247fa1b3c6d5"}},"summary":"A rule with no dimension except the legal entity and the accounting book."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, BOOK_REQUIRED, DUPLICATE_RULE_TUPLE, UNKNOWN_PARENT_ACCOUNT_TYPE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_DETERMINATION_RULE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_DETERMINATION_RULE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_DETERMINATION_RULE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAccountDeterminationRuleInput"},"examples":{"aCategoryRule":{"value":{"ruleName":"Finished goods — receipts","priority":10,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}},"summary":"Receipts of one item category in one accounting book. Every other dimension is a wildcard."},"anEntityCatchAll":{"value":{"ruleName":"Whole entity","matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f"}},"summary":"A rule with no dimension except the legal entity and the accounting book."}}}}},"summary":"Create an account determination rule","description":"Creates an account determination rule. The response contains only the new rule's `id`.\n\nTo read the new rule, including the ids of its overrides, use GET inventory/account-determination-rules/:id. To create multiple rules, use POST inventory/account-determination-rules/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryAccountDeterminationRules"]}},"/people/skill-levels":{"get":{"operationId":"skillLevels","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[skillLevelOrder]","in":"query","required":false,"description":"Filter skillLevelOrder (equality)","schema":{"type":"number"}},{"name":"filter[skillLevelOrder][ne]","in":"query","required":false,"description":"Filter skillLevelOrder (ne)","schema":{"type":"number"}},{"name":"filter[skillLevelOrder][gt]","in":"query","required":false,"description":"Filter skillLevelOrder (gt)","schema":{"type":"number"}},{"name":"filter[skillLevelOrder][gte]","in":"query","required":false,"description":"Filter skillLevelOrder (gte)","schema":{"type":"number"}},{"name":"filter[skillLevelOrder][lt]","in":"query","required":false,"description":"Filter skillLevelOrder (lt)","schema":{"type":"number"}},{"name":"filter[skillLevelOrder][lte]","in":"query","required":false,"description":"Filter skillLevelOrder (lte)","schema":{"type":"number"}},{"name":"filter[skillLevelOrder][in]","in":"query","required":false,"description":"Filter skillLevelOrder (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillLevelOrder][notIn]","in":"query","required":false,"description":"Filter skillLevelOrder (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[skillLevelOrder][between]","in":"query","required":false,"description":"Filter skillLevelOrder (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","skillLevelName","-skillLevelName","skillLevelOrder","-skillLevelOrder","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","skillLevelName","skillLevelOrder","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/skillLevelsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List skill levels","description":"Lists skill levels in every status. Filter on status=Active for the levels you can assign. Sort by skillLevelOrder to get them from lowest to highest proficiency. The id is what skillLevelId takes on POST people/employee-skill-assignments and POST people/position-skill-requirements.","tags":["hrSkillLevels"]}},"/people/skill-categories":{"post":{"operationId":"createSkillCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSkillCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CATEGORY_NAME_TAKEN, NAME_BELONGS_TO_DEPRECATED, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSkillCategoryInput"}}}},"summary":"Create a skill category","description":"Creates a skill category. The name is unique across all records, deprecated ones included: if a deprecated record holds the name, the request fails with NAME_BELONGS_TO_DEPRECATED and names that record, so you can reactivate it with POST people/skill-categories/:id/reactivate.\n\nThe response contains only the new id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrSkillCategories"]},"get":{"operationId":"skillCategories","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","categoryName","-categoryName","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","categoryName","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/skillCategoriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List skill categories","description":"Lists skill category records in every status. Filter on status to leave out deprecated ones. External identifiers are on GET people/skill-categories/:id and POST people/skill-categories/search.","tags":["hrSkillCategories"]}},"/inventory/reason-codes":{"get":{"operationId":"reasonCodes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[code]","in":"query","required":false,"description":"Filter code (equality)","schema":{"type":"string"}},{"name":"filter[code][ne]","in":"query","required":false,"description":"Filter code (ne)","schema":{"type":"string"}},{"name":"filter[code][gt]","in":"query","required":false,"description":"Filter code (gt)","schema":{"type":"string"}},{"name":"filter[code][gte]","in":"query","required":false,"description":"Filter code (gte)","schema":{"type":"string"}},{"name":"filter[code][lt]","in":"query","required":false,"description":"Filter code (lt)","schema":{"type":"string"}},{"name":"filter[code][lte]","in":"query","required":false,"description":"Filter code (lte)","schema":{"type":"string"}},{"name":"filter[code][in]","in":"query","required":false,"description":"Filter code (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[code][notIn]","in":"query","required":false,"description":"Filter code (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[code][between]","in":"query","required":false,"description":"Filter code (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[code][like]","in":"query","required":false,"description":"Filter code (like)","schema":{"type":"string"}},{"name":"filter[isActive]","in":"query","required":false,"description":"Filter isActive (equality)","schema":{"type":"boolean"}},{"name":"filter[isActive][ne]","in":"query","required":false,"description":"Filter isActive (ne)","schema":{"type":"boolean"}},{"name":"filter[isActive][gt]","in":"query","required":false,"description":"Filter isActive (gt)","schema":{"type":"boolean"}},{"name":"filter[isActive][gte]","in":"query","required":false,"description":"Filter isActive (gte)","schema":{"type":"boolean"}},{"name":"filter[isActive][lt]","in":"query","required":false,"description":"Filter isActive (lt)","schema":{"type":"boolean"}},{"name":"filter[isActive][lte]","in":"query","required":false,"description":"Filter isActive (lte)","schema":{"type":"boolean"}},{"name":"filter[isActive][in]","in":"query","required":false,"description":"Filter isActive (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][notIn]","in":"query","required":false,"description":"Filter isActive (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][between]","in":"query","required":false,"description":"Filter isActive (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[requiresApproval]","in":"query","required":false,"description":"Filter requiresApproval (equality)","schema":{"type":"boolean"}},{"name":"filter[requiresApproval][ne]","in":"query","required":false,"description":"Filter requiresApproval (ne)","schema":{"type":"boolean"}},{"name":"filter[requiresApproval][gt]","in":"query","required":false,"description":"Filter requiresApproval (gt)","schema":{"type":"boolean"}},{"name":"filter[requiresApproval][gte]","in":"query","required":false,"description":"Filter requiresApproval (gte)","schema":{"type":"boolean"}},{"name":"filter[requiresApproval][lt]","in":"query","required":false,"description":"Filter requiresApproval (lt)","schema":{"type":"boolean"}},{"name":"filter[requiresApproval][lte]","in":"query","required":false,"description":"Filter requiresApproval (lte)","schema":{"type":"boolean"}},{"name":"filter[requiresApproval][in]","in":"query","required":false,"description":"Filter requiresApproval (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requiresApproval][notIn]","in":"query","required":false,"description":"Filter requiresApproval (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requiresApproval][between]","in":"query","required":false,"description":"Filter requiresApproval (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","code","-code","description","-description","isActive","-isActive","requiresApproval","-requiresApproval","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","code","description","isActive","requiresApproval","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/reasonCodesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","code":"DAMAGE","description":"Stock damaged in the warehouse","isActive":true,"requiresApproval":true,"lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"1f5b83d0-6c47-4a92-b8e1-0d472a95c3f6","code":"CYCLECOUNT","description":"Correction from a cycle count","isActive":true,"requiresApproval":false,"lastModifiedDate":"2026-05-12T09:30:01.000Z"},{"id":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c","code":"OBSOLETE","isActive":false,"requiresApproval":false,"lastModifiedDate":"2026-05-12T09:30:02.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List reason codes","description":"Lists reason codes. Each reason code comes back with its settings, but without the document types it can be selected on.\n\nTo read documentTypes, use GET inventory/reason-codes/:id or POST inventory/reason-codes/search.\n\nTo filter by document type, use POST inventory/reason-codes/search.","tags":["inventoryReasonCodes"]},"post":{"operationId":"createReasonCode","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createReasonCodeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"REASON_CODE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDecreaseReason":{"value":{"data":{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"}},"summary":"A reason usable on write-downs and returns, gated by approval"},"stagedWithNoDocumentTypes":{"value":{"data":{"id":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c"}},"summary":"A code that exists but is not yet selectable anywhere"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_CODE, UNKNOWN_DOCUMENT_TYPES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createReasonCodeInput"},"examples":{"aDecreaseReason":{"value":{"code":"DAMAGE","description":"Stock damaged in the warehouse","requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"]},"summary":"A reason usable on write-downs and returns, gated by approval"},"stagedWithNoDocumentTypes":{"value":{"code":"RECOUNT","isActive":false,"documentTypes":[]},"summary":"A code that exists but is not yet selectable anywhere"}}}}},"summary":"Create a reason code","description":"Creates a reason code. Send documentTypes with the reason code. It can be an empty list. The response is only its id.\n\nTo read the created reason code, use GET inventory/reason-codes/:id. To create several at once, use POST inventory/reason-codes/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReasonCodes"]}},"/inventory/inventory-transactions/search":{"post":{"operationId":"searchInventoryTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInventoryTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"oneItemsMonth":{"value":{"data":{"items":[{"id":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-03","inQuantity":"500.00","outQuantity":"0.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every inventory transaction for one item in August."},"receiptsIntoOneWarehouse":{"value":{"data":{"items":[{"id":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-03","inQuantity":"500.00","outQuantity":"0.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Receipts into one warehouse."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInventoryTransactionsInput"},"examples":{"oneItemsMonth":{"value":{"filters":{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Every inventory transaction for one item in August."},"receiptsIntoOneWarehouse":{"value":{"filters":{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","sourceDocumentLineType":"InvPurchaseDeliveryLine"}},"summary":"Receipts into one warehouse."}}}}},"summary":"Search inventory transactions","description":"Searches inventory transactions. Results are in the order the inventory transactions were created, not in order of `transactionDate`.","tags":["inventoryInventoryTransactions"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/warehouses":{"post":{"operationId":"createWarehouse","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createWarehouseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"WAREHOUSE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aStockingSite":{"value":{"data":{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}},"summary":"A real warehouse with a full address, flagged as the entity's receiving point"},"minimal":{"value":{"data":{"id":"b5390f6a-1c72-4e84-9a03-8f2d61c74e59"}},"summary":"The four required fields and nothing else"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_LOCATION_CODE, ENTITY_NOT_FOUND, WAREHOUSE_TYPE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["locationCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"}},"additionalProperties":false,"required":["warehouseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createWarehouseInput"},"examples":{"aStockingSite":{"value":{"locationCode":"WH-01","name":"Rotterdam Distribution Centre","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","isPrimaryReceiving":true,"addressLine1":"Waalhaven 12","city":"Rotterdam","postalCode":"3087 BM","countryCode":"NL","region":"Benelux"},"summary":"A real warehouse with a full address, flagged as the entity's receiving point"},"minimal":{"value":{"locationCode":"WH-02","name":"Overflow warehouse","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE"},"summary":"The four required fields and nothing else"}}}}},"summary":"Create a warehouse","description":"Creates a warehouse. A warehouse belongs to a legal entity. The response is only the new warehouse's id. To read the new warehouse, use GET inventory/warehouses/:id.\n\nTo create several warehouses at once, use POST inventory/warehouses/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouses"]},"get":{"operationId":"warehouses","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType]","in":"query","required":false,"description":"Filter inventoryLocationType (equality)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][ne]","in":"query","required":false,"description":"Filter inventoryLocationType (ne)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][gt]","in":"query","required":false,"description":"Filter inventoryLocationType (gt)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][gte]","in":"query","required":false,"description":"Filter inventoryLocationType (gte)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][lt]","in":"query","required":false,"description":"Filter inventoryLocationType (lt)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][lte]","in":"query","required":false,"description":"Filter inventoryLocationType (lte)","schema":{"type":"string"}},{"name":"filter[inventoryLocationType][in]","in":"query","required":false,"description":"Filter inventoryLocationType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[inventoryLocationType][notIn]","in":"query","required":false,"description":"Filter inventoryLocationType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[inventoryLocationType][between]","in":"query","required":false,"description":"Filter inventoryLocationType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[inventoryLocationType][like]","in":"query","required":false,"description":"Filter inventoryLocationType (like)","schema":{"type":"string"}},{"name":"filter[isActive]","in":"query","required":false,"description":"Filter isActive (equality)","schema":{"type":"boolean"}},{"name":"filter[isActive][ne]","in":"query","required":false,"description":"Filter isActive (ne)","schema":{"type":"boolean"}},{"name":"filter[isActive][gt]","in":"query","required":false,"description":"Filter isActive (gt)","schema":{"type":"boolean"}},{"name":"filter[isActive][gte]","in":"query","required":false,"description":"Filter isActive (gte)","schema":{"type":"boolean"}},{"name":"filter[isActive][lt]","in":"query","required":false,"description":"Filter isActive (lt)","schema":{"type":"boolean"}},{"name":"filter[isActive][lte]","in":"query","required":false,"description":"Filter isActive (lte)","schema":{"type":"boolean"}},{"name":"filter[isActive][in]","in":"query","required":false,"description":"Filter isActive (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][notIn]","in":"query","required":false,"description":"Filter isActive (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][between]","in":"query","required":false,"description":"Filter isActive (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isPrimaryReceiving]","in":"query","required":false,"description":"Filter isPrimaryReceiving (equality)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][ne]","in":"query","required":false,"description":"Filter isPrimaryReceiving (ne)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][gt]","in":"query","required":false,"description":"Filter isPrimaryReceiving (gt)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][gte]","in":"query","required":false,"description":"Filter isPrimaryReceiving (gte)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][lt]","in":"query","required":false,"description":"Filter isPrimaryReceiving (lt)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][lte]","in":"query","required":false,"description":"Filter isPrimaryReceiving (lte)","schema":{"type":"boolean"}},{"name":"filter[isPrimaryReceiving][in]","in":"query","required":false,"description":"Filter isPrimaryReceiving (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPrimaryReceiving][notIn]","in":"query","required":false,"description":"Filter isPrimaryReceiving (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPrimaryReceiving][between]","in":"query","required":false,"description":"Filter isPrimaryReceiving (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId]","in":"query","required":false,"description":"Filter warehouseTypeId (equality)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][ne]","in":"query","required":false,"description":"Filter warehouseTypeId (ne)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][gt]","in":"query","required":false,"description":"Filter warehouseTypeId (gt)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][gte]","in":"query","required":false,"description":"Filter warehouseTypeId (gte)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][lt]","in":"query","required":false,"description":"Filter warehouseTypeId (lt)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][lte]","in":"query","required":false,"description":"Filter warehouseTypeId (lte)","schema":{"type":"string"}},{"name":"filter[warehouseTypeId][in]","in":"query","required":false,"description":"Filter warehouseTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[warehouseTypeId][notIn]","in":"query","required":false,"description":"Filter warehouseTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[warehouseTypeId][between]","in":"query","required":false,"description":"Filter warehouseTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[warehouseTypeId][like]","in":"query","required":false,"description":"Filter warehouseTypeId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","locationCode","-locationCode","entityId","-entityId","warehouseTypeId","-warehouseTypeId","inventoryLocationType","-inventoryLocationType","isActive","-isActive","isPrimaryReceiving","-isPrimaryReceiving","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","locationCode","name","inventoryLocationType","isActive","isPrimaryReceiving","addressLine1","addressLine2","city","stateProvince","postalCode","countryCode","region","entityId","entityName","warehouseTypeId","warehouseTypeName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/warehousesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","name":"Rotterdam Distribution Centre","inventoryLocationType":"WAREHOUSE","isActive":true,"isPrimaryReceiving":true,"addressLine1":"Waalhaven 12","city":"Rotterdam","postalCode":"3087 BM","countryCode":"NL","region":"Benelux","entityId":"81e8beb1-1415-4012-9012-8138580f43dc","entityName":"Acme GmbH","lastModifiedDate":"2026-05-12T09:30:00.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List warehouses","description":"Lists warehouses. The fields are the same as on GET inventory/warehouses/:id and POST inventory/warehouses/search. The owning legal entity and the warehouse type each come back as both an id and a name.\n\nTo filter by name, city, country, or region, use POST inventory/warehouses/search.","tags":["inventoryWarehouses"]}},"/inventory/landed-cost-items":{"post":{"operationId":"createLandedCostItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createLandedCostItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"dutyByAccount":{"value":{"data":{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}},"summary":"A landed cost item that covers a customs duty account, allocated by 'LineTotal'."},"freightByItem":{"value":{"data":{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"}},"summary":"A landed cost item that covers a freight service item, allocated by 'Weight'."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_SELECTOR, REFERENCE_NOT_FOUND, UNKNOWN_ALLOCATION_MODE, DUPLICATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createLandedCostItemInput"},"examples":{"dutyByAccount":{"value":{"accountId":"7e21b508-4a93-4c67-b0d5-19f6a3e84c72","allocationMode":"LineTotal"},"summary":"A landed cost item that covers a customs duty account, allocated by 'LineTotal'."},"freightByItem":{"value":{"itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","allocationMode":"Weight","costingElementTypeId":"c4a90e21-7b35-4d18-9e02-6f13a85c7d40"},"summary":"A landed cost item that covers a freight service item, allocated by 'Weight'."}}}}},"summary":"Create a landed cost item","description":"Creates a landed cost item. Send `itemId`, `accountId`, or both. With both, a vendor bill line matches when either its item or its expense account matches. Each `itemId` and each `accountId` can be used by only one landed cost item, including one whose `active` is false, so creating a second one for the same item or account fails. To change an existing landed cost item, use PATCH inventory/landed-cost-items/:id. The response contains only the `id`. To see the created landed cost item, use GET inventory/landed-cost-items/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCostItems"]},"get":{"operationId":"landedCostItems","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[accountId]","in":"query","required":false,"description":"Filter accountId (equality)","schema":{"type":"string"}},{"name":"filter[accountId][ne]","in":"query","required":false,"description":"Filter accountId (ne)","schema":{"type":"string"}},{"name":"filter[accountId][gt]","in":"query","required":false,"description":"Filter accountId (gt)","schema":{"type":"string"}},{"name":"filter[accountId][gte]","in":"query","required":false,"description":"Filter accountId (gte)","schema":{"type":"string"}},{"name":"filter[accountId][lt]","in":"query","required":false,"description":"Filter accountId (lt)","schema":{"type":"string"}},{"name":"filter[accountId][lte]","in":"query","required":false,"description":"Filter accountId (lte)","schema":{"type":"string"}},{"name":"filter[accountId][in]","in":"query","required":false,"description":"Filter accountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountId][notIn]","in":"query","required":false,"description":"Filter accountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountId][between]","in":"query","required":false,"description":"Filter accountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountId][like]","in":"query","required":false,"description":"Filter accountId (like)","schema":{"type":"string"}},{"name":"filter[allocationMode]","in":"query","required":false,"description":"Filter allocationMode (equality)","schema":{"type":"string"}},{"name":"filter[allocationMode][ne]","in":"query","required":false,"description":"Filter allocationMode (ne)","schema":{"type":"string"}},{"name":"filter[allocationMode][gt]","in":"query","required":false,"description":"Filter allocationMode (gt)","schema":{"type":"string"}},{"name":"filter[allocationMode][gte]","in":"query","required":false,"description":"Filter allocationMode (gte)","schema":{"type":"string"}},{"name":"filter[allocationMode][lt]","in":"query","required":false,"description":"Filter allocationMode (lt)","schema":{"type":"string"}},{"name":"filter[allocationMode][lte]","in":"query","required":false,"description":"Filter allocationMode (lte)","schema":{"type":"string"}},{"name":"filter[allocationMode][in]","in":"query","required":false,"description":"Filter allocationMode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allocationMode][notIn]","in":"query","required":false,"description":"Filter allocationMode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allocationMode][between]","in":"query","required":false,"description":"Filter allocationMode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[allocationMode][like]","in":"query","required":false,"description":"Filter allocationMode (like)","schema":{"type":"string"}},{"name":"filter[costingElementTypeId]","in":"query","required":false,"description":"Filter costingElementTypeId (equality)","schema":{"type":"string"}},{"name":"filter[costingElementTypeId][ne]","in":"query","required":false,"description":"Filter costingElementTypeId (ne)","schema":{"type":"string"}},{"name":"filter[costingElementTypeId][gt]","in":"query","required":false,"description":"Filter costingElementTypeId (gt)","schema":{"type":"string"}},{"name":"filter[costingElementTypeId][gte]","in":"query","required":false,"description":"Filter costingElementTypeId (gte)","schema":{"type":"string"}},{"name":"filter[costingElementTypeId][lt]","in":"query","required":false,"description":"Filter costingElementTypeId (lt)","schema":{"type":"string"}},{"name":"filter[costingElementTypeId][lte]","in":"query","required":false,"description":"Filter costingElementTypeId (lte)","schema":{"type":"string"}},{"name":"filter[costingElementTypeId][in]","in":"query","required":false,"description":"Filter costingElementTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[costingElementTypeId][notIn]","in":"query","required":false,"description":"Filter costingElementTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[costingElementTypeId][between]","in":"query","required":false,"description":"Filter costingElementTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[costingElementTypeId][like]","in":"query","required":false,"description":"Filter costingElementTypeId (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","itemCode","-itemCode","accountNumber","-accountNumber","allocationMode","-allocationMode","active","-active","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","itemId","itemCode","itemName","accountId","accountNumber","accountName","allocationMode","costingElementTypeId","costingElementTypeCode","costingElementTypeName","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/landedCostItemsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Weight","costingElementTypeId":"c4a90e21-7b35-4d18-9e02-6f13a85c7d40","costingElementTypeCode":"FRT","costingElementTypeName":"Freight","active":true,"createdDate":"2026-08-01T11:02:19.880Z","lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14","accountId":"7e21b508-4a93-4c67-b0d5-19f6a3e84c72","accountNumber":"5820","accountName":"Customs and duty","allocationMode":"LineTotal","active":true,"createdDate":"2026-08-01T11:04:47.331Z","lastModifiedDate":"2026-08-18T09:16:03.204Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List landed cost items","description":"Lists landed cost items, with the names of their items, accounts, and costing element types.","tags":["inventoryLandedCostItems"]}},"/people/sbo-context-types":{"get":{"operationId":"sboContextTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","contextType","-contextType","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","contextType","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/sboContextTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List SBO context types","description":"Lists SBO context types. Linked values are on GET people/sbo-context-types/:id and POST people/sbo-context-types/search.","tags":["hrSboContextTypes"]},"post":{"operationId":"createSboContextType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSboContextTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CONTEXT_TYPE_NAME_TAKEN, UNKNOWN_CONTEXT_VALUE, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL, TOO_MANY_ITEMS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CONTEXT_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CONTEXT_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CONTEXT_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSboContextTypeInput"}}}},"summary":"Create an SBO context type","description":"Creates an SBO context type. The name is unique. Pass contextValueIds to link existing SBO context values to the type in the same request. Pass externalIdentifiers to record the keys other systems use for it. The response contains only the new id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrSboContextTypes"]}},"/inventory/unit-of-measure-groups":{"post":{"operationId":"createUnitOfMeasureGroup","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createUnitOfMeasureGroupOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aPackagingGroup":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}},"summary":"A group based on Each, with a box of twelve. The EA line is written automatically."},"baseUnitOnly":{"value":{"data":{"id":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"}},"summary":"A group with nothing but its base unit; add conversions later with PATCH"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: UNIT_NOT_FOUND, DUPLICATE_UNIT_IN_GROUP, INVALID_CONVERSION_FACTOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createUnitOfMeasureGroupInput"},"examples":{"aPackagingGroup":{"value":{"name":"Packaging","description":"Eaches, boxes and pallets","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","lines":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"12.00"}]},"summary":"A group based on Each, with a box of twelve. The EA line is written automatically."},"baseUnitOnly":{"value":{"name":"Weight","baseUnitOfMeasureId":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b"},"summary":"A group with nothing but its base unit; add conversions later with PATCH"}}}}},"summary":"Create a unit of measure group","description":"Creates a unit of measure group. A group has a base unit and conversion lines. The base unit gets its own line automatically, with a factor of 1. Send the base unit as baseUnitOfMeasureId and leave it out of lines.\n\nThe response contains only the group's id. To see the group with the ids assigned to its lines, use GET inventory/unit-of-measure-groups/:id. To create several groups at once, use POST inventory/unit-of-measure-groups/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasureGroups"]},"get":{"operationId":"unitOfMeasureGroups","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","description","-description","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/unitOfMeasureGroupsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846","name":"Packaging","description":"Eaches, boxes and pallets","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4","name":"Weight","description":"Grams and kilograms","lastModifiedDate":"2026-05-12T09:30:01.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List unit of measure groups","description":"Lists unit of measure groups. Each group comes back with its name and description, without its base unit or conversion lines.\n\nTo get the conversion lines, use GET inventory/unit-of-measure-groups/:id or POST inventory/unit-of-measure-groups/search. To find the groups that convert a given unit of measure, use POST inventory/unit-of-measure-groups/search with filters.unitOfMeasureId.","tags":["inventoryUnitOfMeasureGroups"]}},"/inventory/account-determination-rules/bulk":{"post":{"operationId":"bulkCreateAccountDeterminationRules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateAccountDeterminationRulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"standingUpAConfiguration":{"value":{"data":{"created":[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}]}},"summary":"Several rules for one legal entity, created in one request. The response lists them in the same order."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, BOOK_REQUIRED, DUPLICATE_RULE_TUPLE, UNKNOWN_PARENT_ACCOUNT_TYPE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID. An empty string when the clash is with an earlier rule in the list."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule. When the clash is with an earlier rule in the list, it is the label of the rule at `index` instead."},"index":{"type":"number","description":"The position of the rule in the list you sent. The first rule is 0, the second is 1."}},"additionalProperties":false,"required":["existingId","existingRuleName","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentAccountType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID. An empty string when the clash is with an earlier rule in the list."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule. When the clash is with an earlier rule in the list, it is the label of the rule at `index` instead."},"index":{"type":"number","description":"The position of the rule in the list you sent. The first rule is 0, the second is 1."}},"additionalProperties":false,"required":["existingId","existingRuleName","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentAccountType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID. An empty string when the clash is with an earlier rule in the list."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule. When the clash is with an earlier rule in the list, it is the label of the rule at `index` instead."},"index":{"type":"number","description":"The position of the rule in the list you sent. The first rule is 0, the second is 1."}},"additionalProperties":false,"required":["existingId","existingRuleName","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentAccountType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateAccountDeterminationRulesInput"},"examples":{"standingUpAConfiguration":{"value":{"accountDeterminationRules":[{"ruleName":"Finished goods — receipts","priority":10,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}}]},"summary":"Several rules for one legal entity, created in one request. The response lists them in the same order."}}}}},"summary":"Bulk create account determination rules","description":"Creates multiple account determination rules in one request. The response lists the new rules' ids in the order you sent them. If one rule cannot be created, the request fails and no rules are created.\n\nTo create a single rule, use POST inventory/account-determination-rules.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryAccountDeterminationRules"]}},"/inventory/inventory-revaluations/bulk":{"post":{"operationId":"bulkCreateInventoryRevaluations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateInventoryRevaluationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aPeriodEndRun":{"value":{"data":{"inventoryRevaluations":[{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentStatus":"DRAFT","currency":"EUR","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]}},"summary":"One revaluation per item group, raised from a valuation feed"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, MISSING_CAPITALISATION_ACCOUNT, TRACKING_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateInventoryRevaluationsInput"},"examples":{"aPeriodEndRun":{"value":{"inventoryRevaluations":[{"costingValuationType":"revaluation","costingElementTypeId":"f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","unitId":"d5a71e93-4c08-4b26-95f7-2e6a8c30b41f","quantity":"150","currentUnitCost":"12","newUnitCost":"9"}]}]},"summary":"One revaluation per item group, raised from a valuation feed"}}}}},"summary":"Bulk create inventory revaluations","description":"Creates multiple inventory revaluations in one request, each as a draft. Each revaluation in inventoryRevaluations takes the same fields as POST inventory/inventory-revaluations. If any revaluation can't be created, none are. 'index' on the error is the position of that revaluation, counting from zero.\n\nThe response lists the new drafts in the order you sent them, without their lines.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryRevaluations"]}},"/people/sbo-context-types/{id}":{"delete":{"operationId":"deleteSboContextType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteSboContextTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, CONTEXT_TYPE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the SBO context type."}],"summary":"Delete an SBO context type","description":"Deletes an SBO context type and its links. It fails with CONTEXT_TYPE_IN_USE while a position skill requirement or team staffing requirement uses one of the links. Deleting is permanent.","tags":["hrSboContextTypes"]},"get":{"operationId":"getSboContextType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSboContextTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the SBO context type."}],"summary":"Get an SBO context type","description":"Returns one SBO context type by id, with its linked value ids and external identifiers.","tags":["hrSboContextTypes"]},"patch":{"operationId":"updateSboContextType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSboContextTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, CONTEXT_TYPE_NAME_TAKEN, UNKNOWN_CONTEXT_VALUE, CONTEXT_TYPE_IN_USE, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL, EXTERNAL_IDENTIFIER_NOT_FOUND, TOO_MANY_ITEMS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CONTEXT_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CONTEXT_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_CONTEXT_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONTEXT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the SBO context type."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSboContextTypeInput"}}}},"summary":"Update an SBO context type","description":"Changes an SBO context type. Send only the fields you want to change. contextValueIds replaces the full set of linked values: send an empty array to unlink all. Add, change and remove external identifiers with createExternalIdentifiers, updateExternalIdentifiers and deleteExternalIdentifiers. Removing a link that a position skill requirement or team staffing requirement uses fails with CONTEXT_TYPE_IN_USE.","tags":["hrSboContextTypes"]}},"/people/skills/bulk-delete":{"post":{"operationId":"bulkDeleteSkills","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteSkillsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, NOT_FOUND, SKILL_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteSkillsInput"}}}},"summary":"Delete skills in bulk","description":"Deprecates many skills in one call. All or nothing: if any skill is still in use or does not exist, nothing changes and the error names its index. Skills that are already deprecated are left as they are.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrSkills"]}},"/inventory/shipments/bulk-delete":{"post":{"operationId":"bulkDeleteShipments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteShipmentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteShipmentsInput"}}}},"summary":"Bulk delete shipments","description":"Deletes multiple shipments in one request. Only shipments in 'DRAFT' status can be deleted. The response lists the deleted ids in the order you sent them.\n\nIf any id matches no shipment, or names a shipment whose status is not 'DRAFT', none are deleted. To delete one shipment, use DELETE inventory/shipments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryShipments"]}},"/inventory/sales-returns/bulk-delete":{"post":{"operationId":"bulkDeleteSalesReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteSalesReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteSalesReturnsInput"}}}},"summary":"Bulk delete sales returns","description":"Deletes multiple draft sales returns in one request. Every identifier is checked before anything is deleted. If any identifier matches no return, or names a return that is not a draft, none are deleted. 'index' on the error is the position of that identifier, counting from zero.\n\nThe response lists the identifiers of the deleted returns in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventorySalesReturns"]}},"/people/sbo-context-types/search":{"post":{"operationId":"searchSboContextTypes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSboContextTypesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSboContextTypesInput"}}}},"summary":"Search SBO context types","description":"Searches SBO context types. A record must match every filter you send. To find the record another system knows, filter on externalIdentifier; several records can share one value, so check how many come back. Results are ordered by creation, oldest first.","tags":["hrSboContextTypes"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/position-skill-requirements/bulk-delete":{"post":{"operationId":"bulkDeletePositionSkillRequirements","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeletePositionSkillRequirementsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeletePositionSkillRequirementsInput"}}}},"summary":"Delete position skill requirements in bulk","description":"Deletes many requirements and their external identifiers in one call. All or nothing: if any id does not exist, nothing is deleted and the error names its index.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPositionSkillRequirements"]}},"/headcount-planning/context":{"get":{"operationId":"getPlanningContext","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPlanningContextOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: PLANNING_ACCESS_DENIED, ENTITY_NOT_FOUND, FISCAL_YEAR_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PLANNING_ACCESS_DENIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entityId you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FISCAL_YEAR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entityId you sent."},"fiscalYear":{"type":"string","description":"The fiscalYear you sent."}},"additionalProperties":false,"required":["entityId","fiscalYear"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PLANNING_ACCESS_DENIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entityId you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FISCAL_YEAR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entityId you sent."},"fiscalYear":{"type":"string","description":"The fiscalYear you sent."}},"additionalProperties":false,"required":["entityId","fiscalYear"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"entityId","in":"query","required":true,"schema":{"type":"string"},"description":"The identifier of the entity to plan for (a UUID). Find it with POST headcount-planning/references/search and kind 'entity'.","example":"3f2a9c14-6b1d-4c8e-9a51-0d7e2b6f4a10"},{"name":"fiscalYear","in":"query","required":true,"schema":{"type":"string"},"description":"The fiscal year to plan for, as the code a fiscalYear reference returns, for example FY2027. A bare four-digit year such as 2027 also matches.","example":"FY2027"}],"summary":"Get the headcount planning context for an entity and fiscal year","description":"Returns what you need before creating or editing a headcount plan for one entity and fiscal year: the entity and its currency, the fiscal year dates, the active departments, positions, locations, employment categories, currencies and hiring managers a plan line can reference, and a description of what your headcount planning role allows. Find entity identifiers and fiscal year values with POST headcount-planning/references/search (kinds entity and fiscalYear).\n\ncapabilities.allowedActions are descriptive hints only. They never authorize a later call: every write endpoint checks your role, department ownership and budget membership again when it runs. A token with no employee identity owns no departments and receives no department-scoped hints. Owned-department hints appear only for an employee who owns at least one department budget. Outside a planning administrator, departments and managers in this response are limited to those of your own department budgets (departments) and to active employees of the entity (managers), and an entityId outside the entities of your budgets answers ENTITY_NOT_FOUND like an unknown one, so a caller who owns or contributes to no department budget can read no entity.\n\nThe context aggregates many records, so it carries no lastModifiedDate.\n\nEvery request needs the Api-Version header. A missing or empty header, or one naming no version, answers 400. A route that does not exist in the requested version answers 404.","tags":["hrPlanningPlanningContexts"]}},"/people/skill-categories/search":{"post":{"operationId":"searchSkillCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSkillCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSkillCategoriesInput"}}}},"summary":"Search skill categories","description":"Searches skill category records in every status. A record must match every filter you send. To find the record another system knows, filter on externalIdentifier; several records can share one value, so check how many come back. Results are ordered by creation, oldest first.","tags":["hrSkillCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/employee-skill-assignments/search":{"post":{"operationId":"searchEmployeeSkillAssignments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchEmployeeSkillAssignmentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchEmployeeSkillAssignmentsInput"}}}},"summary":"Search employee skill assignments","description":"Searches employee skill assignments in every status. An assignment must match every filter you send. For the skills an employee holds today, send employeeId with approvalStatus 'Approved' and recordStatus 'Active'. Results are ordered by creation, oldest first.","tags":["hrEmployeeSkillAssignments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/headcount-planning/references/search":{"post":{"operationId":"searchPlanningReferences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPlanningReferencesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"fiscalYearsOfAnEntity":{"value":{"data":{"items":[{"kind":"fiscalYear","label":"FY2027","code":"FY2027"}],"pagination":{"hasMore":false}}},"summary":"List the fiscal years of an entity, to pick the fiscalYear for getPlanningContext."}}}}},"400":{"description":"Invalid request or business failure. Codes: PLANNING_ACCESS_DENIED, ENTITY_REQUIRED, ENTITY_NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PLANNING_ACCESS_DENIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"The kind you sent."}},"additionalProperties":false,"required":["kind"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entityId you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PLANNING_ACCESS_DENIED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"The kind you sent."}},"additionalProperties":false,"required":["kind"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entityId you sent."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPlanningReferencesInput"},"examples":{"fiscalYearsOfAnEntity":{"value":{"filters":{"kind":"fiscalYear","entityId":"3f2a9c14-6b1d-4c8e-9a51-0d7e2b6f4a10"}},"summary":"List the fiscal years of an entity, to pick the fiscalYear for getPlanningContext."}}}}},"summary":"Search headcount planning references","description":"Finds the identifiers that headcount planning endpoints take, one kind of reference per request. Send filters.kind, and filters.entityId for kinds that belong to an entity: fiscalYear, book, account and compensationBandSet. filters.text narrows the results to references whose label or code contains it, case-insensitively. Results are ordered by label and paged with an opaque cursor: pass pagination.nextCursor back as page.cursor. A page holds 50 references by default and at most 200.\n\nEmployees are the active employees of the entity and its subsidiaries when entityId is sent, and otherwise of every entity for a planning administrator, or of the entities of your department budgets and their subsidiaries for anyone else; send filters.includeInactiveEmployees true to include inactive and former employees. Departments, positions, locations, employment categories and currencies are shared across entities, so entityId does not narrow them. A caller who is not a planning administrator sees only the entities and departments of the department budgets they own or contribute to, and an entityId outside that scope answers ENTITY_NOT_FOUND exactly like an unknown one.\n\nAccounts are the leaf profit-and-loss accounts of the entity's book. Compensation band sets are the draft and active sets of the entity. A fiscalYear reference's code is the value getPlanningContext takes as fiscalYear.\n\nReferences aggregate several record types, so they carry no lastModifiedDate.\n\nEvery request needs the Api-Version header. A missing or empty header, or one naming no version, answers 400. A route that does not exist in the requested version answers 404.","tags":["hrPlanningPlanningContexts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/employee-skill-assignments/{id}":{"delete":{"operationId":"deleteEmployeeSkillAssignment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteEmployeeSkillAssignmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the assignment."}],"summary":"Delete an employee skill assignment","description":"Deletes an assignment. The delete is permanent. Deleting the current assignment does not make an older one current again.","tags":["hrEmployeeSkillAssignments"]},"patch":{"operationId":"updateEmployeeSkillAssignment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateEmployeeSkillAssignmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SKILL_LEVEL_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the assignment."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateEmployeeSkillAssignmentInput"}}}},"summary":"Update an employee skill assignment","description":"Changes an assignment's level, approval status or texts. Send only the fields you want to change; a field you leave out keeps its value. Send reasoning or employeeNotes as null to clear them. Setting approvalStatus to 'Approved' makes the assignment the employee's current one for the skill (recordStatus 'Active') and the previous approved one 'Inactive'. To move a skill to another employee or skill, delete the assignment and create another.","tags":["hrEmployeeSkillAssignments"]}},"/people/sbo-contexts":{"get":{"operationId":"sboContexts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[contextTypeId]","in":"query","required":false,"description":"Filter contextTypeId (equality)","schema":{"type":"string"}},{"name":"filter[contextTypeId][ne]","in":"query","required":false,"description":"Filter contextTypeId (ne)","schema":{"type":"string"}},{"name":"filter[contextTypeId][gt]","in":"query","required":false,"description":"Filter contextTypeId (gt)","schema":{"type":"string"}},{"name":"filter[contextTypeId][gte]","in":"query","required":false,"description":"Filter contextTypeId (gte)","schema":{"type":"string"}},{"name":"filter[contextTypeId][lt]","in":"query","required":false,"description":"Filter contextTypeId (lt)","schema":{"type":"string"}},{"name":"filter[contextTypeId][lte]","in":"query","required":false,"description":"Filter contextTypeId (lte)","schema":{"type":"string"}},{"name":"filter[contextTypeId][in]","in":"query","required":false,"description":"Filter contextTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[contextTypeId][notIn]","in":"query","required":false,"description":"Filter contextTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[contextTypeId][between]","in":"query","required":false,"description":"Filter contextTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[contextTypeId][like]","in":"query","required":false,"description":"Filter contextTypeId (like)","schema":{"type":"string"}},{"name":"filter[contextValueId]","in":"query","required":false,"description":"Filter contextValueId (equality)","schema":{"type":"string"}},{"name":"filter[contextValueId][ne]","in":"query","required":false,"description":"Filter contextValueId (ne)","schema":{"type":"string"}},{"name":"filter[contextValueId][gt]","in":"query","required":false,"description":"Filter contextValueId (gt)","schema":{"type":"string"}},{"name":"filter[contextValueId][gte]","in":"query","required":false,"description":"Filter contextValueId (gte)","schema":{"type":"string"}},{"name":"filter[contextValueId][lt]","in":"query","required":false,"description":"Filter contextValueId (lt)","schema":{"type":"string"}},{"name":"filter[contextValueId][lte]","in":"query","required":false,"description":"Filter contextValueId (lte)","schema":{"type":"string"}},{"name":"filter[contextValueId][in]","in":"query","required":false,"description":"Filter contextValueId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[contextValueId][notIn]","in":"query","required":false,"description":"Filter contextValueId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[contextValueId][between]","in":"query","required":false,"description":"Filter contextValueId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[contextValueId][like]","in":"query","required":false,"description":"Filter contextValueId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","contextTypeId","-contextTypeId","contextValueId","-contextValueId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","contextTypeId","contextValueId","contextValueName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/sboContextsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List SBO contexts","description":"Lists SBO contexts. ","tags":["hrSboContexts"]}},"/people/sbo-context-values/search":{"post":{"operationId":"searchSboContextValues","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSboContextValuesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSboContextValuesInput"}}}},"summary":"Search SBO context values","description":"Searches SBO context values. A record must match every filter you send. To find the record another system knows, filter on externalIdentifier; several records can share one value, so check how many come back. Results are ordered by creation, oldest first.","tags":["hrSboContextValues"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/sbo-context-values":{"get":{"operationId":"sboContextValues","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","contextValue","-contextValue","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","contextValue","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/sboContextValuesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List SBO context values","description":"Lists SBO context values. ","tags":["hrSboContextValues"]},"post":{"operationId":"createSboContextValue","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSboContextValueOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CONTEXT_VALUE_NAME_TAKEN, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CONTEXT_VALUE_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["name","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSboContextValueInput"}}}},"summary":"Create an SBO context value","description":"Creates an SBO context value. The value is unique. Link it to a type with contextValueIds on POST people/sbo-context-types or PATCH people/sbo-context-types/:id. Pass externalIdentifiers to record the keys other systems use for it. The response contains only the new id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrSboContextValues"]}},"/people/skills/search":{"post":{"operationId":"searchSkills","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSkillsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSkillsInput"}}}},"summary":"Search skills","description":"Searches skills in every status. A skill must match every filter you send. To find the skill another system knows, filter on externalIdentifier; several skills can share one value, so check how many come back. Results are ordered by creation, oldest first.","tags":["hrSkills"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/position-skill-requirements/bulk":{"patch":{"operationId":"bulkUpdatePositionSkillRequirements","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkUpdatePositionSkillRequirementsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, NOT_FOUND, POSITION_NOT_FOUND, SKILL_NOT_FOUND, SKILL_LEVEL_NOT_FOUND, SENIORITY_NOT_FOUND, SBO_CONTEXT_NOT_FOUND, DUPLICATE_REQUIREMENT, DUPLICATE_IN_REQUEST, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"value":{"type":"string"}},"additionalProperties":false,"required":["index","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"value":{"type":"string"}},"additionalProperties":false,"required":["index","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"value":{"type":"string"}},"additionalProperties":false,"required":["index","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkUpdatePositionSkillRequirementsInput"}}}},"summary":"Update position skill requirements in bulk","description":"Changes many requirements in one call. All or nothing: if any row fails, nothing changes and the error names the row index. Each row takes the same fields as PATCH people/position-skill-requirements/:id, plus the id. A requirement may appear in only one row.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPositionSkillRequirements"]},"post":{"operationId":"bulkCreatePositionSkillRequirements","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreatePositionSkillRequirementsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, POSITION_NOT_FOUND, SKILL_NOT_FOUND, SKILL_LEVEL_NOT_FOUND, SENIORITY_NOT_FOUND, SBO_CONTEXT_NOT_FOUND, DUPLICATE_REQUIREMENT, DUPLICATE_IN_REQUEST, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"value":{"type":"string"}},"additionalProperties":false,"required":["index","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"value":{"type":"string"}},"additionalProperties":false,"required":["index","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_LEVEL_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SENIORITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SBO_CONTEXT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_REQUIREMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"value":{"type":"string"}},"additionalProperties":false,"required":["index","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["index","fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"The 0-based index of the failing row."},"fieldName":{"type":"string"}},"additionalProperties":false,"required":["index","fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreatePositionSkillRequirementsInput"}}}},"summary":"Create position skill requirements in bulk","description":"Creates many requirements in one call. All or nothing: if any row fails, nothing is created and the error names the row index. Each row takes the same fields as POST people/position-skill-requirements. The response lists the new ids in the order of the rows.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPositionSkillRequirements"]}},"/people/skills":{"get":{"operationId":"skills","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[isCanonical]","in":"query","required":false,"description":"Filter isCanonical (equality)","schema":{"type":"boolean"}},{"name":"filter[isCanonical][ne]","in":"query","required":false,"description":"Filter isCanonical (ne)","schema":{"type":"boolean"}},{"name":"filter[isCanonical][gt]","in":"query","required":false,"description":"Filter isCanonical (gt)","schema":{"type":"boolean"}},{"name":"filter[isCanonical][gte]","in":"query","required":false,"description":"Filter isCanonical (gte)","schema":{"type":"boolean"}},{"name":"filter[isCanonical][lt]","in":"query","required":false,"description":"Filter isCanonical (lt)","schema":{"type":"boolean"}},{"name":"filter[isCanonical][lte]","in":"query","required":false,"description":"Filter isCanonical (lte)","schema":{"type":"boolean"}},{"name":"filter[isCanonical][in]","in":"query","required":false,"description":"Filter isCanonical (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isCanonical][notIn]","in":"query","required":false,"description":"Filter isCanonical (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isCanonical][between]","in":"query","required":false,"description":"Filter isCanonical (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","skillName","-skillName","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","skillName","description","isCanonical","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/skillsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List skills","description":"Lists skills in every status. Filter on status to leave out deprecated skills. The list doesn't include each skill's categories or external identifiers; GET people/skills/:id and POST people/skills/search return them.","tags":["hrSkills"]},"post":{"operationId":"createSkill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSkillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: CATEGORY_NOT_FOUND, SKILL_NAME_TAKEN, NAME_BELONGS_TO_DEPRECATED, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSkillInput"}}}},"summary":"Create a skill","description":"Creates a skill. skillName and description are stored as the English values. A skill name is unique across all skills, deprecated ones included: if a deprecated skill holds the name, the request fails with NAME_BELONGS_TO_DEPRECATED and names that skill, so you can reactivate it with POST people/skills/:id/reactivate.\n\nThe response contains only the new skill's id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrSkills"]}},"/people/skill-levels/search":{"post":{"operationId":"searchSkillLevels","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSkillLevelsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSkillLevelsInput"}}}},"summary":"Search skill levels","description":"Searches skill levels in every status. A record must match every filter you send. Results are ordered by creation, oldest first; sort by skillLevelOrder yourself for the proficiency order.","tags":["hrSkillLevels"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/skills/{id}":{"delete":{"operationId":"deleteSkill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteSkillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SKILL_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the skill."}],"summary":"Delete a skill","description":"Deprecates a skill. The skill stays readable with status 'Deprecated' and can be reactivated. The request fails with SKILL_IN_USE while active category mappings, employee skill assignments, position or staffing requirements, or skill relationships use it. Deleting a skill that is already deprecated succeeds and changes nothing.","tags":["hrSkills"]},"get":{"operationId":"getSkill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSkillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the skill."}],"summary":"Get a skill","description":"Returns one skill by id, in any status. skillName and description are the English values. categoryIds lists only the skill's active categories. externalIdentifiers holds the identifiers other systems use for the skill.","tags":["hrSkills"]},"patch":{"operationId":"updateSkill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateSkillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, CATEGORY_NOT_FOUND, SKILL_NAME_TAKEN, NAME_BELONGS_TO_DEPRECATED, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND, INVALID_EXTERNAL_URL","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SKILL_NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_BELONGS_TO_DEPRECATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"skillName":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["skillName","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXTERNAL_URL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the skill."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateSkillInput"}}}},"summary":"Update a skill","description":"Changes a skill. Send only the fields you want to change; a field you leave out keeps its value. Send description as null to clear it. categoryIds replaces the skill's full category set; send an empty array to remove the skill from every category. Add, change and remove external identifiers with createExternalIdentifiers, updateExternalIdentifiers and deleteExternalIdentifiers. A deprecated skill can be updated; reactivate it with POST people/skills/:id/reactivate to use it again.","tags":["hrSkills"]}},"/people/sbo-contexts/search":{"post":{"operationId":"searchSboContexts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSboContextsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: TOO_MANY_ITEMS, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"TOO_MANY_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxItems":{"type":"number"},"count":{"type":"number"}},"additionalProperties":false,"required":["maxItems","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSboContextsInput"}}}},"summary":"Search SBO contexts","description":"Searches SBO contexts. A record must match every filter you send. Results are ordered by creation, oldest first.","tags":["hrSboContexts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/sales-returns":{"get":{"operationId":"salesReturns","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryDate]","in":"query","required":false,"description":"Filter deliveryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][ne]","in":"query","required":false,"description":"Filter deliveryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gt]","in":"query","required":false,"description":"Filter deliveryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gte]","in":"query","required":false,"description":"Filter deliveryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lt]","in":"query","required":false,"description":"Filter deliveryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lte]","in":"query","required":false,"description":"Filter deliveryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][in]","in":"query","required":false,"description":"Filter deliveryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][notIn]","in":"query","required":false,"description":"Filter deliveryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][between]","in":"query","required":false,"description":"Filter deliveryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[returnType]","in":"query","required":false,"description":"Filter returnType (equality)","schema":{"type":"string"}},{"name":"filter[returnType][ne]","in":"query","required":false,"description":"Filter returnType (ne)","schema":{"type":"string"}},{"name":"filter[returnType][gt]","in":"query","required":false,"description":"Filter returnType (gt)","schema":{"type":"string"}},{"name":"filter[returnType][gte]","in":"query","required":false,"description":"Filter returnType (gte)","schema":{"type":"string"}},{"name":"filter[returnType][lt]","in":"query","required":false,"description":"Filter returnType (lt)","schema":{"type":"string"}},{"name":"filter[returnType][lte]","in":"query","required":false,"description":"Filter returnType (lte)","schema":{"type":"string"}},{"name":"filter[returnType][in]","in":"query","required":false,"description":"Filter returnType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][notIn]","in":"query","required":false,"description":"Filter returnType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][between]","in":"query","required":false,"description":"Filter returnType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnType][like]","in":"query","required":false,"description":"Filter returnType (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","deliveryDate","-deliveryDate","documentStatus","-documentStatus","totalAmount","-totalAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","deliveryDate","entityId","entityName","businessPartnerId","businessPartnerName","currency","totalAmount","returnFeeAmount","returnType","lineCount","referenceNumber","trackingNumber","sourceDocumentId","sourceDocumentType","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/salesReturnsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lineCount":1},{"id":"b81c4f30-27de-4a95-8106-3fd7e5a2c914","documentNumber":"SR-1043","documentStatus":"RECEIVED","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","currency":"EUR","totalAmount":"312.00","returnFeeAmount":"0.00","notes":"Wrong size shipped","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-16T11:45:00.000Z","lineCount":3}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List sales returns","description":"Lists sales returns, without their lines. Each return comes back with lineCount instead of its lines. To read the lines, use GET inventory/sales-returns/:id or POST inventory/sales-returns/search.\n\nTo filter by customer, reference number, tracking number, item, or warehouse, use POST inventory/sales-returns/search.","tags":["inventorySalesReturns"]},"post":{"operationId":"createSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"fromACustomerRma":{"value":{"data":{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}},"summary":"Six damaged units coming back against a delivery line"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSalesReturnInput"},"examples":{"fromACustomerRma":{"value":{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-18","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","notes":"Customer reports transit damage","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]},"summary":"Six damaged units coming back against a delivery line"}}}}},"summary":"Create a sales return","description":"Creates a sales return as a draft. The draft lists what the customer is sending back, line by line. No stock moves and no credit is created until you commit the return with POST inventory/sales-returns/:id/commit.\n\nThe response is the created return with its lines, in the same shape as GET inventory/sales-returns/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventorySalesReturns"]}},"/inventory/inventory-revaluations":{"post":{"operationId":"createInventoryRevaluation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createInventoryRevaluationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"writeStockDown":{"value":{"data":{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","costingValuationType":"revaluation","costingElementTypeId":"f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"6c2f9a41-7b58-4d30-91e6-4a0d8c25f3b7","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationCode":"WH-CENTRAL","unitCode":"EA","quantity":"150","currentUnitCost":"12","newUnitCost":"9","revaluationAmount":"-450"}]}},"summary":"Restating 150 units from 12 to 9 after a market fall"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, MISSING_CAPITALISATION_ACCOUNT, TRACKING_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createInventoryRevaluationInput"},"examples":{"writeStockDown":{"value":{"costingValuationType":"revaluation","costingElementTypeId":"f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","unitId":"d5a71e93-4c08-4b26-95f7-2e6a8c30b41f","quantity":"150","currentUnitCost":"12","newUnitCost":"9"}]},"summary":"Restating 150 units from 12 to 9 after a market fall"}}}}},"summary":"Create an inventory revaluation","description":"Creates an inventory revaluation as a draft. The revaluation gives the stock of one or more items a new unit cost, with each line in its own warehouse. No stock value changes until you commit the revaluation with POST inventory/inventory-revaluations/:id/commit.\n\nEach line states what the stock is valued at now, in currentUnitCost, and what it should be valued at, in newUnitCost. The API doesn't look up currentUnitCost, and refuses only a negative value.\n\nRead currentUnitCost from GET inventory/inventory-levels for the same item and warehouse. A wrong current cost puts the wrong difference in the journal entry.\n\nThe response is the created revaluation with its lines, in the same shape as GET inventory/inventory-revaluations/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryRevaluations"]},"get":{"operationId":"inventoryRevaluations","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[costingValuationType]","in":"query","required":false,"description":"Filter costingValuationType (equality)","schema":{"type":"string"}},{"name":"filter[costingValuationType][ne]","in":"query","required":false,"description":"Filter costingValuationType (ne)","schema":{"type":"string"}},{"name":"filter[costingValuationType][gt]","in":"query","required":false,"description":"Filter costingValuationType (gt)","schema":{"type":"string"}},{"name":"filter[costingValuationType][gte]","in":"query","required":false,"description":"Filter costingValuationType (gte)","schema":{"type":"string"}},{"name":"filter[costingValuationType][lt]","in":"query","required":false,"description":"Filter costingValuationType (lt)","schema":{"type":"string"}},{"name":"filter[costingValuationType][lte]","in":"query","required":false,"description":"Filter costingValuationType (lte)","schema":{"type":"string"}},{"name":"filter[costingValuationType][in]","in":"query","required":false,"description":"Filter costingValuationType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[costingValuationType][notIn]","in":"query","required":false,"description":"Filter costingValuationType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[costingValuationType][between]","in":"query","required":false,"description":"Filter costingValuationType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[costingValuationType][like]","in":"query","required":false,"description":"Filter costingValuationType (like)","schema":{"type":"string"}},{"name":"filter[reasonCodeId]","in":"query","required":false,"description":"Filter reasonCodeId (equality)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][ne]","in":"query","required":false,"description":"Filter reasonCodeId (ne)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][gt]","in":"query","required":false,"description":"Filter reasonCodeId (gt)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][gte]","in":"query","required":false,"description":"Filter reasonCodeId (gte)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][lt]","in":"query","required":false,"description":"Filter reasonCodeId (lt)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][lte]","in":"query","required":false,"description":"Filter reasonCodeId (lte)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][in]","in":"query","required":false,"description":"Filter reasonCodeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCodeId][notIn]","in":"query","required":false,"description":"Filter reasonCodeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCodeId][between]","in":"query","required":false,"description":"Filter reasonCodeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reasonCodeId][like]","in":"query","required":false,"description":"Filter reasonCodeId (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","documentStatus","-documentStatus","costingValuationType","-costingValuationType","totalRevaluationAmount","-totalRevaluationAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","entityId","entityName","costingValuationType","capitalisationExpenseAccountId","costingElementTypeId","reasonCodeId","reasonCode","reasonCodeDescription","currency","totalRevaluationAmount","active","notes","lineCount","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/inventoryRevaluationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"COMMITTED","documentDate":"2026-08-18","costingValuationType":"revaluation","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"2b7d95f3-1e46-4c80-a3f9-6d10c48b7e25","documentNumber":"REV-1186","documentStatus":"DRAFT","documentDate":"2026-08-17","costingValuationType":"directCostCapitalisation","currency":"EUR","totalRevaluationAmount":"1280","lineCount":4,"lastModifiedDate":"2026-08-17T16:41:09.220Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List inventory revaluations","description":"Lists inventory revaluations, without their lines. Each revaluation comes back with lineCount and totalRevaluationAmount instead of its lines. To read the lines, use GET inventory/inventory-revaluations/:id or POST inventory/inventory-revaluations/search.\n\nTo filter by item or warehouse, use POST inventory/inventory-revaluations/search.","tags":["inventoryInventoryRevaluations"]}},"/inventory/item-types/search":{"post":{"operationId":"searchItemTypes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchItemTypesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"serviceTypes":{"value":{"data":{"items":[{"id":"b1d47e29-3c86-4a05-9f72-04e5c13b8a60","name":"Service","description":"Bought but never stocked","procurable":true,"stockable":false,"active":true,"itemCount":7,"lastModifiedDate":"2026-08-18T09:15:02.108Z"}],"pagination":{"hasMore":false}}},"summary":"The types a charge item belongs under"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchItemTypesInput"},"examples":{"serviceTypes":{"value":{"filters":{"stockable":false}},"summary":"The types a charge item belongs under"}}}}},"summary":"Search item types","description":"Searches item types. The filters go in the request body. The fields are the same as on GET inventory/item-types/:id, including itemCount.","tags":["inventoryItemTypes"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/inventory-decreases/{id}":{"get":{"operationId":"getInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDraftCountCorrection":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"A drafted write-off of one batch-tracked item, out of one bin"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory decrease you want to retrieve.","examples":{"aDraftCountCorrection":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"summary":"Retrieve an inventory decrease","description":"Retrieves an inventory decrease. The inventory decrease comes back with its main fields, its lines, and each line's batch, serial, and bin details.\n\nPOST inventory/inventory-decreases/search returns the same fields. The collection GET inventory/inventory-decreases returns the main fields without the lines.\n\ndocumentStatus says what you can do next. A 'DRAFT' can be updated, committed, or deleted. A 'COMMITTED' one can't be changed or deleted, and a 'CANCELLED' one can only be deleted.","tags":["inventoryInventoryDecreases"]},"delete":{"operationId":"deleteInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"discardADraft":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}},"summary":"A draft that was raised in error"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory decrease you want to delete.","examples":{"discardADraft":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"summary":"Delete an inventory decrease","description":"Deletes an inventory decrease. The lines and their batch, serial, and bin details are deleted with the document. The batch numbers and serial numbers the lines used are kept.\n\nA draft or a canceled inventory decrease can be deleted. A committed one can't.","tags":["inventoryInventoryDecreases"]},"patch":{"operationId":"updateInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"recountOneLine":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Forklift damage, aisle 4 — two more found","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:40:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"14.00","inventoryQuantity":"14.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"14.00","inventoryQuantity":"14.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"14.00","inventoryQuantity":"14.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"Two more damaged units turned up; the batch and bin detail is restated to match"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, REASON_CODE_NOT_APPLICABLE, NO_LINES, INVALID_QUANTITY, UNKNOWN_TRACKING_NUMBER, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory decrease you want to update.","examples":{"recountOneLine":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateInventoryDecreaseInput"},"examples":{"recountOneLine":{"value":{"notes":"Forklift damage, aisle 4 — two more found","updateLines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","quantity":"14.00","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"14.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"14.00","batchNumber":"LOT-2026-08-14"}]}]},"summary":"Two more damaged units turned up; the batch and bin detail is restated to match"}}}}},"summary":"Update an inventory decrease","description":"Updates an inventory decrease with the fields you send. A field you leave out keeps its current value. Lines change through three separate arrays: deleteLines, updateLines, and createLines. You can send any combination in one request.\n\nLeave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value. On an updateLines item, sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin entry the line should keep.\n\nLeave all three out to keep the line's tracking as it is.\n\nOnly a draft can be changed. You can change its date, reason code, notes, and lines, but not its location. The response is the whole updated document.\n\nOne request can remove a line and add its replacement.","tags":["inventoryInventoryDecreases"]}},"/inventory/warehouse-transfers/{id}/bill":{"post":{"operationId":"billWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/billWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"invoiceTheOtherEntity":{"value":{"data":{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","billingStatus":"BILLED","intercompanyBillId":"884213","intercompanyBillNumber":"IC-BILL-1042","warnings":[]}},"summary":"Closing the intercompany payable after the goods have moved"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_BILLABLE, ALREADY_BILLED, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_BILLABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_BILLABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_BILLABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer you want to bill.","examples":{"invoiceTheOtherEntity":{"value":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/billWarehouseTransferInput"},"examples":{"invoiceTheOtherEntity":{"value":{},"summary":"Closing the intercompany payable after the goods have moved"}}}}},"summary":"Bill an intercompany transfer","description":"Bills an intercompany transfer. Charges the receiving legal entity (toEntityId) for the goods and sets the transfer's billingStatus to 'BILLED'. Each line is billed at its unitTransferValue, in the transfer's contractualCurrency.\n\nOnly a committed transfer with transferType 'INTERCOMPANY' that has not been billed can be billed. Committing a transfer does not bill it, so use this endpoint after POST inventory/warehouse-transfers/:id/commit.","tags":["inventoryWarehouseTransfers"]}},"/inventory/account-determination-rules/bulk-delete":{"post":{"operationId":"bulkDeleteAccountDeterminationRules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteAccountDeterminationRulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteAccountDeterminationRulesInput"}}}},"summary":"Bulk delete account determination rules","description":"Deletes multiple account determination rules in one request. Each rule's reason-code overrides are deleted with it. The response lists each deleted rule's `id` and `ruleName` in the order you sent the ids. If one rule cannot be deleted, the request fails and no rules are deleted.\n\nJournal entries that already used the rules do not change.\n\nTo turn off a rule without deleting it, set `isActive` to false with PATCH inventory/account-determination-rules/:id. To delete a single rule, use DELETE inventory/account-determination-rules/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryAccountDeterminationRules"]}},"/inventory/serial-numbers/search":{"post":{"operationId":"searchSerialNumbers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSerialNumbersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"onHand":{"value":{"data":{"items":[{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","manufacturerSerialNumber":"MFG-77-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"cost":"250","originalCost":"250","currency":"GBP","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Every unit of one item that is in stock."},"traceOne":{"value":{"data":{"items":[{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","manufacturerSerialNumber":"MFG-77-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"cost":"250","originalCost":"250","currency":"GBP","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"One unit, found by its serial number."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSerialNumbersInput"},"examples":{"onHand":{"value":{"filters":{"itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","inStock":true}},"summary":"Every unit of one item that is in stock."},"traceOne":{"value":{"filters":{"serialNumber":"SN-000418"}},"summary":"One unit, found by its serial number."}}}}},"summary":"Search serial numbers","description":"Searches serial numbers, with their costs.","tags":["inventorySerialNumbers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/reason-codes/{id}":{"patch":{"operationId":"updateReasonCode","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateReasonCodeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"replaceTheDocumentTypes":{"value":{"data":{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"}},"summary":"Declare the whole set — the third value is added, and anything not listed is removed"},"retireACode":{"value":{"data":{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"}},"summary":"Stop a reason code being selectable without deleting it or touching its documents"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_CODE, UNKNOWN_DOCUMENT_TYPES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["code","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["documentTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the reason code you want to update.","examples":{"replaceTheDocumentTypes":{"value":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"},"retireACode":{"value":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateReasonCodeInput"},"examples":{"replaceTheDocumentTypes":{"value":{"documentTypes":["InventoryDecrease","SalesReturn","Disposal"]},"summary":"Declare the whole set — the third value is added, and anything not listed is removed"},"retireACode":{"value":{"isActive":false},"summary":"Stop a reason code being selectable without deleting it or touching its documents"}}}}},"summary":"Update a reason code","description":"Updates a reason code with the fields you send. A field you leave out keeps its current value. A documentTypes list you send replaces the whole list, so include every document type you want to keep.\n\nYou can change the reason code's code, description, isActive, requiresApproval, and documentTypes. The response is only its id.\n\nTo add a document type, read the current documentTypes with GET inventory/reason-codes/:id and send them back with the new one.\n\nTo see the updated reason code, use GET inventory/reason-codes/:id.","tags":["inventoryReasonCodes"]},"get":{"operationId":"getReasonCode","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReasonCodeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDecreaseReason":{"value":{"data":{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","code":"DAMAGE","description":"Stock damaged in the warehouse","isActive":true,"requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A reason code usable on write-downs and on returns, needing approval"},"withNoDocumentTypes":{"value":{"data":{"id":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c","code":"RECOUNT","isActive":false,"requiresApproval":false,"documentTypes":[],"lastModifiedDate":"2026-05-12T09:31:00.000Z"}},"summary":"A reason code linked to nothing yet returns an empty array, not an absent field"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the reason code you want to retrieve.","examples":{"aDecreaseReason":{"value":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"},"withNoDocumentTypes":{"value":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c"}}}],"summary":"Retrieve a reason code","description":"Retrieves a reason code. The reason code comes back with its settings and the document types it can be selected on.\n\nPOST inventory/reason-codes/search returns the same fields. The collection GET inventory/reason-codes returns them all except documentTypes.\n\nTo find a reason code by its code instead of its id, filter the collection on code.","tags":["inventoryReasonCodes"]},"delete":{"operationId":"deleteReasonCode","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteReasonCodeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c","code":"RECOUNT"}},"summary":"Removing a reason code no document has used"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REASON_CODE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the reason code you want to delete.","examples":{"basic":{"value":"c30b6f18-4a92-4e05-8d73-1b6f95e2043c"}}}],"summary":"Delete a reason code","description":"Deletes a reason code. Deleting the reason code also deletes its links to document types. The response is the reason code's id and code.\n\nA reason code that an inventory increase, inventory decrease, inventory revaluation, sales return line, or account determination rule override still uses can't be deleted. To retire the reason code instead, set isActive to false with PATCH inventory/reason-codes/:id.\n\nTo delete several at once, use POST inventory/reason-codes/bulk-delete.","tags":["inventoryReasonCodes"]}},"/inventory/purchase-returns/{id}/approve":{"post":{"operationId":"approvePurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approvePurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase return you want to approve. Format: UUID.","example":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvePurchaseReturnInput"}}}},"summary":"Approve a purchase return","description":"Approves a draft purchase return. Approving checks that the purchase return could be shipped now:\n\n- all its lines use the same warehouse\n- each line's item is an active inventory item\n- the warehouse has each line's quantity in stock\n- no line returns more than is still returnable on the purchase order line it draws on","tags":["inventoryPurchaseReturns"]}},"/inventory/inventory-increases/{id}/commit":{"post":{"operationId":"commitInventoryIncrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitInventoryIncreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"postTheCount":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":[]}},"summary":"The count correction is posted; stock rises and a journal entry is written"},"postWithASoftBinBreach":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":["Bin A-01-02 exceeds its maximum quantity by 20"]}},"summary":"The destination bin is over its configured limit, but not configured to hard-block, so the commit succeeds with an advisory"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory increase you want to commit.","examples":{"postTheCount":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"},"postWithASoftBinBreach":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitInventoryIncreaseInput"},"examples":{"postTheCount":{"value":{},"summary":"The count correction is posted; stock rises and a journal entry is written"},"postWithASoftBinBreach":{"value":{},"summary":"The destination bin is over its configured limit, but not configured to hard-block, so the commit succeeds with an advisory"}}}}},"summary":"Commit an inventory increase","description":"Commits an inventory increase. The lines' quantities are added to stock and documentStatus becomes 'COMMITTED'. The response includes journalEntryId and any warnings.\n\nOnly a draft can be committed. Tracking, bin requirements, and bin capacity are checked when you commit, and a failed check returns POSTING_REJECTED. A committed inventory increase can't be changed or deleted, and no endpoint cancels it.\n\nCommits of the same item at the same location may run at the same time. A database write conflict between them is not a rejection: the platform retries the request, so it never returns POSTING_REJECTED.","tags":["inventoryInventoryIncreases"]}},"/inventory/unit-of-measure-groups/{id}":{"delete":{"operationId":"deleteUnitOfMeasureGroup","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteUnitOfMeasureGroupOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4","name":"Weight"}},"summary":"Removing a group whose lines have already been cleared and that no item uses"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNIT_OF_MEASURE_GROUP_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure group you want to delete.","examples":{"basic":{"value":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"}}}],"summary":"Delete a unit of measure group","description":"Deletes a unit of measure group. The response gives the name the group had.\n\nThe group must be empty first, with no items assigned to it and no conversion lines, the base unit's line included. Reassign the items, then remove the lines with deleteLines on PATCH inventory/unit-of-measure-groups/:id.\n\nTo delete several groups at once, use POST inventory/unit-of-measure-groups/bulk-delete.","tags":["inventoryUnitOfMeasureGroups"]},"patch":{"operationId":"updateUnitOfMeasureGroup","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateUnitOfMeasureGroupOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"addAConversion":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}},"summary":"Add a pallet of 480 to an existing group, leaving its other lines alone"},"allThreeAtOnce":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}},"summary":"Rename the group, drop one line and add another — one transaction, deletes applied first"},"correctAFactor":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}},"summary":"Change one line's factor, addressing it by its own id"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNIT_NOT_FOUND, DUPLICATE_UNIT_IN_GROUP, LINE_NOT_FOUND, INVALID_CONVERSION_FACTOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_IN_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string"}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CONVERSION_FACTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasureId":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasureId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure group you want to update.","examples":{"addAConversion":{"value":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"},"allThreeAtOnce":{"value":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"},"correctAFactor":{"value":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateUnitOfMeasureGroupInput"},"examples":{"addAConversion":{"value":{"createLines":[{"unitOfMeasureId":"d1f7b204-53ea-4c98-8b16-7f420e93ac57","conversionFactor":"480.00"}]},"summary":"Add a pallet of 480 to an existing group, leaving its other lines alone"},"allThreeAtOnce":{"value":{"name":"Packaging (revised)","deleteLines":["e04a83f5-91c6-4d27-a5b0-73f2e618d94c"],"createLines":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"24.00"}]},"summary":"Rename the group, drop one line and add another — one transaction, deletes applied first"},"correctAFactor":{"value":{"updateLines":[{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","conversionFactor":"24.00"}]},"summary":"Change one line's factor, addressing it by its own id"}}}}},"summary":"Update a unit of measure group","description":"Updates a unit of measure group with the fields you send. A field you leave out keeps its current value. Conversion lines change through three separate arrays, applied in this order: deleteLines, updateLines, createLines.\n\nLeave out all three to keep the lines as they are.\n\nChanges a unit of measure group's name, description, or conversion lines. The base unit can't be changed.\n\ndeleteLines and updateLines take line ids, and createLines takes new lines with no id. Because deletes come first, one request can remove a unit's line and add it back with a different factor.\n\nThe response contains only the group's id. To see the updated group, including the ids of new lines, use GET inventory/unit-of-measure-groups/:id.","tags":["inventoryUnitOfMeasureGroups"]},"get":{"operationId":"getUnitOfMeasureGroup","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getUnitOfMeasureGroupOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aPackagingGroup":{"value":{"data":{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846","name":"Packaging","description":"Eaches, boxes and pallets","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","baseUnitCode":"EA","lines":[{"id":"9f1b60d4-27ac-4e53-b8f1-05d3e79a2c68","unitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","conversionFactor":"1.00","isBaseUnit":true},{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"BOX","unitName":"Box","conversionFactor":"12.00","isBaseUnit":false}],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A group whose base unit is Each, with a box holding twelve"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the unit of measure group you want to retrieve.","examples":{"aPackagingGroup":{"value":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"}}}],"summary":"Retrieve a unit of measure group","description":"Retrieves a unit of measure group. The response has the whole group: its name, its base unit, and every conversion line.\n\nGET inventory/unit-of-measure-groups returns only the group's own fields, without the base unit or the lines. POST inventory/unit-of-measure-groups/search returns the whole group, like this endpoint.","tags":["inventoryUnitOfMeasureGroups"]}},"/inventory/bins/{id}":{"delete":{"operationId":"deleteBin","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteBinOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"empty":{"value":{"data":{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1"}},"summary":"A bin created in error, before anything was put in it"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"}},"additionalProperties":false,"required":["detailRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"}},"additionalProperties":false,"required":["detailRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"detailRows":{"type":"number"}},"additionalProperties":false,"required":["detailRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bin you want to delete.","examples":{"empty":{"value":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"}}}],"summary":"Delete a bin","description":"Deletes a bin. Only an empty bin can be deleted. The response is the bin's id and binCode.\n\nTo delete a bin that still has stock, move the stock out first. To close the bin and keep its contents where they are, set active to false with PATCH inventory/bins/:id instead.\n\nTo delete several bins at once, use POST inventory/bins/bulk-delete.","tags":["inventoryBins"]},"get":{"operationId":"getBin","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBinOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"pickingBin":{"value":{"data":{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"isReceivingBin":false,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","supportsPerishable":false,"active":true,"capacity":{"currentQuantity":"310","currentWeight":"148.2","quantityUtilizationPct":"62","weightUtilizationPct":"59.3","status":"ok","mixedUnits":false},"lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"A picking bin at 62% of its quantity limit and 59% of its weight limit"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bin you want to retrieve.","examples":{"pickingBin":{"value":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"}}}],"summary":"Retrieve a bin","description":"Retrieves a bin. Use the bin's id, not its binCode.\n\nThe bin comes back with its layout, limits, and settings, and with capacity. capacity is what the bin contains now, measured against the bin's limits. For a bin with no limits, capacity reports zero contents, whatever the bin contains.\n\nOnly this endpoint returns capacity. The collection GET inventory/bins and POST inventory/bins/search do not.","tags":["inventoryBins"]},"patch":{"operationId":"updateBin","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBinOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"closeIt":{"value":{"data":{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"}},"summary":"Take a bin out of use without moving its stock"},"raiseTheLimit":{"value":{"data":{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"}},"summary":"Raise a weight limit — the unit is already on the bin, so it need not be repeated"},"removeTheLimit":{"value":{"data":{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"}},"summary":"Remove a weight limit — its unit is removed with it, and the capacity check stops checking weight"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, DUPLICATE_CODE, WAREHOUSE_NOT_BIN_TRACKABLE, UNKNOWN_VALUE, INCOMPLETE_LIMIT, NON_POSITIVE_LIMIT, INVALID_RANGE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bin you want to update.","examples":{"closeIt":{"value":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"},"raiseTheLimit":{"value":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"},"removeTheLimit":{"value":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBinInput"},"examples":{"closeIt":{"value":{"active":false},"summary":"Take a bin out of use without moving its stock"},"raiseTheLimit":{"value":{"maxWeight":"300"},"summary":"Raise a weight limit — the unit is already on the bin, so it need not be repeated"},"removeTheLimit":{"value":{"maxWeight":null},"summary":"Remove a weight limit — its unit is removed with it, and the capacity check stops checking weight"}}}}},"summary":"Update a bin","description":"Updates a bin with the fields you send. A field you leave out keeps its current value.\n\nUse the bin's id, not its binCode.\n\nYou can change the bin's layout, flags, limits, and temperature range. binCode, barcode, and the warehouse are not accepted.\n\nThe limit and range checks look at the request and the current bin together. For example, sending maxWeight for a bin with no maxWeightUnit is refused, because a limit needs a unit.\n\nTo remove a limit, send null for it: maxQuantity, maxWeight or maxVolume. A null maxWeight or maxVolume removes its unit too. A limit of zero or below is refused, so null is the only way to leave a bin with no limit.\n\nThe layout fields (aisle, rack, shelfLevel, zone, itemPosition) and the temperature fields (tempZone, tempMin, tempMax) are cleared the same way, by sending null.\n\nThe response is only the bin's id. To see the updated bin, use GET inventory/bins/:id.","tags":["inventoryBins"]}},"/inventory/purchase-returns":{"post":{"operationId":"createPurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_RETURN_TYPE, NO_LINES, INVALID_QUANTITY, INCOMPLETE_LINE, UNSUPPORTED_SOURCE_TYPE, MULTIPLE_PURCHASE_ORDERS, MISSING_TRACKING_SELECTION, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"required":["value","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"required":["value","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"required":["value","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","kind","itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseReturnInput"}}}},"summary":"Create a purchase return","description":"Creates a purchase return with the `documentStatus` 'DRAFT'. The response contains the whole purchase return.\n\nA purchase return is created from one purchase order: every line names a line of that purchase order in `sourceDocumentLineId`. To create a purchase return for everything still returnable on a purchase order, use POST inventory/purchase-returns/from-purchase-order.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryPurchaseReturns"]},"get":{"operationId":"purchaseReturns","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryDate]","in":"query","required":false,"description":"Filter deliveryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][ne]","in":"query","required":false,"description":"Filter deliveryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gt]","in":"query","required":false,"description":"Filter deliveryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gte]","in":"query","required":false,"description":"Filter deliveryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lt]","in":"query","required":false,"description":"Filter deliveryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lte]","in":"query","required":false,"description":"Filter deliveryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][in]","in":"query","required":false,"description":"Filter deliveryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][notIn]","in":"query","required":false,"description":"Filter deliveryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][between]","in":"query","required":false,"description":"Filter deliveryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnType]","in":"query","required":false,"description":"Filter returnType (equality)","schema":{"type":"string"}},{"name":"filter[returnType][ne]","in":"query","required":false,"description":"Filter returnType (ne)","schema":{"type":"string"}},{"name":"filter[returnType][gt]","in":"query","required":false,"description":"Filter returnType (gt)","schema":{"type":"string"}},{"name":"filter[returnType][gte]","in":"query","required":false,"description":"Filter returnType (gte)","schema":{"type":"string"}},{"name":"filter[returnType][lt]","in":"query","required":false,"description":"Filter returnType (lt)","schema":{"type":"string"}},{"name":"filter[returnType][lte]","in":"query","required":false,"description":"Filter returnType (lte)","schema":{"type":"string"}},{"name":"filter[returnType][in]","in":"query","required":false,"description":"Filter returnType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][notIn]","in":"query","required":false,"description":"Filter returnType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[returnType][between]","in":"query","required":false,"description":"Filter returnType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[returnType][like]","in":"query","required":false,"description":"Filter returnType (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","deliveryDate","-deliveryDate","documentStatus","-documentStatus","totalAmount","-totalAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","deliveryDate","shippedDate","returnType","entityId","entityName","businessPartnerId","businessPartnerName","referenceNumber","currency","totalAmount","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/purchaseReturnsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List purchase returns","description":"Lists purchase returns, with their header fields only. To get the lines of the purchase returns, or to filter by item or warehouse, use POST inventory/purchase-returns/search.","tags":["inventoryPurchaseReturns"]}},"/inventory/inventory-decreases":{"get":{"operationId":"inventoryDecreases","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[reasonCodeId]","in":"query","required":false,"description":"Filter reasonCodeId (equality)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][ne]","in":"query","required":false,"description":"Filter reasonCodeId (ne)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][gt]","in":"query","required":false,"description":"Filter reasonCodeId (gt)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][gte]","in":"query","required":false,"description":"Filter reasonCodeId (gte)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][lt]","in":"query","required":false,"description":"Filter reasonCodeId (lt)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][lte]","in":"query","required":false,"description":"Filter reasonCodeId (lte)","schema":{"type":"string"}},{"name":"filter[reasonCodeId][in]","in":"query","required":false,"description":"Filter reasonCodeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCodeId][notIn]","in":"query","required":false,"description":"Filter reasonCodeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCodeId][between]","in":"query","required":false,"description":"Filter reasonCodeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reasonCodeId][like]","in":"query","required":false,"description":"Filter reasonCodeId (like)","schema":{"type":"string"}},{"name":"filter[reasonCode]","in":"query","required":false,"description":"Filter reasonCode (equality)","schema":{"type":"string"}},{"name":"filter[reasonCode][ne]","in":"query","required":false,"description":"Filter reasonCode (ne)","schema":{"type":"string"}},{"name":"filter[reasonCode][gt]","in":"query","required":false,"description":"Filter reasonCode (gt)","schema":{"type":"string"}},{"name":"filter[reasonCode][gte]","in":"query","required":false,"description":"Filter reasonCode (gte)","schema":{"type":"string"}},{"name":"filter[reasonCode][lt]","in":"query","required":false,"description":"Filter reasonCode (lt)","schema":{"type":"string"}},{"name":"filter[reasonCode][lte]","in":"query","required":false,"description":"Filter reasonCode (lte)","schema":{"type":"string"}},{"name":"filter[reasonCode][in]","in":"query","required":false,"description":"Filter reasonCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCode][notIn]","in":"query","required":false,"description":"Filter reasonCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reasonCode][between]","in":"query","required":false,"description":"Filter reasonCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[reasonCode][like]","in":"query","required":false,"description":"Filter reasonCode (like)","schema":{"type":"string"}},{"name":"filter[offsetAccountId]","in":"query","required":false,"description":"Filter offsetAccountId (equality)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][ne]","in":"query","required":false,"description":"Filter offsetAccountId (ne)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][gt]","in":"query","required":false,"description":"Filter offsetAccountId (gt)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][gte]","in":"query","required":false,"description":"Filter offsetAccountId (gte)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][lt]","in":"query","required":false,"description":"Filter offsetAccountId (lt)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][lte]","in":"query","required":false,"description":"Filter offsetAccountId (lte)","schema":{"type":"string"}},{"name":"filter[offsetAccountId][in]","in":"query","required":false,"description":"Filter offsetAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[offsetAccountId][notIn]","in":"query","required":false,"description":"Filter offsetAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[offsetAccountId][between]","in":"query","required":false,"description":"Filter offsetAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[offsetAccountId][like]","in":"query","required":false,"description":"Filter offsetAccountId (like)","schema":{"type":"string"}},{"name":"filter[offsetKind]","in":"query","required":false,"description":"Filter offsetKind (equality)","schema":{"type":"string"}},{"name":"filter[offsetKind][ne]","in":"query","required":false,"description":"Filter offsetKind (ne)","schema":{"type":"string"}},{"name":"filter[offsetKind][gt]","in":"query","required":false,"description":"Filter offsetKind (gt)","schema":{"type":"string"}},{"name":"filter[offsetKind][gte]","in":"query","required":false,"description":"Filter offsetKind (gte)","schema":{"type":"string"}},{"name":"filter[offsetKind][lt]","in":"query","required":false,"description":"Filter offsetKind (lt)","schema":{"type":"string"}},{"name":"filter[offsetKind][lte]","in":"query","required":false,"description":"Filter offsetKind (lte)","schema":{"type":"string"}},{"name":"filter[offsetKind][in]","in":"query","required":false,"description":"Filter offsetKind (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[offsetKind][notIn]","in":"query","required":false,"description":"Filter offsetKind (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[offsetKind][between]","in":"query","required":false,"description":"Filter offsetKind (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[offsetKind][like]","in":"query","required":false,"description":"Filter offsetKind (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","documentStatus","-documentStatus","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","entityId","entityName","locationId","locationCode","locationName","reasonCodeId","reasonCode","reasonCodeDescription","offsetAccountId","offsetKind","currency","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/inventoryDecreasesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lineCount":1},{"id":"0f5c8a24-91b7-4e63-8d02-4a7e1b96c380","documentNumber":"DEC-43","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Quarterly shrinkage write-off","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-15T14:20:00.000Z","lineCount":4}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List inventory decreases","description":"Lists inventory decreases. Each inventory decrease comes back with its main fields and lineCount, but without the lines.\n\nTo read the lines, use GET inventory/inventory-decreases/:id or POST inventory/inventory-decreases/search. To filter by item, use POST inventory/inventory-decreases/search.","tags":["inventoryInventoryDecreases"]},"post":{"operationId":"createInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aBatchTrackedCountCorrection":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"Twelve damaged units of one lot, taken from one bin"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, REASON_CODE_NOT_APPLICABLE, NO_LINES, INVALID_QUANTITY, UNKNOWN_TRACKING_NUMBER, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createInventoryDecreaseInput"},"examples":{"aBatchTrackedCountCorrection":{"value":{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Forklift damage, aisle 4","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]},"summary":"Twelve damaged units of one lot, taken from one bin"}}}}},"summary":"Create an inventory decrease","description":"Creates an inventory decrease as a draft, with its lines. The response is the whole document, in the same shape as GET inventory/inventory-decreases/:id.\n\nNo stock moves and no journal entry is written until you commit the draft with POST inventory/inventory-decreases/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryDecreases"]}},"/inventory/items":{"post":{"operationId":"createItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"freightService":{"value":{"data":{"id":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT"}},"summary":"A charge item for freight: no stock, not sold, and carrying the allocation mode a landed cost should use for it"},"stocked":{"value":{"data":{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01"}},"summary":"A stocked, moving-average item, weighed so landed cost allocation will work on it"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DUPLICATE_CODE, UNKNOWN_VALUE, TRACKING_MISMATCH, ITEM_TYPE_NOT_STOCKABLE, VALUATION_METHOD_UNAVAILABLE, UNIT_NOT_IN_UNIT_GROUP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createItemInput"},"examples":{"freightService":{"value":{"itemCode":"SVC-FREIGHT","itemName":"Inbound freight","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","valuationMethod":"none","isInventory":false,"isSalesItem":false,"defaultAllocationMode":"Weight"},"summary":"A charge item for freight: no stock, not sold, and carrying the allocation mode a landed cost should use for it"},"stocked":{"value":{"itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","valuationMethod":"movingAverage","weight":"1.4","weightUnit":"Kg"},"summary":"A stocked, moving-average item, weighed so landed cost allocation will work on it"}}}}},"summary":"Create an item","description":"Creates an item. The item is added to your tenant. The response is its id and item code.\n\nSet weight, length, width, and height if the item will ever be received under a landed cost. A landed cost with the Weight or Volume allocation mode is refused when an item on its receipt has a missing or zero measurement. POST inventory/items/search with missingWeight or missingDimensions finds the items with no weight or with a missing dimension.\n\nRead the full record with GET inventory/items/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItems"]},"get":{"operationId":"items","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[externalItemId]","in":"query","required":false,"description":"Filter externalItemId (equality)","schema":{"type":"string"}},{"name":"filter[externalItemId][ne]","in":"query","required":false,"description":"Filter externalItemId (ne)","schema":{"type":"string"}},{"name":"filter[externalItemId][gt]","in":"query","required":false,"description":"Filter externalItemId (gt)","schema":{"type":"string"}},{"name":"filter[externalItemId][gte]","in":"query","required":false,"description":"Filter externalItemId (gte)","schema":{"type":"string"}},{"name":"filter[externalItemId][lt]","in":"query","required":false,"description":"Filter externalItemId (lt)","schema":{"type":"string"}},{"name":"filter[externalItemId][lte]","in":"query","required":false,"description":"Filter externalItemId (lte)","schema":{"type":"string"}},{"name":"filter[externalItemId][in]","in":"query","required":false,"description":"Filter externalItemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalItemId][notIn]","in":"query","required":false,"description":"Filter externalItemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalItemId][between]","in":"query","required":false,"description":"Filter externalItemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalItemId][like]","in":"query","required":false,"description":"Filter externalItemId (like)","schema":{"type":"string"}},{"name":"filter[brandName]","in":"query","required":false,"description":"Filter brandName (equality)","schema":{"type":"string"}},{"name":"filter[brandName][ne]","in":"query","required":false,"description":"Filter brandName (ne)","schema":{"type":"string"}},{"name":"filter[brandName][gt]","in":"query","required":false,"description":"Filter brandName (gt)","schema":{"type":"string"}},{"name":"filter[brandName][gte]","in":"query","required":false,"description":"Filter brandName (gte)","schema":{"type":"string"}},{"name":"filter[brandName][lt]","in":"query","required":false,"description":"Filter brandName (lt)","schema":{"type":"string"}},{"name":"filter[brandName][lte]","in":"query","required":false,"description":"Filter brandName (lte)","schema":{"type":"string"}},{"name":"filter[brandName][in]","in":"query","required":false,"description":"Filter brandName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[brandName][notIn]","in":"query","required":false,"description":"Filter brandName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[brandName][between]","in":"query","required":false,"description":"Filter brandName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[brandName][like]","in":"query","required":false,"description":"Filter brandName (like)","schema":{"type":"string"}},{"name":"filter[itemTypeId]","in":"query","required":false,"description":"Filter itemTypeId (equality)","schema":{"type":"string"}},{"name":"filter[itemTypeId][ne]","in":"query","required":false,"description":"Filter itemTypeId (ne)","schema":{"type":"string"}},{"name":"filter[itemTypeId][gt]","in":"query","required":false,"description":"Filter itemTypeId (gt)","schema":{"type":"string"}},{"name":"filter[itemTypeId][gte]","in":"query","required":false,"description":"Filter itemTypeId (gte)","schema":{"type":"string"}},{"name":"filter[itemTypeId][lt]","in":"query","required":false,"description":"Filter itemTypeId (lt)","schema":{"type":"string"}},{"name":"filter[itemTypeId][lte]","in":"query","required":false,"description":"Filter itemTypeId (lte)","schema":{"type":"string"}},{"name":"filter[itemTypeId][in]","in":"query","required":false,"description":"Filter itemTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemTypeId][notIn]","in":"query","required":false,"description":"Filter itemTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemTypeId][between]","in":"query","required":false,"description":"Filter itemTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemTypeId][like]","in":"query","required":false,"description":"Filter itemTypeId (like)","schema":{"type":"string"}},{"name":"filter[categoryId]","in":"query","required":false,"description":"Filter categoryId (equality)","schema":{"type":"string"}},{"name":"filter[categoryId][ne]","in":"query","required":false,"description":"Filter categoryId (ne)","schema":{"type":"string"}},{"name":"filter[categoryId][gt]","in":"query","required":false,"description":"Filter categoryId (gt)","schema":{"type":"string"}},{"name":"filter[categoryId][gte]","in":"query","required":false,"description":"Filter categoryId (gte)","schema":{"type":"string"}},{"name":"filter[categoryId][lt]","in":"query","required":false,"description":"Filter categoryId (lt)","schema":{"type":"string"}},{"name":"filter[categoryId][lte]","in":"query","required":false,"description":"Filter categoryId (lte)","schema":{"type":"string"}},{"name":"filter[categoryId][in]","in":"query","required":false,"description":"Filter categoryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][notIn]","in":"query","required":false,"description":"Filter categoryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][between]","in":"query","required":false,"description":"Filter categoryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[categoryId][like]","in":"query","required":false,"description":"Filter categoryId (like)","schema":{"type":"string"}},{"name":"filter[unitGroupId]","in":"query","required":false,"description":"Filter unitGroupId (equality)","schema":{"type":"string"}},{"name":"filter[unitGroupId][ne]","in":"query","required":false,"description":"Filter unitGroupId (ne)","schema":{"type":"string"}},{"name":"filter[unitGroupId][gt]","in":"query","required":false,"description":"Filter unitGroupId (gt)","schema":{"type":"string"}},{"name":"filter[unitGroupId][gte]","in":"query","required":false,"description":"Filter unitGroupId (gte)","schema":{"type":"string"}},{"name":"filter[unitGroupId][lt]","in":"query","required":false,"description":"Filter unitGroupId (lt)","schema":{"type":"string"}},{"name":"filter[unitGroupId][lte]","in":"query","required":false,"description":"Filter unitGroupId (lte)","schema":{"type":"string"}},{"name":"filter[unitGroupId][in]","in":"query","required":false,"description":"Filter unitGroupId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitGroupId][notIn]","in":"query","required":false,"description":"Filter unitGroupId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitGroupId][between]","in":"query","required":false,"description":"Filter unitGroupId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitGroupId][like]","in":"query","required":false,"description":"Filter unitGroupId (like)","schema":{"type":"string"}},{"name":"filter[valuationMethod]","in":"query","required":false,"description":"Filter valuationMethod (equality)","schema":{"type":"string"}},{"name":"filter[valuationMethod][ne]","in":"query","required":false,"description":"Filter valuationMethod (ne)","schema":{"type":"string"}},{"name":"filter[valuationMethod][gt]","in":"query","required":false,"description":"Filter valuationMethod (gt)","schema":{"type":"string"}},{"name":"filter[valuationMethod][gte]","in":"query","required":false,"description":"Filter valuationMethod (gte)","schema":{"type":"string"}},{"name":"filter[valuationMethod][lt]","in":"query","required":false,"description":"Filter valuationMethod (lt)","schema":{"type":"string"}},{"name":"filter[valuationMethod][lte]","in":"query","required":false,"description":"Filter valuationMethod (lte)","schema":{"type":"string"}},{"name":"filter[valuationMethod][in]","in":"query","required":false,"description":"Filter valuationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[valuationMethod][notIn]","in":"query","required":false,"description":"Filter valuationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[valuationMethod][between]","in":"query","required":false,"description":"Filter valuationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[valuationMethod][like]","in":"query","required":false,"description":"Filter valuationMethod (like)","schema":{"type":"string"}},{"name":"filter[isBatch]","in":"query","required":false,"description":"Filter isBatch (equality)","schema":{"type":"boolean"}},{"name":"filter[isBatch][ne]","in":"query","required":false,"description":"Filter isBatch (ne)","schema":{"type":"boolean"}},{"name":"filter[isBatch][gt]","in":"query","required":false,"description":"Filter isBatch (gt)","schema":{"type":"boolean"}},{"name":"filter[isBatch][gte]","in":"query","required":false,"description":"Filter isBatch (gte)","schema":{"type":"boolean"}},{"name":"filter[isBatch][lt]","in":"query","required":false,"description":"Filter isBatch (lt)","schema":{"type":"boolean"}},{"name":"filter[isBatch][lte]","in":"query","required":false,"description":"Filter isBatch (lte)","schema":{"type":"boolean"}},{"name":"filter[isBatch][in]","in":"query","required":false,"description":"Filter isBatch (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isBatch][notIn]","in":"query","required":false,"description":"Filter isBatch (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isBatch][between]","in":"query","required":false,"description":"Filter isBatch (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isSerial]","in":"query","required":false,"description":"Filter isSerial (equality)","schema":{"type":"boolean"}},{"name":"filter[isSerial][ne]","in":"query","required":false,"description":"Filter isSerial (ne)","schema":{"type":"boolean"}},{"name":"filter[isSerial][gt]","in":"query","required":false,"description":"Filter isSerial (gt)","schema":{"type":"boolean"}},{"name":"filter[isSerial][gte]","in":"query","required":false,"description":"Filter isSerial (gte)","schema":{"type":"boolean"}},{"name":"filter[isSerial][lt]","in":"query","required":false,"description":"Filter isSerial (lt)","schema":{"type":"boolean"}},{"name":"filter[isSerial][lte]","in":"query","required":false,"description":"Filter isSerial (lte)","schema":{"type":"boolean"}},{"name":"filter[isSerial][in]","in":"query","required":false,"description":"Filter isSerial (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSerial][notIn]","in":"query","required":false,"description":"Filter isSerial (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSerial][between]","in":"query","required":false,"description":"Filter isSerial (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isInventory]","in":"query","required":false,"description":"Filter isInventory (equality)","schema":{"type":"boolean"}},{"name":"filter[isInventory][ne]","in":"query","required":false,"description":"Filter isInventory (ne)","schema":{"type":"boolean"}},{"name":"filter[isInventory][gt]","in":"query","required":false,"description":"Filter isInventory (gt)","schema":{"type":"boolean"}},{"name":"filter[isInventory][gte]","in":"query","required":false,"description":"Filter isInventory (gte)","schema":{"type":"boolean"}},{"name":"filter[isInventory][lt]","in":"query","required":false,"description":"Filter isInventory (lt)","schema":{"type":"boolean"}},{"name":"filter[isInventory][lte]","in":"query","required":false,"description":"Filter isInventory (lte)","schema":{"type":"boolean"}},{"name":"filter[isInventory][in]","in":"query","required":false,"description":"Filter isInventory (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isInventory][notIn]","in":"query","required":false,"description":"Filter isInventory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isInventory][between]","in":"query","required":false,"description":"Filter isInventory (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isSalesItem]","in":"query","required":false,"description":"Filter isSalesItem (equality)","schema":{"type":"boolean"}},{"name":"filter[isSalesItem][ne]","in":"query","required":false,"description":"Filter isSalesItem (ne)","schema":{"type":"boolean"}},{"name":"filter[isSalesItem][gt]","in":"query","required":false,"description":"Filter isSalesItem (gt)","schema":{"type":"boolean"}},{"name":"filter[isSalesItem][gte]","in":"query","required":false,"description":"Filter isSalesItem (gte)","schema":{"type":"boolean"}},{"name":"filter[isSalesItem][lt]","in":"query","required":false,"description":"Filter isSalesItem (lt)","schema":{"type":"boolean"}},{"name":"filter[isSalesItem][lte]","in":"query","required":false,"description":"Filter isSalesItem (lte)","schema":{"type":"boolean"}},{"name":"filter[isSalesItem][in]","in":"query","required":false,"description":"Filter isSalesItem (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSalesItem][notIn]","in":"query","required":false,"description":"Filter isSalesItem (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSalesItem][between]","in":"query","required":false,"description":"Filter isSalesItem (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isPurchaseItem]","in":"query","required":false,"description":"Filter isPurchaseItem (equality)","schema":{"type":"boolean"}},{"name":"filter[isPurchaseItem][ne]","in":"query","required":false,"description":"Filter isPurchaseItem (ne)","schema":{"type":"boolean"}},{"name":"filter[isPurchaseItem][gt]","in":"query","required":false,"description":"Filter isPurchaseItem (gt)","schema":{"type":"boolean"}},{"name":"filter[isPurchaseItem][gte]","in":"query","required":false,"description":"Filter isPurchaseItem (gte)","schema":{"type":"boolean"}},{"name":"filter[isPurchaseItem][lt]","in":"query","required":false,"description":"Filter isPurchaseItem (lt)","schema":{"type":"boolean"}},{"name":"filter[isPurchaseItem][lte]","in":"query","required":false,"description":"Filter isPurchaseItem (lte)","schema":{"type":"boolean"}},{"name":"filter[isPurchaseItem][in]","in":"query","required":false,"description":"Filter isPurchaseItem (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPurchaseItem][notIn]","in":"query","required":false,"description":"Filter isPurchaseItem (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPurchaseItem][between]","in":"query","required":false,"description":"Filter isPurchaseItem (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[countryOfOrigin]","in":"query","required":false,"description":"Filter countryOfOrigin (equality)","schema":{"type":"string"}},{"name":"filter[countryOfOrigin][ne]","in":"query","required":false,"description":"Filter countryOfOrigin (ne)","schema":{"type":"string"}},{"name":"filter[countryOfOrigin][gt]","in":"query","required":false,"description":"Filter countryOfOrigin (gt)","schema":{"type":"string"}},{"name":"filter[countryOfOrigin][gte]","in":"query","required":false,"description":"Filter countryOfOrigin (gte)","schema":{"type":"string"}},{"name":"filter[countryOfOrigin][lt]","in":"query","required":false,"description":"Filter countryOfOrigin (lt)","schema":{"type":"string"}},{"name":"filter[countryOfOrigin][lte]","in":"query","required":false,"description":"Filter countryOfOrigin (lte)","schema":{"type":"string"}},{"name":"filter[countryOfOrigin][in]","in":"query","required":false,"description":"Filter countryOfOrigin (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[countryOfOrigin][notIn]","in":"query","required":false,"description":"Filter countryOfOrigin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[countryOfOrigin][between]","in":"query","required":false,"description":"Filter countryOfOrigin (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[countryOfOrigin][like]","in":"query","required":false,"description":"Filter countryOfOrigin (like)","schema":{"type":"string"}},{"name":"filter[isPerishable]","in":"query","required":false,"description":"Filter isPerishable (equality)","schema":{"type":"boolean"}},{"name":"filter[isPerishable][ne]","in":"query","required":false,"description":"Filter isPerishable (ne)","schema":{"type":"boolean"}},{"name":"filter[isPerishable][gt]","in":"query","required":false,"description":"Filter isPerishable (gt)","schema":{"type":"boolean"}},{"name":"filter[isPerishable][gte]","in":"query","required":false,"description":"Filter isPerishable (gte)","schema":{"type":"boolean"}},{"name":"filter[isPerishable][lt]","in":"query","required":false,"description":"Filter isPerishable (lt)","schema":{"type":"boolean"}},{"name":"filter[isPerishable][lte]","in":"query","required":false,"description":"Filter isPerishable (lte)","schema":{"type":"boolean"}},{"name":"filter[isPerishable][in]","in":"query","required":false,"description":"Filter isPerishable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPerishable][notIn]","in":"query","required":false,"description":"Filter isPerishable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPerishable][between]","in":"query","required":false,"description":"Filter isPerishable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","itemCode","-itemCode","valuationMethod","-valuationMethod","active","-active","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","itemCode","itemName","externalItemId","brandName","notes","imageAvatar","itemTypeId","itemTypeName","categoryId","categoryName","inventoryUnitId","inventoryUnitCode","salesUnitId","salesUnitCode","purchaseUnitId","purchaseUnitCode","unitGroupId","unitGroupName","valuationMethod","isBatch","isSerial","isInventory","isSalesItem","isPurchaseItem","active","eccnNumber","htsCode","countryOfOrigin","minStockLevel","minimumTransactionQuantity","leadTime","weight","weightUnit","grossWeight","netWeight","length","width","height","volumePerUnit","volumeUnit","defaultAllocationMode","isPerishable","shelfLifeDays","minShelfLifeDaysOnReceipt","minShelfLifeDaysOnDispatch","bestBeforeOffsetDays","storageTempMin","storageTempMax","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/itemsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","itemTypeName":"Stocked good","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","categoryName":"Components","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","inventoryUnitCode":"EA","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","unitGroupName":"Each","valuationMethod":"movingAverage","isBatch":false,"isSerial":false,"isInventory":true,"isSalesItem":true,"isPurchaseItem":true,"active":true,"weight":"1.4","weightUnit":"Kg","lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","valuationMethod":"none","isInventory":false,"isSalesItem":false,"isPurchaseItem":true,"active":true,"defaultAllocationMode":"Weight","lastModifiedDate":"2026-08-18T09:20:41.882Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List items","description":"Lists items. Each item comes back without standardCost, itemPurchasePrice, and currency. To read those, use GET inventory/items/:id or POST inventory/items/search.\n\nThe collection cannot filter on a missing weight or missing dimensions. For those, use POST inventory/items/search with missingWeight or missingDimensions.","tags":["inventoryItems"]}},"/inventory/item-categories/bulk":{"post":{"operationId":"bulkCreateItemCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateItemCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"seedingACategoryTree":{"value":{"data":{"created":[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"},{"id":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8"}]}},"summary":"Two categories created together; match the response to the request by index"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PARENT_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["parentId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateItemCategoriesInput"},"examples":{"seedingACategoryTree":{"value":{"itemCategories":[{"name":"Hardware","description":"Fasteners, fittings and tooling","idealTurnoverRatio":"6.50"},{"name":"Consumables","idealTurnoverRatio":"12.00"}]},"summary":"Two categories created together; match the response to the request by index"}}}}},"summary":"Bulk create item categories","description":"Creates multiple item categories in one request. Each category in itemCategories takes the same fields as POST inventory/item-categories. If any category can't be created, none are. The response lists the new categories in the order you sent them, each with only its id.\n\nA parentId must name a category that already exists before this request; a category created in the same request has no id yet, so it cannot be a parent here. To seed a tree, create one level per request.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItemCategories"]}},"/inventory/warehouse-transfers/{id}/commit":{"post":{"operationId":"commitWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"moveTheStock":{"value":{"data":{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentStatus":"COMMITTED","journalEntryId":"6b31d0a7-4e28-4c95-8f13-2a7e0c5d9b64","warnings":[]}},"summary":"A straightforward move between two of one entity's warehouses"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer you want to commit.","examples":{"moveTheStock":{"value":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitWarehouseTransferInput"},"examples":{"moveTheStock":{"value":{},"summary":"A straightforward move between two of one entity's warehouses"}}}}},"summary":"Commit a warehouse transfer","description":"Commits a warehouse transfer. It moves the goods from the source warehouse to the target warehouse, creates a journal entry for the movement, and sets documentStatus to 'COMMITTED'.\n\nThe stock must be available in the source warehouse. Otherwise the request fails with POSTING_REJECTED.\n\nCommitting doesn't create the intercompany bill. To bill an intercompany transfer, use POST inventory/warehouse-transfers/:id/bill.","tags":["inventoryWarehouseTransfers"]}},"/inventory/landed-cost-items/bulk-delete":{"post":{"operationId":"bulkDeleteLandedCostItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteLandedCostItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteLandedCostItemsInput"}}}},"summary":"Bulk delete landed cost items","description":"Deletes multiple landed cost items in one request. Each landed cost item is deleted as with DELETE inventory/landed-cost-items/:id. If one landed cost item cannot be deleted, the request fails and no landed cost items are deleted.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCostItems"]}},"/inventory/warehouse-transfers":{"get":{"operationId":"warehouseTransfers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[transferType]","in":"query","required":false,"description":"Filter transferType (equality)","schema":{"type":"string"}},{"name":"filter[transferType][ne]","in":"query","required":false,"description":"Filter transferType (ne)","schema":{"type":"string"}},{"name":"filter[transferType][gt]","in":"query","required":false,"description":"Filter transferType (gt)","schema":{"type":"string"}},{"name":"filter[transferType][gte]","in":"query","required":false,"description":"Filter transferType (gte)","schema":{"type":"string"}},{"name":"filter[transferType][lt]","in":"query","required":false,"description":"Filter transferType (lt)","schema":{"type":"string"}},{"name":"filter[transferType][lte]","in":"query","required":false,"description":"Filter transferType (lte)","schema":{"type":"string"}},{"name":"filter[transferType][in]","in":"query","required":false,"description":"Filter transferType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transferType][notIn]","in":"query","required":false,"description":"Filter transferType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transferType][between]","in":"query","required":false,"description":"Filter transferType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[transferType][like]","in":"query","required":false,"description":"Filter transferType (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[toEntityId]","in":"query","required":false,"description":"Filter toEntityId (equality)","schema":{"type":"string"}},{"name":"filter[toEntityId][ne]","in":"query","required":false,"description":"Filter toEntityId (ne)","schema":{"type":"string"}},{"name":"filter[toEntityId][gt]","in":"query","required":false,"description":"Filter toEntityId (gt)","schema":{"type":"string"}},{"name":"filter[toEntityId][gte]","in":"query","required":false,"description":"Filter toEntityId (gte)","schema":{"type":"string"}},{"name":"filter[toEntityId][lt]","in":"query","required":false,"description":"Filter toEntityId (lt)","schema":{"type":"string"}},{"name":"filter[toEntityId][lte]","in":"query","required":false,"description":"Filter toEntityId (lte)","schema":{"type":"string"}},{"name":"filter[toEntityId][in]","in":"query","required":false,"description":"Filter toEntityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[toEntityId][notIn]","in":"query","required":false,"description":"Filter toEntityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[toEntityId][between]","in":"query","required":false,"description":"Filter toEntityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[toEntityId][like]","in":"query","required":false,"description":"Filter toEntityId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[targetLocationId]","in":"query","required":false,"description":"Filter targetLocationId (equality)","schema":{"type":"string"}},{"name":"filter[targetLocationId][ne]","in":"query","required":false,"description":"Filter targetLocationId (ne)","schema":{"type":"string"}},{"name":"filter[targetLocationId][gt]","in":"query","required":false,"description":"Filter targetLocationId (gt)","schema":{"type":"string"}},{"name":"filter[targetLocationId][gte]","in":"query","required":false,"description":"Filter targetLocationId (gte)","schema":{"type":"string"}},{"name":"filter[targetLocationId][lt]","in":"query","required":false,"description":"Filter targetLocationId (lt)","schema":{"type":"string"}},{"name":"filter[targetLocationId][lte]","in":"query","required":false,"description":"Filter targetLocationId (lte)","schema":{"type":"string"}},{"name":"filter[targetLocationId][in]","in":"query","required":false,"description":"Filter targetLocationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[targetLocationId][notIn]","in":"query","required":false,"description":"Filter targetLocationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[targetLocationId][between]","in":"query","required":false,"description":"Filter targetLocationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[targetLocationId][like]","in":"query","required":false,"description":"Filter targetLocationId (like)","schema":{"type":"string"}},{"name":"filter[billingStatus]","in":"query","required":false,"description":"Filter billingStatus (equality)","schema":{"type":"string"}},{"name":"filter[billingStatus][ne]","in":"query","required":false,"description":"Filter billingStatus (ne)","schema":{"type":"string"}},{"name":"filter[billingStatus][gt]","in":"query","required":false,"description":"Filter billingStatus (gt)","schema":{"type":"string"}},{"name":"filter[billingStatus][gte]","in":"query","required":false,"description":"Filter billingStatus (gte)","schema":{"type":"string"}},{"name":"filter[billingStatus][lt]","in":"query","required":false,"description":"Filter billingStatus (lt)","schema":{"type":"string"}},{"name":"filter[billingStatus][lte]","in":"query","required":false,"description":"Filter billingStatus (lte)","schema":{"type":"string"}},{"name":"filter[billingStatus][in]","in":"query","required":false,"description":"Filter billingStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billingStatus][notIn]","in":"query","required":false,"description":"Filter billingStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billingStatus][between]","in":"query","required":false,"description":"Filter billingStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billingStatus][like]","in":"query","required":false,"description":"Filter billingStatus (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","documentStatus","-documentStatus","transferType","-transferType","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","referenceNumber","transferType","entityId","entityName","toEntityId","toEntityName","locationId","locationCode","locationName","targetLocationId","targetLocationCode","targetLocationName","billingStatus","intercompanyBillId","contractualCurrency","currency","sourceAmount","destinationCurrency","destinationAmount","notes","lineCount","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/warehouseTransfersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentNumber":"WTR-2291","documentStatus":"DRAFT","documentDate":"2026-08-18","transferType":"NORMAL","locationCode":"WH-CENTRAL","targetLocationCode":"WH-NORTH","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","documentNumber":"WTR-2292","documentStatus":"COMMITTED","documentDate":"2026-08-17","transferType":"INTERCOMPANY","billingStatus":"NOT_BILLED","toEntityName":"Acme GmbH","locationCode":"WH-CENTRAL","targetLocationCode":"WH-DE-01","lineCount":3,"lastModifiedDate":"2026-08-17T16:41:09.220Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List warehouse transfers","description":"Lists warehouse transfers. Each transfer comes back without its lines, with lineCount instead. Every other field matches GET inventory/warehouse-transfers/:id.\n\nTo find intercompany transfers that are committed but not billed, filter on transferType 'INTERCOMPANY', documentStatus 'COMMITTED' and billingStatus 'NOT_BILLED'.\n\nTo filter by item, use POST inventory/warehouse-transfers/search.","tags":["inventoryWarehouseTransfers"]},"post":{"operationId":"createWarehouseTransfer","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createWarehouseTransferOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"anIntercompanySale":{"value":{"data":{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentNumber":"WTR-2291","documentStatus":"DRAFT","documentDate":"2026-08-18","transferType":"INTERCOMPANY","locationCode":"WH-CENTRAL","targetLocationCode":"WH-NORTH","currency":"EUR","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"7d2b48e1-95c3-4a06-8f17-3e5a9c06b2d4","itemCode":"WIDGET-01","quantity":"24","inventoryQuantity":"24","unitTransferValue":"22","totalTransferValue":"528"}],"toEntityId":"3d81b5f0-9c24-4e67-a015-7b2e8d3c9014","contractualCurrency":"EUR","billingStatus":"NOT_BILLED"}},"summary":"Moving goods to another legal entity, priced for the bill that follows"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, INTERCOMPANY_CONFIG_MISSING, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createWarehouseTransferInput"},"examples":{"anIntercompanySale":{"value":{"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","documentDate":"2026-08-18","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"24","unitTransferValue":"22"}],"transferType":"INTERCOMPANY","toEntityId":"3d81b5f0-9c24-4e67-a015-7b2e8d3c9014","contractualCurrency":"EUR"},"summary":"Moving goods to another legal entity, priced for the bill that follows"}}}}},"summary":"Create a warehouse transfer","description":"Creates a warehouse transfer as a draft. A transfer moves items from one warehouse to another. Nothing moves until you commit the transfer with POST inventory/warehouse-transfers/:id/commit.\n\nThe source and target warehouses are set once, on the transfer, and apply to every line. They must be different warehouses.\n\nAn intercompany transfer, with transferType 'INTERCOMPANY', also needs toEntityId, contractualCurrency and a unitTransferValue on every line. These are checked here, so a missing one fails before anything is written rather than at commit.\n\nThe response has the same fields as GET inventory/warehouse-transfers/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransfers"]}},"/inventory/receipts/search":{"post":{"operationId":"searchReceipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchReceiptsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byDeliveryNote":{"value":{"data":{"items":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}],"pagination":{"hasMore":false}}},"summary":"The receipt behind a vendor's delivery note number — the question accounts payable asks"},"oneVendorsReceipts":{"value":{"data":{"items":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"COMMITTED","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T10:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}],"pagination":{"hasMore":false}}},"summary":"Everything received from one vendor this month"},"theUnpostedQueue":{"value":{"data":{"items":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}],"pagination":{"hasMore":false}}},"summary":"Every receipt still drafted and waiting to be posted"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchReceiptsInput"},"examples":{"byDeliveryNote":{"value":{"filters":{"referenceNumber":"DN-77120"}},"summary":"The receipt behind a vendor's delivery note number — the question accounts payable asks"},"oneVendorsReceipts":{"value":{"filters":{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Everything received from one vendor this month"},"theUnpostedQueue":{"value":{"filters":{"documentStatus":"DRAFT"}},"summary":"Every receipt still drafted and waiting to be posted"}}}}},"summary":"Search receipts","description":"Searches receipts. The response has each receipt in full: its lines with their batch, serial, and bin detail, and the same fields GET inventory/receipts/:id returns.\n\nThis is the only endpoint that filters by vendor, reference number, tracking number, item, or warehouse. The collection GET inventory/receipts has none of those filters and returns no lines.","tags":["inventoryReceipts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/landed-costs/bulk-delete":{"post":{"operationId":"bulkDeleteLandedCosts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteLandedCostsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteLandedCostsInput"}}}},"summary":"Bulk delete landed costs","description":"Deletes multiple draft landed costs in one request, with their receipt selections, charges, and allocation lines. If one landed cost cannot be deleted, the request fails and no landed costs are deleted. The receipts and vendor bills do not change.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCosts"]}},"/inventory/reason-codes/search":{"post":{"operationId":"searchReasonCodes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchReasonCodesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"codesThatGateADocument":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Every active reason code that forces approval"},"codesUsableOnADecrease":{"value":{"data":{"items":[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","code":"DAMAGE","description":"Stock damaged in the warehouse","isActive":true,"requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Populate a reason picker on an inventory decrease — the filter the collection route cannot offer"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchReasonCodesInput"},"examples":{"codesThatGateADocument":{"value":{"filters":{"isActive":true,"requiresApproval":true}},"summary":"Every active reason code that forces approval"},"codesUsableOnADecrease":{"value":{"filters":{"documentType":"InventoryDecrease","isActive":true}},"summary":"Populate a reason picker on an inventory decrease — the filter the collection route cannot offer"}}}}},"summary":"Search reason codes","description":"Searches reason codes. Each matching reason code comes back with documentTypes, the document types it can be selected on. The filters include documentType.\n\nThe collection GET inventory/reason-codes neither returns documentTypes nor filters by document type.","tags":["inventoryReasonCodes"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/warehouse-transfer-orders":{"post":{"operationId":"createTransferOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTransferOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"twoWarehouses":{"value":{"data":{"id":"7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38","documentNumber":"WTO-1043","documentStatus":"DRAFT","documentDate":"2026-08-18","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"40","inventoryQuantity":"40","openQuantity":"40","status":"DRAFT"}]}},"summary":"A replenishment moving stock from the central warehouse to a depot"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, HEADER_SAME_LOCATION, HEADER_ENTITY_MISMATCH, ENTITY_MISMATCH, UNIT_NOT_CONVERTIBLE, WRITE_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["field","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["field","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["field","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTransferOrderInput"},"examples":{"twoWarehouses":{"value":{"documentDate":"2026-08-18","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","referenceNumber":"REPLEN-2026-33","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"40"}]},"summary":"A replenishment moving stock from the central warehouse to a depot"}}}}},"summary":"Create a warehouse transfer order","description":"Creates a warehouse transfer order as a draft. An order is a request to move a quantity of items between warehouses. Nothing moves until POST inventory/warehouse-transfer-orders/:id/commit turns the order into a warehouse transfer.\n\nEvery line names the warehouse to draw from and the warehouse to deliver to. The two must differ and belong to the same legal entity, or the request fails with SAME_LOCATION or ENTITY_MISMATCH. The order's own locationId and targetLocationId are its overall source and destination. A line can name its own source and destination, so one order can draw from several warehouses.\n\nThe response has the same fields as GET inventory/warehouse-transfer-orders/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransferOrders"]},"get":{"operationId":"warehouseTransferOrders","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[targetLocationId]","in":"query","required":false,"description":"Filter targetLocationId (equality)","schema":{"type":"string"}},{"name":"filter[targetLocationId][ne]","in":"query","required":false,"description":"Filter targetLocationId (ne)","schema":{"type":"string"}},{"name":"filter[targetLocationId][gt]","in":"query","required":false,"description":"Filter targetLocationId (gt)","schema":{"type":"string"}},{"name":"filter[targetLocationId][gte]","in":"query","required":false,"description":"Filter targetLocationId (gte)","schema":{"type":"string"}},{"name":"filter[targetLocationId][lt]","in":"query","required":false,"description":"Filter targetLocationId (lt)","schema":{"type":"string"}},{"name":"filter[targetLocationId][lte]","in":"query","required":false,"description":"Filter targetLocationId (lte)","schema":{"type":"string"}},{"name":"filter[targetLocationId][in]","in":"query","required":false,"description":"Filter targetLocationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[targetLocationId][notIn]","in":"query","required":false,"description":"Filter targetLocationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[targetLocationId][between]","in":"query","required":false,"description":"Filter targetLocationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[targetLocationId][like]","in":"query","required":false,"description":"Filter targetLocationId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","documentStatus","-documentStatus","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","referenceNumber","entityId","entityName","locationId","locationCode","locationName","targetLocationId","targetLocationCode","targetLocationName","notes","lineCount","openLineCount","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/warehouseTransferOrdersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38","documentNumber":"WTO-1043","documentStatus":"DRAFT","documentDate":"2026-08-18","locationCode":"WH-CENTRAL","targetLocationCode":"WH-NORTH","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"5d3a91b8-2e46-4f07-b19c-8a2f6d40e735","documentNumber":"WTO-1042","documentStatus":"PROCESSED","documentDate":"2026-08-17","locationCode":"WH-CENTRAL","targetLocationCode":"WH-SOUTH","lineCount":3,"openLineCount":0,"lastModifiedDate":"2026-08-17T16:41:09.220Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List warehouse transfer orders","description":"Lists warehouse transfer orders. Each order comes back without its lines, with lineCount and openLineCount instead. Every other field matches GET inventory/warehouse-transfer-orders/:id.\n\nlocationId and targetLocationId are the order's overall source and destination. A line can name its own warehouses, which only GET inventory/warehouse-transfer-orders/:id and POST inventory/warehouse-transfer-orders/search return.\n\nTo filter by item, use POST inventory/warehouse-transfer-orders/search.","tags":["inventoryWarehouseTransferOrders"]}},"/inventory/inventory-revaluations/{id}":{"patch":{"operationId":"updateInventoryRevaluation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateInventoryRevaluationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"correctTheNewCost":{"value":{"data":{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentStatus":"DRAFT","currency":"EUR","totalRevaluationAmount":"-300","lineCount":1,"lastModifiedDate":"2026-08-18T11:20:04.219Z"}},"summary":"Changing what the stock should be carried at, before the document posts"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, MISSING_CAPITALISATION_ACCOUNT, TRACKING_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_CAPITALISATION_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revaluation you want to update.","examples":{"correctTheNewCost":{"value":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateInventoryRevaluationInput"},"examples":{"correctTheNewCost":{"value":{"updateLines":[{"id":"6c2f9a41-7b58-4d30-91e6-4a0d8c25f3b7","newUnitCost":"10"}]},"summary":"Changing what the stock should be carried at, before the document posts"}}}}},"summary":"Update an inventory revaluation","description":"Updates a draft inventory revaluation. Use the revaluation's id, not its documentNumber.\n\nOnly a draft revaluation can be changed. A main field you leave out keeps its current value.\n\nSend every line you want the revaluation to keep, in updateLines or createLines, with every update. A request with no lines returns the revaluation unchanged, including its main fields. An existing line you don't send is deleted, and deleteLines has no effect.\n\nupdateLines names a line by its id from GET inventory/inventory-revaluations/:id, and a line id from another revaluation is refused. Sending batches or serials on a line replaces the ones that line had.\n\nThe response is the updated revaluation with its lines, in the same shape as GET inventory/inventory-revaluations/:id.","tags":["inventoryInventoryRevaluations"]},"delete":{"operationId":"deleteInventoryRevaluation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteInventoryRevaluationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"abandonADraft":{"value":{"data":{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"}},"summary":"A draft raised in error"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revaluation you want to delete.","examples":{"abandonADraft":{"value":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"}}}],"summary":"Delete an inventory revaluation","description":"Deletes a draft inventory revaluation. The revaluation's lines are deleted with it. A revaluation that is not a draft can't be deleted.\n\nThe response is the id of the deleted revaluation.","tags":["inventoryInventoryRevaluations"]},"get":{"operationId":"getInventoryRevaluation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInventoryRevaluationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aWriteDown":{"value":{"data":{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","costingValuationType":"revaluation","costingElementTypeId":"f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"6c2f9a41-7b58-4d30-91e6-4a0d8c25f3b7","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationCode":"WH-CENTRAL","unitCode":"EA","quantity":"150","currentUnitCost":"12","newUnitCost":"9","revaluationAmount":"-450"}]}},"summary":"Stock carried at 12 restated to 9 — the difference lands on the balance sheet"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revaluation you want to retrieve.","examples":{"aWriteDown":{"value":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"}}}],"summary":"Retrieve an inventory revaluation","description":"Retrieves an inventory revaluation. Use the revaluation's id, not its documentNumber.\n\nThe revaluation comes back with all of its lines, including their batches and serials. GET inventory/inventory-revaluations returns the same fields without the lines.\n\nThe warehouse is set on each line, not on the revaluation, so one revaluation can revalue the same item in several warehouses. A negative totalRevaluationAmount is a write-down.","tags":["inventoryInventoryRevaluations"]}},"/inventory/items/bulk":{"post":{"operationId":"bulkCreateItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"import":{"value":{"data":{"created":[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01"}]}},"summary":"A catalog import; one bad row and none of it lands"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DUPLICATE_CODE, UNKNOWN_VALUE, TRACKING_MISMATCH, ITEM_TYPE_NOT_STOCKABLE, VALUATION_METHOD_UNAVAILABLE, UNIT_NOT_IN_UNIT_GROUP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","field","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["itemCode","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["valuationMethod","requires","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["itemTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["valuationMethod","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","unitId","unitGroupId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","field","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["itemCode","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["valuationMethod","requires","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["itemTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["valuationMethod","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","unitId","unitGroupId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","field","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["itemCode","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["valuationMethod","requires","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["itemTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["valuationMethod","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","unitId","unitGroupId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateItemsInput"},"examples":{"import":{"value":{"items":[{"itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87"}]},"summary":"A catalog import; one bad row and none of it lands"}}}}},"summary":"Bulk create items","description":"Creates multiple items in one request. Each item is checked the same way as on POST inventory/items. If any item can't be created, none are. The response lists the new items' ids and item codes in the order you sent them.\n\n'index' on the error is the position of that item, counting from zero. Items in the request are checked against each other as well as against existing items. Two items in the request with the same item code are refused with DUPLICATE_CODE, and 'index' is the second one's position.\n\nTo create each item independently, use POST inventory/items once per item.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItems"]}},"/inventory/item-categories/{id}":{"get":{"operationId":"getItemCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getItemCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","name":"Hardware","description":"Fasteners, fittings and tooling","active":true,"idealTurnoverRatio":"6.50","lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A category with a turnover target set"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item category you want to retrieve.","examples":{"basic":{"value":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}}}],"summary":"Retrieve an item category","description":"Retrieves an item category. The category comes back with its parent. POST inventory/item-categories/search returns the same fields, and GET inventory/item-categories returns all of them except parentId.\n\nNames aren't unique. To find categories by name, filter GET inventory/item-categories or POST inventory/item-categories/search by name, which can return several.","tags":["inventoryItemCategories"]},"patch":{"operationId":"updateItemCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateItemCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"raiseTheTurnoverTarget":{"value":{"data":{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}},"summary":"Change one field and leave the rest untouched"},"retireACategory":{"value":{"data":{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}},"summary":"Stop a category being assignable without deleting it or touching its items"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PARENT_NOT_FOUND, CATEGORY_CYCLE, CATEGORY_TOO_DEEP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"},"maxDepth":{"type":"number"}},"additionalProperties":false,"required":["id","parentId","maxDepth"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"},"maxDepth":{"type":"number"}},"additionalProperties":false,"required":["id","parentId","maxDepth"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"type":"string"},"maxDepth":{"type":"number"}},"additionalProperties":false,"required":["id","parentId","maxDepth"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item category you want to update.","examples":{"raiseTheTurnoverTarget":{"value":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"},"retireACategory":{"value":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateItemCategoryInput"},"examples":{"raiseTheTurnoverTarget":{"value":{"idealTurnoverRatio":"8.00"},"summary":"Change one field and leave the rest untouched"},"retireACategory":{"value":{"active":false},"summary":"Stop a category being assignable without deleting it or touching its items"}}}}},"summary":"Update an item category","description":"Updates an item category with the fields you send. A field you leave out keeps its current value. To clear parentId and make this a top-level category, send null.\n\nYou can change the category's name, description, active flag, turnover target, and parent.\n\nThe response is only the id. To see the updated category, use GET inventory/item-categories/:id.","tags":["inventoryItemCategories"]},"delete":{"operationId":"deleteItemCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteItemCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"9d61b0af-3c58-4e17-b942-06ea8c73f215","name":"Pilot programme"}},"summary":"Removing a category no item has been assigned to"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ITEM_CATEGORY_IN_USE, ITEM_CATEGORY_HAS_CHILDREN","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item category you want to delete.","examples":{"basic":{"value":"9d61b0af-3c58-4e17-b942-06ea8c73f215"}}}],"summary":"Delete an item category","description":"Deletes an item category. A category that any item or inventory transaction uses, or that has categories beneath it, can't be deleted. The response is the deleted category's id and name.\n\nTo stop using a category that has history, set active to false with PATCH inventory/item-categories/:id instead. Existing items keep the category. An inactive category can still be assigned to an item.","tags":["inventoryItemCategories"]}},"/inventory/batch-numbers/search":{"post":{"operationId":"searchBatchNumbers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBatchNumbersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"quarantined":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Quarantined batches. None match in this example."},"shelfLife":{"value":{"data":{"items":[{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchNumber":"LOT-2026-0448","manufacturerBatchNumber":"MFG-8842-C","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","quantity":"400","inStock":"260","cost":"12.5","originalCost":"12","currency":"GBP","expirationDate":"2027-03-31","batchStatus":"ACTIVE","temperatureBreach":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Batches still in stock that expire by the end of the year."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBatchNumbersInput"},"examples":{"quarantined":{"value":{"filters":{"batchStatus":"QUARANTINED"}},"summary":"Quarantined batches. None match in this example."},"shelfLife":{"value":{"filters":{"expiringBefore":"2027-12-31","inStock":true}},"summary":"Batches still in stock that expire by the end of the year."}}}}},"summary":"Search batch numbers","description":"Searches batch numbers, with their costs. For a shelf-life check, send `expiringBefore` with `inStock` true to find the batches still in stock that expire by a date.","tags":["inventoryBatchNumbers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/items/search":{"post":{"operationId":"searchItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"beforeAllocating":{"value":{"data":{"items":[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","itemTypeName":"Stocked good","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","categoryName":"Components","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","inventoryUnitCode":"EA","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","unitGroupName":"Each","valuationMethod":"movingAverage","isBatch":false,"isSerial":false,"isInventory":true,"isSalesItem":true,"isPurchaseItem":true,"active":true,"weight":"1.4","weightUnit":"Kg","lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Which items would break a Weight allocation"},"byCategory":{"value":{"data":{"items":[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","itemTypeName":"Stocked good","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","categoryName":"Components","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","inventoryUnitCode":"EA","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","unitGroupName":"Each","valuationMethod":"movingAverage","isBatch":false,"isSerial":false,"isInventory":true,"isSalesItem":true,"isPurchaseItem":true,"active":true,"weight":"1.4","weightUnit":"Kg","lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Every active item in a category"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchItemsInput"},"examples":{"beforeAllocating":{"value":{"filters":{"missingWeight":true},"page":{"size":50}},"summary":"Which items would break a Weight allocation"},"byCategory":{"value":{"filters":{"categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","active":true}},"summary":"Every active item in a category"}}}}},"summary":"Search items","description":"Searches items. The filters go in the request body. The fields are the same as on GET inventory/items/:id, including standardCost, itemPurchasePrice, and currency.\n\nmissingWeight finds the items with no weight, and missingDimensions finds the items missing a length, width, or height. A landed cost's Weight or Volume allocation needs these values. The allocation also refuses a value of 0, which these filters don't find. The collection GET inventory/items cannot filter on either.","tags":["inventoryItems"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/items/{id}/activate":{"post":{"operationId":"activateItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/activateItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_A_DRAFT, REQUIRED_FIELD_MISSING, REFERENCE_NOT_FOUND, DUPLICATE_CODE, TRACKING_MISMATCH, ITEM_TYPE_NOT_STOCKABLE, VALUATION_METHOD_UNAVAILABLE, UNIT_NOT_IN_UNIT_GROUP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_A_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUIRED_FIELD_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingFields":{"type":"array","items":{"type":"string"},"description":"The api names of the missing fields, in the order POST inventory/items declares them."}},"additionalProperties":false,"required":["missingFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_A_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUIRED_FIELD_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingFields":{"type":"array","items":{"type":"string"},"description":"The api names of the missing fields, in the order POST inventory/items declares them."}},"additionalProperties":false,"required":["missingFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_A_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REQUIRED_FIELD_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingFields":{"type":"array","items":{"type":"string"},"description":"The api names of the missing fields, in the order POST inventory/items declares them."}},"additionalProperties":false,"required":["missingFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the draft item to activate; bound from the :id path segment.","example":"517a93e4-cbb4-4571-9e3d-2343e56cfd84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/activateItemInput"}}}},"summary":"Activate a draft item","description":"Activates a draft item: turns a system draft, created with POST inventory/items/drafts or saved as a draft in the item form, into a real item.\n\n**Activation runs every check POST inventory/items runs**, on the draft as it is stored: the required fields (itemCode, itemTypeId, categoryId, inventoryUnitId, unitGroupId, valuationMethod), item code uniqueness against real items, valuation against tracking, a stockable type for an inventory item, and every unit in the unit group. A refused draft is left exactly as it was, still a draft; fix it with PATCH inventory/items/:id and activate again.\n\nThe draft's barcodes are activated with it, all or nothing.\n\nActivating an item that is not a draft is NOT_A_DRAFT, not a silent success.","tags":["inventoryItems"]}},"/inventory/item-attributes":{"get":{"operationId":"listItemAttributes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[attributeId]","in":"query","required":false,"description":"Filter attributeId (equality)","schema":{"type":"string"}},{"name":"filter[attributeId][ne]","in":"query","required":false,"description":"Filter attributeId (ne)","schema":{"type":"string"}},{"name":"filter[attributeId][gt]","in":"query","required":false,"description":"Filter attributeId (gt)","schema":{"type":"string"}},{"name":"filter[attributeId][gte]","in":"query","required":false,"description":"Filter attributeId (gte)","schema":{"type":"string"}},{"name":"filter[attributeId][lt]","in":"query","required":false,"description":"Filter attributeId (lt)","schema":{"type":"string"}},{"name":"filter[attributeId][lte]","in":"query","required":false,"description":"Filter attributeId (lte)","schema":{"type":"string"}},{"name":"filter[attributeId][in]","in":"query","required":false,"description":"Filter attributeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[attributeId][notIn]","in":"query","required":false,"description":"Filter attributeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[attributeId][between]","in":"query","required":false,"description":"Filter attributeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[attributeId][like]","in":"query","required":false,"description":"Filter attributeId (like)","schema":{"type":"string"}},{"name":"filter[attributeName]","in":"query","required":false,"description":"Filter attributeName (equality)","schema":{"type":"string"}},{"name":"filter[attributeName][ne]","in":"query","required":false,"description":"Filter attributeName (ne)","schema":{"type":"string"}},{"name":"filter[attributeName][gt]","in":"query","required":false,"description":"Filter attributeName (gt)","schema":{"type":"string"}},{"name":"filter[attributeName][gte]","in":"query","required":false,"description":"Filter attributeName (gte)","schema":{"type":"string"}},{"name":"filter[attributeName][lt]","in":"query","required":false,"description":"Filter attributeName (lt)","schema":{"type":"string"}},{"name":"filter[attributeName][lte]","in":"query","required":false,"description":"Filter attributeName (lte)","schema":{"type":"string"}},{"name":"filter[attributeName][in]","in":"query","required":false,"description":"Filter attributeName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[attributeName][notIn]","in":"query","required":false,"description":"Filter attributeName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[attributeName][between]","in":"query","required":false,"description":"Filter attributeName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[attributeName][like]","in":"query","required":false,"description":"Filter attributeName (like)","schema":{"type":"string"}},{"name":"filter[valueId]","in":"query","required":false,"description":"Filter valueId (equality)","schema":{"type":"string"}},{"name":"filter[valueId][ne]","in":"query","required":false,"description":"Filter valueId (ne)","schema":{"type":"string"}},{"name":"filter[valueId][gt]","in":"query","required":false,"description":"Filter valueId (gt)","schema":{"type":"string"}},{"name":"filter[valueId][gte]","in":"query","required":false,"description":"Filter valueId (gte)","schema":{"type":"string"}},{"name":"filter[valueId][lt]","in":"query","required":false,"description":"Filter valueId (lt)","schema":{"type":"string"}},{"name":"filter[valueId][lte]","in":"query","required":false,"description":"Filter valueId (lte)","schema":{"type":"string"}},{"name":"filter[valueId][in]","in":"query","required":false,"description":"Filter valueId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[valueId][notIn]","in":"query","required":false,"description":"Filter valueId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[valueId][between]","in":"query","required":false,"description":"Filter valueId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[valueId][like]","in":"query","required":false,"description":"Filter valueId (like)","schema":{"type":"string"}},{"name":"filter[value]","in":"query","required":false,"description":"Filter value (equality)","schema":{"type":"string"}},{"name":"filter[value][ne]","in":"query","required":false,"description":"Filter value (ne)","schema":{"type":"string"}},{"name":"filter[value][gt]","in":"query","required":false,"description":"Filter value (gt)","schema":{"type":"string"}},{"name":"filter[value][gte]","in":"query","required":false,"description":"Filter value (gte)","schema":{"type":"string"}},{"name":"filter[value][lt]","in":"query","required":false,"description":"Filter value (lt)","schema":{"type":"string"}},{"name":"filter[value][lte]","in":"query","required":false,"description":"Filter value (lte)","schema":{"type":"string"}},{"name":"filter[value][in]","in":"query","required":false,"description":"Filter value (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[value][notIn]","in":"query","required":false,"description":"Filter value (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[value][between]","in":"query","required":false,"description":"Filter value (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[value][like]","in":"query","required":false,"description":"Filter value (like)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","itemCode","-itemCode","attributeName","-attributeName","value","-value"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","itemId","itemCode","attributeId","attributeName","valueId","value"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/listItemAttributesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List item attributes","description":"Lists item attributes. Filter by itemId to read everything one item is tagged with, or by attributeId to find every item carrying a given attribute. The same fields come back from GET inventory/item-attributes/:id. An identifier that matches no record returns an empty page rather than an error.","tags":["inventoryItemAttributes"]},"post":{"operationId":"createItemAttribute","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createItemAttributeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"tag":{"value":{"data":{"id":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","attributeId":"c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48","attributeName":"Colour","valueId":"2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03","value":"Red"}},"summary":"Tag an item as red"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, VALUE_MISMATCH, DUPLICATE_ASSIGNMENT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attributeId":{"type":"string"},"valueId":{"type":"string"}},"additionalProperties":false,"required":["attributeId","valueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string"},"attributeId":{"type":"string"}},"additionalProperties":false,"required":["itemId","attributeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attributeId":{"type":"string"},"valueId":{"type":"string"}},"additionalProperties":false,"required":["attributeId","valueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string"},"attributeId":{"type":"string"}},"additionalProperties":false,"required":["itemId","attributeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attributeId":{"type":"string"},"valueId":{"type":"string"}},"additionalProperties":false,"required":["attributeId","valueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string"},"attributeId":{"type":"string"}},"additionalProperties":false,"required":["itemId","attributeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createItemAttributeInput"},"examples":{"tag":{"value":{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","attributeId":"c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48","valueId":"2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03"},"summary":"Tag an item as red"}}}}},"summary":"Tag an item with an attribute value","description":"Tags an item with one value of one attribute. The value must be one the attribute defines: assigning a value that belongs to a different attribute fails with VALUE_MISMATCH. An item holds one value per attribute, so tagging it with an attribute it already carries fails with DUPLICATE_ASSIGNMENT — delete the existing assignment first. There is no update — an assignment is only the item, the attribute and the value, so a change is this call and a DELETE.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItemAttributes"]}},"/inventory/items/drafts":{"post":{"operationId":"createItemDraft","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createItemDraftOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, UNKNOWN_VALUE, VALUATION_METHOD_UNAVAILABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createItemDraftInput"}}}},"summary":"Create a draft item","description":"Creates an item as a system draft. Every field is optional, so a draft can be saved while the item is still being described: the fields POST inventory/items requires may be missing, and its cross-checks (code uniqueness, valuation against tracking, a stockable type, units in the unit group) are not run. Only what could never be stored is refused: an id that matches no record, a value outside its accepted set, and the 'fifo' valuation method.\n\nA draft is not offered on any document and is not returned by GET inventory/items or by POST inventory/items/search unless the search sends isDraft true. Read it with GET inventory/items/:id, which reports isDraft true, complete it with PATCH inventory/items/:id, which keeps it a draft and also accepts itemCode and itemTypeId, and make it a real item with POST inventory/items/:id/activate, which runs every check POST inventory/items runs.\n\nThe defaults POST inventory/items applies are applied here too (movingAverage valuation, active true, isInventory true), so an activated draft is the record the same request would have created.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItems"]}},"/inventory/account-determination-rules/{id}":{"delete":{"operationId":"deleteAccountDeterminationRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAccountDeterminationRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts"}},"summary":"Deleting a rule and its reason-code overrides."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the rule you want to delete. Format: UUID.","examples":{"basic":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}}}],"summary":"Delete an account determination rule","description":"Deletes an account determination rule. The rule's reason-code overrides are deleted with it. The response is the deleted rule's `id` and `ruleName`.\n\nJournal entries that already used the rule do not change.\n\nTo turn off a rule without deleting it, set `isActive` to false with PATCH inventory/account-determination-rules/:id. To delete multiple rules, use POST inventory/account-determination-rules/bulk-delete.","tags":["inventoryAccountDeterminationRules"]},"patch":{"operationId":"updateAccountDeterminationRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAccountDeterminationRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"assignOneAccount":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}},"summary":"Set one account. The other accounts, the dimensions, and the overrides keep their current values."},"swapAnOverride":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}},"summary":"Delete one reason-code override and add its replacement in the same request."},"widenADimension":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}},"summary":"Make a rule for one item category apply to every item category. Sending null clears the category. Leaving the field out keeps the current category."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, BOOK_REQUIRED, TRANSACTION_TYPE_REQUIRED, DUPLICATE_RULE_TUPLE, OVERRIDE_NOT_FOUND, UNKNOWN_PARENT_ACCOUNT_TYPE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_TYPE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OVERRIDE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"overrideId":{"type":"string"}},"additionalProperties":false,"required":["overrideId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_TYPE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OVERRIDE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"overrideId":{"type":"string"}},"additionalProperties":false,"required":["overrideId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["field","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_TYPE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_TUPLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"existingId":{"type":"string","description":"The unique identifier for the existing rule. Format: UUID."},"existingRuleName":{"type":"string","description":"The free-text label of the existing rule."}},"additionalProperties":false,"required":["existingId","existingRuleName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OVERRIDE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"overrideId":{"type":"string"}},"additionalProperties":false,"required":["overrideId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_PARENT_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentAccountType":{"type":"string"}},"additionalProperties":false,"required":["parentAccountType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the rule you want to update. Format: UUID.","examples":{"assignOneAccount":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"},"swapAnOverride":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"},"widenADimension":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAccountDeterminationRuleInput"},"examples":{"assignOneAccount":{"value":{"accounts":{"cogsAccountId":"9a4d18e2-70bc-4f51-8d36-2e0b74f9a3c1"}},"summary":"Set one account. The other accounts, the dimensions, and the overrides keep their current values."},"swapAnOverride":{"value":{"deleteReasonCodeOverrides":["b1c07e35-9d42-4a68-8f10-5c3e92a7b064"],"createReasonCodeOverrides":[{"reasonCodeId":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","accountId":"9a4d18e2-70bc-4f51-8d36-2e0b74f9a3c1","parentAccountType":"inventoryAdjustmentLossAccount"}]},"summary":"Delete one reason-code override and add its replacement in the same request."},"widenADimension":{"value":{"matching":{"itemCategoryId":null}},"summary":"Make a rule for one item category apply to every item category. Sending null clears the category. Leaving the field out keeps the current category."}}}}},"summary":"Update an account determination rule","description":"Updates an account determination rule with the fields you send. A field you leave out keeps its current value, including inside `matching` and `accounts`.\n\nTo clear a field in `matching` or `accounts`, send null. The book is the exception: you can change it, but not remove it.\n\nReason-code overrides change through three arrays: `createReasonCodeOverrides`, `updateReasonCodeOverrides`, and `deleteReasonCodeOverrides`.\n\nYou cannot change the rule's legal entity. To move a rule to another legal entity, create a new rule there and delete the old one.\n\nThe response is only the rule's `id`. To see the updated rule, use GET inventory/account-determination-rules/:id.","tags":["inventoryAccountDeterminationRules"]},"get":{"operationId":"getAccountDeterminationRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAccountDeterminationRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aReceiptRule":{"value":{"data":{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts","priority":10,"isActive":true,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"},"reasonCodeOverrides":[],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}},"summary":"A rule for receipts of one item category in one accounting book. Every other dimension is a wildcard."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the rule you want to retrieve. Format: UUID.","examples":{"aReceiptRule":{"value":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}}}],"summary":"Retrieve an account determination rule","description":"Retrieves an account determination rule, with its dimensions, accounts, and reason-code overrides.","tags":["inventoryAccountDeterminationRules"]}},"/inventory/landed-costs/bulk":{"post":{"operationId":"bulkCreateLandedCosts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateLandedCostsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"periodEnd":{"value":{"data":{"created":[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007"}]}},"summary":"Landed costs created as drafts in one request."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_RECEIPTS, NO_CHARGES, RECEIPT_NOT_COMMITTED, VENDOR_BILL_NOT_APPROVED, ENTITY_MISMATCH, CHARGE_NOT_LANDED_COST_ITEM, INVALID_AMOUNT, UNKNOWN_ALLOCATION_MODE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["receiptNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["billNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["receiptNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["billNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_RECEIPTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHARGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECEIPT_NOT_COMMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"receiptNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["receiptNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billNumber":{"type":"string"},"status":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["billNumber","status","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CHARGE_NOT_LANDED_COST_ITEM"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateLandedCostsInput"},"examples":{"periodEnd":{"value":{"landedCosts":[{"entityId":"7039b992-696a-40c7-a181-51759304ef83","receipts":[{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}],"charges":[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"Quantity","amount":"240"}]}]},"summary":"Landed costs created as drafts in one request."}}}}},"summary":"Bulk create landed costs","description":"Creates multiple landed costs as drafts in one request. Each landed cost is checked the same way as on POST inventory/landed-costs. If one landed cost cannot be created, the request fails and no landed costs are created.\n\nNothing is committed. Commit each landed cost with POST inventory/landed-costs/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCosts"]}},"/inventory/inventory-decreases/{id}/commit":{"post":{"operationId":"commitInventoryDecrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitInventoryDecreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"postTheCount":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":[]}},"summary":"The write-off is posted; stock falls and a journal entry is written"},"postWithASoftBinBreach":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":["Bin A-01-02 is left below its configured minimum"]}},"summary":"The destination bin is over its configured limit, but not configured to hard-block, so the commit succeeds with an advisory"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the draft inventory decrease you want to commit.","examples":{"postTheCount":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"},"postWithASoftBinBreach":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitInventoryDecreaseInput"},"examples":{"postTheCount":{"value":{},"summary":"The write-off is posted; stock falls and a journal entry is written"},"postWithASoftBinBreach":{"value":{},"summary":"The destination bin is over its configured limit, but not configured to hard-block, so the commit succeeds with an advisory"}}}}},"summary":"Commit an inventory decrease","description":"Commits an inventory decrease. The lines' quantities leave stock and documentStatus becomes 'COMMITTED'. The response includes journalEntryId and any warnings.\n\nOnly a draft can be committed. Stock is checked when you commit, not when you created the draft. Each line needs enough stock at its item and location, or the request fails with POSTING_REJECTED.\n\nA committed inventory decrease can't be changed or deleted, and no endpoint cancels it.\n\nCommits of the same item at the same location may run at the same time. A database write conflict between them is not a rejection: the platform retries the request, so it never returns POSTING_REJECTED.","tags":["inventoryInventoryDecreases"]}},"/inventory/receipts":{"get":{"operationId":"receipts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentNumber]","in":"query","required":false,"description":"Filter documentNumber (equality)","schema":{"type":"string"}},{"name":"filter[documentNumber][ne]","in":"query","required":false,"description":"Filter documentNumber (ne)","schema":{"type":"string"}},{"name":"filter[documentNumber][gt]","in":"query","required":false,"description":"Filter documentNumber (gt)","schema":{"type":"string"}},{"name":"filter[documentNumber][gte]","in":"query","required":false,"description":"Filter documentNumber (gte)","schema":{"type":"string"}},{"name":"filter[documentNumber][lt]","in":"query","required":false,"description":"Filter documentNumber (lt)","schema":{"type":"string"}},{"name":"filter[documentNumber][lte]","in":"query","required":false,"description":"Filter documentNumber (lte)","schema":{"type":"string"}},{"name":"filter[documentNumber][in]","in":"query","required":false,"description":"Filter documentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][notIn]","in":"query","required":false,"description":"Filter documentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentNumber][between]","in":"query","required":false,"description":"Filter documentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentNumber][like]","in":"query","required":false,"description":"Filter documentNumber (like)","schema":{"type":"string"}},{"name":"filter[documentStatus]","in":"query","required":false,"description":"Filter documentStatus (equality)","schema":{"type":"string"}},{"name":"filter[documentStatus][ne]","in":"query","required":false,"description":"Filter documentStatus (ne)","schema":{"type":"string"}},{"name":"filter[documentStatus][gt]","in":"query","required":false,"description":"Filter documentStatus (gt)","schema":{"type":"string"}},{"name":"filter[documentStatus][gte]","in":"query","required":false,"description":"Filter documentStatus (gte)","schema":{"type":"string"}},{"name":"filter[documentStatus][lt]","in":"query","required":false,"description":"Filter documentStatus (lt)","schema":{"type":"string"}},{"name":"filter[documentStatus][lte]","in":"query","required":false,"description":"Filter documentStatus (lte)","schema":{"type":"string"}},{"name":"filter[documentStatus][in]","in":"query","required":false,"description":"Filter documentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][notIn]","in":"query","required":false,"description":"Filter documentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentStatus][between]","in":"query","required":false,"description":"Filter documentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentStatus][like]","in":"query","required":false,"description":"Filter documentStatus (like)","schema":{"type":"string"}},{"name":"filter[documentDate]","in":"query","required":false,"description":"Filter documentDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][ne]","in":"query","required":false,"description":"Filter documentDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gt]","in":"query","required":false,"description":"Filter documentDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][gte]","in":"query","required":false,"description":"Filter documentDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lt]","in":"query","required":false,"description":"Filter documentDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][lte]","in":"query","required":false,"description":"Filter documentDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[documentDate][in]","in":"query","required":false,"description":"Filter documentDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][notIn]","in":"query","required":false,"description":"Filter documentDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentDate][between]","in":"query","required":false,"description":"Filter documentDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deliveryDate]","in":"query","required":false,"description":"Filter deliveryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][ne]","in":"query","required":false,"description":"Filter deliveryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gt]","in":"query","required":false,"description":"Filter deliveryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][gte]","in":"query","required":false,"description":"Filter deliveryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lt]","in":"query","required":false,"description":"Filter deliveryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][lte]","in":"query","required":false,"description":"Filter deliveryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[deliveryDate][in]","in":"query","required":false,"description":"Filter deliveryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][notIn]","in":"query","required":false,"description":"Filter deliveryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deliveryDate][between]","in":"query","required":false,"description":"Filter deliveryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","documentDate","-documentDate","deliveryDate","-deliveryDate","documentStatus","-documentStatus","totalAmount","-totalAmount","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","documentStatus","documentDate","deliveryDate","entityId","entityName","businessPartnerId","businessPartnerName","referenceNumber","trackingNumber","receiptType","currency","totalAmount","lineCount","notes","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/receiptsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lineCount":2},{"id":"a4e81c07-52fb-4d93-8206-71b3fe0c9d54","documentNumber":"GR-2292","documentStatus":"COMMITTED","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","currency":"EUR","totalAmount":"2400.00","notes":"Weekly delivery","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-16T11:45:00.000Z","lineCount":5}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List receipts","description":"Lists receipts. The response has each receipt's main fields without its lines. lineCount is the number of lines on each receipt.\n\nThe vendor, the vendor's reference number, and the carrier's tracking number are returned but can't be filtered or sorted on here.\n\nTo read the lines, use GET inventory/receipts/:id or POST inventory/receipts/search. To filter by vendor, reference number, tracking number, item, or warehouse, use POST inventory/receipts/search.","tags":["inventoryReceipts"]},"post":{"operationId":"createReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"againstAPurchaseOrder":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}},"summary":"Two pallets and their inbound freight, received against a purchase order line"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, LINE_TOTAL_MISMATCH, INCOMPLETE_LINE, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, LOCATION_ENTITY_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","lineType","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createReceiptInput"},"examples":{"againstAPurchaseOrder":{"value":{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-14","deliveryDate":"2026-08-14","referenceNumber":"DN-77120","currency":"EUR","notes":"Received at the back dock","lines":[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]},"summary":"Two pallets and their inbound freight, received against a purchase order line"}}}}},"summary":"Create a receipt","description":"Creates a receipt in draft status. No stock is brought in and no journal entry is created for the accrual until you commit the receipt with POST inventory/receipts/:id/commit.\n\nEvery line's warehouse must belong to the receipt's legal entity. Otherwise the request fails with LOCATION_ENTITY_MISMATCH.\n\nThe response is the created receipt, with the same fields GET inventory/receipts/:id returns.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReceipts"]}},"/inventory/warehouses/bulk-delete":{"post":{"operationId":"bulkDeleteWarehouses","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteWarehousesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WAREHOUSE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"recordCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","recordCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteWarehousesInput"}}}},"summary":"Bulk delete warehouses","description":"Deletes multiple warehouses in one request. If any id is unknown, or names a warehouse still in use, none are deleted.\n\nA warehouse is in use while it has stock records, movement history, bins, inventory counts, or allocations. To retire it instead, set isActive to false with PATCH inventory/warehouses/:id.\n\nThe response has each deleted warehouse's id and locationCode, in the order you sent them. To delete one warehouse, use DELETE inventory/warehouses/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouses"]}},"/inventory/item-attributes/{id}":{"get":{"operationId":"getItemAttribute","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getItemAttributeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"tagged":{"value":{"data":{"id":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","attributeId":"c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48","attributeName":"Colour","valueId":"2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03","value":"Red"}},"summary":"An item tagged with a color"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the item attribute to read.","examples":{"tagged":{"value":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"}}}],"summary":"Retrieve an item attribute","description":"Retrieves an item attribute. The same fields come back from GET inventory/item-attributes. The item's code and the attribute's name are returned beside their identifiers, so a row can be rendered without three further calls.","tags":["inventoryItemAttributes"]},"delete":{"operationId":"deleteItemAttribute","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteItemAttributeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"untag":{"value":{"data":{"id":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"}},"summary":"Remove a color tag from an item"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the item attribute to remove.","examples":{"untag":{"value":"9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"}}}],"summary":"Remove an item attribute","description":"Removes one attribute assignment from an item. Nothing references an assignment, so there is no in-use check and the delete always succeeds for an identifier that exists. The attribute definition and its allowed values are untouched — this removes the item's link to the value, not the value itself.","tags":["inventoryItemAttributes"]}},"/inventory/sales-returns/{id}/commit":{"post":{"operationId":"commitSalesReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitSalesReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"acceptTheReturn":{"value":{"data":{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentStatus":"RECEIVED","warnings":[]}},"summary":"The RMA checks out: the goods go back on the shelf and the return is closed"},"creditRaised":{"value":{"data":{"id":"3c81f0a5-9d72-4b6e-8f14-0a5e73c9b2d8","documentStatus":"RECEIVED","creditMemoId":"b7d4e19c-3a62-4f85-9e07-1c2d5a8f6b30","warnings":[]}},"summary":"A return that came from a finance sales return raised as a credit"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the sales return.","examples":{"acceptTheReturn":{"value":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"},"creditRaised":{"value":"3c81f0a5-9d72-4b6e-8f14-0a5e73c9b2d8"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitSalesReturnInput"},"examples":{"acceptTheReturn":{"value":{"approvalNotes":"RMA verified against the delivery"},"summary":"The RMA checks out: the goods go back on the shelf and the return is closed"},"creditRaised":{"value":{"approvalNotes":"Customer credited in full"},"summary":"A return that came from a finance sales return raised as a credit"}}}}},"summary":"Commit a sales return","description":"Commits a draft sales return and brings the goods back into stock. The commit creates the inventory transactions and the journal entry for the returned goods, and sets documentStatus to 'RECEIVED'. When the return is linked to a sales return in accounting that credits the customer, the commit also creates the credit memo. creditMemoId is the id of that credit memo.\n\nOnly a draft can be committed. All lines must use the same warehouse, or the request fails with POSTING_REJECTED. After the commit, the return can't be updated or deleted.","tags":["inventorySalesReturns"]}},"/inventory/inventory-increases/{id}":{"get":{"operationId":"getInventoryIncrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getInventoryIncreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aDraftCountCorrection":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"A drafted count correction of one batch-tracked item, landing in one bin"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory increase you want to retrieve.","examples":{"aDraftCountCorrection":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"summary":"Retrieve an inventory increase","description":"Retrieves an inventory increase. The inventory increase comes back with its main fields, its lines, and each line's batch, serial, and bin details.\n\nPOST inventory/inventory-increases/search returns the same fields. The collection GET inventory/inventory-increases returns the main fields without the lines.\n\ndocumentStatus says what you can do next. A 'DRAFT' can be updated, committed, or deleted. A 'COMMITTED' one can't be changed or deleted, and a 'CANCELLED' one can only be deleted.","tags":["inventoryInventoryIncreases"]},"patch":{"operationId":"updateInventoryIncrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateInventoryIncreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"recountOneLine":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count, recounted","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:40:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"150.00","inventoryQuantity":"150.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"150.00","inventoryQuantity":"150.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"150.00","inventoryQuantity":"150.00","batchNumber":"LOT-2026-08-14"}]}]}},"summary":"The recount raised the quantity; the batch and bin detail is restated to match"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, REFERENCE_NOT_FOUND, REASON_CODE_NOT_APPLICABLE, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"}},"additionalProperties":false,"required":["reasonCodeId","documentType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"}},"additionalProperties":false,"required":["kind","number"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory increase you want to update.","examples":{"recountOneLine":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateInventoryIncreaseInput"},"examples":{"recountOneLine":{"value":{"notes":"August cycle count, recounted","updateLines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","quantity":"150.00","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"150.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"150.00","batchNumber":"LOT-2026-08-14"}]}]},"summary":"The recount raised the quantity; the batch and bin detail is restated to match"}}}}},"summary":"Update an inventory increase","description":"Updates an inventory increase with the fields you send. A field you leave out keeps its current value. Lines change through three separate arrays: deleteLines, updateLines, and createLines. You can send any combination in one request.\n\nLeave out all three to keep the lines as they are. On an updateLines item, a field you leave out keeps its current value. On an updateLines item, sending batches, serials, or binLocations replaces all of that line's tracking, so send every batch, serial, and bin entry the line should keep.\n\nLeave all three out to keep the line's tracking as it is.\n\nOnly a draft can be changed. You can change its date, reason code, notes, and lines. The response is the whole updated document.\n\nThe warehouse can't be changed. To use another warehouse, delete the draft and create a new inventory increase.\n\nOne request can remove a line and add its replacement.","tags":["inventoryInventoryIncreases"]},"delete":{"operationId":"deleteInventoryIncrease","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteInventoryIncreaseOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"discardADraft":{"value":{"data":{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}},"summary":"A draft that was raised in error"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the inventory increase you want to delete.","examples":{"discardADraft":{"value":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"}}}],"summary":"Delete an inventory increase","description":"Deletes an inventory increase. The lines and their batch, serial, and bin details are deleted with the document. The batch numbers and serial numbers the inventory increase created are kept.\n\nA draft or a canceled inventory increase can be deleted. A committed one can't.","tags":["inventoryInventoryIncreases"]}},"/inventory/shipment-carriers":{"get":{"operationId":"shipmentCarriers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorId]","in":"query","required":false,"description":"Filter vendorId (equality)","schema":{"type":"string"}},{"name":"filter[vendorId][ne]","in":"query","required":false,"description":"Filter vendorId (ne)","schema":{"type":"string"}},{"name":"filter[vendorId][gt]","in":"query","required":false,"description":"Filter vendorId (gt)","schema":{"type":"string"}},{"name":"filter[vendorId][gte]","in":"query","required":false,"description":"Filter vendorId (gte)","schema":{"type":"string"}},{"name":"filter[vendorId][lt]","in":"query","required":false,"description":"Filter vendorId (lt)","schema":{"type":"string"}},{"name":"filter[vendorId][lte]","in":"query","required":false,"description":"Filter vendorId (lte)","schema":{"type":"string"}},{"name":"filter[vendorId][in]","in":"query","required":false,"description":"Filter vendorId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorId][notIn]","in":"query","required":false,"description":"Filter vendorId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorId][between]","in":"query","required":false,"description":"Filter vendorId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorId][like]","in":"query","required":false,"description":"Filter vendorId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","active","-active","vendorId","-vendorId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","active","vendorId","vendorName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/shipmentCarriersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332","name":"DHL Express","active":true,"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47","vendorName":"DHL International GmbH","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714","name":"In-house fleet","active":true,"lastModifiedDate":"2026-05-12T09:31:00.000Z"},{"id":"0d94a2fe-51b7-4c88-a06d-3e7f21c94b55","name":"Regional Couriers","active":false,"vendorId":"9e5c1f70-3a82-4b46-8d09-71c4e0a92f38","vendorName":"Regional Couriers Ltd","lastModifiedDate":"2026-05-12T09:32:00.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List shipment carriers","description":"Lists shipment carriers. The fields are the same as on GET inventory/shipment-carriers/:id and POST inventory/shipment-carriers/search.\n\nTo find the carriers of one vendor, filter on vendorId. vendorName can't be filtered or sorted on.","tags":["inventoryShipmentCarriers"]},"post":{"operationId":"createShipmentCarrier","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createShipmentCarrierOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"linkedToAVendor":{"value":{"data":{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"}},"summary":"A carrier that bills through an existing vendor record"},"stagedInactive":{"value":{"data":{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714"}},"summary":"An in-house fleet with no vendor, created but not yet selectable"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: VENDOR_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"}},"additionalProperties":false,"required":["vendorId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createShipmentCarrierInput"},"examples":{"linkedToAVendor":{"value":{"name":"DHL Express","vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47"},"summary":"A carrier that bills through an existing vendor record"},"stagedInactive":{"value":{"name":"In-house fleet","active":false},"summary":"An in-house fleet with no vendor, created but not yet selectable"}}}}},"summary":"Create a shipment carrier","description":"Creates a shipment carrier. A carrier can be linked to the vendor it bills through.\n\nThe response contains only the new carrier's id. To read the record, use GET inventory/shipment-carriers/:id. To create several carriers at once, use POST inventory/shipment-carriers/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryShipmentCarriers"]}},"/inventory/items/{id}":{"delete":{"operationId":"deleteItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"mistake":{"value":{"data":{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01"}},"summary":"An item created in error, before anything referenced it"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"number"}},"additionalProperties":false,"required":["reason","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"number"}},"additionalProperties":false,"required":["reason","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"number"}},"additionalProperties":false,"required":["reason","count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item you want to delete.","examples":{"mistake":{"value":"517a93e4-cbb4-4571-9e3d-2343e56cfd84"}}}],"summary":"Delete an item","description":"Deletes an item. The response is the deleted item's id and item code.\n\nAn item can't be deleted while it has stock or any inventory transaction. Nor can it be deleted while a purchase order or warehouse transfer order for it is still awaiting receipt.\n\nTo retire an item instead, set active to false with PATCH inventory/items/:id. The item then can't be selected on new documents, and historical records keep it.\n\nRetiring needs every quantity of the item to be zero and nothing on its way in. So an item with transactions but no stock left can be retired. An item that still has stock can be neither deleted nor retired.\n\nA retired item keeps its item code, and no other item can use it.","tags":["inventoryItems"]},"patch":{"operationId":"updateItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"retire":{"value":{"data":{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84"}},"summary":"Retire an item without deleting it"},"weighIt":{"value":{"data":{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84"}},"summary":"Give an item the weight a landed cost allocation needs"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: FIELD_NOT_UPDATABLE, NOT_FOUND, REFERENCE_NOT_FOUND, DUPLICATE_CODE, UNKNOWN_VALUE, TRACKING_MISMATCH, ITEM_TYPE_NOT_STOCKABLE, VALUATION_METHOD_UNAVAILABLE, UNIT_NOT_IN_UNIT_GROUP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"FIELD_NOT_UPDATABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"FIELD_NOT_UPDATABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"FIELD_NOT_UPDATABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemCode":{"type":"string"}},"additionalProperties":false,"required":["itemCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRACKING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"},"requires":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod","requires"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_TYPE_NOT_STOCKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemTypeId":{"type":"string"}},"additionalProperties":false,"required":["itemTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUATION_METHOD_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valuationMethod":{"type":"string"}},"additionalProperties":false,"required":["valuationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_IN_UNIT_GROUP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"unitId":{"type":"string"},"unitGroupId":{"type":"string"}},"additionalProperties":false,"required":["field","unitId","unitGroupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item you want to update.","examples":{"retire":{"value":"517a93e4-cbb4-4571-9e3d-2343e56cfd84"},"weighIt":{"value":"517a93e4-cbb4-4571-9e3d-2343e56cfd84"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateItemInput"},"examples":{"retire":{"value":{"active":false},"summary":"Retire an item without deleting it"},"weighIt":{"value":{"weight":"1.6","weightUnit":"Kg"},"summary":"Give an item the weight a landed cost allocation needs"}}}}},"summary":"Update an item","description":"Updates an item with the fields you send. A field you leave out keeps its current value.\n\nitemCode and itemTypeId can't change once the item is real, and sending either is FIELD_NOT_UPDATABLE. A draft item is the exception: it accepts both, and every other field, without the create checks, and stays a draft until POST inventory/items/:id/activate.\n\nSetting active to false retires the item. Retiring is refused while the item still has a quantity in stock, in transit, allocated, reserved, on quality hold, or damaged. Retiring is also refused while the item is on a purchase order or warehouse transfer order still awaiting receipt.\n\nA retired item is refused on every inventory document, corrections and cancellations included. Setting active back to true is never refused.\n\nThe response contains only the id. Read the updated item with GET inventory/items/:id.","tags":["inventoryItems"]},"get":{"operationId":"getItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"stocked":{"value":{"data":{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","itemTypeName":"Stocked good","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","categoryName":"Components","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","inventoryUnitCode":"EA","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","unitGroupName":"Each","valuationMethod":"movingAverage","isBatch":false,"isSerial":false,"isInventory":true,"isSalesItem":true,"isPurchaseItem":true,"active":true,"weight":"1.4","weightUnit":"Kg","lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"A stocked, moving-average item with a weight, so Weight allocation will work on it"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item you want to retrieve.","examples":{"stocked":{"value":"517a93e4-cbb4-4571-9e3d-2343e56cfd84"}}}],"summary":"Retrieve an item","description":"Retrieves an item. The item comes back with every field, including standardCost, itemPurchasePrice, and currency, which the collection GET inventory/items leaves out. POST inventory/items/search returns the same fields.","tags":["inventoryItems"]}},"/inventory/batch-transactions/search":{"post":{"operationId":"searchBatchTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBatchTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"traceABatch":{"value":{"data":{"items":[{"id":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"500.00","cost":"3.75","valueDelta":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every batch transaction for one batch, found by its batch number."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBatchTransactionsInput"},"examples":{"traceABatch":{"value":{"filters":{"batchNumber":"LOT-2026-08-14"}},"summary":"Every batch transaction for one batch, found by its batch number."}}}}},"summary":"Search batch transactions","description":"Searches batch transactions. Results are in the order the batch transactions were created, not in order of `transactionDate`.","tags":["inventoryBatchTransactions"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/landed-costs/{id}/commit":{"post":{"operationId":"commitLandedCost","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitLandedCostOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"capitalise":{"value":{"data":{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentStatus":"COMMITTED","totalChargeAmount":"240","revaluationIds":["f0a25c71-8d43-4e96-b2c8-51730e9a4d62"],"warnings":[]}},"summary":"Committing a landed cost with one £240 freight charge. The commit creates one inventory revaluation."},"twoAccounts":{"value":{"data":{"id":"a4f92c05-7b31-4e68-9d02-5c17e83b6a49","documentStatus":"COMMITTED","totalChargeAmount":"420","revaluationIds":["f0a25c71-8d43-4e96-b2c8-51730e9a4d62","3b8e40d9-6c15-4a72-8f03-9d21e75b0c48"],"warnings":[]}},"summary":"Committing a landed cost whose freight and duty charges have different expense accounts. The commit creates one inventory revaluation for each account."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, VALIDATION_FAILED, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost you want to commit. Format: UUID.","examples":{"capitalise":{"value":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"},"twoAccounts":{"value":"a4f92c05-7b31-4e68-9d02-5c17e83b6a49"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitLandedCostInput"},"examples":{"capitalise":{"value":{},"summary":"Committing a landed cost with one £240 freight charge. The commit creates one inventory revaluation."},"twoAccounts":{"value":{},"summary":"Committing a landed cost whose freight and duty charges have different expense accounts. The commit creates one inventory revaluation for each account."}}}}},"summary":"Commit a landed cost","description":"Commits a draft landed cost. The commit does these steps in one request:\n\n1. It checks that the landed cost has at least one receipt and one charge, that its receipts are still committed, and that no charge uses more than is left on its vendor bill line. If the check finds problems, the commit stops, creates no inventory revaluations, and returns all of the problems together.\n2. It creates inventory revaluations for the charges, at least one for each expense account and costing element type.\n3. It commits each inventory revaluation, which changes the cost of the stock.\n4. It records how much of each charge was allocated, in `allocatedAmount`.\n5. It marks the landed cost as committed. The response lists the inventory revaluations in `revaluationIds`.","tags":["inventoryLandedCosts"]}},"/inventory/shipments/{id}/commit":{"post":{"operationId":"commitShipment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitShipmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"shipAndClose":{"value":{"data":{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentStatus":"DELIVERED","journalEntryId":"6b2d90f1-4c37-4e85-a019-8d3f5c72b6e4","warnings":[]}},"summary":"A business that does not track transit closes the shipment in one call"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, NO_LINES, SOURCE_LINE_NOT_PROJECTED, MIXED_LOCATIONS, POSTING_REJECTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["locationIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the shipment you want to commit.","examples":{"shipAndClose":{"value":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitShipmentInput"},"examples":{"shipAndClose":{"value":{},"summary":"A business that does not track transit closes the shipment in one call"}}}}},"summary":"Ship and deliver a shipment","description":"Ships and delivers a shipment in one request. Moves a draft or packed shipment to 'DELIVERED': the stock leaves the warehouse and the cost of sale is recorded in a journal entry. The response gives the new status and, when a journal entry was created, its id in journalEntryId.\n\nEvery line must leave from the same warehouse. The check runs before any stock leaves or any journal entry is created, and a shipment with lines in more than one warehouse fails the request with MIXED_LOCATIONS.\n\nA delivered shipment can't be changed or deleted, and no endpoint cancels it.","tags":["inventoryShipments"]}},"/inventory/inventory-decreases/search":{"post":{"operationId":"searchInventoryDecreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInventoryDecreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"draftsAtOneWarehouse":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Everything still drafted at one warehouse, waiting to be committed"},"everyAdjustmentOfOneItem":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T10:03:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Every decrease touching one item in August — the shrinkage question"},"incrementalSync":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T10:03:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Everything changed since the last sync, for a caller keeping a copy"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInventoryDecreasesInput"},"examples":{"draftsAtOneWarehouse":{"value":{"filters":{"documentStatus":"DRAFT","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}},"summary":"Everything still drafted at one warehouse, waiting to be committed"},"everyAdjustmentOfOneItem":{"value":{"filters":{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Every decrease touching one item in August — the shrinkage question"},"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-14T00:00:00.000Z"}},"summary":"Everything changed since the last sync, for a caller keeping a copy"}}}}},"summary":"Search inventory decreases","description":"Searches inventory decreases. Each matching inventory decrease comes back with its main fields, its lines, and each line's batch, serial, and bin details. The fields are the same as on GET inventory/inventory-decreases/:id.\n\nThis is the only endpoint that filters by item. itemId matches inventory decreases that have a line for that item.","tags":["inventoryInventoryDecreases"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/batch-transactions/{id}":{"get":{"operationId":"getBatchTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBatchTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aBatchReceipt":{"value":{"data":{"id":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"500.00","cost":"3.75","valueDelta":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"}},"summary":"500 units of one batch received on a receipt."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the batch transaction you want to retrieve. Format: UUID.","examples":{"aBatchReceipt":{"value":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f"}}}],"summary":"Retrieve a batch transaction","description":"Retrieves a batch transaction.","tags":["inventoryBatchTransactions"]}},"/inventory/shipments/search":{"post":{"operationId":"searchShipments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchShipmentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byTrackingNumber":{"value":{"data":{"items":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}],"pagination":{"hasMore":false}}},"summary":"The shipment behind a carrier tracking number — the support desk's question"},"oneCustomersShipments":{"value":{"data":{"items":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"SHIPPED","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-15T07:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}],"pagination":{"hasMore":false}}},"summary":"Everything sent to one customer this month"},"theInTransitQueue":{"value":{"data":{"items":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}],"pagination":{"hasMore":false}}},"summary":"Every shipment that has left but not yet been delivered"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchShipmentsInput"},"examples":{"byTrackingNumber":{"value":{"filters":{"trackingNumber":"3SABCD1234567"}},"summary":"The shipment behind a carrier tracking number — the support desk's question"},"oneCustomersShipments":{"value":{"filters":{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Everything sent to one customer this month"},"theInTransitQueue":{"value":{"filters":{"documentStatus":"SHIPPED"}},"summary":"Every shipment that has left but not yet been delivered"}}}}},"summary":"Search shipments","description":"Searches shipments. The fields are the same as on GET inventory/shipments/:id.\n\nThis is the only endpoint that filters by customer, item, warehouse, reference number, or tracking number.","tags":["inventoryShipments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/item-types/{id}":{"get":{"operationId":"getItemType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getItemTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"stocked":{"value":{"data":{"id":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","name":"Stocked good","description":"Physical goods held in a warehouse","procurable":true,"stockable":true,"active":true,"itemCount":42,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"The type most items name"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the item type you want to retrieve.","examples":{"stocked":{"value":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16"}}}],"summary":"Retrieve an item type","description":"Retrieves an item type. The item type comes back with itemCount, the number of items that use it. The collection GET inventory/item-types leaves itemCount out. POST inventory/item-types/search returns the same fields as this endpoint.","tags":["inventoryItemTypes"]}},"/inventory/reason-codes/bulk-delete":{"post":{"operationId":"bulkDeleteReasonCodes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteReasonCodesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REASON_CODE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"documentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","documentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteReasonCodesInput"}}}},"summary":"Bulk delete reason codes","description":"Deletes multiple reason codes in one request. If any reason code can't be deleted, none are deleted. The response lists each deleted reason code's id and code in the order you sent the ids.\n\nA reason code that an inventory increase, inventory decrease, inventory revaluation, sales return line, or account determination rule override still uses can't be deleted. To retire the reason code instead, set isActive to false with PATCH inventory/reason-codes/:id.\n\nTo delete a single reason code, use DELETE inventory/reason-codes/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReasonCodes"]}},"/inventory/warehouse-transfer-orders/bulk":{"post":{"operationId":"bulkCreateTransferOrders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateTransferOrdersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aReplenishmentRun":{"value":{"data":{"transferOrders":[{"id":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6","documentStatus":"DRAFT","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T10:02:41.883Z"}]}},"summary":"A planning run raising one order per receiving warehouse"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, HEADER_SAME_LOCATION, HEADER_ENTITY_MISMATCH, ENTITY_MISMATCH, UNIT_NOT_CONVERTIBLE, WRITE_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HEADER_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"targetLocationId":{"type":"string"},"orderEntityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","targetLocationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CONVERTIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"itemId":{"type":"string"},"unitId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","itemId","unitId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRITE_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateTransferOrdersInput"},"examples":{"aReplenishmentRun":{"value":{"transferOrders":[{"targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"12","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}],"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}]},"summary":"A planning run raising one order per receiving warehouse"}}}}},"summary":"Bulk create warehouse transfer orders","description":"Creates multiple warehouse transfer orders in one request. Every transfer order is created as a draft. If any order can't be created, none are.\n\nThe response lists the created orders in the order you sent them, without their lines. To see an order's lines, use GET inventory/warehouse-transfer-orders/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransferOrders"]}},"/people/positions":{"post":{"operationId":"createPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: MANAGER_NOT_FOUND, JOB_PROFILE_NOT_FOUND, REGION_NOT_FOUND, DUPLICATE_POSITION","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POSITION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPositionInput"}}}},"summary":"Create a position","description":"Creates a position. A position's name must be unique among positions with the same job profile. If you leave out jobProfileId, any position with the same name counts as a duplicate, and the request fails with DUPLICATE_POSITION.\n\nThe response contains only the new position's id. Read the full record with GET people/positions/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPositions"]},"get":{"operationId":"positions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[positionNumber]","in":"query","required":false,"description":"Filter positionNumber (equality)","schema":{"type":"string"}},{"name":"filter[positionNumber][ne]","in":"query","required":false,"description":"Filter positionNumber (ne)","schema":{"type":"string"}},{"name":"filter[positionNumber][gt]","in":"query","required":false,"description":"Filter positionNumber (gt)","schema":{"type":"string"}},{"name":"filter[positionNumber][gte]","in":"query","required":false,"description":"Filter positionNumber (gte)","schema":{"type":"string"}},{"name":"filter[positionNumber][lt]","in":"query","required":false,"description":"Filter positionNumber (lt)","schema":{"type":"string"}},{"name":"filter[positionNumber][lte]","in":"query","required":false,"description":"Filter positionNumber (lte)","schema":{"type":"string"}},{"name":"filter[positionNumber][in]","in":"query","required":false,"description":"Filter positionNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionNumber][notIn]","in":"query","required":false,"description":"Filter positionNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionNumber][between]","in":"query","required":false,"description":"Filter positionNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[positionNumber][like]","in":"query","required":false,"description":"Filter positionNumber (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[overtimeStatus]","in":"query","required":false,"description":"Filter overtimeStatus (equality)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][ne]","in":"query","required":false,"description":"Filter overtimeStatus (ne)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][gt]","in":"query","required":false,"description":"Filter overtimeStatus (gt)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][gte]","in":"query","required":false,"description":"Filter overtimeStatus (gte)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][lt]","in":"query","required":false,"description":"Filter overtimeStatus (lt)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][lte]","in":"query","required":false,"description":"Filter overtimeStatus (lte)","schema":{"type":"string"}},{"name":"filter[overtimeStatus][in]","in":"query","required":false,"description":"Filter overtimeStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[overtimeStatus][notIn]","in":"query","required":false,"description":"Filter overtimeStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[overtimeStatus][between]","in":"query","required":false,"description":"Filter overtimeStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[overtimeStatus][like]","in":"query","required":false,"description":"Filter overtimeStatus (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[timelineStatus]","in":"query","required":false,"description":"Filter timelineStatus (equality)","schema":{"type":"string"}},{"name":"filter[timelineStatus][ne]","in":"query","required":false,"description":"Filter timelineStatus (ne)","schema":{"type":"string"}},{"name":"filter[timelineStatus][gt]","in":"query","required":false,"description":"Filter timelineStatus (gt)","schema":{"type":"string"}},{"name":"filter[timelineStatus][gte]","in":"query","required":false,"description":"Filter timelineStatus (gte)","schema":{"type":"string"}},{"name":"filter[timelineStatus][lt]","in":"query","required":false,"description":"Filter timelineStatus (lt)","schema":{"type":"string"}},{"name":"filter[timelineStatus][lte]","in":"query","required":false,"description":"Filter timelineStatus (lte)","schema":{"type":"string"}},{"name":"filter[timelineStatus][in]","in":"query","required":false,"description":"Filter timelineStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[timelineStatus][notIn]","in":"query","required":false,"description":"Filter timelineStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[timelineStatus][between]","in":"query","required":false,"description":"Filter timelineStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[timelineStatus][like]","in":"query","required":false,"description":"Filter timelineStatus (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","positionNumber","-positionNumber","name","-name","hiringManagerName","-hiringManagerName","desiredHeadcount","-desiredHeadcount","employeeCount","-employeeCount","status","-status","timelineStatus","-timelineStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","positionNumber","name","description","desiredHeadcount","employeeCount","expectedSalary","hiringManagerName","overtimeStatus","status","timelineStatus","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/positionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List positions","description":"Lists positions. The list doesn't include each position's start and end dates or its hiring manager, job profile, and region identifiers. GET people/positions/:id returns those, with the job profile and region names.","tags":["hrPositions"]}},"/accounting/ad-hoc-documents/{id}/void":{"post":{"operationId":"voidAdHocDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/voidAdHocDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, FIELD_REQUIRED, DOCUMENT_NOT_VOIDABLE, ACCOUNTING_PERIOD_CLOSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_VOIDABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_VOIDABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_VOIDABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id of the ad hoc document to void (a UUID); bound from the :id path segment.","example":"3f2a9c14-7b6d-4e58-9a01-2c8f5d6e7a0b"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/voidAdHocDocumentInput"}}}},"summary":"Void an ad hoc document, reversing the journal entry it posted.","description":"Voids an ad hoc document: reverses the journal entry it posted, with the reason you give, and leaves the record in place with paymentStatus 'voided'. The document is not deleted and its content is not changed; a voided document still appears in the reads.\n\nVoid is the only change this API makes to a posted document — there is no PATCH. It is refused when the document is already voided, when a payment or credit is applied to it, when it has been sent to an external system, or when its accounting period is closed or locked.\n\nThe response is empty: you named the document, and what changed is readable through GET accounting/ad-hoc-documents/:id. Every request carries an `Api-Version` header; without it the request is rejected with 400, and a route that exists in another version answers 404.","tags":["taxDocumentAdHocDocuments"]}},"/people/documents/import":{"post":{"operationId":"importDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/importDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_IMPORT_KEY, IMPORT_KEY_CONFLICT, INVALID_FILE_CONTENT, INVALID_FILE_NAME, UNSUPPORTED_FILE_TYPE, FILE_FORMAT_MISMATCH, FILE_TOO_LARGE, INVALID_EXPIRY_DATE, EMPLOYEE_NOT_FOUND, EMPLOYEE_OUT_OF_SCOPE, CATEGORY_NOT_FOUND, CATEGORY_NOT_USABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_IMPORT_KEY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"importKey":{"type":"string"}},"additionalProperties":false,"required":["importKey"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IMPORT_KEY_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"importKey":{"type":"string"}},"additionalProperties":false,"required":["importKey"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string"},"reason":{"oneOf":[{"const":"empty","description":"The name is empty."},{"const":"tooLong","description":"The name is longer than 200 characters."},{"const":"containsPath","description":"The name contains a slash, a backslash or '..'."},{"const":"containsControlCharacter","description":"The name contains a control character."},{"const":"notStoredAsSent","description":"The file could not be stored under this name."}]}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"extension":{"type":"string"}},"additionalProperties":false,"required":["extension"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_FORMAT_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maximumBytes":{"type":"number"}},"additionalProperties":false,"required":["maximumBytes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXPIRY_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expiryDate":{"type":"string"}},"additionalProperties":false,"required":["expiryDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_OUT_OF_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_IMPORT_KEY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"importKey":{"type":"string"}},"additionalProperties":false,"required":["importKey"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IMPORT_KEY_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"importKey":{"type":"string"}},"additionalProperties":false,"required":["importKey"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string"},"reason":{"oneOf":[{"const":"empty","description":"The name is empty."},{"const":"tooLong","description":"The name is longer than 200 characters."},{"const":"containsPath","description":"The name contains a slash, a backslash or '..'."},{"const":"containsControlCharacter","description":"The name contains a control character."},{"const":"notStoredAsSent","description":"The file could not be stored under this name."}]}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"extension":{"type":"string"}},"additionalProperties":false,"required":["extension"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_FORMAT_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maximumBytes":{"type":"number"}},"additionalProperties":false,"required":["maximumBytes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXPIRY_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expiryDate":{"type":"string"}},"additionalProperties":false,"required":["expiryDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_OUT_OF_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_IMPORT_KEY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"importKey":{"type":"string"}},"additionalProperties":false,"required":["importKey"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IMPORT_KEY_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"importKey":{"type":"string"}},"additionalProperties":false,"required":["importKey"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fileName":{"type":"string"},"reason":{"oneOf":[{"const":"empty","description":"The name is empty."},{"const":"tooLong","description":"The name is longer than 200 characters."},{"const":"containsPath","description":"The name contains a slash, a backslash or '..'."},{"const":"containsControlCharacter","description":"The name contains a control character."},{"const":"notStoredAsSent","description":"The file could not be stored under this name."}]}},"additionalProperties":false,"required":["fileName","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"extension":{"type":"string"}},"additionalProperties":false,"required":["extension"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_FORMAT_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maximumBytes":{"type":"number"}},"additionalProperties":false,"required":["maximumBytes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXPIRY_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expiryDate":{"type":"string"}},"additionalProperties":false,"required":["expiryDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_OUT_OF_SCOPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/importDocumentInput"}}}},"summary":"Import a document idempotently","description":"Files one document for an employee the way the bulk document upload in Everest does. Send the file base64-encoded. Choose a new UUID as importKey for each document: if a call fails or times out, send it again with the same importKey and values, and you get the id of the document that was already filed instead of a second copy.\n\nThe file name is stored as you send it, trimmed of surrounding spaces. Its extension, mimeType and the file content must all be the same format: PDF, PNG, JPEG or TIFF. No notifications are sent. The status is 'approved' when you file a document for another employee and 'pending' for your own.\n\nThe response contains only the document's id. Read the stored file name and status with GET people/documents.\n\nThe whole request must stay within the platform's request size limit of about 2 MiB, so the file itself can be about 1.5 MB. A larger request is refused by the platform with HTTP 500 before this endpoint runs.\n\nOnly HR administrators can call this endpoint. To check file names against your naming rules first, use POST people/documents/match.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrDocuments"]}},"/people/person":{"get":{"operationId":"people","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[employmentCategory]","in":"query","required":false,"description":"Filter employmentCategory (equality)","schema":{"type":"string"}},{"name":"filter[employmentCategory][ne]","in":"query","required":false,"description":"Filter employmentCategory (ne)","schema":{"type":"string"}},{"name":"filter[employmentCategory][gt]","in":"query","required":false,"description":"Filter employmentCategory (gt)","schema":{"type":"string"}},{"name":"filter[employmentCategory][gte]","in":"query","required":false,"description":"Filter employmentCategory (gte)","schema":{"type":"string"}},{"name":"filter[employmentCategory][lt]","in":"query","required":false,"description":"Filter employmentCategory (lt)","schema":{"type":"string"}},{"name":"filter[employmentCategory][lte]","in":"query","required":false,"description":"Filter employmentCategory (lte)","schema":{"type":"string"}},{"name":"filter[employmentCategory][in]","in":"query","required":false,"description":"Filter employmentCategory (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employmentCategory][notIn]","in":"query","required":false,"description":"Filter employmentCategory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employmentCategory][between]","in":"query","required":false,"description":"Filter employmentCategory (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employmentCategory][like]","in":"query","required":false,"description":"Filter employmentCategory (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","employeeNumber","-employeeNumber","status","-status","employmentCategory","-employmentCategory","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","employeeNumber","firstName","lastName","name","displayName","email","status","employmentCategory","weeklyWorkingHours","entityId","entityName","locationName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/peopleRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List people","description":"Lists people. GET people/person/:id returns a richer record, including compensation and external identifiers.\n\nTo filter by name, email, employeeNumber, or external identifier, use POST people/person/search.","tags":["hrPeople"]},"post":{"operationId":"createPerson","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPersonOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ENTITY_NOT_FOUND, DEPARTMENT_NOT_FOUND, POSITION_NOT_FOUND, MANAGER_NOT_FOUND, HOLIDAY_CALENDAR_NOT_FOUND, HOLIDAY_CALENDAR_REQUIRED, ABSENCE_POLICY_NOT_FOUND, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["absencePolicyIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["absencePolicyIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOLIDAY_CALENDAR_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["absencePolicyIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPersonInput"}}}},"summary":"Create a person","description":"Creates a person. The response contains only the new person's id. Read the full record with GET people/person/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrPeople"]}},"/people/documents":{"get":{"operationId":"documents","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[employeeId]","in":"query","required":false,"description":"Filter employeeId (equality)","schema":{"type":"string"}},{"name":"filter[employeeId][ne]","in":"query","required":false,"description":"Filter employeeId (ne)","schema":{"type":"string"}},{"name":"filter[employeeId][gt]","in":"query","required":false,"description":"Filter employeeId (gt)","schema":{"type":"string"}},{"name":"filter[employeeId][gte]","in":"query","required":false,"description":"Filter employeeId (gte)","schema":{"type":"string"}},{"name":"filter[employeeId][lt]","in":"query","required":false,"description":"Filter employeeId (lt)","schema":{"type":"string"}},{"name":"filter[employeeId][lte]","in":"query","required":false,"description":"Filter employeeId (lte)","schema":{"type":"string"}},{"name":"filter[employeeId][in]","in":"query","required":false,"description":"Filter employeeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][notIn]","in":"query","required":false,"description":"Filter employeeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][between]","in":"query","required":false,"description":"Filter employeeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId][like]","in":"query","required":false,"description":"Filter employeeId (like)","schema":{"type":"string"}},{"name":"filter[categoryId]","in":"query","required":false,"description":"Filter categoryId (equality)","schema":{"type":"string"}},{"name":"filter[categoryId][ne]","in":"query","required":false,"description":"Filter categoryId (ne)","schema":{"type":"string"}},{"name":"filter[categoryId][gt]","in":"query","required":false,"description":"Filter categoryId (gt)","schema":{"type":"string"}},{"name":"filter[categoryId][gte]","in":"query","required":false,"description":"Filter categoryId (gte)","schema":{"type":"string"}},{"name":"filter[categoryId][lt]","in":"query","required":false,"description":"Filter categoryId (lt)","schema":{"type":"string"}},{"name":"filter[categoryId][lte]","in":"query","required":false,"description":"Filter categoryId (lte)","schema":{"type":"string"}},{"name":"filter[categoryId][in]","in":"query","required":false,"description":"Filter categoryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][notIn]","in":"query","required":false,"description":"Filter categoryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][between]","in":"query","required":false,"description":"Filter categoryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[categoryId][like]","in":"query","required":false,"description":"Filter categoryId (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[expiryDate]","in":"query","required":false,"description":"Filter expiryDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[expiryDate][ne]","in":"query","required":false,"description":"Filter expiryDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[expiryDate][gt]","in":"query","required":false,"description":"Filter expiryDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[expiryDate][gte]","in":"query","required":false,"description":"Filter expiryDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[expiryDate][lt]","in":"query","required":false,"description":"Filter expiryDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[expiryDate][lte]","in":"query","required":false,"description":"Filter expiryDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[expiryDate][in]","in":"query","required":false,"description":"Filter expiryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expiryDate][notIn]","in":"query","required":false,"description":"Filter expiryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expiryDate][between]","in":"query","required":false,"description":"Filter expiryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentNumber","-documentNumber","categoryId","-categoryId","status","-status","expiryDate","-expiryDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentNumber","employeeId","categoryId","categoryLabel","fileName","status","expiryDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/documentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List documents","description":"Lists documents. The list contains document details, not the files. To download a file, request a link with GET people/documents/:id/download.","tags":["hrDocuments"]},"post":{"operationId":"uploadDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/uploadDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: EMPLOYEE_NOT_FOUND, CATEGORY_NOT_FOUND, INVALID_FILE_CONTENT, INVALID_EXPIRY_DATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXPIRY_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expiryDate":{"type":"string"}},"additionalProperties":false,"required":["expiryDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXPIRY_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expiryDate":{"type":"string"}},"additionalProperties":false,"required":["expiryDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FILE_CONTENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_EXPIRY_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expiryDate":{"type":"string"}},"additionalProperties":false,"required":["expiryDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/uploadDocumentInput"}}}},"summary":"Create a document","description":"Creates a document from a base64-encoded file. You can file a document for yourself. Only an HR administrator can file one for another employee.\n\nYou don't send the file name or the initial status. The status is 'approved' when an HR administrator files a document for another employee, and 'pending' otherwise.\n\nThe response contains only the new document's id. Read the file name and status with GET people/documents.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrDocuments"]}},"/people/absences/reject":{"post":{"operationId":"rejectAbsences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectAbsencesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_APPROVAL_POLICY, NOT_FOUND, EMPLOYEE_NOT_FOUND, ALREADY_DECIDED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectAbsencesInput"}}}},"summary":"Reject absence requests","description":"Rejects one or more absence requests. Each absence must have status 'requested'. Unless you are an HR admin, each absence must also match an absence approval policy, you must be one of its approvers or the employee's direct manager, and it may not be your own absence. If any absence can't be rejected, none are.\n\nThe response lists the rejected absences' ids in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrAbsences"]}},"/people/absences/{id}":{"patch":{"operationId":"updateAbsence","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAbsenceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ABSENCE_TYPE_NOT_FOUND, ABSENCE_POLICY_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyId":{"type":"string"}},"additionalProperties":false,"required":["absencePolicyId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyId":{"type":"string"}},"additionalProperties":false,"required":["absencePolicyId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyId":{"type":"string"}},"additionalProperties":false,"required":["absencePolicyId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the absence you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAbsenceInput"}}}},"summary":"Update an absence","description":"Updates an absence with the fields you send. A field you leave out keeps its current value, except in two cases.\n\nUse the absence's id, not its leaveNumber.\n\nSick certificates: if editReason contains the text 'sick certificate', only leaveCertificate and certificateName are saved, and everything else in the request is ignored.\n\nStatus: any other update recalculates the status, so editing an approved absence can send it back to 'requested' and restart the approval workflow.\n\nThe response is empty. Read the absence back with GET people/absences/:id.","tags":["hrAbsences"]},"delete":{"operationId":"deleteAbsence","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAbsenceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the absence you want to delete."}],"summary":"Delete or cancel an absence","description":"Deletes or cancels an absence. Deleting does not always remove the absence. An absence with status 'requested' is removed.\n\nAny other approved or rejected absence is canceled instead: its status changes to 'canceled' and the absence is kept. An absence that is already canceled stays as it is.\n\nAn absence created from a mandatory absence, which the company assigns to employees, can be deleted only by an HR administrator who is not its employee, and is then removed whatever its status. Unless you are an HR administrator or the employee's manager, you can't delete an approved absence that has already started.\n\nWhen the request succeeds, it returns the id whether the absence was removed, canceled, or left as it was. To see what happened, read the absence with GET people/absences/:id.","tags":["hrAbsences"]},"get":{"operationId":"getAbsence","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAbsenceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the absence you want to retrieve."}],"summary":"Retrieve an absence","description":"Retrieves an absence. Use the absence's id, not its leaveNumber.","tags":["hrAbsences"]}},"/banking/reconciliations/{id}/in-transit/bank-transactions":{"patch":{"operationId":"updateReconciliationInTransitBankTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateReconciliationInTransitBankTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"swap":{"value":{"data":{}},"summary":"Flag one transaction as in transit and release another in the same call"},"unwindMistake":{"value":{"data":{}},"summary":"Release a transaction that was wrongly flagged and has been carried forward since June"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, RECONCILIATION_INVALID_STATUS, UNKNOWN_BANK_TRANSACTIONS, RESET_FROM_DATE_WITHOUT_RESET, TRANSACTION_ALREADY_MATCHED, TRANSACTIONS_NOT_IN_ACCOUNT, RESET_FROM_DATE_BEFORE_PERIOD, RESET_FROM_DATE_REACHES_COMPLETED_PERIOD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BANK_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_WITHOUT_RESET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_NOT_IN_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_BEFORE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"resetFromDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["resetFromDate","periodStartDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_REACHES_COMPLETED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"accountingPeriodIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids","accountingPeriodIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BANK_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_WITHOUT_RESET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_NOT_IN_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_BEFORE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"resetFromDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["resetFromDate","periodStartDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_REACHES_COMPLETED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"accountingPeriodIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids","accountingPeriodIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_BANK_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_WITHOUT_RESET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_NOT_IN_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_BEFORE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"resetFromDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["resetFromDate","periodStartDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RESET_FROM_DATE_REACHES_COMPLETED_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"accountingPeriodIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids","accountingPeriodIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation; bound from the :id path segment.","examples":{"swap":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},"unwindMistake":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateReconciliationInTransitBankTransactionsInput"},"examples":{"swap":{"value":{"set":["b2f7c418-95a1-4d0e-8a63-7fe0d1c34592"],"reset":["d4a19f62-0c37-4e85-b2d1-8f6e3a70c9b4"]},"summary":"Flag one transaction as in transit and release another in the same call"},"unwindMistake":{"value":{"reset":["d4a19f62-0c37-4e85-b2d1-8f6e3a70c9b4"],"resetFromDate":"2026-06-01"},"summary":"Release a transaction that was wrongly flagged and has been carried forward since June"}}}}},"summary":"Set and clear the in-transit flag on bank transactions","description":"Flags bank transactions as in transit, and clears the flag again — both in one call, because the ordinary edit is a swap: some transactions turn out to be timing gaps, others turn out not to be, and doing it in two requests would leave the roll-forward briefly wrong between them.\n\n`set` and `reset` name **bank transaction** ids, the ones `outstanding/bank-transactions` and `in-transit/bank-transactions` return — not the ids of the in-transit flags themselves. Both are optional; a call may do either, both, or nothing. When both are present the resets are applied first, so the same id in both lists ends up flagged.\n\n**Only this reconciliation's transactions.** Every id must be a bank transaction of the account this reconciliation covers (`TRANSACTIONS_NOT_IN_ACCOUNT`).\n\n**`resetFromDate` widens the reset.** Without it, `reset` clears the flag for this reconciliation's period only. With it, each transaction in `reset` also loses the flag in every later period that carried it forward — the right thing when a transaction was wrongly flagged and has been dragged along since. It has no effect on its own: sending it without `reset` is rejected rather than silently ignored. It cannot be earlier than this reconciliation's period start (`RESET_FROM_DATE_BEFORE_PERIOD`), and it never reaches a flag a completed reconciliation was struck with (`RESET_FROM_DATE_REACHES_COMPLETED_PERIOD`): a flag set in a closed period is carried into the next one, so reopen that reconciliation first.\n\n**Flags the platform set itself are left alone.** A row marked `automaticallySet` is not disturbed by this call, so a client that reads the in-transit collection, sends everything back, and expects an exact replacement will not get one. This endpoint is a set of instructions, not a whole-collection PUT.\n\n**Matching and the in-transit flag interact.** Matching a transaction clears its in-transit flag, so a later `reset` on it succeeds without doing anything. An already-matched transaction cannot be flagged through `set`, and a flagged one that has since been matched cannot be reset until it is unmatched; both are refused with `TRANSACTION_ALREADY_MATCHED`. Flag only rows taken from the outstanding collection.\n\nEvery amount that moves in or out of the in-transit set changes `balances` on `GET banking/reconciliations/{id}`, so re-read the reconciliation afterwards rather than adjusting a cached difference.","tags":["bankReconciliations"]},"get":{"operationId":"getReconciliationInTransitBankTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReconciliationInTransitBankTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation; bound from the :id path segment.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque forward cursor from a previous response's nextCursor; omit for the first page. Do not construct or decode one."},{"name":"size","in":"query","required":false,"schema":{"type":"number"},"description":"Maximum number of items to return. Default 50, capped at 200; a larger value is clamped rather than rejected."}],"summary":"List the in-transit bank transactions of a reconciliation","description":"The bank-feed transactions this reconciliation has set aside as in transit: on the statement in this period, but not expected in the ledger until a later one.\n\nFlagging a transaction in transit is how a reconciliation balances against a timing gap rather than an error. Each row here is excluded from `outstanding/bank-transactions` and adjusts the ledger side of the roll-forward — it appears in `balances.incomingBankTransactionsInTransit` or `balances.outgoingBankTransactionsInTransit` on `GET banking/reconciliations/{id}`.\n\n**`automaticallySet` says who decided.** A row the system carried forward on its own is marked true; one a person flagged is false. `PATCH banking/reconciliations/{id}/in-transit/bank-transactions` preserves the automatic ones, so the distinction is not cosmetic.\n\n`nextAccountingPeriodId` is the period the transaction is expected to reach the ledger in, derived when it was flagged rather than chosen.\n\nPaginate with the `cursor` and `size` query parameters: pass the previous response's `nextCursor` back as `cursor`, and stop when `hasMore` is false. Default page size 50, capped at 200. The cursor is opaque — do not construct or decode one.","tags":["bankReconciliations"]}},"/people/absence-types/{id}":{"get":{"operationId":"getAbsenceType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAbsenceTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the absence type you want to retrieve."}],"summary":"Retrieve an absence type","description":"Retrieves an absence type.","tags":["hrAbsenceTypes"]}},"/banking/bank-rules/run":{"post":{"operationId":"runBankRules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/runBankRulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: RUN_ALREADY_IN_PROGRESS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_ALREADY_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_ALREADY_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RUN_ALREADY_IN_PROGRESS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/runBankRulesInput"}}}},"summary":"Run bank rules","description":"Runs all active bank rules and matches bank transactions. Rules run one at a time, lowest `priority` first. For each unmatched bank transaction on its bank accounts that meets its criteria, a rule creates the bank entry or credit card entry its action object describes, with its journal entry, and matches the transaction to it with the status `autoMatched`. A transaction matched by one rule is no longer available to the rules after it. When every rule has run, match suggestions are refreshed for the transactions that are still unmatched.\n\nThe run finishes before the response is returned. The request takes no body.\n\nA rule that cannot run is skipped and listed in `skippedBankRules`, and the other rules still run. A bank transaction for which a rule could not create its bank entry or credit card entry, or that entry's journal entry, is not reported. It is left out of `matchedBankTransactionIds` and stays unmatched. This happens, for example, when the transaction's accounting period is closed or the journal entry for the bank entry or credit card entry could not be created. A `matchedCount` of 0 still means the run succeeded.\n\nOnly one bank rule run can happen at a time in a tenant, including runs started in Lensing or on a schedule. A request made during another run returns `RUN_ALREADY_IN_PROGRESS` and changes nothing. It does not wait for the other run to finish.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingBankRules"]}},"/people/document-categories":{"get":{"operationId":"documentCategories","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[label]","in":"query","required":false,"description":"Filter label (equality)","schema":{"type":"string"}},{"name":"filter[label][ne]","in":"query","required":false,"description":"Filter label (ne)","schema":{"type":"string"}},{"name":"filter[label][gt]","in":"query","required":false,"description":"Filter label (gt)","schema":{"type":"string"}},{"name":"filter[label][gte]","in":"query","required":false,"description":"Filter label (gte)","schema":{"type":"string"}},{"name":"filter[label][lt]","in":"query","required":false,"description":"Filter label (lt)","schema":{"type":"string"}},{"name":"filter[label][lte]","in":"query","required":false,"description":"Filter label (lte)","schema":{"type":"string"}},{"name":"filter[label][in]","in":"query","required":false,"description":"Filter label (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[label][notIn]","in":"query","required":false,"description":"Filter label (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[label][between]","in":"query","required":false,"description":"Filter label (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[label][like]","in":"query","required":false,"description":"Filter label (like)","schema":{"type":"string"}},{"name":"filter[requestable]","in":"query","required":false,"description":"Filter requestable (equality)","schema":{"type":"boolean"}},{"name":"filter[requestable][ne]","in":"query","required":false,"description":"Filter requestable (ne)","schema":{"type":"boolean"}},{"name":"filter[requestable][gt]","in":"query","required":false,"description":"Filter requestable (gt)","schema":{"type":"boolean"}},{"name":"filter[requestable][gte]","in":"query","required":false,"description":"Filter requestable (gte)","schema":{"type":"boolean"}},{"name":"filter[requestable][lt]","in":"query","required":false,"description":"Filter requestable (lt)","schema":{"type":"boolean"}},{"name":"filter[requestable][lte]","in":"query","required":false,"description":"Filter requestable (lte)","schema":{"type":"boolean"}},{"name":"filter[requestable][in]","in":"query","required":false,"description":"Filter requestable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requestable][notIn]","in":"query","required":false,"description":"Filter requestable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requestable][between]","in":"query","required":false,"description":"Filter requestable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","label","-label","requestable","-requestable","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","label","description","requestable","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/documentCategoriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List document categories","description":"Lists document categories.","tags":["hrDocumentCategories"]}},"/banking/bank-rules":{"post":{"operationId":"createBankRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBankRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, ACCOUNTS_REQUIRED, CRITERIA_REQUIRED, ACTION_OBJECT_REQUIRED, ACCOUNTS_SPAN_ENTITIES, MIXED_ACCOUNT_TYPES, ACTION_ACCOUNT_TYPE_MISMATCH, RULE_ACTION_NOT_SUPPORTED, DUPLICATE_RULE_NAME, INVALID_FUND_TRANSFER, INVALID_CRITERIA, ACCOUNT_NOT_POSTABLE, BUSINESS_PARTNER_REQUIRED, TAX_CODE_NOT_USABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CRITERIA_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_OBJECT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_SPAN_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityCount":{"type":"number"}},"additionalProperties":false,"required":["entityCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_ACCOUNT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_ACCOUNT_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"},"creditCard":{"type":"boolean"}},"additionalProperties":false,"required":["action","creditCard"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_ACTION_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"}},"additionalProperties":false,"required":["action"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FUND_TRANSFER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CRITERIA"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_POSTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CRITERIA_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_OBJECT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_SPAN_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityCount":{"type":"number"}},"additionalProperties":false,"required":["entityCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_ACCOUNT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_ACCOUNT_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"},"creditCard":{"type":"boolean"}},"additionalProperties":false,"required":["action","creditCard"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_ACTION_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"}},"additionalProperties":false,"required":["action"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FUND_TRANSFER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CRITERIA"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_POSTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CRITERIA_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_OBJECT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_SPAN_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityCount":{"type":"number"}},"additionalProperties":false,"required":["entityCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_ACCOUNT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_ACCOUNT_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"},"creditCard":{"type":"boolean"}},"additionalProperties":false,"required":["action","creditCard"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_ACTION_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"}},"additionalProperties":false,"required":["action"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FUND_TRANSFER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CRITERIA"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_POSTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBankRuleInput"}}}},"summary":"Create a bank rule","description":"Creates a bank rule, with its criteria, accounts, and action object. The response contains only its `id`. Read the record back with `GET banking/bank-rules/{id}` if you need its stored state; `bankRuleNumber` comes from a gapless number range and is visible only on that follow-up GET.\n\nA rule is created whole: the header, at least one criterion, the watched bank accounts, and the action object describing the entry to create. `createBankEntry` and `createCreditCardEntry` need at least one watched account; `createFundTransfer` derives its two sides from the action object and takes none.\n\n**The watched accounts constrain the action.** For `createBankEntry` and `createCreditCardEntry` every account must belong to one legal entity (`ACCOUNTS_SPAN_ENTITIES`), and they must be either all credit card accounts or all not (`MIXED_ACCOUNT_TYPES`); `createCreditCardEntry` then works only with credit card accounts and `createBankEntry` only with the rest, a mismatch being `ACTION_ACCOUNT_TYPE_MISMATCH`. `createFundTransfer` is exempt from all three: a transfer spans two accounts, so it may mix entities (intercompany) and account types.\n\n**Only three of the four rule actions are implemented.** `autoMatch` is rejected with `RULE_ACTION_NOT_SUPPORTED`, which is why the input is a three-member union rather than the whole enum.\n\n**Operators are constrained by the criterion.** Numeric operators apply only to `amount`, text operators only to `description` and `payeePayor`, and an `amount` value must parse as a number. Anything else is `INVALID_CRITERIA` with the offending criterion named.\n\nAll guards run before the first write, so a rejected request creates nothing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingBankRules"]},"get":{"operationId":"bankRules","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[bankRuleNumber]","in":"query","required":false,"description":"Filter bankRuleNumber (equality)","schema":{"type":"string"}},{"name":"filter[bankRuleNumber][ne]","in":"query","required":false,"description":"Filter bankRuleNumber (ne)","schema":{"type":"string"}},{"name":"filter[bankRuleNumber][gt]","in":"query","required":false,"description":"Filter bankRuleNumber (gt)","schema":{"type":"string"}},{"name":"filter[bankRuleNumber][gte]","in":"query","required":false,"description":"Filter bankRuleNumber (gte)","schema":{"type":"string"}},{"name":"filter[bankRuleNumber][lt]","in":"query","required":false,"description":"Filter bankRuleNumber (lt)","schema":{"type":"string"}},{"name":"filter[bankRuleNumber][lte]","in":"query","required":false,"description":"Filter bankRuleNumber (lte)","schema":{"type":"string"}},{"name":"filter[bankRuleNumber][in]","in":"query","required":false,"description":"Filter bankRuleNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bankRuleNumber][notIn]","in":"query","required":false,"description":"Filter bankRuleNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bankRuleNumber][between]","in":"query","required":false,"description":"Filter bankRuleNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bankRuleNumber][like]","in":"query","required":false,"description":"Filter bankRuleNumber (like)","schema":{"type":"string"}},{"name":"filter[rule]","in":"query","required":false,"description":"Filter rule (equality)","schema":{"type":"string"}},{"name":"filter[rule][ne]","in":"query","required":false,"description":"Filter rule (ne)","schema":{"type":"string"}},{"name":"filter[rule][gt]","in":"query","required":false,"description":"Filter rule (gt)","schema":{"type":"string"}},{"name":"filter[rule][gte]","in":"query","required":false,"description":"Filter rule (gte)","schema":{"type":"string"}},{"name":"filter[rule][lt]","in":"query","required":false,"description":"Filter rule (lt)","schema":{"type":"string"}},{"name":"filter[rule][lte]","in":"query","required":false,"description":"Filter rule (lte)","schema":{"type":"string"}},{"name":"filter[rule][in]","in":"query","required":false,"description":"Filter rule (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[rule][notIn]","in":"query","required":false,"description":"Filter rule (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[rule][between]","in":"query","required":false,"description":"Filter rule (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[rule][like]","in":"query","required":false,"description":"Filter rule (like)","schema":{"type":"string"}},{"name":"filter[action]","in":"query","required":false,"description":"Filter action (equality)","schema":{"type":"string"}},{"name":"filter[action][ne]","in":"query","required":false,"description":"Filter action (ne)","schema":{"type":"string"}},{"name":"filter[action][gt]","in":"query","required":false,"description":"Filter action (gt)","schema":{"type":"string"}},{"name":"filter[action][gte]","in":"query","required":false,"description":"Filter action (gte)","schema":{"type":"string"}},{"name":"filter[action][lt]","in":"query","required":false,"description":"Filter action (lt)","schema":{"type":"string"}},{"name":"filter[action][lte]","in":"query","required":false,"description":"Filter action (lte)","schema":{"type":"string"}},{"name":"filter[action][in]","in":"query","required":false,"description":"Filter action (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[action][notIn]","in":"query","required":false,"description":"Filter action (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[action][between]","in":"query","required":false,"description":"Filter action (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[action][like]","in":"query","required":false,"description":"Filter action (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[priority]","in":"query","required":false,"description":"Filter priority (equality)","schema":{"type":"number"}},{"name":"filter[priority][ne]","in":"query","required":false,"description":"Filter priority (ne)","schema":{"type":"number"}},{"name":"filter[priority][gt]","in":"query","required":false,"description":"Filter priority (gt)","schema":{"type":"number"}},{"name":"filter[priority][gte]","in":"query","required":false,"description":"Filter priority (gte)","schema":{"type":"number"}},{"name":"filter[priority][lt]","in":"query","required":false,"description":"Filter priority (lt)","schema":{"type":"number"}},{"name":"filter[priority][lte]","in":"query","required":false,"description":"Filter priority (lte)","schema":{"type":"number"}},{"name":"filter[priority][in]","in":"query","required":false,"description":"Filter priority (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priority][notIn]","in":"query","required":false,"description":"Filter priority (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[priority][between]","in":"query","required":false,"description":"Filter priority (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","bankRuleNumber","-bankRuleNumber","rule","-rule","action","-action","status","-status","priority","-priority","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","bankRuleNumber","rule","action","status","priority","description","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/bankRulesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List bank rules","description":"Lists bank rules. Each rule has the rule fields only. For its criteria, its bank accounts or credit card accounts and its action object, use `GET banking/bank-rules/:id` or `POST banking/bank-rules/search`.","tags":["bankingBankRules"]}},"/people/documents/{id}/download":{"get":{"operationId":"downloadDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/downloadDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, FILE_UNAVAILABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_UNAVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the document you want to download."}],"summary":"Retrieve a document's download link","description":"Retrieves a download link for a document. The response contains a short-lived link, not the file itself. Request a new link each time you start a download instead of saving the link.","tags":["hrDocuments"]}},"/people/teams/{id}":{"get":{"operationId":"getTeam","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTeamOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the team you want to retrieve."}],"summary":"Retrieve a team","description":"Retrieves a team. Use the team's id, not its teamNumber.","tags":["peopleTeams"]},"delete":{"operationId":"deleteTeam","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteTeamOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, TEAM_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TEAM_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TEAM_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TEAM_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the team you want to delete."}],"summary":"Delete or deactivate a team","description":"Deletes or deactivates a team. The team is removed, or end-dated when it can't be removed. The outcome field in the response says which.\n\n'deleted' means the team was removed and its direct child teams moved under the deleted team's parent. 'deactivated' means the team couldn't be removed because it has members whose membership has ended, or because it is used in financial transactions. Its endDate was set to the current date instead, and reason says why.\n\nYou can't delete a team of type 'psaTeam' here. The request fails with TEAM_IN_USE.","tags":["peopleTeams"]},"patch":{"operationId":"updateTeam","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateTeamOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PARENT_TEAM_NOT_FOUND, PARENT_TEAM_CYCLE, INVALID_DATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the team you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateTeamInput"}}}},"summary":"Update a team","description":"Updates a team with the fields you send. A field you leave out keeps its current value.\n\nUse the team's id, not its teamNumber.\n\nNo field can be cleared, so an endDate can't be removed once set. Unlike POST people/teams, an update does not check that the name is unique.","tags":["peopleTeams"]}},"/people/departments":{"get":{"operationId":"departments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[departmentNumber]","in":"query","required":false,"description":"Filter departmentNumber (equality)","schema":{"type":"string"}},{"name":"filter[departmentNumber][ne]","in":"query","required":false,"description":"Filter departmentNumber (ne)","schema":{"type":"string"}},{"name":"filter[departmentNumber][gt]","in":"query","required":false,"description":"Filter departmentNumber (gt)","schema":{"type":"string"}},{"name":"filter[departmentNumber][gte]","in":"query","required":false,"description":"Filter departmentNumber (gte)","schema":{"type":"string"}},{"name":"filter[departmentNumber][lt]","in":"query","required":false,"description":"Filter departmentNumber (lt)","schema":{"type":"string"}},{"name":"filter[departmentNumber][lte]","in":"query","required":false,"description":"Filter departmentNumber (lte)","schema":{"type":"string"}},{"name":"filter[departmentNumber][in]","in":"query","required":false,"description":"Filter departmentNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentNumber][notIn]","in":"query","required":false,"description":"Filter departmentNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentNumber][between]","in":"query","required":false,"description":"Filter departmentNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentNumber][like]","in":"query","required":false,"description":"Filter departmentNumber (like)","schema":{"type":"string"}},{"name":"filter[departmentCode]","in":"query","required":false,"description":"Filter departmentCode (equality)","schema":{"type":"string"}},{"name":"filter[departmentCode][ne]","in":"query","required":false,"description":"Filter departmentCode (ne)","schema":{"type":"string"}},{"name":"filter[departmentCode][gt]","in":"query","required":false,"description":"Filter departmentCode (gt)","schema":{"type":"string"}},{"name":"filter[departmentCode][gte]","in":"query","required":false,"description":"Filter departmentCode (gte)","schema":{"type":"string"}},{"name":"filter[departmentCode][lt]","in":"query","required":false,"description":"Filter departmentCode (lt)","schema":{"type":"string"}},{"name":"filter[departmentCode][lte]","in":"query","required":false,"description":"Filter departmentCode (lte)","schema":{"type":"string"}},{"name":"filter[departmentCode][in]","in":"query","required":false,"description":"Filter departmentCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentCode][notIn]","in":"query","required":false,"description":"Filter departmentCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentCode][between]","in":"query","required":false,"description":"Filter departmentCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentCode][like]","in":"query","required":false,"description":"Filter departmentCode (like)","schema":{"type":"string"}},{"name":"filter[parentId]","in":"query","required":false,"description":"Filter parentId (equality)","schema":{"type":"string"}},{"name":"filter[parentId][ne]","in":"query","required":false,"description":"Filter parentId (ne)","schema":{"type":"string"}},{"name":"filter[parentId][gt]","in":"query","required":false,"description":"Filter parentId (gt)","schema":{"type":"string"}},{"name":"filter[parentId][gte]","in":"query","required":false,"description":"Filter parentId (gte)","schema":{"type":"string"}},{"name":"filter[parentId][lt]","in":"query","required":false,"description":"Filter parentId (lt)","schema":{"type":"string"}},{"name":"filter[parentId][lte]","in":"query","required":false,"description":"Filter parentId (lte)","schema":{"type":"string"}},{"name":"filter[parentId][in]","in":"query","required":false,"description":"Filter parentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][notIn]","in":"query","required":false,"description":"Filter parentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][between]","in":"query","required":false,"description":"Filter parentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentId][like]","in":"query","required":false,"description":"Filter parentId (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","departmentNumber","-departmentNumber","departmentCode","-departmentCode","name","-name","managerName","-managerName","status","-status","employeeCount","-employeeCount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","departmentNumber","departmentCode","parentId","name","description","managerName","status","employeeCount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/departmentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List departments","description":"Lists departments. GET people/departments/:id also returns managerId, parentName, startDate, endDate, and externalIdentifiers.","tags":["hrDepartments"]},"post":{"operationId":"createDepartment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createDepartmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: MANAGER_NOT_FOUND, PARENT_DEPARTMENT_NOT_FOUND, DUPLICATE_DEPARTMENT_CODE, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDepartmentInput"}}}},"summary":"Create a department","description":"Creates a department. The response contains only the new department's id. Read the full record with GET people/departments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrDepartments"]}},"/people/departments/{id}":{"get":{"operationId":"getDepartment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDepartmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the department you want to retrieve."}],"summary":"Retrieve a department","description":"Retrieves a department. Use the department's id, not its departmentNumber.","tags":["hrDepartments"]},"patch":{"operationId":"updateDepartment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateDepartmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, MANAGER_NOT_FOUND, PARENT_DEPARTMENT_NOT_FOUND, DUPLICATE_DEPARTMENT_CODE, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_DEPARTMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_DEPARTMENT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"departmentCode":{"type":"string"}},"additionalProperties":false,"required":["departmentCode"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the department you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateDepartmentInput"}}}},"summary":"Update a department","description":"Updates a department with the fields you send. A field you leave out keeps its current value.\n\nUse the department's id, not its departmentNumber.\n\nYou don't send external identifiers as a whole list. Add, change, and remove them with createExternalIdentifiers, updateExternalIdentifiers, and deleteExternalIdentifiers.\n\nThe response is empty. Read the updated department with GET people/departments/:id.","tags":["hrDepartments"]}},"/people/positions/{id}":{"get":{"operationId":"getPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position you want to retrieve."}],"summary":"Retrieve a position","description":"Retrieves a position. Use the position's id, not its positionNumber.","tags":["hrPositions"]},"patch":{"operationId":"updatePosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, MANAGER_NOT_FOUND, JOB_PROFILE_NOT_FOUND, REGION_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MANAGER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOB_PROFILE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REGION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePositionInput"}}}},"summary":"Update a position","description":"Updates a position with the fields you send. A field you leave out keeps its current value.\n\nUse the position's id, not its positionNumber.\n\nUnlike POST people/positions, an update does not check that the name and job profile combination is unique.","tags":["hrPositions"]}},"/banking/bank-rules/search":{"post":{"operationId":"searchBankRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBankRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBankRuleInput"}}}},"summary":"Search bank rules","description":"Searches bank rules. A bank rule must match every filter you send. Omit them all to return every bank rule. Each bank rule returned is the full record, including its criteria, bank accounts and action object.","tags":["bankingBankRules"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/recruitments/{id}":{"get":{"operationId":"getRecruitment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getRecruitmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the recruitment you want to retrieve."}],"summary":"Retrieve a recruitment","description":"Retrieves a recruitment. Use the recruitment's id, not its recruitmentNumber.","tags":["peopleRecruitments"]},"patch":{"operationId":"updateRecruitment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateRecruitmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, INVALID_DEADLINE, INVALID_VACANCIES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the recruitment you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateRecruitmentInput"}}}},"summary":"Update a recruitment","description":"Updates a recruitment with the fields you send. A field you leave out keeps its current value.\n\nUse the recruitment's id, not its recruitmentNumber.\n\nA new hiring manager or owner also gets the permissions to work on the opening.\n\nThe response is empty. Read the updated recruitment with GET people/recruitments/:id.","tags":["peopleRecruitments"]}},"/fixed-asset-types":{"get":{"operationId":"fixedAssetTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[defaultUsefulLife]","in":"query","required":false,"description":"Filter defaultUsefulLife (equality)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][ne]","in":"query","required":false,"description":"Filter defaultUsefulLife (ne)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][gt]","in":"query","required":false,"description":"Filter defaultUsefulLife (gt)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][gte]","in":"query","required":false,"description":"Filter defaultUsefulLife (gte)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][lt]","in":"query","required":false,"description":"Filter defaultUsefulLife (lt)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][lte]","in":"query","required":false,"description":"Filter defaultUsefulLife (lte)","schema":{"type":"number"}},{"name":"filter[defaultUsefulLife][in]","in":"query","required":false,"description":"Filter defaultUsefulLife (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultUsefulLife][notIn]","in":"query","required":false,"description":"Filter defaultUsefulLife (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultUsefulLife][between]","in":"query","required":false,"description":"Filter defaultUsefulLife (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[groupId]","in":"query","required":false,"description":"Filter groupId (equality)","schema":{"type":"string"}},{"name":"filter[groupId][ne]","in":"query","required":false,"description":"Filter groupId (ne)","schema":{"type":"string"}},{"name":"filter[groupId][gt]","in":"query","required":false,"description":"Filter groupId (gt)","schema":{"type":"string"}},{"name":"filter[groupId][gte]","in":"query","required":false,"description":"Filter groupId (gte)","schema":{"type":"string"}},{"name":"filter[groupId][lt]","in":"query","required":false,"description":"Filter groupId (lt)","schema":{"type":"string"}},{"name":"filter[groupId][lte]","in":"query","required":false,"description":"Filter groupId (lte)","schema":{"type":"string"}},{"name":"filter[groupId][in]","in":"query","required":false,"description":"Filter groupId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupId][notIn]","in":"query","required":false,"description":"Filter groupId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[groupId][between]","in":"query","required":false,"description":"Filter groupId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[groupId][like]","in":"query","required":false,"description":"Filter groupId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","defaultUsefulLife","-defaultUsefulLife","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","active","defaultUsefulLife","groupId","groupName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/fixedAssetTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"Fixed asset types — the master data a fixed asset is created from, carrying the depreciation defaults it inherits. Both active and inactive types are returned; filter active to populate a picker. [nav: @uicode:fixedAssetType?id={id}]","description":"The fixed asset type collection, with structured filtering, ordering, sparse field selection and cursor pagination in the query string.\n\n```\nGET fixed-asset-types?filter[active][eq]=true&filter[groupId][eq]=<id>&sort=name\n```\n\nA response is `{ \"data\": [ … ], \"pagination\": { \"hasMore\": …, \"nextCursor\": … } }`. Page forward by passing the previous `nextCursor` as `page[cursor]`. Page size defaults to 25 and is capped at 100; a larger `page[size]` is clamped to 100 rather than rejected.\n\n**`name` is filterable and orderable here, unlike on most resources.** An asset type name is a classification label chosen by whoever configures the module — 'Machinery', 'Vehicles' — not a person, a counterparty, or physical property, so it is not identifying data that has to stay out of a query string. The filter is exact match; there is no free-text search on this resource.\n\n**Inactive types are returned.** A type is deactivated rather than deleted once assets reference it, so the collection carries both and `active` is filterable: filter `active` when populating a picker, and leave it off when resolving the type a historical asset points at.\n\n**Incremental sync.** `lastModifiedDate` is both filterable and orderable, which is what makes `filter[lastModifiedDate][gte]=…&sort=lastModifiedDate` a complete sync cursor — either half alone is not. It tracks the FixedAssetType row only, so renaming the group a type belongs to does not move it.\n\n**`defaultUsefulLife` is a count of periods, not an amount.** No field on this resource is money, so nothing here carries a currency.\n\n**`bookIds` is on `GET fixed-asset-types/{id}` only.** The accounting books a type is in are an array, and a collection row carries scalars only. Read the type by id for its books, for example before changing them with `PATCH fixed-asset-types/{id}`.","tags":["invFixedAssetTypes"]},"post":{"operationId":"createFixedAssetType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createFixedAssetTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: GROUP_NOT_FOUND, BOOK_NOT_FOUND, BOOK_NOT_FULL, AT_LEAST_ONE_BOOK_REQUIRED, INVALID_FIELD_VALUE, FIELD_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"GROUP_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupId":{"type":"string"}},"additionalProperties":false,"required":["groupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FULL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AT_LEAST_ONE_BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"GROUP_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupId":{"type":"string"}},"additionalProperties":false,"required":["groupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FULL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AT_LEAST_ONE_BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"GROUP_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupId":{"type":"string"}},"additionalProperties":false,"required":["groupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FULL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AT_LEAST_ONE_BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createFixedAssetTypeInput"}}}},"summary":"Create a fixed asset type","description":"Creates a fixed asset type, the same as saving a new type on the Fixed Asset Type page in Lensing.\n\nA type needs a name and at least one accounting book. `bookIds` lists the books a fixed asset of this type can be recorded in; an empty array fails with AT_LEAST_ONE_BOOK_REQUIRED, and a book that is not a full book (an adjustment book) with BOOK_NOT_FULL. `defaultUsefulLife` is in months. `groupId` and `defaultUsefulLife` are optional: leave `groupId` out, or send it as an empty string, for an ungrouped type.\n\nA new type is not yet usable for depreciating fixed assets: a depreciation policy of the book must also have a rule for it, which is set up on the depreciation policy.\n\nType names are not unique: creating a type with the name of an existing one creates a second type. A caller that must not create duplicates filters `name` on GET fixed-asset-types first.\n\nThe response contains only the new type's id. Read the type with GET fixed-asset-types/:id.\n\nEvery error code below is returned with HTTP status 400; branch on the code. Only the fields below are accepted: a body with any other field, `id` or `active` included, is refused with HTTP 400 'Invalid input' before any code is raised, so that response carries no code; its diagnostics name the unexpected property.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["invFixedAssetTypes"]}},"/depreciation-policies":{"post":{"operationId":"createDepreciationPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createDepreciationPolicyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: BOOK_NOT_FOUND, ACCOUNT_NOT_FOUND, ENTITY_NOT_FOUND, FIXED_ASSET_TYPE_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_NOT_APPLICABLE, MISSING_DEPRECIATION_RULES, DEPRECIATION_CONVENTION_REQUIRED, UNSUPPORTED_DEPRECIATION_CONVENTION, CUSTOM_TERM_FISCAL_YEAR_CONVENTION, DUPLICATE_POLICY_NAME, DUPLICATE_FIXED_ASSET_TYPE_IDS, MISSING_DEPRECIATION_POLICY_USEFUL_LIFE, DUPLICATE_FIXED_ASSET_ENTITY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"}},"additionalProperties":false,"required":["field","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_RULES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_CONVENTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_TERM_FISCAL_YEAR_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POLICY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_TYPE_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_POLICY_USEFUL_LIFE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"}},"additionalProperties":false,"required":["field","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_RULES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_CONVENTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_TERM_FISCAL_YEAR_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POLICY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_TYPE_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_POLICY_USEFUL_LIFE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"}},"additionalProperties":false,"required":["field","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_RULES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_CONVENTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_TERM_FISCAL_YEAR_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POLICY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_TYPE_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_POLICY_USEFUL_LIFE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDepreciationPolicyInput"}}}},"summary":"Create a depreciation policy","description":"Creates a depreciation policy, the same as saving a new policy on the depreciation policies page in Lensing. The policy is created active.\n\nA policy belongs to one accounting book (`bookId`) and covers the fixed asset types its `rules` name, for the legal entities in `entityIds`. Send at least one rule, and at most one rule per fixed asset type. For each fixed asset type, legal entity and book, only one active policy can exist: a rule whose type another active policy of the same book already covers for one of your legal entities fails with DUPLICATE_FIXED_ASSET_ENTITY.\n\n`depreciationConvention` is required for the 'StraightLine' and 'Degressive' methods, and must be left out for 'Immediate' and 'Bypassed'. A rule with the 'custom' term takes no `usefulLife`, and cannot be combined with the 'MidYear' or 'SixMonthRule' convention.\n\nCreating a policy recalculates nothing. It applies to fixed assets registered or scheduled after it exists.\n\nAn empty `description` is treated as absent. Every reference is an id (a UUID). The response contains only the policy's id; read the policy with GET depreciation-policies/:id. Every error is returned with HTTP status 400. Branch on the code.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["invDepreciationPolicies"]},"get":{"operationId":"depreciationPolicies","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (equality)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][ne]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (ne)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][gt]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (gt)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][gte]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (gte)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][lt]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (lt)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][lte]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (lte)","schema":{"type":"string"}},{"name":"filter[depreciationPolicyNumber][in]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationPolicyNumber][notIn]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationPolicyNumber][between]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationPolicyNumber][like]","in":"query","required":false,"description":"Filter depreciationPolicyNumber (like)","schema":{"type":"string"}},{"name":"filter[depreciationMethod]","in":"query","required":false,"description":"Filter depreciationMethod (equality)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][ne]","in":"query","required":false,"description":"Filter depreciationMethod (ne)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][gt]","in":"query","required":false,"description":"Filter depreciationMethod (gt)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][gte]","in":"query","required":false,"description":"Filter depreciationMethod (gte)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][lt]","in":"query","required":false,"description":"Filter depreciationMethod (lt)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][lte]","in":"query","required":false,"description":"Filter depreciationMethod (lte)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][in]","in":"query","required":false,"description":"Filter depreciationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationMethod][notIn]","in":"query","required":false,"description":"Filter depreciationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationMethod][between]","in":"query","required":false,"description":"Filter depreciationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationMethod][like]","in":"query","required":false,"description":"Filter depreciationMethod (like)","schema":{"type":"string"}},{"name":"filter[depreciationConvention]","in":"query","required":false,"description":"Filter depreciationConvention (equality)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][ne]","in":"query","required":false,"description":"Filter depreciationConvention (ne)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][gt]","in":"query","required":false,"description":"Filter depreciationConvention (gt)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][gte]","in":"query","required":false,"description":"Filter depreciationConvention (gte)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][lt]","in":"query","required":false,"description":"Filter depreciationConvention (lt)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][lte]","in":"query","required":false,"description":"Filter depreciationConvention (lte)","schema":{"type":"string"}},{"name":"filter[depreciationConvention][in]","in":"query","required":false,"description":"Filter depreciationConvention (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationConvention][notIn]","in":"query","required":false,"description":"Filter depreciationConvention (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationConvention][between]","in":"query","required":false,"description":"Filter depreciationConvention (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationConvention][like]","in":"query","required":false,"description":"Filter depreciationConvention (like)","schema":{"type":"string"}},{"name":"filter[depreciationInterval]","in":"query","required":false,"description":"Filter depreciationInterval (equality)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][ne]","in":"query","required":false,"description":"Filter depreciationInterval (ne)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][gt]","in":"query","required":false,"description":"Filter depreciationInterval (gt)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][gte]","in":"query","required":false,"description":"Filter depreciationInterval (gte)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][lt]","in":"query","required":false,"description":"Filter depreciationInterval (lt)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][lte]","in":"query","required":false,"description":"Filter depreciationInterval (lte)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][in]","in":"query","required":false,"description":"Filter depreciationInterval (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationInterval][notIn]","in":"query","required":false,"description":"Filter depreciationInterval (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationInterval][between]","in":"query","required":false,"description":"Filter depreciationInterval (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationInterval][like]","in":"query","required":false,"description":"Filter depreciationInterval (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[assetAccountId]","in":"query","required":false,"description":"Filter assetAccountId (equality)","schema":{"type":"string"}},{"name":"filter[assetAccountId][ne]","in":"query","required":false,"description":"Filter assetAccountId (ne)","schema":{"type":"string"}},{"name":"filter[assetAccountId][gt]","in":"query","required":false,"description":"Filter assetAccountId (gt)","schema":{"type":"string"}},{"name":"filter[assetAccountId][gte]","in":"query","required":false,"description":"Filter assetAccountId (gte)","schema":{"type":"string"}},{"name":"filter[assetAccountId][lt]","in":"query","required":false,"description":"Filter assetAccountId (lt)","schema":{"type":"string"}},{"name":"filter[assetAccountId][lte]","in":"query","required":false,"description":"Filter assetAccountId (lte)","schema":{"type":"string"}},{"name":"filter[assetAccountId][in]","in":"query","required":false,"description":"Filter assetAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[assetAccountId][notIn]","in":"query","required":false,"description":"Filter assetAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[assetAccountId][between]","in":"query","required":false,"description":"Filter assetAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[assetAccountId][like]","in":"query","required":false,"description":"Filter assetAccountId (like)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (equality)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][ne]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (ne)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][gt]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (gt)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][gte]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (gte)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][lt]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (lt)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][lte]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (lte)","schema":{"type":"string"}},{"name":"filter[accumulatedDepreciationAccountId][in]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accumulatedDepreciationAccountId][notIn]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accumulatedDepreciationAccountId][between]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accumulatedDepreciationAccountId][like]","in":"query","required":false,"description":"Filter accumulatedDepreciationAccountId (like)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (equality)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][ne]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (ne)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][gt]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (gt)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][gte]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (gte)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][lt]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (lt)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][lte]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (lte)","schema":{"type":"string"}},{"name":"filter[depreciationExpenseAccountId][in]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationExpenseAccountId][notIn]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationExpenseAccountId][between]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationExpenseAccountId][like]","in":"query","required":false,"description":"Filter depreciationExpenseAccountId (like)","schema":{"type":"string"}},{"name":"filter[gainAccountId]","in":"query","required":false,"description":"Filter gainAccountId (equality)","schema":{"type":"string"}},{"name":"filter[gainAccountId][ne]","in":"query","required":false,"description":"Filter gainAccountId (ne)","schema":{"type":"string"}},{"name":"filter[gainAccountId][gt]","in":"query","required":false,"description":"Filter gainAccountId (gt)","schema":{"type":"string"}},{"name":"filter[gainAccountId][gte]","in":"query","required":false,"description":"Filter gainAccountId (gte)","schema":{"type":"string"}},{"name":"filter[gainAccountId][lt]","in":"query","required":false,"description":"Filter gainAccountId (lt)","schema":{"type":"string"}},{"name":"filter[gainAccountId][lte]","in":"query","required":false,"description":"Filter gainAccountId (lte)","schema":{"type":"string"}},{"name":"filter[gainAccountId][in]","in":"query","required":false,"description":"Filter gainAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[gainAccountId][notIn]","in":"query","required":false,"description":"Filter gainAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[gainAccountId][between]","in":"query","required":false,"description":"Filter gainAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[gainAccountId][like]","in":"query","required":false,"description":"Filter gainAccountId (like)","schema":{"type":"string"}},{"name":"filter[lossAccountId]","in":"query","required":false,"description":"Filter lossAccountId (equality)","schema":{"type":"string"}},{"name":"filter[lossAccountId][ne]","in":"query","required":false,"description":"Filter lossAccountId (ne)","schema":{"type":"string"}},{"name":"filter[lossAccountId][gt]","in":"query","required":false,"description":"Filter lossAccountId (gt)","schema":{"type":"string"}},{"name":"filter[lossAccountId][gte]","in":"query","required":false,"description":"Filter lossAccountId (gte)","schema":{"type":"string"}},{"name":"filter[lossAccountId][lt]","in":"query","required":false,"description":"Filter lossAccountId (lt)","schema":{"type":"string"}},{"name":"filter[lossAccountId][lte]","in":"query","required":false,"description":"Filter lossAccountId (lte)","schema":{"type":"string"}},{"name":"filter[lossAccountId][in]","in":"query","required":false,"description":"Filter lossAccountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lossAccountId][notIn]","in":"query","required":false,"description":"Filter lossAccountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lossAccountId][between]","in":"query","required":false,"description":"Filter lossAccountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lossAccountId][like]","in":"query","required":false,"description":"Filter lossAccountId (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","depreciationPolicyNumber","-depreciationPolicyNumber","name","-name","depreciationMethod","-depreciationMethod","depreciationConvention","-depreciationConvention","depreciationInterval","-depreciationInterval","bookId","-bookId","active","-active","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","depreciationPolicyNumber","name","description","depreciationMethod","depreciationConvention","depreciationInterval","bookId","assetAccountId","accumulatedDepreciationAccountId","depreciationExpenseAccountId","gainAccountId","lossAccountId","active","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/depreciationPoliciesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5","depreciationPolicyNumber":"DP-0007","name":"Office Equipment — 5 Year Straight Line","description":"Standard straight-line write-down for office equipment over five years.","depreciationMethod":"StraightLine","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"3a5f81c6-9d24-4b70-8e15-6c2b7f094d38","accumulatedDepreciationAccountId":"9e14d7b2-6c83-4f51-a027-8d3b5e199c61","depreciationExpenseAccountId":"5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-14T09:12:33.000Z"},{"id":"7e2a9c05-4b18-4d73-91af-6c0e5b28d3f1","depreciationPolicyNumber":"DP-0008","name":"Vehicles — Declining Balance","description":"Declining-balance write-down for the vehicle fleet.","depreciationMethod":"Degressive","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"6b8d40f3-2c71-4e59-83a6-9f1e5d7b0a28","accumulatedDepreciationAccountId":"4e91c7a8-5d06-42b3-b7f4-8a3c1e6d905b","depreciationExpenseAccountId":"7a3f16d9-8e25-4c81-9b60-3d5f2a8c4e17","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-20T14:02:07.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List depreciation policies","description":"Lists depreciation policies. Each policy has the same fields as `GET depreciation-policies/:id`.\n\nTo find the policies that use an account, filter the list on that account field, such as `depreciationExpenseAccountId`. To find policies by name or description, use `POST depreciation-policies/search`.\n\nThe list includes policies that aren't set up for any legal entity.","tags":["invDepreciationPolicies"]}},"/fixed-asset-types/{id}":{"patch":{"operationId":"updateFixedAssetType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateFixedAssetTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"removeBook":{"value":{"data":{}},"summary":"Remove a book from the type, accepting the changes to the depreciation policies of that book"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, GROUP_NOT_FOUND, BOOK_NOT_FOUND, BOOK_NOT_FULL, AT_LEAST_ONE_BOOK_REQUIRED, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_APPLICABLE, BOOK_REMOVAL_AFFECTS_DEPRECIATION_POLICIES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUP_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupId":{"type":"string"}},"additionalProperties":false,"required":["groupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FULL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AT_LEAST_ONE_BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REMOVAL_AFFECTS_DEPRECIATION_POLICIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationPolicyIds":{"type":"array","items":{"type":"string"}},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["depreciationPolicyIds","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUP_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupId":{"type":"string"}},"additionalProperties":false,"required":["groupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FULL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AT_LEAST_ONE_BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REMOVAL_AFFECTS_DEPRECIATION_POLICIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationPolicyIds":{"type":"array","items":{"type":"string"}},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["depreciationPolicyIds","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GROUP_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"groupId":{"type":"string"}},"additionalProperties":false,"required":["groupId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FULL"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AT_LEAST_ONE_BOOK_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_REMOVAL_AFFECTS_DEPRECIATION_POLICIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationPolicyIds":{"type":"array","items":{"type":"string"}},"bookIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["depreciationPolicyIds","bookIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the fixed asset type to update; bound from the :id path segment.","examples":{"removeBook":{"value":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateFixedAssetTypeInput"},"examples":{"removeBook":{"value":{"bookIds":["4a1d7c52-93e8-4f06-b2c1-7e5d08a39f64"],"confirmBookRemoval":true},"summary":"Remove a book from the type, accepting the changes to the depreciation policies of that book"}}}}},"summary":"Update a fixed asset type","description":"Updates a fixed asset type, the same as editing it on the Fixed Asset Type page in Lensing. Send only the fields you want to change; a field you leave out keeps its value. Every input has the name and type GET fixed-asset-types/:id returns, so you can send back what you read.\n\n**`bookIds` is the whole set.** When you send it, the type ends up in exactly those books: a book you leave out is removed, a new one is added. Leave `bookIds` out to keep the books as they are. A book you add must be a full book, not an adjustment book, or the request fails with BOOK_NOT_FULL. An empty array fails with AT_LEAST_ONE_BOOK_REQUIRED, and so does leaving `bookIds` out for a type that is in no book today (only types that predate the rule can be): send it its books.\n\n**Removing a book changes depreciation policies, so it must be confirmed.** A depreciation policy of a removed book may have a rule for this type. Saving the removal changes that policy: a rule that fixed assets use is marked unavailable (the assets keep it, but no new asset can use the type in that book), an unused rule is deleted, and a policy left without an available rule is deactivated, or deleted when it has no rule left at all. Without `confirmBookRemoval: true`, such a request fails with BOOK_REMOVAL_AFFECTS_DEPRECIATION_POLICIES before anything is written; its `depreciationPolicyIds` names the policies and `bookIds` the removed books they are in. Send the request again with `confirmBookRemoval: true` to save it. Removing a book no policy covers needs no confirmation. Adding a book back makes its unavailable rules available again and reactivates their policies.\n\nSend `groupId` as an empty string to make the type ungrouped. `defaultUsefulLife` is in months; it can be changed but not cleared.\n\nEvery error code below is returned with HTTP status 400; branch on the code. Only the fields below are accepted: a body with any other field, `active` included, is refused with HTTP 400 'Invalid input' before any code is raised, so that response carries no code; its diagnostics name the unexpected property.","tags":["invFixedAssetTypes"]},"get":{"operationId":"getFixedAssetType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getFixedAssetTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"grouped":{"value":{"data":{"id":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","name":"Machinery","active":true,"defaultUsefulLife":60,"groupId":"2e8c14a9-6b73-4f52-9d01-8a3f7e0c5b26","groupName":"Plant and Equipment","lastModifiedDate":"2026-08-18T09:14:22.517Z","bookIds":["4a1d7c52-93e8-4f06-b2c1-7e5d08a39f64"]}},"summary":"An active type inside a group, carrying the default useful life a new asset inherits"},"ungroupedAndInactive":{"value":{"data":{"id":"c93a5f18-2d47-4b60-8e91-5f2c60a8d374","name":"Low-Value Assets","active":false,"lastModifiedDate":"2026-02-04T16:41:08.220Z","bookIds":["4a1d7c52-93e8-4f06-b2c1-7e5d08a39f64","e60b2f97-5c14-4d83-a7f2-91c3d8e4b015"]}},"summary":"A deactivated type with no group and no default useful life - groupId, groupName and defaultUsefulLife are all absent"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the fixed asset type; bound from the :id path segment. A value that is not UUID-shaped cannot match any record and is answered with NOT_FOUND, the same as a well-formed id that matches nothing.","examples":{"grouped":{"value":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"},"ungroupedAndInactive":{"value":"c93a5f18-2d47-4b60-8e91-5f2c60a8d374"}}}],"summary":"Fetch a fixed asset type by id, with its default useful life and the group it belongs to","description":"Reads one fixed asset type by its id, returning the whole record: the display name, whether it is still usable, the default useful life a new asset inherits, the group it belongs to, and the accounting books it is in.\n\n**Look-ups by any other key are filters, not routes.** The type name identifies a type just as well for a human, and it is not this path parameter — which is the platform UUID. Filter `name` on `GET fixed-asset-types` instead; it returns this same item schema.\n\n**An inactive type IS returned here.** A type is deactivated rather than deleted once assets reference it, and an integration resolving the type a historical asset points at still needs to read it. Check `active`.\n\n**`defaultUsefulLife` is a count of periods, not a duration.** The depreciation interval that gives it units lives on the asset that inherited it, so the number alone does not say whether it means months or years.\n\nA missing id answers `NOT_FOUND` rather than an empty payload — under HTTP 400, so branch on the `code`.","tags":["invFixedAssetTypes"]}},"/inventory/warehouse-transfer-orders/bulk-delete":{"post":{"operationId":"bulkDeleteTransferOrders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteTransferOrdersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteTransferOrdersInput"}}}},"summary":"Bulk delete warehouse transfer orders","description":"Deletes multiple draft warehouse transfer orders in one request. If any id matches no order, or names an order that is not 'DRAFT', none are deleted.\n\nThe response lists the deleted ids in the order you sent them. To delete one transfer order, use DELETE inventory/warehouse-transfer-orders/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransferOrders"]}},"/inventory/batch-transactions":{"get":{"operationId":"batchTransactions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[batchNumberId]","in":"query","required":false,"description":"Filter batchNumberId (equality)","schema":{"type":"string"}},{"name":"filter[batchNumberId][ne]","in":"query","required":false,"description":"Filter batchNumberId (ne)","schema":{"type":"string"}},{"name":"filter[batchNumberId][gt]","in":"query","required":false,"description":"Filter batchNumberId (gt)","schema":{"type":"string"}},{"name":"filter[batchNumberId][gte]","in":"query","required":false,"description":"Filter batchNumberId (gte)","schema":{"type":"string"}},{"name":"filter[batchNumberId][lt]","in":"query","required":false,"description":"Filter batchNumberId (lt)","schema":{"type":"string"}},{"name":"filter[batchNumberId][lte]","in":"query","required":false,"description":"Filter batchNumberId (lte)","schema":{"type":"string"}},{"name":"filter[batchNumberId][in]","in":"query","required":false,"description":"Filter batchNumberId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumberId][notIn]","in":"query","required":false,"description":"Filter batchNumberId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumberId][between]","in":"query","required":false,"description":"Filter batchNumberId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchNumberId][like]","in":"query","required":false,"description":"Filter batchNumberId (like)","schema":{"type":"string"}},{"name":"filter[batchNumber]","in":"query","required":false,"description":"Filter batchNumber (equality)","schema":{"type":"string"}},{"name":"filter[batchNumber][ne]","in":"query","required":false,"description":"Filter batchNumber (ne)","schema":{"type":"string"}},{"name":"filter[batchNumber][gt]","in":"query","required":false,"description":"Filter batchNumber (gt)","schema":{"type":"string"}},{"name":"filter[batchNumber][gte]","in":"query","required":false,"description":"Filter batchNumber (gte)","schema":{"type":"string"}},{"name":"filter[batchNumber][lt]","in":"query","required":false,"description":"Filter batchNumber (lt)","schema":{"type":"string"}},{"name":"filter[batchNumber][lte]","in":"query","required":false,"description":"Filter batchNumber (lte)","schema":{"type":"string"}},{"name":"filter[batchNumber][in]","in":"query","required":false,"description":"Filter batchNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumber][notIn]","in":"query","required":false,"description":"Filter batchNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumber][between]","in":"query","required":false,"description":"Filter batchNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchNumber][like]","in":"query","required":false,"description":"Filter batchNumber (like)","schema":{"type":"string"}},{"name":"filter[expirationDate]","in":"query","required":false,"description":"Filter expirationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][ne]","in":"query","required":false,"description":"Filter expirationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gt]","in":"query","required":false,"description":"Filter expirationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gte]","in":"query","required":false,"description":"Filter expirationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lt]","in":"query","required":false,"description":"Filter expirationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lte]","in":"query","required":false,"description":"Filter expirationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][in]","in":"query","required":false,"description":"Filter expirationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][notIn]","in":"query","required":false,"description":"Filter expirationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][between]","in":"query","required":false,"description":"Filter expirationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType]","in":"query","required":false,"description":"Filter sourceDocumentLineType (equality)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][ne]","in":"query","required":false,"description":"Filter sourceDocumentLineType (ne)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][in]","in":"query","required":false,"description":"Filter sourceDocumentLineType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][notIn]","in":"query","required":false,"description":"Filter sourceDocumentLineType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][between]","in":"query","required":false,"description":"Filter sourceDocumentLineType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][like]","in":"query","required":false,"description":"Filter sourceDocumentLineType (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","transactionDate","-transactionDate","expirationDate","-expirationDate","batchNumber","-batchNumber","itemCode","-itemCode","locationCode","-locationCode","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","batchNumberId","batchNumber","expirationDate","transactionId","itemId","itemCode","itemName","locationId","locationCode","locationName","unitId","unitCode","transactionDate","inQuantity","outQuantity","unitInQuantity","unitOutQuantity","cost","valueDelta","currency","sourceDocumentLineType","sourceDocumentId","sourceDocumentLineId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/batchTransactionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"500.00","cost":"3.75","valueDelta":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"af03c261-9d84-4e50-b127-6c9f1a3e80d5","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-05","outQuantity":"120.00","cost":"3.75","valueDelta":"-450.00","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-05T08:41:00.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List batch transactions","description":"Lists batch transactions.","tags":["inventoryBatchTransactions"]}},"/inventory/unit-of-measures":{"post":{"operationId":"createUnitOfMeasure","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createUnitOfMeasureOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}},"summary":"A weight unit"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_UNIT_CODE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_UNIT_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitCode":{"type":"string"},"existingId":{"type":"string"}},"additionalProperties":false,"required":["unitCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_CREATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createUnitOfMeasureInput"},"examples":{"basic":{"value":{"unitCode":"KG","unitName":"Kilogram"},"summary":"A weight unit"}}}}},"summary":"Create a unit of measure","description":"Creates a unit of measure. A unit of measure has a code, unique within the tenant, and a display name.\n\nThe response contains only the new unit of measure's id. To read the record, use GET inventory/unit-of-measures/:id. To create several at once, use POST inventory/unit-of-measures/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasures"]},"get":{"operationId":"unitOfMeasures","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[unitCode]","in":"query","required":false,"description":"Filter unitCode (equality)","schema":{"type":"string"}},{"name":"filter[unitCode][ne]","in":"query","required":false,"description":"Filter unitCode (ne)","schema":{"type":"string"}},{"name":"filter[unitCode][gt]","in":"query","required":false,"description":"Filter unitCode (gt)","schema":{"type":"string"}},{"name":"filter[unitCode][gte]","in":"query","required":false,"description":"Filter unitCode (gte)","schema":{"type":"string"}},{"name":"filter[unitCode][lt]","in":"query","required":false,"description":"Filter unitCode (lt)","schema":{"type":"string"}},{"name":"filter[unitCode][lte]","in":"query","required":false,"description":"Filter unitCode (lte)","schema":{"type":"string"}},{"name":"filter[unitCode][in]","in":"query","required":false,"description":"Filter unitCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitCode][notIn]","in":"query","required":false,"description":"Filter unitCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitCode][between]","in":"query","required":false,"description":"Filter unitCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitCode][like]","in":"query","required":false,"description":"Filter unitCode (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","unitCode","-unitCode","unitName","-unitName","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","unitCode","unitName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/unitOfMeasuresRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"KG","unitName":"Kilogram","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"EA","unitName":"Each","lastModifiedDate":"2026-05-12T09:30:01.000Z"},{"id":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b","unitCode":"L","unitName":"Litre","lastModifiedDate":"2026-05-12T09:30:02.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List units of measure","description":"Lists units of measure. The response gives each unit of measure's code and display name. The fields are the same as on GET inventory/unit-of-measures/:id and POST inventory/unit-of-measures/search.","tags":["inventoryUnitOfMeasures"]}},"/depreciation-policies/{id}":{"get":{"operationId":"getDepreciationPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDepreciationPolicyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5","depreciationPolicyNumber":"DP-0007","name":"Office Equipment — 5 Year Straight Line","description":"Standard straight-line write-down for office equipment over five years.","depreciationMethod":"StraightLine","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"3a5f81c6-9d24-4b70-8e15-6c2b7f094d38","accumulatedDepreciationAccountId":"9e14d7b2-6c83-4f51-a027-8d3b5e199c61","depreciationExpenseAccountId":"5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-14T09:12:33.000Z","entityIds":["e3a9c2d1-4b5f-4d6e-8a7b-9c0d1e2f3a4b"],"rules":[{"fixedAssetTypeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","usefulLife":5,"usefulLifeDurationType":"year","minimumAmount":"500","currency":"USD","belowThresholdDepreciationMethod":"expense","available":true}]}},"summary":"A straight-line policy for office equipment"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the depreciation policy you want to retrieve.","examples":{"basic":{"value":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5"}}}],"summary":"Retrieve a depreciation policy","description":"Retrieves a depreciation policy. To find a policy by its number or name, use `POST depreciation-policies/search`.\n\nThe `depreciationPolicyId` of each entry in `allowedTypes` on GET unscheduled-fixed-assets/:id resolves here: it is the policy a fixed asset registered with that type is depreciated under.","tags":["invDepreciationPolicies"]},"patch":{"operationId":"updateDepreciationPolicy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateDepreciationPolicyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, BOOK_NOT_FOUND, ACCOUNT_NOT_FOUND, ENTITY_NOT_FOUND, FIXED_ASSET_TYPE_NOT_FOUND, DEPRECIATION_RULE_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_NOT_APPLICABLE, MISSING_DEPRECIATION_RULES, DEPRECIATION_CONVENTION_REQUIRED, UNSUPPORTED_DEPRECIATION_CONVENTION, CUSTOM_TERM_FISCAL_YEAR_CONVENTION, DUPLICATE_POLICY_NAME, DUPLICATE_FIXED_ASSET_TYPE_IDS, USED_FIXED_ASSET_TYPE, MISSING_DEPRECIATION_POLICY_USEFUL_LIFE, DUPLICATE_FIXED_ASSET_ENTITY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"}},"additionalProperties":false,"required":["field","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_RULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_RULES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_CONVENTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_TERM_FISCAL_YEAR_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POLICY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_TYPE_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USED_FIXED_ASSET_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_POLICY_USEFUL_LIFE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"}},"additionalProperties":false,"required":["field","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_RULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_RULES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_CONVENTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_TERM_FISCAL_YEAR_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POLICY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_TYPE_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USED_FIXED_ASSET_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_POLICY_USEFUL_LIFE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string"}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"}},"additionalProperties":false,"required":["field","accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_RULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string"}},"additionalProperties":false,"required":["fixedAssetTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_RULES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_CONVENTION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_TERM_FISCAL_YEAR_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_POLICY_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_TYPE_IDS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"USED_FIXED_ASSET_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_DEPRECIATION_POLICY_USEFUL_LIFE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_FIXED_ASSET_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the depreciation policy to update.","example":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateDepreciationPolicyInput"}}}},"summary":"Update a depreciation policy","description":"Updates a depreciation policy, the same as editing it on the depreciation policies page in Lensing. Send only the fields you want to change: a field you leave out keeps its value.\n\nTo start from GET depreciation-policies/:id, leave out what the server owns — `depreciationPolicyNumber`, `active` and `lastModifiedDate` — and send the rules through the operations below, not as `rules`. The `id` goes in the path.\n\n`entityIds` is written as a whole set: leave it out to keep the legal entities, send it to replace them (a stored legal entity you do not send is removed), or send an empty array to clear them.\n\nThe rules are changed through three operations, each naming a rule by its `fixedAssetTypeId`: `createRules` adds a rule for a type the policy has no rule for, `updateRules` changes a stored rule (a field you leave out keeps its value), and `deleteRules` removes rules. A type can appear in one operation only. A policy must keep at least one rule (MISSING_DEPRECIATION_RULES), and a rule that fixed assets use cannot be removed (USED_FIXED_ASSET_TYPE); an updated rule stays linked to the fixed assets scheduled under it.\n\nEditing a policy does not recalculate anything. Fixed assets already scheduled under the policy keep their depreciation schedules; the changes apply to fixed assets registered or scheduled afterwards. The policy's status (active or inactive) does not change. An inactive policy is not checked against the active policies for DUPLICATE_FIXED_ASSET_ENTITY; that check applies when it is activated.\n\nWhen you change `depreciationMethod` to 'Immediate' or 'Bypassed' and leave out `depreciationConvention`, the convention is cleared, since those methods take none. For any other method, send the convention it takes if the stored one does not fit, or the request fails with DEPRECIATION_CONVENTION_REQUIRED or UNSUPPORTED_DEPRECIATION_CONVENTION. Send an empty `description` to clear it.\n\nEvery reference is an id (a UUID). Every error is returned with HTTP status 400. Branch on the code.","tags":["invDepreciationPolicies"]}},"/unscheduled-fixed-assets":{"get":{"operationId":"listUnscheduledFixedAssets","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[kind]","in":"query","required":false,"description":"Filter kind (equality)","schema":{"type":"string"}},{"name":"filter[kind][ne]","in":"query","required":false,"description":"Filter kind (ne)","schema":{"type":"string"}},{"name":"filter[kind][gt]","in":"query","required":false,"description":"Filter kind (gt)","schema":{"type":"string"}},{"name":"filter[kind][gte]","in":"query","required":false,"description":"Filter kind (gte)","schema":{"type":"string"}},{"name":"filter[kind][lt]","in":"query","required":false,"description":"Filter kind (lt)","schema":{"type":"string"}},{"name":"filter[kind][lte]","in":"query","required":false,"description":"Filter kind (lte)","schema":{"type":"string"}},{"name":"filter[kind][in]","in":"query","required":false,"description":"Filter kind (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[kind][notIn]","in":"query","required":false,"description":"Filter kind (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[kind][between]","in":"query","required":false,"description":"Filter kind (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[kind][like]","in":"query","required":false,"description":"Filter kind (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[sourceJournalEntryLineId]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (equality)","schema":{"type":"string"}},{"name":"filter[sourceJournalEntryLineId][ne]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (ne)","schema":{"type":"string"}},{"name":"filter[sourceJournalEntryLineId][gt]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (gt)","schema":{"type":"string"}},{"name":"filter[sourceJournalEntryLineId][gte]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (gte)","schema":{"type":"string"}},{"name":"filter[sourceJournalEntryLineId][lt]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (lt)","schema":{"type":"string"}},{"name":"filter[sourceJournalEntryLineId][lte]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (lte)","schema":{"type":"string"}},{"name":"filter[sourceJournalEntryLineId][in]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceJournalEntryLineId][notIn]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceJournalEntryLineId][between]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceJournalEntryLineId][like]","in":"query","required":false,"description":"Filter sourceJournalEntryLineId (like)","schema":{"type":"string"}},{"name":"filter[journalEntryId]","in":"query","required":false,"description":"Filter journalEntryId (equality)","schema":{"type":"string"}},{"name":"filter[journalEntryId][ne]","in":"query","required":false,"description":"Filter journalEntryId (ne)","schema":{"type":"string"}},{"name":"filter[journalEntryId][gt]","in":"query","required":false,"description":"Filter journalEntryId (gt)","schema":{"type":"string"}},{"name":"filter[journalEntryId][gte]","in":"query","required":false,"description":"Filter journalEntryId (gte)","schema":{"type":"string"}},{"name":"filter[journalEntryId][lt]","in":"query","required":false,"description":"Filter journalEntryId (lt)","schema":{"type":"string"}},{"name":"filter[journalEntryId][lte]","in":"query","required":false,"description":"Filter journalEntryId (lte)","schema":{"type":"string"}},{"name":"filter[journalEntryId][in]","in":"query","required":false,"description":"Filter journalEntryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryId][notIn]","in":"query","required":false,"description":"Filter journalEntryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[journalEntryId][between]","in":"query","required":false,"description":"Filter journalEntryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[journalEntryId][like]","in":"query","required":false,"description":"Filter journalEntryId (like)","schema":{"type":"string"}},{"name":"filter[accountId]","in":"query","required":false,"description":"Filter accountId (equality)","schema":{"type":"string"}},{"name":"filter[accountId][ne]","in":"query","required":false,"description":"Filter accountId (ne)","schema":{"type":"string"}},{"name":"filter[accountId][gt]","in":"query","required":false,"description":"Filter accountId (gt)","schema":{"type":"string"}},{"name":"filter[accountId][gte]","in":"query","required":false,"description":"Filter accountId (gte)","schema":{"type":"string"}},{"name":"filter[accountId][lt]","in":"query","required":false,"description":"Filter accountId (lt)","schema":{"type":"string"}},{"name":"filter[accountId][lte]","in":"query","required":false,"description":"Filter accountId (lte)","schema":{"type":"string"}},{"name":"filter[accountId][in]","in":"query","required":false,"description":"Filter accountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountId][notIn]","in":"query","required":false,"description":"Filter accountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountId][between]","in":"query","required":false,"description":"Filter accountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountId][like]","in":"query","required":false,"description":"Filter accountId (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[defaultTypeId]","in":"query","required":false,"description":"Filter defaultTypeId (equality)","schema":{"type":"string"}},{"name":"filter[defaultTypeId][ne]","in":"query","required":false,"description":"Filter defaultTypeId (ne)","schema":{"type":"string"}},{"name":"filter[defaultTypeId][gt]","in":"query","required":false,"description":"Filter defaultTypeId (gt)","schema":{"type":"string"}},{"name":"filter[defaultTypeId][gte]","in":"query","required":false,"description":"Filter defaultTypeId (gte)","schema":{"type":"string"}},{"name":"filter[defaultTypeId][lt]","in":"query","required":false,"description":"Filter defaultTypeId (lt)","schema":{"type":"string"}},{"name":"filter[defaultTypeId][lte]","in":"query","required":false,"description":"Filter defaultTypeId (lte)","schema":{"type":"string"}},{"name":"filter[defaultTypeId][in]","in":"query","required":false,"description":"Filter defaultTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultTypeId][notIn]","in":"query","required":false,"description":"Filter defaultTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[defaultTypeId][between]","in":"query","required":false,"description":"Filter defaultTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[defaultTypeId][like]","in":"query","required":false,"description":"Filter defaultTypeId (like)","schema":{"type":"string"}},{"name":"filter[typeId]","in":"query","required":false,"description":"Filter typeId (equality)","schema":{"type":"string"}},{"name":"filter[typeId][ne]","in":"query","required":false,"description":"Filter typeId (ne)","schema":{"type":"string"}},{"name":"filter[typeId][gt]","in":"query","required":false,"description":"Filter typeId (gt)","schema":{"type":"string"}},{"name":"filter[typeId][gte]","in":"query","required":false,"description":"Filter typeId (gte)","schema":{"type":"string"}},{"name":"filter[typeId][lt]","in":"query","required":false,"description":"Filter typeId (lt)","schema":{"type":"string"}},{"name":"filter[typeId][lte]","in":"query","required":false,"description":"Filter typeId (lte)","schema":{"type":"string"}},{"name":"filter[typeId][in]","in":"query","required":false,"description":"Filter typeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[typeId][notIn]","in":"query","required":false,"description":"Filter typeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[typeId][between]","in":"query","required":false,"description":"Filter typeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[typeId][like]","in":"query","required":false,"description":"Filter typeId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","transactionDate","-transactionDate","amount","-amount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","kind","entityId","bookId","sourceJournalEntryLineId","journalEntryId","accountId","name","transactionDate","amount","currency","reference","allowedTypeCount","defaultTypeId","typeId","inServiceDate","depreciationMethod","depreciationInterval","depreciationConvention","degressionRate","salvageValueAmount","serialNumber","assetTag","departmentId","businessUnitId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/listUnscheduledFixedAssetsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List what a fixed asset can be registered from","description":"Lists what a fixed asset can be registered from with POST fixed-assets: the rows of the Unscheduled tab of the fixed assets page in Lensing, for every legal entity and accounting book. A row of kind 'journalEntryLine' is a posted, approved, not reversed line of a Bank Entry, Credit Card Entry, Expense, Manual journal entry or Vendor Bill, on an asset account of a depreciation policy of its book, that no fixed asset holds in that book and that was not rejected or part of a disposed asset. A row of kind 'draft' is a draft fixed asset, saved, split or combined on the tab and not yet published. A row leaves the list once a fixed asset is registered from it.\n\nThe Unscheduled tab shows one legal entity and book at a time. To read the same rows, filter `entityId` and `bookId`, for example `filter[entityId][eq]=…&filter[bookId][eq]=…`. Sort with `sort=-transactionDate` for the tab's order, newest first. A draft that combines several lines is one row.\n\n`allowedTypeCount` and `defaultTypeId` say whether POST fixed-assets needs a typeId: when defaultTypeId is present you can leave typeId out. The types themselves, with their policy terms, are in `allowedTypes` on GET unscheduled-fixed-assets/:id and POST unscheduled-fixed-assets/search; the list leaves that collection out. A draft also carries the values saved on it (typeId, inServiceDate, the depreciation terms, serialNumber, assetTag, departmentId, businessUnitId), which registering it keeps unless you send others.\n\nTo find rows by name, use POST unscheduled-fixed-assets/search.\n\nA page has 25 rows by default and at most 100. A larger `page[size]` is treated as 100.","tags":["invUnscheduledFixedAssets"]}},"/inventory/sales-returns/bulk":{"post":{"operationId":"bulkCreateSalesReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateSalesReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadAnRmaBatch":{"value":{"data":{"items":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]},{"id":"b81c4f30-27de-4a95-8106-3fd7e5a2c914","documentNumber":"SR-1043","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0088","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}]}},"summary":"Two returns raised together from a customer portal export"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateSalesReturnsInput"},"examples":{"loadAnRmaBatch":{"value":{"returns":[{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-18","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","notes":"Customer reports transit damage","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]},{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-18","referenceNumber":"RMA-2026-0088","trackingNumber":"3SABCD1234567","currency":"EUR","notes":"Customer reports transit damage","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]}]},"summary":"Two returns raised together from a customer portal export"}}}}},"summary":"Bulk create sales returns","description":"Creates multiple draft sales returns in one request. Each return in returns takes the same fields as POST inventory/sales-returns. If any return can't be created, none are. 'index' on the error is the position of that return, counting from zero.\n\nThe response lists the new drafts with their lines, in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventorySalesReturns"]}},"/inventory/serial-transactions":{"get":{"operationId":"serialTransactions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[serialNumberId]","in":"query","required":false,"description":"Filter serialNumberId (equality)","schema":{"type":"string"}},{"name":"filter[serialNumberId][ne]","in":"query","required":false,"description":"Filter serialNumberId (ne)","schema":{"type":"string"}},{"name":"filter[serialNumberId][gt]","in":"query","required":false,"description":"Filter serialNumberId (gt)","schema":{"type":"string"}},{"name":"filter[serialNumberId][gte]","in":"query","required":false,"description":"Filter serialNumberId (gte)","schema":{"type":"string"}},{"name":"filter[serialNumberId][lt]","in":"query","required":false,"description":"Filter serialNumberId (lt)","schema":{"type":"string"}},{"name":"filter[serialNumberId][lte]","in":"query","required":false,"description":"Filter serialNumberId (lte)","schema":{"type":"string"}},{"name":"filter[serialNumberId][in]","in":"query","required":false,"description":"Filter serialNumberId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumberId][notIn]","in":"query","required":false,"description":"Filter serialNumberId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumberId][between]","in":"query","required":false,"description":"Filter serialNumberId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serialNumberId][like]","in":"query","required":false,"description":"Filter serialNumberId (like)","schema":{"type":"string"}},{"name":"filter[serialNumber]","in":"query","required":false,"description":"Filter serialNumber (equality)","schema":{"type":"string"}},{"name":"filter[serialNumber][ne]","in":"query","required":false,"description":"Filter serialNumber (ne)","schema":{"type":"string"}},{"name":"filter[serialNumber][gt]","in":"query","required":false,"description":"Filter serialNumber (gt)","schema":{"type":"string"}},{"name":"filter[serialNumber][gte]","in":"query","required":false,"description":"Filter serialNumber (gte)","schema":{"type":"string"}},{"name":"filter[serialNumber][lt]","in":"query","required":false,"description":"Filter serialNumber (lt)","schema":{"type":"string"}},{"name":"filter[serialNumber][lte]","in":"query","required":false,"description":"Filter serialNumber (lte)","schema":{"type":"string"}},{"name":"filter[serialNumber][in]","in":"query","required":false,"description":"Filter serialNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumber][notIn]","in":"query","required":false,"description":"Filter serialNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumber][between]","in":"query","required":false,"description":"Filter serialNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serialNumber][like]","in":"query","required":false,"description":"Filter serialNumber (like)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (equality)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][ne]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (ne)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][gt]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (gt)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][gte]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (gte)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][lt]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (lt)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][lte]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (lte)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][in]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][notIn]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][between]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][like]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (like)","schema":{"type":"string"}},{"name":"filter[expirationDate]","in":"query","required":false,"description":"Filter expirationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][ne]","in":"query","required":false,"description":"Filter expirationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gt]","in":"query","required":false,"description":"Filter expirationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gte]","in":"query","required":false,"description":"Filter expirationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lt]","in":"query","required":false,"description":"Filter expirationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lte]","in":"query","required":false,"description":"Filter expirationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][in]","in":"query","required":false,"description":"Filter expirationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][notIn]","in":"query","required":false,"description":"Filter expirationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][between]","in":"query","required":false,"description":"Filter expirationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entryDate]","in":"query","required":false,"description":"Filter entryDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][ne]","in":"query","required":false,"description":"Filter entryDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][gt]","in":"query","required":false,"description":"Filter entryDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][gte]","in":"query","required":false,"description":"Filter entryDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][lt]","in":"query","required":false,"description":"Filter entryDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][lte]","in":"query","required":false,"description":"Filter entryDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[entryDate][in]","in":"query","required":false,"description":"Filter entryDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entryDate][notIn]","in":"query","required":false,"description":"Filter entryDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entryDate][between]","in":"query","required":false,"description":"Filter entryDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isSold]","in":"query","required":false,"description":"Filter isSold (equality)","schema":{"type":"boolean"}},{"name":"filter[isSold][ne]","in":"query","required":false,"description":"Filter isSold (ne)","schema":{"type":"boolean"}},{"name":"filter[isSold][gt]","in":"query","required":false,"description":"Filter isSold (gt)","schema":{"type":"boolean"}},{"name":"filter[isSold][gte]","in":"query","required":false,"description":"Filter isSold (gte)","schema":{"type":"boolean"}},{"name":"filter[isSold][lt]","in":"query","required":false,"description":"Filter isSold (lt)","schema":{"type":"boolean"}},{"name":"filter[isSold][lte]","in":"query","required":false,"description":"Filter isSold (lte)","schema":{"type":"boolean"}},{"name":"filter[isSold][in]","in":"query","required":false,"description":"Filter isSold (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSold][notIn]","in":"query","required":false,"description":"Filter isSold (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSold][between]","in":"query","required":false,"description":"Filter isSold (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType]","in":"query","required":false,"description":"Filter sourceDocumentLineType (equality)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][ne]","in":"query","required":false,"description":"Filter sourceDocumentLineType (ne)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][in]","in":"query","required":false,"description":"Filter sourceDocumentLineType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][notIn]","in":"query","required":false,"description":"Filter sourceDocumentLineType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][between]","in":"query","required":false,"description":"Filter sourceDocumentLineType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][like]","in":"query","required":false,"description":"Filter sourceDocumentLineType (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","transactionDate","-transactionDate","entryDate","-entryDate","expirationDate","-expirationDate","serialNumber","-serialNumber","itemCode","-itemCode","locationCode","-locationCode","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","serialNumberId","serialNumber","manufacturerSerialNumber","expirationDate","entryDate","isSold","transactionId","itemId","itemCode","itemName","locationId","locationCode","locationName","transactionDate","inQuantity","outQuantity","cost","currency","sourceDocumentLineType","sourceDocumentId","sourceDocumentLineId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/serialTransactionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":false,"transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"8d17b4e2-3c95-4a60-b7f8-01e5d9c26a43","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-11","outQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-11T09:02:00.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List serial transactions","description":"Lists serial transactions.","tags":["inventorySerialTransactions"]}},"/fixed-assets/depreciation-schedules/search":{"post":{"operationId":"searchDepreciationSchedules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchDepreciationSchedulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"items":[{"id":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39","scheduleNumber":"DS-0042","fixedAssetId":3187,"entityId":1,"bookId":1,"depreciationRuleId":12,"status":"Ongoing","acquisitionDate":"2024-01-15","startDate":"2024-02-01","endDate":"2029-01-31","currency":"EUR","acquisitionValue":"24000.00","depreciableAmount":"21600.00","depreciatedAmount":"7560.00","remainingValue":"16440.00","lastModifiedDate":"2026-08-14T09:12:33.000Z"}],"pagination":{"hasMore":false}}},"summary":"Schedules that started during 2024 and are still running for one entity"}}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchDepreciationSchedulesInput"},"examples":{"basic":{"value":{"filters":{"status":"Ongoing","entityIds":[1],"startDateFrom":"2024-01-01","startDateTo":"2024-12-31"}},"summary":"Schedules that started during 2024 and are still running for one entity"}}}}},"summary":"Search depreciation schedules","description":"Searches depreciation schedules. Each schedule returned has the same fields as `GET fixed-assets/depreciation-schedules/:id`.\n\nTo filter by depreciation rule, acquisition date, currency, or `lastModifiedDate`, use `GET fixed-assets/depreciation-schedules`.","tags":["invDepreciationSchedules"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/depreciation-policies/search":{"post":{"operationId":"searchDepreciationPolicies","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchDepreciationPoliciesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byName":{"value":{"data":{"items":[{"id":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5","depreciationPolicyNumber":"DP-0007","name":"Office Equipment — 5 Year Straight Line","description":"Standard straight-line write-down for office equipment over five years.","depreciationMethod":"StraightLine","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"3a5f81c6-9d24-4b70-8e15-6c2b7f094d38","accumulatedDepreciationAccountId":"9e14d7b2-6c83-4f51-a027-8d3b5e199c61","depreciationExpenseAccountId":"5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-14T09:12:33.000Z","entityIds":["e3a9c2d1-4b5f-4d6e-8a7b-9c0d1e2f3a4b"],"rules":[{"fixedAssetTypeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","usefulLife":5,"usefulLifeDurationType":"year","minimumAmount":"500","currency":"USD","belowThresholdDepreciationMethod":"expense","available":true}]}],"pagination":{"hasMore":false}}},"summary":"Policies in book 1 whose name mentions equipment"}}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchDepreciationPoliciesInput"},"examples":{"byName":{"value":{"filters":{"nameContains":"equipment","bookIds":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]}},"summary":"Policies in book 1 whose name mentions equipment"}}}}},"summary":"Search depreciation policies","description":"Searches depreciation policies. Each policy returned has the same fields as `GET depreciation-policies/:id`.\n\nTo filter by depreciation method, depreciation interval, account, active status, or `lastModifiedDate`, use `GET depreciation-policies`.","tags":["invDepreciationPolicies"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/fixed-assets/{id}":{"patch":{"operationId":"updateFixedAsset","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateFixedAssetOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, FIXED_ASSET_VOIDED, REFERENCED_RECORD_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_APPLICABLE, CURRENCY_MISMATCH, ASSET_STATUS_NOT_ALLOWED, FIELDS_LOCKED_DEPRECIATION_STARTED, FIELDS_LOCKED_BY_SOURCE, DEPRECIATION_METHOD_CHANGE_NOT_ALLOWED, BOOK_NOT_ENABLED_FOR_ENTITY, BOOK_ALREADY_USED, FIXED_ASSET_TYPE_NOT_ASSOCIATED_WITH_BOOK, DEPRECIATION_POLICY_NOT_FOUND, UNSUPPORTED_DEPRECIATION_CONVENTION, VENDOR_TAG_NOT_EDITABLE, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["field","currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSET_STATUS_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"assetStatus":{"type":"string"}},"additionalProperties":false,"required":["assetStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELDS_LOCKED_DEPRECIATION_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELDS_LOCKED_BY_SOURCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_METHOD_CHANGE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_ENABLED_FOR_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_ALREADY_USED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ASSOCIATED_WITH_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"},"depreciationConvention":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_TAG_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["field","currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSET_STATUS_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"assetStatus":{"type":"string"}},"additionalProperties":false,"required":["assetStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELDS_LOCKED_DEPRECIATION_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELDS_LOCKED_BY_SOURCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_METHOD_CHANGE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_ENABLED_FOR_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_ALREADY_USED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ASSOCIATED_WITH_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"},"depreciationConvention":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_TAG_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["field","currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSET_STATUS_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"assetStatus":{"type":"string"}},"additionalProperties":false,"required":["assetStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELDS_LOCKED_DEPRECIATION_STARTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELDS_LOCKED_BY_SOURCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_METHOD_CHANGE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_ENABLED_FOR_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_ALREADY_USED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ASSOCIATED_WITH_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"},"depreciationConvention":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_TAG_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fixed asset to update.","example":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateFixedAssetInput"}}}},"summary":"Update a fixed asset","description":"Updates a fixed asset, the same as editing it in Lensing. Send only the fields you want to change. A field you leave out keeps its value, and a field you send with its current value is not a change. The input is the item of GET fixed-assets/:id minus the fields the server owns: fixedAssetNumber, fixedAssetStatus, companyAssetId, assetNumber, typeName, depreciationStatus, depreciableAmount, depreciatedAmount, initialDepreciatedAmount, remainingValue, lastModifiedDate and sources. Sending one of those is rejected with HTTP 400 and no code (unexpected property), so remove them before you send a GET body back.\n\nOnce depreciation has started for the fixed asset (its depreciation schedule is no longer 'NotStarted'), the fields the schedule is calculated from cannot be changed: entityId, bookId, currency, typeId, depreciationMethod, depreciationInterval, depreciationConvention, acquisitionValueAmount, salvageValueAmount, degressionRate, inServiceDate and acquisitionDate. Changing one fails with FIELDS_LOCKED_DEPRECIATION_STARTED. A fixed asset created from a journal entry line keeps the line's entityId, bookId, currency, acquisitionValueAmount and acquisitionDate; changing one fails with FIELDS_LOCKED_BY_SOURCE. A fixed asset registered with POST fixed-assets from a journal entry line, or from a draft made from lines, has a source, so these fields are locked for it.\n\nWhile depreciation has not started, changing a field the schedule is calculated from recalculates the depreciation schedule. A fixed asset imported part-way through its life keeps the start date its schedule was imported with. Changing depreciationMethod to 'Bypassed' while the fixed asset has a depreciation schedule fails with DEPRECIATION_METHOD_CHANGE_NOT_ALLOWED, and the schedule is kept: the API never deletes one.\n\nThe name, serial number, asset tag, asset status, department and business unit can be changed at any time. After depreciation has started, a department or business unit change applies to the periods not yet recorded; recorded depreciation keeps the department and business unit it was recorded with.\n\nWhen you change typeId and leave out depreciationConvention, the fixed asset takes the convention of the new type's depreciation policy. When you change depreciationMethod, a convention the new method does not accept is replaced by the method's default.\n\nEvery error code declared for this endpoint is returned with HTTP status 400; branch on the code. A request turned away before the action runs carries no code: 401 when the credentials are missing or invalid, 403 when the access token does not hold this endpoint's permission task, and 400 when the body does not match the input schema, for example an unexpected property. The Api-Version header is required: a missing or empty header, or one that names no published version, fails with 400, and a route that does not exist in the version it names fails with 404.","tags":["invFixedAssets"]},"get":{"operationId":"getFixedAsset","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getFixedAssetOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"depreciating":{"value":{"data":{"id":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915","fixedAssetNumber":"FA-000142","fixedAssetStatus":"active","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","name":"Forklift - Warehouse 2","entityId":"c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9","assetStatus":"inUse","assetNumber":"CA-0881","serialNumber":"SN-77120934","assetTag":"WH2-FORK-03","acquisitionDate":"2024-03-11","departmentId":"5c8a2b70-1e94-4f37-8d06-b3e75f1290ac","typeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","typeName":"Machinery","bookId":"e0c37a94-2d15-4b86-9f42-5a7c81de03b6","currency":"EUR","inServiceDate":"2024-04-01","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationStatus":"Ongoing","acquisitionValueAmount":"42000","acquisitionValueCurrency":"EUR","salvageValueAmount":"2000","salvageValueCurrency":"EUR","depreciableAmount":"40000","depreciatedAmount":"13333.33","remainingValue":"28666.67","lastModifiedDate":"2026-08-18T09:14:22.517Z","sources":[{"journalEntryLineId":"3f6a1c88-9b27-4d05-a6e3-0c9d4b7e21f5","journalEntryId":"b81e40d2-6c9a-4f13-9e57-2d0a7c63f914","source":"VB-000318 / 1"}]}},"summary":"An asset part-way through its life: depreciatedAmount against remainingValue"},"soldAndDisposed":{"value":{"data":{"id":"1f4c9a26-8d73-4b05-9e18-7a2c30f6b8d4","fixedAssetNumber":"FA-000097","fixedAssetStatus":"active","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","name":"Forklift - Warehouse 2","entityId":"c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9","assetStatus":"disposed","assetNumber":"CA-0881","serialNumber":"SN-77120934","assetTag":"WH2-FORK-03","acquisitionDate":"2024-03-11","departmentId":"5c8a2b70-1e94-4f37-8d06-b3e75f1290ac","typeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","typeName":"Machinery","bookId":"e0c37a94-2d15-4b86-9f42-5a7c81de03b6","currency":"EUR","inServiceDate":"2024-04-01","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationStatus":"Disposed","acquisitionValueAmount":"42000","acquisitionValueCurrency":"EUR","salvageValueAmount":"2000","salvageValueCurrency":"EUR","depreciableAmount":"40000","depreciatedAmount":"40000","remainingValue":"0","lastModifiedDate":"2026-08-18T09:14:22.517Z","disposalDate":"2026-06-30","disposalAmount":"0","disposalEntryId":"b8e14d57-3a09-4c62-8f75-2e91d06a4b3c","disposalEntryNumber":"JE-4412","soldAmountAmount":"3500","soldAmountCurrency":"EUR","saleEntryId":"6d20f83b-5c17-4e94-a1b8-9f0347e2c65d","saleEntryNumber":"JE-4413","revenueAccountId":"4a91c605-7e38-4d2b-b096-1c58e73f2a80","sources":[{"journalEntryLineId":"3f6a1c88-9b27-4d05-a6e3-0c9d4b7e21f5","journalEntryId":"b81e40d2-6c9a-4f13-9e57-2d0a7c63f914","source":"VB-000318 / 1"}]}},"summary":"A disposed asset that was sold - remainingValue is forced to 0, and the disposal and sale journal entries are named"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fixed asset you want to retrieve.","examples":{"depreciating":{"value":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915"},"soldAndDisposed":{"value":"1f4c9a26-8d73-4b05-9e18-7a2c30f6b8d4"}}}],"summary":"Retrieve a fixed asset","description":"Retrieves a fixed asset, including a voided one. `GET fixed-assets` does not return voided assets. A voided asset has a `fixedAssetStatus` of 'voided'.\n\nA `depreciationStatus` of 'Completed' can also mean the asset has no depreciation schedule. Check `depreciatedAmount` before you treat an asset as fully depreciated.\n\nAmounts are in the asset's own `currency` and are not converted. The exception is `soldAmountAmount`, which is in `soldAmountCurrency`.\n\nTo find a fixed asset by its fixed asset number, asset number, or serial number, use `POST fixed-assets/search`.\n\n`sources` names the journal entry lines the fixed asset was registered from, in its own book.","tags":["invFixedAssets"]}},"/fixed-assets/depreciation-schedules/{id}":{"get":{"operationId":"getDepreciationSchedule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDepreciationScheduleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"id":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39","scheduleNumber":"DS-0042","fixedAssetId":3187,"entityId":1,"bookId":1,"depreciationRuleId":12,"status":"Ongoing","acquisitionDate":"2024-01-15","startDate":"2024-02-01","endDate":"2029-01-31","currency":"EUR","acquisitionValue":"24000.00","depreciableAmount":"21600.00","depreciatedAmount":"7560.00","remainingValue":"16440.00","lastModifiedDate":"2026-08-14T09:12:33.000Z"}},"summary":"A schedule part-way through its run"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the depreciation schedule you want to retrieve.","examples":{"basic":{"value":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39"}}}],"summary":"Retrieve a depreciation schedule","description":"Retrieves a depreciation schedule. To find a schedule by its schedule number, use `POST fixed-assets/depreciation-schedules/search`.","tags":["invDepreciationSchedules"]}},"/unscheduled-fixed-assets/search":{"post":{"operationId":"searchUnscheduledFixedAssets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchUnscheduledFixedAssetsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: FIELD_REQUIRED, INVALID_FIELD_VALUE, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchUnscheduledFixedAssetsInput"}}}},"summary":"Search what a fixed asset can be registered from","description":"The Unscheduled list is what the Unscheduled tab of the fixed assets page shows in Lensing: what a fixed asset can be registered from with POST fixed-assets. It has two kinds of row. A row of kind 'journalEntryLine' is a posted, approved, not reversed line of a Bank Entry, Credit Card Entry, Expense, Manual journal entry or Vendor Bill, on an asset account of a depreciation policy of its book, that no fixed asset holds in that book and that was not rejected or part of a disposed asset. A row of kind 'draft' is a draft fixed asset, saved, split or combined on the tab and not yet published. A row leaves the list once a fixed asset is registered from it.\n\n`allowedTypeCount` and `defaultTypeId` say whether POST fixed-assets needs a typeId: when defaultTypeId is present you can leave typeId out. The types themselves, with their policy terms, are in `allowedTypes` on GET unscheduled-fixed-assets/:id and POST unscheduled-fixed-assets/search. A draft also carries the values saved on it (typeId, inServiceDate, the depreciation terms, serialNumber, assetTag, departmentId, businessUnitId), which registering it keeps unless you send others.\n\nSearches the Unscheduled list, returning the fields of GET unscheduled-fixed-assets/:id, `allowedTypes` included.\n\nScope the search with `filters.entityId` and `filters.bookId`, or name rows with `filters.ids`. With ids alone the search spans every legal entity and book the rows live in; without ids both entityId and bookId are required, and the request fails with FIELD_REQUIRED otherwise.\n\n`name` matches any part of the row's own description, case-insensitively: a line's description, or a draft's name. For a line, it does not match the name the row shows when that name is taken from the asset in another book. `sourceJournalEntryLineIds` finds a line by its id and a draft by its source lines.\n\nRows are ordered by transactionDate, newest first. A draft that combines several lines is returned once, never twice on one page or across pages.\n\nEvery error code declared for this endpoint is returned with HTTP status 400; branch on the code. A request turned away before the action runs carries no code: 401 when the credentials are missing or invalid, 403 when the access token does not hold this endpoint's permission task, and 400 when the request does not match the input schema. The Api-Version header is required: a missing or empty header, or one that names no published version, fails with 400, and a route that does not exist in the version it names fails with 404.","tags":["invUnscheduledFixedAssets"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/landed-cost-items/{id}":{"patch":{"operationId":"updateLandedCostItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateLandedCostItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"changeMode":{"value":{"data":{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"}},"summary":"Change the allocation mode from 'Weight' to 'Quantity', for example because items have no weights."},"retire":{"value":{"data":{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}},"summary":"Turn off a landed cost item without deleting it."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, UNKNOWN_ALLOCATION_MODE, DUPLICATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost item you want to update. Format: UUID.","examples":{"changeMode":{"value":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"},"retire":{"value":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateLandedCostItemInput"},"examples":{"changeMode":{"value":{"allocationMode":"Quantity"},"summary":"Change the allocation mode from 'Weight' to 'Quantity', for example because items have no weights."},"retire":{"value":{"active":false},"summary":"Turn off a landed cost item without deleting it."}}}}},"summary":"Update a landed cost item","description":"Updates a landed cost item with the fields you send. A field you leave out keeps its current value. You cannot remove a field's value, because null is not accepted.\n\nChanging `itemId` or `accountId` to one that another landed cost item already uses fails, because each `itemId` and each `accountId` can be used by only one landed cost item.\n\nThe response contains only the `id`. To see the updated landed cost item, use GET inventory/landed-cost-items/:id.","tags":["inventoryLandedCostItems"]},"delete":{"operationId":"deleteLandedCostItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteLandedCostItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"remove":{"value":{"data":{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}},"summary":"Deleting a landed cost item for charges you no longer add to the value of stock (capitalize)."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost item you want to delete. Format: UUID.","examples":{"remove":{"value":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}}}],"summary":"Delete a landed cost item","description":"Deletes a landed cost item. After the delete, the vendor bill lines that this landed cost item matched no longer appear on GET inventory/landed-costs/vendor-bill-lines, unless another landed cost item also matches them. Landed costs keep any charges they already have from vendor bill lines that this landed cost item matched. To stop the matching but keep the landed cost item, set its `active` to false with PATCH inventory/landed-cost-items/:id instead.","tags":["inventoryLandedCostItems"]},"get":{"operationId":"getLandedCostItem","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getLandedCostItemOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byAccount":{"value":{"data":{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14","accountId":"7e21b508-4a93-4c67-b0d5-19f6a3e84c72","accountNumber":"5820","accountName":"Customs and duty","allocationMode":"LineTotal","active":true,"lastModifiedDate":"2026-08-18T09:16:03.204Z"}},"summary":"A landed cost item that covers a general ledger account instead of an item."},"byItem":{"value":{"data":{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Weight","costingElementTypeId":"c4a90e21-7b35-4d18-9e02-6f13a85c7d40","costingElementTypeCode":"FRT","costingElementTypeName":"Freight","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}},"summary":"A landed cost item that covers a freight service item, allocated by 'Weight'."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the landed cost item you want to retrieve. Format: UUID.","examples":{"byAccount":{"value":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"},"byItem":{"value":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"}}}],"summary":"Retrieve a landed cost item","description":"Retrieves a landed cost item, with the names of its item, account, and costing element type.","tags":["inventoryLandedCostItems"]}},"/fixed-assets/search":{"post":{"operationId":"searchFixedAssets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchFixedAssetsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"bySerialNumber":{"value":{"data":{"items":[{"id":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915","fixedAssetNumber":"FA-000142","serialNumber":"SN-77120934","fixedAssetStatus":"active","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","lastModifiedDate":"2026-08-18T09:14:22.517Z","sources":[{"journalEntryLineId":"3f6a1c88-9b27-4d05-a6e3-0c9d4b7e21f5","journalEntryId":"b81e40d2-6c9a-4f13-9e57-2d0a7c63f914","source":"VB-000318 / 1"}]}],"pagination":{"hasMore":false}}},"summary":"Find the asset bearing a serial number - the look-up that cannot be a URL"},"neverDisposed":{"value":{"data":{"items":[{"id":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915","fixedAssetStatus":"active","depreciationStatus":"Ongoing","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","lastModifiedDate":"2026-08-30T07:22:48.913Z","sources":[]}],"pagination":{"hasMore":true,"nextCursor":"MjU="}}},"summary":"Assets carrying no disposal date - not expressible as a date range"},"voidedOnly":{"value":{"data":{"items":[{"id":"2b7f4e19-6c85-4a30-9d72-8e1350ca4f6b","fixedAssetNumber":"FA-000031","fixedAssetStatus":"voided","remainingValue":"0","companyAssetId":"6e2b90d4-71a5-4c38-b0f9-4d7e21c85a36","lastModifiedDate":"2026-05-02T16:40:11.204Z","sources":[{"journalEntryLineId":"3f6a1c88-9b27-4d05-a6e3-0c9d4b7e21f5","journalEntryId":"b81e40d2-6c9a-4f13-9e57-2d0a7c63f914","source":"VB-000318 / 1"}]}],"pagination":{"hasMore":false}}},"summary":"Voided assets, which the collection route cannot show at all"}}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR, INVALID_TIMESTAMP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The filter with the invalid value. Possible values: 'filters.lastModifiedDate.start' or 'filters.lastModifiedDate.end'."},"value":{"type":"string","description":"The value you sent."}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The `page.cursor` you sent."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The filter with the invalid value. Possible values: 'filters.lastModifiedDate.start' or 'filters.lastModifiedDate.end'."},"value":{"type":"string","description":"The value you sent."}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchFixedAssetsInput"},"examples":{"bySerialNumber":{"value":{"filters":{"serialNumber":"SN-77120934"}},"summary":"Find the asset bearing a serial number - the look-up that cannot be a URL"},"neverDisposed":{"value":{"filters":{"disposed":false,"fixedAssetStatuses":["active"]}},"summary":"Assets carrying no disposal date - not expressible as a date range"},"voidedOnly":{"value":{"filters":{"fixedAssetStatuses":["voided"]}},"summary":"Voided assets, which the collection route cannot show at all"}}}}},"summary":"Search fixed assets","description":"Searches fixed assets, returning the same fields as `GET fixed-assets/:id` and `GET fixed-assets`.\n\n`name`, `assetTag`, `assetNumber`, and `serialNumber` can be filtered only on this endpoint. `name` and `assetTag` match any part of the value, and the match is case-insensitive. `assetNumber` and `serialNumber` must match exactly.\n\nVoided assets are included. To leave them out, set `fixedAssetStatuses` to ['active'].\n\nTo find assets that were never disposed, set `disposed` to false. A `disposalDate` range can't find them, because an asset with no disposal date falls outside every range. If you send `disposed: false` together with a `disposalDate` range, no fixed assets are returned.\n\nThe `acquisitionValueAmount` range compares only the number, not the currency. Amounts are not converted, so a range of 1,000 to 5,000 matches an asset worth 2,000 USD and one worth 2,000 JPY. To match amounts in one currency only, also filter on `currencies`.\n\nTo find the fixed asset registered from a journal entry line, filter on `sourceJournalEntryLineIds`. It matches a fixed asset in the line's own book only.","tags":["invFixedAssets"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/inventory-revaluations/{id}/commit":{"post":{"operationId":"commitInventoryRevaluation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitInventoryRevaluationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"postTheWriteDown":{"value":{"data":{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentStatus":"COMMITTED","journalEntryId":"3a91c74e-6b05-4d28-91f6-8c2e70a5d413","totalRevaluationAmount":"-450","warnings":[]}},"summary":"The stock revalues and the loss lands on the balance sheet"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, VALIDATION_FAILED, POSTING_REJECTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["errors"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the revaluation you want to commit.","examples":{"postTheWriteDown":{"value":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitInventoryRevaluationInput"},"examples":{"postTheWriteDown":{"value":{},"summary":"The stock revalues and the loss lands on the balance sheet"}}}}},"summary":"Commit an inventory revaluation","description":"Commits a draft inventory revaluation and creates its journal entry. The commit writes the cost adjustments and revalues the inventory levels. The journal entry records the difference in value. documentStatus becomes 'COMMITTED'.\n\nOnly a draft can be committed. The whole revaluation is checked first. If any check fails, the error lists every problem and nothing is written.\n\nThe revaluation must have lines. Batch quantities and serials must match their lines, and a costing element type must be set.\n\ntotalRevaluationAmount in the response is the total change in stock value, negative for a write-down.","tags":["inventoryInventoryRevaluations"]}},"/inventory/inventory-revaluations/bulk-delete":{"post":{"operationId":"bulkDeleteInventoryRevaluations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteInventoryRevaluationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteInventoryRevaluationsInput"}}}},"summary":"Bulk delete inventory revaluations","description":"Deletes multiple draft inventory revaluations in one request. Every identifier is checked before anything is deleted. If any identifier matches no revaluation, or names a revaluation that is not a draft, none are deleted. 'index' on the error is the position of that identifier, counting from zero.\n\nThe response lists the identifiers of the deleted revaluations in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryRevaluations"]}},"/fixed-assets/depreciation-schedules":{"get":{"operationId":"depreciationSchedules","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[scheduleNumber]","in":"query","required":false,"description":"Filter scheduleNumber (equality)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][ne]","in":"query","required":false,"description":"Filter scheduleNumber (ne)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][gt]","in":"query","required":false,"description":"Filter scheduleNumber (gt)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][gte]","in":"query","required":false,"description":"Filter scheduleNumber (gte)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][lt]","in":"query","required":false,"description":"Filter scheduleNumber (lt)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][lte]","in":"query","required":false,"description":"Filter scheduleNumber (lte)","schema":{"type":"string"}},{"name":"filter[scheduleNumber][in]","in":"query","required":false,"description":"Filter scheduleNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduleNumber][notIn]","in":"query","required":false,"description":"Filter scheduleNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[scheduleNumber][between]","in":"query","required":false,"description":"Filter scheduleNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[scheduleNumber][like]","in":"query","required":false,"description":"Filter scheduleNumber (like)","schema":{"type":"string"}},{"name":"filter[fixedAssetId]","in":"query","required":false,"description":"Filter fixedAssetId (equality)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][ne]","in":"query","required":false,"description":"Filter fixedAssetId (ne)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][gt]","in":"query","required":false,"description":"Filter fixedAssetId (gt)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][gte]","in":"query","required":false,"description":"Filter fixedAssetId (gte)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][lt]","in":"query","required":false,"description":"Filter fixedAssetId (lt)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][lte]","in":"query","required":false,"description":"Filter fixedAssetId (lte)","schema":{"type":"number"}},{"name":"filter[fixedAssetId][in]","in":"query","required":false,"description":"Filter fixedAssetId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetId][notIn]","in":"query","required":false,"description":"Filter fixedAssetId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetId][between]","in":"query","required":false,"description":"Filter fixedAssetId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"number"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"number"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"number"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"number"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"number"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"number"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"number"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"number"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"number"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"number"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"number"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"number"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationRuleId]","in":"query","required":false,"description":"Filter depreciationRuleId (equality)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][ne]","in":"query","required":false,"description":"Filter depreciationRuleId (ne)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][gt]","in":"query","required":false,"description":"Filter depreciationRuleId (gt)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][gte]","in":"query","required":false,"description":"Filter depreciationRuleId (gte)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][lt]","in":"query","required":false,"description":"Filter depreciationRuleId (lt)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][lte]","in":"query","required":false,"description":"Filter depreciationRuleId (lte)","schema":{"type":"number"}},{"name":"filter[depreciationRuleId][in]","in":"query","required":false,"description":"Filter depreciationRuleId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationRuleId][notIn]","in":"query","required":false,"description":"Filter depreciationRuleId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationRuleId][between]","in":"query","required":false,"description":"Filter depreciationRuleId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[acquisitionDate]","in":"query","required":false,"description":"Filter acquisitionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][ne]","in":"query","required":false,"description":"Filter acquisitionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][gt]","in":"query","required":false,"description":"Filter acquisitionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][gte]","in":"query","required":false,"description":"Filter acquisitionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][lt]","in":"query","required":false,"description":"Filter acquisitionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][lte]","in":"query","required":false,"description":"Filter acquisitionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][in]","in":"query","required":false,"description":"Filter acquisitionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[acquisitionDate][notIn]","in":"query","required":false,"description":"Filter acquisitionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[acquisitionDate][between]","in":"query","required":false,"description":"Filter acquisitionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","scheduleNumber","-scheduleNumber","fixedAssetId","-fixedAssetId","status","-status","acquisitionDate","-acquisitionDate","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","scheduleNumber","fixedAssetId","entityId","bookId","depreciationRuleId","status","acquisitionDate","startDate","endDate","currency","acquisitionValue","depreciableAmount","depreciatedAmount","remainingValue","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/depreciationSchedulesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List depreciation schedules","description":"Lists depreciation schedules. Each schedule has the same fields as `GET fixed-assets/depreciation-schedules/:id`.\n\nRecording depreciation doesn't always update `lastModifiedDate`. It changes `depreciatedAmount` and `remainingValue`. It updates `lastModifiedDate` only when the schedule's `status` changes.","tags":["invDepreciationSchedules"]}},"/fixed-assets/depreciation-schedules/record":{"post":{"operationId":"recordDepreciation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/recordDepreciationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"basic":{"value":{"data":{"asyncExecution":false,"lineCount":3}},"summary":"Three lines posted inline"},"queuedInBackground":{"value":{"data":{"asyncExecution":true,"lineCount":5}},"summary":"A large batch is queued; no journal entries exist yet"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_LINES, LINES_NOT_FOUND, INVALID_SCHEDULE_STATE, TASK_ALREADY_RUNNING","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requested":{"type":"number","description":"The number of line ids you sent."}},"additionalProperties":false,"required":["requested"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SCHEDULE_STATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requested":{"type":"number","description":"The number of line ids you sent."}},"additionalProperties":false,"required":["requested"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SCHEDULE_STATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"requested":{"type":"number","description":"The number of line ids you sent."}},"additionalProperties":false,"required":["requested"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SCHEDULE_STATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASK_ALREADY_RUNNING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recordDepreciationInput"},"examples":{"basic":{"value":{"lineIds":[101,102,103],"postingDate":"2026-09-30"},"summary":"Three lines posted inline"},"queuedInBackground":{"value":{"lineIds":[201,202,203,204,205],"postingDate":"2026-09-30"},"summary":"A large batch is queued; no journal entries exist yet"}}}}},"summary":"Record depreciation","description":"Records depreciation for the depreciation schedule lines you send. It creates one journal entry for each schedule. Each journal entry is dated `postingDate`. It debits the depreciation expense account and credits the accumulated depreciation account of the fixed asset's depreciation policy.\n\nThis endpoint records only the lines you send, whatever their dates. It does not find the lines that are due.\n\nIf you send 35 line ids or fewer, the response comes back after the recording is finished. Either all the lines are recorded, or none are, and the response explains why.\n\nIf you send more than 35 line ids, the response comes back straight away, with `asyncExecution` set to `true`, and the lines are recorded afterwards. The response cannot tell you about errors, such as a line that is already recorded or a closed accounting period. A very large recording is saved in parts. If it stops because of an error, the parts saved before the error stay recorded. To check how much was recorded, read `depreciatedAmount` on the schedules, or list journal entries with the type 'depreciation' on `GET accounting/journal-entries`.\n\nThe request fails with `TASK_ALREADY_RUNNING` while another depreciation recording is running for the same legal entity and book. This includes recordings started in Lensing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["invDepreciationSchedules"]}},"/unscheduled-fixed-assets/{id}":{"get":{"operationId":"getUnscheduledFixedAsset","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getUnscheduledFixedAssetOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The `id` you sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id of the row: a journal entry line's id or a draft fixed asset's id, as on GET unscheduled-fixed-assets.","example":"52e7c0a9-1d84-4b36-9f20-8c3a6b15e7d4"}],"summary":"Retrieve what a fixed asset can be registered from","description":"The Unscheduled list is what the Unscheduled tab of the fixed assets page shows in Lensing: what a fixed asset can be registered from with POST fixed-assets. It has two kinds of row. A row of kind 'journalEntryLine' is a posted, approved, not reversed line of a Bank Entry, Credit Card Entry, Expense, Manual journal entry or Vendor Bill, on an asset account of a depreciation policy of its book, that no fixed asset holds in that book and that was not rejected or part of a disposed asset. A row of kind 'draft' is a draft fixed asset, saved, split or combined on the tab and not yet published. A row leaves the list once a fixed asset is registered from it.\n\n`allowedTypeCount` and `defaultTypeId` say whether POST fixed-assets needs a typeId: when defaultTypeId is present you can leave typeId out. The types themselves, with their policy terms, are in `allowedTypes` on GET unscheduled-fixed-assets/:id and POST unscheduled-fixed-assets/search. A draft also carries the values saved on it (typeId, inServiceDate, the depreciation terms, serialNumber, assetTag, departmentId, businessUnitId), which registering it keeps unless you send others.\n\nRetrieves one row of the Unscheduled list by its id: a journal entry line's id or a draft fixed asset's id. It returns the fields of GET unscheduled-fixed-assets, and `allowedTypes`: every type the row can be registered as, with the depreciation policy, method, interval, convention, useful life and capitalization threshold it would take. Look a policy up with GET depreciation-policies/:id.\n\nA journal entry line that is not in the list (not posted, on another account, or already held by a fixed asset) and a published fixed asset are NOT_FOUND. A line held by a draft is not in the list: the draft is, under its own id.\n\nEvery error code declared for this endpoint is returned with HTTP status 400; branch on the code. A request turned away before the action runs carries no code: 401 when the credentials are missing or invalid, 403 when the access token does not hold this endpoint's permission task, and 400 when the request does not match the input schema. The Api-Version header is required: a missing or empty header, or one that names no published version, fails with 400, and a route that does not exist in the version it names fails with 404.","tags":["invUnscheduledFixedAssets"]}},"/fixed-assets":{"get":{"operationId":"listFixedAssets","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber]","in":"query","required":false,"description":"Filter fixedAssetNumber (equality)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][ne]","in":"query","required":false,"description":"Filter fixedAssetNumber (ne)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][gt]","in":"query","required":false,"description":"Filter fixedAssetNumber (gt)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][gte]","in":"query","required":false,"description":"Filter fixedAssetNumber (gte)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][lt]","in":"query","required":false,"description":"Filter fixedAssetNumber (lt)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][lte]","in":"query","required":false,"description":"Filter fixedAssetNumber (lte)","schema":{"type":"string"}},{"name":"filter[fixedAssetNumber][in]","in":"query","required":false,"description":"Filter fixedAssetNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetNumber][notIn]","in":"query","required":false,"description":"Filter fixedAssetNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetNumber][between]","in":"query","required":false,"description":"Filter fixedAssetNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fixedAssetNumber][like]","in":"query","required":false,"description":"Filter fixedAssetNumber (like)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus]","in":"query","required":false,"description":"Filter fixedAssetStatus (equality)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][ne]","in":"query","required":false,"description":"Filter fixedAssetStatus (ne)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][gt]","in":"query","required":false,"description":"Filter fixedAssetStatus (gt)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][gte]","in":"query","required":false,"description":"Filter fixedAssetStatus (gte)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][lt]","in":"query","required":false,"description":"Filter fixedAssetStatus (lt)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][lte]","in":"query","required":false,"description":"Filter fixedAssetStatus (lte)","schema":{"type":"string"}},{"name":"filter[fixedAssetStatus][in]","in":"query","required":false,"description":"Filter fixedAssetStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetStatus][notIn]","in":"query","required":false,"description":"Filter fixedAssetStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[fixedAssetStatus][between]","in":"query","required":false,"description":"Filter fixedAssetStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[fixedAssetStatus][like]","in":"query","required":false,"description":"Filter fixedAssetStatus (like)","schema":{"type":"string"}},{"name":"filter[companyAssetId]","in":"query","required":false,"description":"Filter companyAssetId (equality)","schema":{"type":"string"}},{"name":"filter[companyAssetId][ne]","in":"query","required":false,"description":"Filter companyAssetId (ne)","schema":{"type":"string"}},{"name":"filter[companyAssetId][gt]","in":"query","required":false,"description":"Filter companyAssetId (gt)","schema":{"type":"string"}},{"name":"filter[companyAssetId][gte]","in":"query","required":false,"description":"Filter companyAssetId (gte)","schema":{"type":"string"}},{"name":"filter[companyAssetId][lt]","in":"query","required":false,"description":"Filter companyAssetId (lt)","schema":{"type":"string"}},{"name":"filter[companyAssetId][lte]","in":"query","required":false,"description":"Filter companyAssetId (lte)","schema":{"type":"string"}},{"name":"filter[companyAssetId][in]","in":"query","required":false,"description":"Filter companyAssetId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[companyAssetId][notIn]","in":"query","required":false,"description":"Filter companyAssetId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[companyAssetId][between]","in":"query","required":false,"description":"Filter companyAssetId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[companyAssetId][like]","in":"query","required":false,"description":"Filter companyAssetId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[assetStatus]","in":"query","required":false,"description":"Filter assetStatus (equality)","schema":{"type":"string"}},{"name":"filter[assetStatus][ne]","in":"query","required":false,"description":"Filter assetStatus (ne)","schema":{"type":"string"}},{"name":"filter[assetStatus][gt]","in":"query","required":false,"description":"Filter assetStatus (gt)","schema":{"type":"string"}},{"name":"filter[assetStatus][gte]","in":"query","required":false,"description":"Filter assetStatus (gte)","schema":{"type":"string"}},{"name":"filter[assetStatus][lt]","in":"query","required":false,"description":"Filter assetStatus (lt)","schema":{"type":"string"}},{"name":"filter[assetStatus][lte]","in":"query","required":false,"description":"Filter assetStatus (lte)","schema":{"type":"string"}},{"name":"filter[assetStatus][in]","in":"query","required":false,"description":"Filter assetStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[assetStatus][notIn]","in":"query","required":false,"description":"Filter assetStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[assetStatus][between]","in":"query","required":false,"description":"Filter assetStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[assetStatus][like]","in":"query","required":false,"description":"Filter assetStatus (like)","schema":{"type":"string"}},{"name":"filter[acquisitionDate]","in":"query","required":false,"description":"Filter acquisitionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][ne]","in":"query","required":false,"description":"Filter acquisitionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][gt]","in":"query","required":false,"description":"Filter acquisitionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][gte]","in":"query","required":false,"description":"Filter acquisitionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][lt]","in":"query","required":false,"description":"Filter acquisitionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][lte]","in":"query","required":false,"description":"Filter acquisitionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[acquisitionDate][in]","in":"query","required":false,"description":"Filter acquisitionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[acquisitionDate][notIn]","in":"query","required":false,"description":"Filter acquisitionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[acquisitionDate][between]","in":"query","required":false,"description":"Filter acquisitionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId]","in":"query","required":false,"description":"Filter departmentId (equality)","schema":{"type":"string"}},{"name":"filter[departmentId][ne]","in":"query","required":false,"description":"Filter departmentId (ne)","schema":{"type":"string"}},{"name":"filter[departmentId][gt]","in":"query","required":false,"description":"Filter departmentId (gt)","schema":{"type":"string"}},{"name":"filter[departmentId][gte]","in":"query","required":false,"description":"Filter departmentId (gte)","schema":{"type":"string"}},{"name":"filter[departmentId][lt]","in":"query","required":false,"description":"Filter departmentId (lt)","schema":{"type":"string"}},{"name":"filter[departmentId][lte]","in":"query","required":false,"description":"Filter departmentId (lte)","schema":{"type":"string"}},{"name":"filter[departmentId][in]","in":"query","required":false,"description":"Filter departmentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][notIn]","in":"query","required":false,"description":"Filter departmentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][between]","in":"query","required":false,"description":"Filter departmentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId][like]","in":"query","required":false,"description":"Filter departmentId (like)","schema":{"type":"string"}},{"name":"filter[businessUnitId]","in":"query","required":false,"description":"Filter businessUnitId (equality)","schema":{"type":"string"}},{"name":"filter[businessUnitId][ne]","in":"query","required":false,"description":"Filter businessUnitId (ne)","schema":{"type":"string"}},{"name":"filter[businessUnitId][gt]","in":"query","required":false,"description":"Filter businessUnitId (gt)","schema":{"type":"string"}},{"name":"filter[businessUnitId][gte]","in":"query","required":false,"description":"Filter businessUnitId (gte)","schema":{"type":"string"}},{"name":"filter[businessUnitId][lt]","in":"query","required":false,"description":"Filter businessUnitId (lt)","schema":{"type":"string"}},{"name":"filter[businessUnitId][lte]","in":"query","required":false,"description":"Filter businessUnitId (lte)","schema":{"type":"string"}},{"name":"filter[businessUnitId][in]","in":"query","required":false,"description":"Filter businessUnitId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[businessUnitId][notIn]","in":"query","required":false,"description":"Filter businessUnitId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[businessUnitId][between]","in":"query","required":false,"description":"Filter businessUnitId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[businessUnitId][like]","in":"query","required":false,"description":"Filter businessUnitId (like)","schema":{"type":"string"}},{"name":"filter[typeId]","in":"query","required":false,"description":"Filter typeId (equality)","schema":{"type":"string"}},{"name":"filter[typeId][ne]","in":"query","required":false,"description":"Filter typeId (ne)","schema":{"type":"string"}},{"name":"filter[typeId][gt]","in":"query","required":false,"description":"Filter typeId (gt)","schema":{"type":"string"}},{"name":"filter[typeId][gte]","in":"query","required":false,"description":"Filter typeId (gte)","schema":{"type":"string"}},{"name":"filter[typeId][lt]","in":"query","required":false,"description":"Filter typeId (lt)","schema":{"type":"string"}},{"name":"filter[typeId][lte]","in":"query","required":false,"description":"Filter typeId (lte)","schema":{"type":"string"}},{"name":"filter[typeId][in]","in":"query","required":false,"description":"Filter typeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[typeId][notIn]","in":"query","required":false,"description":"Filter typeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[typeId][between]","in":"query","required":false,"description":"Filter typeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[typeId][like]","in":"query","required":false,"description":"Filter typeId (like)","schema":{"type":"string"}},{"name":"filter[bookId]","in":"query","required":false,"description":"Filter bookId (equality)","schema":{"type":"string"}},{"name":"filter[bookId][ne]","in":"query","required":false,"description":"Filter bookId (ne)","schema":{"type":"string"}},{"name":"filter[bookId][gt]","in":"query","required":false,"description":"Filter bookId (gt)","schema":{"type":"string"}},{"name":"filter[bookId][gte]","in":"query","required":false,"description":"Filter bookId (gte)","schema":{"type":"string"}},{"name":"filter[bookId][lt]","in":"query","required":false,"description":"Filter bookId (lt)","schema":{"type":"string"}},{"name":"filter[bookId][lte]","in":"query","required":false,"description":"Filter bookId (lte)","schema":{"type":"string"}},{"name":"filter[bookId][in]","in":"query","required":false,"description":"Filter bookId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][notIn]","in":"query","required":false,"description":"Filter bookId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bookId][between]","in":"query","required":false,"description":"Filter bookId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bookId][like]","in":"query","required":false,"description":"Filter bookId (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[inServiceDate]","in":"query","required":false,"description":"Filter inServiceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][ne]","in":"query","required":false,"description":"Filter inServiceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][gt]","in":"query","required":false,"description":"Filter inServiceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][gte]","in":"query","required":false,"description":"Filter inServiceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][lt]","in":"query","required":false,"description":"Filter inServiceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][lte]","in":"query","required":false,"description":"Filter inServiceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[inServiceDate][in]","in":"query","required":false,"description":"Filter inServiceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[inServiceDate][notIn]","in":"query","required":false,"description":"Filter inServiceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[inServiceDate][between]","in":"query","required":false,"description":"Filter inServiceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationMethod]","in":"query","required":false,"description":"Filter depreciationMethod (equality)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][ne]","in":"query","required":false,"description":"Filter depreciationMethod (ne)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][gt]","in":"query","required":false,"description":"Filter depreciationMethod (gt)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][gte]","in":"query","required":false,"description":"Filter depreciationMethod (gte)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][lt]","in":"query","required":false,"description":"Filter depreciationMethod (lt)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][lte]","in":"query","required":false,"description":"Filter depreciationMethod (lte)","schema":{"type":"string"}},{"name":"filter[depreciationMethod][in]","in":"query","required":false,"description":"Filter depreciationMethod (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationMethod][notIn]","in":"query","required":false,"description":"Filter depreciationMethod (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationMethod][between]","in":"query","required":false,"description":"Filter depreciationMethod (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationMethod][like]","in":"query","required":false,"description":"Filter depreciationMethod (like)","schema":{"type":"string"}},{"name":"filter[depreciationInterval]","in":"query","required":false,"description":"Filter depreciationInterval (equality)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][ne]","in":"query","required":false,"description":"Filter depreciationInterval (ne)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][gt]","in":"query","required":false,"description":"Filter depreciationInterval (gt)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][gte]","in":"query","required":false,"description":"Filter depreciationInterval (gte)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][lt]","in":"query","required":false,"description":"Filter depreciationInterval (lt)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][lte]","in":"query","required":false,"description":"Filter depreciationInterval (lte)","schema":{"type":"string"}},{"name":"filter[depreciationInterval][in]","in":"query","required":false,"description":"Filter depreciationInterval (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationInterval][notIn]","in":"query","required":false,"description":"Filter depreciationInterval (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationInterval][between]","in":"query","required":false,"description":"Filter depreciationInterval (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationInterval][like]","in":"query","required":false,"description":"Filter depreciationInterval (like)","schema":{"type":"string"}},{"name":"filter[depreciationStatus]","in":"query","required":false,"description":"Filter depreciationStatus (equality)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][ne]","in":"query","required":false,"description":"Filter depreciationStatus (ne)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][gt]","in":"query","required":false,"description":"Filter depreciationStatus (gt)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][gte]","in":"query","required":false,"description":"Filter depreciationStatus (gte)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][lt]","in":"query","required":false,"description":"Filter depreciationStatus (lt)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][lte]","in":"query","required":false,"description":"Filter depreciationStatus (lte)","schema":{"type":"string"}},{"name":"filter[depreciationStatus][in]","in":"query","required":false,"description":"Filter depreciationStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationStatus][notIn]","in":"query","required":false,"description":"Filter depreciationStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[depreciationStatus][between]","in":"query","required":false,"description":"Filter depreciationStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[depreciationStatus][like]","in":"query","required":false,"description":"Filter depreciationStatus (like)","schema":{"type":"string"}},{"name":"filter[disposalDate]","in":"query","required":false,"description":"Filter disposalDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][ne]","in":"query","required":false,"description":"Filter disposalDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][gt]","in":"query","required":false,"description":"Filter disposalDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][gte]","in":"query","required":false,"description":"Filter disposalDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][lt]","in":"query","required":false,"description":"Filter disposalDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][lte]","in":"query","required":false,"description":"Filter disposalDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[disposalDate][in]","in":"query","required":false,"description":"Filter disposalDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[disposalDate][notIn]","in":"query","required":false,"description":"Filter disposalDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[disposalDate][between]","in":"query","required":false,"description":"Filter disposalDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","fixedAssetNumber","-fixedAssetNumber","inServiceDate","-inServiceDate","acquisitionDate","-acquisitionDate","acquisitionValueAmount","-acquisitionValueAmount","remainingValue","-remainingValue","depreciatedAmount","-depreciatedAmount","disposalDate","-disposalDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","fixedAssetNumber","fixedAssetStatus","companyAssetId","name","entityId","assetStatus","assetNumber","serialNumber","assetTag","acquisitionDate","departmentId","businessUnitId","typeId","typeName","bookId","currency","inServiceDate","depreciationMethod","depreciationInterval","depreciationConvention","depreciationStatus","degressionRate","acquisitionValueAmount","acquisitionValueCurrency","salvageValueAmount","salvageValueCurrency","depreciationStartValueAmount","depreciableAmount","depreciatedAmount","initialDepreciatedAmount","remainingValue","disposalDate","disposalAmount","disposalEntryId","disposalEntryNumber","soldAmountAmount","soldAmountCurrency","saleEntryId","saleEntryNumber","saleReceivingAccountId","revenueAccountId","saleDocumentId","saleDocumentNumber","vatPercentageId","valueAllocationId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/listFixedAssetsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List fixed assets","description":"Lists fixed assets.\n\nThe list does not include `sources`, the journal entry lines a fixed asset was registered from. GET fixed-assets/:id and POST fixed-assets/search return them.\n\nVoided assets are not included, even if you filter `fixedAssetStatus` on 'voided'.\n\nAmounts are in each asset's own `currency` and are not converted. The exception is `soldAmountAmount`, which is in `soldAmountCurrency`. An asset recorded in more than one book has one fixed asset in each. Filter `bookId` before you add up amounts.\n\nA page has 25 fixed assets by default and at most 100. A larger `page[size]` is treated as 100.\n\nTo include voided assets, use `POST fixed-assets/search`. To read a voided asset by its id, use `GET fixed-assets/:id`. To filter by `name`, `assetTag`, `assetNumber`, or `serialNumber`, use `POST fixed-assets/search`.","tags":["invFixedAssets"]},"post":{"operationId":"createFixedAsset","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createFixedAssetOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"fromDraft":{"value":{"data":{"id":"52e7c0a9-1d84-4b36-9f20-8c3a6b15e7d4"}},"summary":"Register a draft saved on the Unscheduled tab, choosing its type and a degressive method"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCED_RECORD_NOT_FOUND, INVALID_FIELD_VALUE, FIELD_REQUIRED, FIELD_NOT_APPLICABLE, NOT_ELIGIBLE, FIXED_ASSET_LINE_ALREADY_HELD, FIXED_ASSET_TYPE_REQUIRED, FIXED_ASSET_TYPE_NOT_ALLOWED, FIXED_ASSET_TYPE_NOT_ASSOCIATED_WITH_BOOK, DEPRECIATION_POLICY_NOT_FOUND, UNSUPPORTED_DEPRECIATION_CONVENTION, VALIDATION_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ELIGIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_LINE_ALREADY_HELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"allowedTypeIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["allowedTypeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"allowedTypeIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["allowedTypeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ASSOCIATED_WITH_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"},"depreciationConvention":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ELIGIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_LINE_ALREADY_HELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"allowedTypeIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["allowedTypeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"allowedTypeIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["allowedTypeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ASSOCIATED_WITH_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"},"depreciationConvention":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCED_RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ELIGIBLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_LINE_ALREADY_HELD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"allowedTypeIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["allowedTypeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"allowedTypeIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["allowedTypeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_ASSET_TYPE_NOT_ASSOCIATED_WITH_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DEPRECIATION_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DEPRECIATION_CONVENTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"depreciationMethod":{"type":"string"},"depreciationConvention":{"type":"string"}},"additionalProperties":false,"required":["depreciationMethod"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALIDATION_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"rule":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createFixedAssetInput"},"examples":{"fromDraft":{"value":{"draftFixedAssetId":"52e7c0a9-1d84-4b36-9f20-8c3a6b15e7d4","typeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","depreciationMethod":"Degressive","depreciationConvention":"FullMonth","degressionRate":"0.25"},"summary":"Register a draft saved on the Unscheduled tab, choosing its type and a degressive method"}}}}},"summary":"Register a fixed asset","description":"Registers a fixed asset from the Unscheduled list, the same as publishing a row of the Unscheduled tab of the fixed assets page in Lensing. The fixed asset gets its depreciation schedule. Registering posts nothing: depreciation is recorded with POST fixed-assets/depreciation-schedules/record.\n\nSend exactly one of `sourceJournalEntryLineId` or `draftFixedAssetId`. Take either from GET unscheduled-fixed-assets: a row of kind 'journalEntryLine' gives its id as `sourceJournalEntryLineId`, a row of kind 'draft' as `draftFixedAssetId`. There is no way to create a fixed asset without a source.\n\nFrom a journal entry line: the line is linked to the fixed asset as its source. The line decides the legal entity, the accounting book (its journal entry's), the currency, the acquisition value (the line's amount) and the acquisition date (the line's transaction date). The in-service date defaults to the line's transaction date. The name defaults to the asset's name in another book, or else the line's description. The department and business unit default to the line's. With reporting tags on, the fixed asset takes all of the line's tags, and a departmentId or businessUnitId you send replaces that tag.\n\nFrom a draft: the draft is published and keeps its id, its source lines, legal entity, book, currency, acquisition value and acquisition date. Every other value defaults to what the draft holds, and the values you send replace them.\n\n`typeId` is optional. The types you can use are the ones a depreciation policy of the book covers for the source line's account (for a draft with no source line, every type the book's policies cover), listed in `allowedTypes` on GET unscheduled-fixed-assets/:id. A draft's saved type stays allowed while its rule is unavailable. When you leave typeId out, the type is the row's `defaultTypeId`: the draft's saved type while it is allowed, or else the only type that qualifies. When there is no default, the request fails with FIXED_ASSET_TYPE_REQUIRED, which lists the types you can send.\n\nWhen you leave out `depreciationMethod`, `depreciationInterval` or `depreciationConvention`, the fixed asset takes the draft's value, or else the depreciation policy's for its type.\n\nThe depreciation schedule is calculated from `inServiceDate` over the useful life the depreciation policy sets for the type. The accounting periods of the legal entity's book must cover the whole schedule, or the request fails with VALIDATION_FAILED and the rule 'accountingPeriodsNotGenerated'.\n\nYou cannot set the asset status: a registered asset starts as 'available' (a draft keeps the status saved on it). Change it afterwards with PATCH fixed-assets/:id. Sending `bookId`, `assetStatus`, `entityId`, `currency`, `acquisitionValueAmount` or `acquisitionDate` is rejected with HTTP 400 and no code, because the body has an unexpected property.\n\nThe response contains only the fixed asset's id. Read it with GET fixed-assets/:id; its `sources` name the journal entry lines it was registered from.\n\nEvery error code declared for this endpoint is returned with HTTP status 400; branch on the code. A request turned away before the action runs carries no code: 401 when the credentials are missing or invalid, 403 when the access token does not hold this endpoint's permission task, and 400 when the body does not match the input schema, for example an unexpected property. The Api-Version header is required: a missing or empty header, or one that names no published version, fails with 400, and a route that does not exist in the version it names fails with 404.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["invFixedAssets"]}},"/inventory/sales-returns/search":{"post":{"operationId":"searchSalesReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSalesReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byRmaNumber":{"value":{"data":{"items":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}],"pagination":{"hasMore":false}}},"summary":"The return behind a customer's RMA number — the support desk's question"},"oneCustomersReturns":{"value":{"data":{"items":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"INSPECTED","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-19T15:10:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"0.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit","inspectedQuantity":"6.00","approvedQuantity":"2.00","rejectedQuantity":"4.00","inspectedDate":"2026-08-19","qualityGrade":"C","rejectionReason":"Water ingress","inspectionDetails":[{"approvalStatus":"APPROVED","inspectedQuantity":"2.00","condition":"GOOD","disposition":"RETURN_TO_STOCK"},{"approvalStatus":"REJECTED","inspectedQuantity":"4.00","condition":"DAMAGED","disposition":"SCRAP","rejectionReason":"Water ingress"}]}]}],"pagination":{"hasMore":false}}},"summary":"Everything one customer has sent back this month"},"theInspectionQueue":{"value":{"data":{"items":[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}],"pagination":{"hasMore":false}}},"summary":"Every return whose goods are back and awaiting inspection"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSalesReturnsInput"},"examples":{"byRmaNumber":{"value":{"filters":{"referenceNumber":"RMA-2026-0087"}},"summary":"The return behind a customer's RMA number — the support desk's question"},"oneCustomersReturns":{"value":{"filters":{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Everything one customer has sent back this month"},"theInspectionQueue":{"value":{"filters":{"documentStatus":"RECEIVED"}},"summary":"Every return whose goods are back and awaiting inspection"}}}}},"summary":"Search sales returns","description":"Searches sales returns. Each return comes back with its lines, including their batches, serials, bins, and inspection details, in the same shape as GET inventory/sales-returns/:id.\n\nOnly this endpoint filters by customer, reference number, tracking number, item, or warehouse. A return matches itemId or locationId when any of its lines has that item or warehouse.","tags":["inventorySalesReturns"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/item-attribute-definitions":{"post":{"operationId":"createItemAttributeDefinition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createItemAttributeDefinitionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"colour":{"value":{"data":{"id":"c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48","name":"Colour","description":"Product colour","valueType":"TEXT","values":[{"id":"2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03","value":"Red"},{"id":"8e1a5c39-4b62-4d17-9f08-3a7c21d5e690","value":"Green"},{"id":"5d92f7b1-6c04-4e83-a215-9b83f4e07c2d","value":"Blue"}]}},"summary":"A text attribute with three allowed values"},"numeric":{"value":{"data":{"id":"a3f19d84-7c25-4e61-b0d9-2f8e4a6c1573","name":"Weight","valueType":"NUMBER","values":[{"id":"6b4e2a97-1d38-4c50-8e72-9a5f3b1c8d04","value":"25"},{"id":"f0c85d13-9e47-42b6-a381-7d2b6e904f5a","value":"50.5"}]}},"summary":"A numeric attribute — every value must parse as a number"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_NAME, UNKNOWN_VALUE_TYPE, NON_NUMERIC_VALUE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_NUMERIC_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_NUMERIC_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_NUMERIC_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":["value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createItemAttributeDefinitionInput"},"examples":{"colour":{"value":{"name":"Colour","description":"Product colour","valueType":"TEXT","values":["Red","Green","Blue"]},"summary":"A text attribute with three allowed values"},"numeric":{"value":{"name":"Weight","valueType":"NUMBER","values":["25","50.5"]},"summary":"A numeric attribute — every value must parse as a number"}}}}},"summary":"Create an item attribute","description":"Creates an item attribute and, in the same request, the values it allows. The attribute's name is unique within the tenant: a name already in use fails with DUPLICATE_NAME. valueType is TEXT or NUMBER and defaults to TEXT; under NUMBER every value must parse as a number, so 'Red' fails with NON_NUMERIC_VALUE rather than being stored as a value nothing can read. This is the only route on item attribute definitions: there is no read, update or delete, so an attribute created here is afterward maintained through the Item Attributes screen or a CSV upload.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItemAttributeDefinitions"]}},"/people/applications":{"get":{"operationId":"applications","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[recruitmentId]","in":"query","required":false,"description":"Filter recruitmentId (equality)","schema":{"type":"string"}},{"name":"filter[recruitmentId][ne]","in":"query","required":false,"description":"Filter recruitmentId (ne)","schema":{"type":"string"}},{"name":"filter[recruitmentId][gt]","in":"query","required":false,"description":"Filter recruitmentId (gt)","schema":{"type":"string"}},{"name":"filter[recruitmentId][gte]","in":"query","required":false,"description":"Filter recruitmentId (gte)","schema":{"type":"string"}},{"name":"filter[recruitmentId][lt]","in":"query","required":false,"description":"Filter recruitmentId (lt)","schema":{"type":"string"}},{"name":"filter[recruitmentId][lte]","in":"query","required":false,"description":"Filter recruitmentId (lte)","schema":{"type":"string"}},{"name":"filter[recruitmentId][in]","in":"query","required":false,"description":"Filter recruitmentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recruitmentId][notIn]","in":"query","required":false,"description":"Filter recruitmentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recruitmentId][between]","in":"query","required":false,"description":"Filter recruitmentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[recruitmentId][like]","in":"query","required":false,"description":"Filter recruitmentId (like)","schema":{"type":"string"}},{"name":"filter[recruitmentName]","in":"query","required":false,"description":"Filter recruitmentName (equality)","schema":{"type":"string"}},{"name":"filter[recruitmentName][ne]","in":"query","required":false,"description":"Filter recruitmentName (ne)","schema":{"type":"string"}},{"name":"filter[recruitmentName][gt]","in":"query","required":false,"description":"Filter recruitmentName (gt)","schema":{"type":"string"}},{"name":"filter[recruitmentName][gte]","in":"query","required":false,"description":"Filter recruitmentName (gte)","schema":{"type":"string"}},{"name":"filter[recruitmentName][lt]","in":"query","required":false,"description":"Filter recruitmentName (lt)","schema":{"type":"string"}},{"name":"filter[recruitmentName][lte]","in":"query","required":false,"description":"Filter recruitmentName (lte)","schema":{"type":"string"}},{"name":"filter[recruitmentName][in]","in":"query","required":false,"description":"Filter recruitmentName (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recruitmentName][notIn]","in":"query","required":false,"description":"Filter recruitmentName (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[recruitmentName][between]","in":"query","required":false,"description":"Filter recruitmentName (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[recruitmentName][like]","in":"query","required":false,"description":"Filter recruitmentName (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[source]","in":"query","required":false,"description":"Filter source (equality)","schema":{"type":"string"}},{"name":"filter[source][ne]","in":"query","required":false,"description":"Filter source (ne)","schema":{"type":"string"}},{"name":"filter[source][gt]","in":"query","required":false,"description":"Filter source (gt)","schema":{"type":"string"}},{"name":"filter[source][gte]","in":"query","required":false,"description":"Filter source (gte)","schema":{"type":"string"}},{"name":"filter[source][lt]","in":"query","required":false,"description":"Filter source (lt)","schema":{"type":"string"}},{"name":"filter[source][lte]","in":"query","required":false,"description":"Filter source (lte)","schema":{"type":"string"}},{"name":"filter[source][in]","in":"query","required":false,"description":"Filter source (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[source][notIn]","in":"query","required":false,"description":"Filter source (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[source][between]","in":"query","required":false,"description":"Filter source (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[source][like]","in":"query","required":false,"description":"Filter source (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","applicantNumber","-applicantNumber","recruitmentName","-recruitmentName","status","-status","source","-source","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","applicantNumber","name","email","personId","recruitmentId","recruitmentName","positionName","status","source","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/applicationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List applications","description":"Lists applications. Create one with POST people/applications, or create a new applicant and their first application with POST people/applicants.","tags":["hrApplications"]},"post":{"operationId":"createApplication","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createApplicationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PERSON_NOT_FOUND, RECRUITMENT_NOT_FOUND, DUPLICATE_APPLICATION","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PERSON_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PERSON_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PERSON_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createApplicationInput"}}}},"summary":"Create an application","description":"Creates an application. An application links one person to one recruitment. The application's recruiter is the recruitment's owner.\n\nA person can't have a second application in status 'new' or 'inProcess' for the same recruitment.\n\nTo apply a person who doesn't exist yet, use POST people/applicants.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrApplications"]}},"/people/positions/{id}/remove-permissions":{"post":{"operationId":"removePositionPermissions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/removePositionPermissionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PERMISSIONS_NOT_PROVIDED, ROLES_NOT_FOUND, TASKS_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/removePositionPermissionsInput"}}}},"summary":"Remove roles and tasks from a position","description":"Removes roles and tasks from a position.","tags":["hrPositions"]}},"/people/absences/search":{"post":{"operationId":"searchAbsences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAbsencesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAbsencesInput"}}}},"summary":"Search absences","description":"Searches absences.","tags":["hrAbsences"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/ad-hoc-documents":{"get":{"operationId":"adHocDocuments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[invoiceDate]","in":"query","required":false,"description":"Filter invoiceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][ne]","in":"query","required":false,"description":"Filter invoiceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][gt]","in":"query","required":false,"description":"Filter invoiceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][gte]","in":"query","required":false,"description":"Filter invoiceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][lt]","in":"query","required":false,"description":"Filter invoiceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][lte]","in":"query","required":false,"description":"Filter invoiceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][in]","in":"query","required":false,"description":"Filter invoiceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceDate][notIn]","in":"query","required":false,"description":"Filter invoiceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceDate][between]","in":"query","required":false,"description":"Filter invoiceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceDate]","in":"query","required":false,"description":"Filter serviceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][ne]","in":"query","required":false,"description":"Filter serviceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gt]","in":"query","required":false,"description":"Filter serviceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gte]","in":"query","required":false,"description":"Filter serviceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lt]","in":"query","required":false,"description":"Filter serviceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lte]","in":"query","required":false,"description":"Filter serviceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][in]","in":"query","required":false,"description":"Filter serviceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][notIn]","in":"query","required":false,"description":"Filter serviceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][between]","in":"query","required":false,"description":"Filter serviceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[paymentStatus]","in":"query","required":false,"description":"Filter paymentStatus (equality)","schema":{"type":"string"}},{"name":"filter[paymentStatus][ne]","in":"query","required":false,"description":"Filter paymentStatus (ne)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gt]","in":"query","required":false,"description":"Filter paymentStatus (gt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gte]","in":"query","required":false,"description":"Filter paymentStatus (gte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lt]","in":"query","required":false,"description":"Filter paymentStatus (lt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lte]","in":"query","required":false,"description":"Filter paymentStatus (lte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][in]","in":"query","required":false,"description":"Filter paymentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][notIn]","in":"query","required":false,"description":"Filter paymentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][between]","in":"query","required":false,"description":"Filter paymentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentStatus][like]","in":"query","required":false,"description":"Filter paymentStatus (like)","schema":{"type":"string"}},{"name":"filter[hasAttachment]","in":"query","required":false,"description":"Filter hasAttachment (equality)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][ne]","in":"query","required":false,"description":"Filter hasAttachment (ne)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][gt]","in":"query","required":false,"description":"Filter hasAttachment (gt)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][gte]","in":"query","required":false,"description":"Filter hasAttachment (gte)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][lt]","in":"query","required":false,"description":"Filter hasAttachment (lt)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][lte]","in":"query","required":false,"description":"Filter hasAttachment (lte)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][in]","in":"query","required":false,"description":"Filter hasAttachment (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasAttachment][notIn]","in":"query","required":false,"description":"Filter hasAttachment (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasAttachment][between]","in":"query","required":false,"description":"Filter hasAttachment (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountId]","in":"query","required":false,"description":"Filter accountId (equality)","schema":{"type":"string"}},{"name":"filter[accountId][ne]","in":"query","required":false,"description":"Filter accountId (ne)","schema":{"type":"string"}},{"name":"filter[accountId][gt]","in":"query","required":false,"description":"Filter accountId (gt)","schema":{"type":"string"}},{"name":"filter[accountId][gte]","in":"query","required":false,"description":"Filter accountId (gte)","schema":{"type":"string"}},{"name":"filter[accountId][lt]","in":"query","required":false,"description":"Filter accountId (lt)","schema":{"type":"string"}},{"name":"filter[accountId][lte]","in":"query","required":false,"description":"Filter accountId (lte)","schema":{"type":"string"}},{"name":"filter[accountId][in]","in":"query","required":false,"description":"Filter accountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountId][notIn]","in":"query","required":false,"description":"Filter accountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountId][between]","in":"query","required":false,"description":"Filter accountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountId][like]","in":"query","required":false,"description":"Filter accountId (like)","schema":{"type":"string"}},{"name":"filter[postingPeriodId]","in":"query","required":false,"description":"Filter postingPeriodId (equality)","schema":{"type":"string"}},{"name":"filter[postingPeriodId][ne]","in":"query","required":false,"description":"Filter postingPeriodId (ne)","schema":{"type":"string"}},{"name":"filter[postingPeriodId][gt]","in":"query","required":false,"description":"Filter postingPeriodId (gt)","schema":{"type":"string"}},{"name":"filter[postingPeriodId][gte]","in":"query","required":false,"description":"Filter postingPeriodId (gte)","schema":{"type":"string"}},{"name":"filter[postingPeriodId][lt]","in":"query","required":false,"description":"Filter postingPeriodId (lt)","schema":{"type":"string"}},{"name":"filter[postingPeriodId][lte]","in":"query","required":false,"description":"Filter postingPeriodId (lte)","schema":{"type":"string"}},{"name":"filter[postingPeriodId][in]","in":"query","required":false,"description":"Filter postingPeriodId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postingPeriodId][notIn]","in":"query","required":false,"description":"Filter postingPeriodId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postingPeriodId][between]","in":"query","required":false,"description":"Filter postingPeriodId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[postingPeriodId][like]","in":"query","required":false,"description":"Filter postingPeriodId (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[vendorId]","in":"query","required":false,"description":"Filter vendorId (equality)","schema":{"type":"string"}},{"name":"filter[vendorId][ne]","in":"query","required":false,"description":"Filter vendorId (ne)","schema":{"type":"string"}},{"name":"filter[vendorId][gt]","in":"query","required":false,"description":"Filter vendorId (gt)","schema":{"type":"string"}},{"name":"filter[vendorId][gte]","in":"query","required":false,"description":"Filter vendorId (gte)","schema":{"type":"string"}},{"name":"filter[vendorId][lt]","in":"query","required":false,"description":"Filter vendorId (lt)","schema":{"type":"string"}},{"name":"filter[vendorId][lte]","in":"query","required":false,"description":"Filter vendorId (lte)","schema":{"type":"string"}},{"name":"filter[vendorId][in]","in":"query","required":false,"description":"Filter vendorId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorId][notIn]","in":"query","required":false,"description":"Filter vendorId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorId][between]","in":"query","required":false,"description":"Filter vendorId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorId][like]","in":"query","required":false,"description":"Filter vendorId (like)","schema":{"type":"string"}},{"name":"filter[employeeId]","in":"query","required":false,"description":"Filter employeeId (equality)","schema":{"type":"string"}},{"name":"filter[employeeId][ne]","in":"query","required":false,"description":"Filter employeeId (ne)","schema":{"type":"string"}},{"name":"filter[employeeId][gt]","in":"query","required":false,"description":"Filter employeeId (gt)","schema":{"type":"string"}},{"name":"filter[employeeId][gte]","in":"query","required":false,"description":"Filter employeeId (gte)","schema":{"type":"string"}},{"name":"filter[employeeId][lt]","in":"query","required":false,"description":"Filter employeeId (lt)","schema":{"type":"string"}},{"name":"filter[employeeId][lte]","in":"query","required":false,"description":"Filter employeeId (lte)","schema":{"type":"string"}},{"name":"filter[employeeId][in]","in":"query","required":false,"description":"Filter employeeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][notIn]","in":"query","required":false,"description":"Filter employeeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][between]","in":"query","required":false,"description":"Filter employeeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId][like]","in":"query","required":false,"description":"Filter employeeId (like)","schema":{"type":"string"}},{"name":"filter[intercompanyEntityId]","in":"query","required":false,"description":"Filter intercompanyEntityId (equality)","schema":{"type":"string"}},{"name":"filter[intercompanyEntityId][ne]","in":"query","required":false,"description":"Filter intercompanyEntityId (ne)","schema":{"type":"string"}},{"name":"filter[intercompanyEntityId][gt]","in":"query","required":false,"description":"Filter intercompanyEntityId (gt)","schema":{"type":"string"}},{"name":"filter[intercompanyEntityId][gte]","in":"query","required":false,"description":"Filter intercompanyEntityId (gte)","schema":{"type":"string"}},{"name":"filter[intercompanyEntityId][lt]","in":"query","required":false,"description":"Filter intercompanyEntityId (lt)","schema":{"type":"string"}},{"name":"filter[intercompanyEntityId][lte]","in":"query","required":false,"description":"Filter intercompanyEntityId (lte)","schema":{"type":"string"}},{"name":"filter[intercompanyEntityId][in]","in":"query","required":false,"description":"Filter intercompanyEntityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[intercompanyEntityId][notIn]","in":"query","required":false,"description":"Filter intercompanyEntityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[intercompanyEntityId][between]","in":"query","required":false,"description":"Filter intercompanyEntityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[intercompanyEntityId][like]","in":"query","required":false,"description":"Filter intercompanyEntityId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[totalTaxAmount]","in":"query","required":false,"description":"Filter totalTaxAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][ne]","in":"query","required":false,"description":"Filter totalTaxAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][gt]","in":"query","required":false,"description":"Filter totalTaxAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][gte]","in":"query","required":false,"description":"Filter totalTaxAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][lt]","in":"query","required":false,"description":"Filter totalTaxAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][lte]","in":"query","required":false,"description":"Filter totalTaxAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][in]","in":"query","required":false,"description":"Filter totalTaxAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalTaxAmount][notIn]","in":"query","required":false,"description":"Filter totalTaxAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalTaxAmount][between]","in":"query","required":false,"description":"Filter totalTaxAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalAmount]","in":"query","required":false,"description":"Filter totalAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][ne]","in":"query","required":false,"description":"Filter totalAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][gt]","in":"query","required":false,"description":"Filter totalAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][gte]","in":"query","required":false,"description":"Filter totalAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][lt]","in":"query","required":false,"description":"Filter totalAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][lte]","in":"query","required":false,"description":"Filter totalAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][in]","in":"query","required":false,"description":"Filter totalAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAmount][notIn]","in":"query","required":false,"description":"Filter totalAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAmount][between]","in":"query","required":false,"description":"Filter totalAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalAllocatedAmount]","in":"query","required":false,"description":"Filter totalAllocatedAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][ne]","in":"query","required":false,"description":"Filter totalAllocatedAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][gt]","in":"query","required":false,"description":"Filter totalAllocatedAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][gte]","in":"query","required":false,"description":"Filter totalAllocatedAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][lt]","in":"query","required":false,"description":"Filter totalAllocatedAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][lte]","in":"query","required":false,"description":"Filter totalAllocatedAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][in]","in":"query","required":false,"description":"Filter totalAllocatedAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAllocatedAmount][notIn]","in":"query","required":false,"description":"Filter totalAllocatedAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAllocatedAmount][between]","in":"query","required":false,"description":"Filter totalAllocatedAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalOpenAmount]","in":"query","required":false,"description":"Filter totalOpenAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][ne]","in":"query","required":false,"description":"Filter totalOpenAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][gt]","in":"query","required":false,"description":"Filter totalOpenAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][gte]","in":"query","required":false,"description":"Filter totalOpenAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][lt]","in":"query","required":false,"description":"Filter totalOpenAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][lte]","in":"query","required":false,"description":"Filter totalOpenAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][in]","in":"query","required":false,"description":"Filter totalOpenAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalOpenAmount][notIn]","in":"query","required":false,"description":"Filter totalOpenAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalOpenAmount][between]","in":"query","required":false,"description":"Filter totalOpenAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","type","-type","invoiceDate","-invoiceDate","serviceDate","-serviceDate","dueDate","-dueDate","currency","-currency","paymentStatus","-paymentStatus","hasAttachment","-hasAttachment","accountId","-accountId","postingPeriodId","-postingPeriodId","customerId","-customerId","vendorId","-vendorId","employeeId","-employeeId","intercompanyEntityId","-intercompanyEntityId","entityId","-entityId","totalTaxAmount","-totalTaxAmount","totalAmount","-totalAmount","totalAllocatedAmount","-totalAllocatedAmount","totalOpenAmount","-totalOpenAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","type","taxDocumentNumber","documentNumber","title","description","invoiceDate","serviceDate","dueDate","currency","paymentStatus","paymentTerms","hasAttachment","accountId","postingPeriodId","customerId","customerName","customerNumber","vendorId","employeeId","intercompanyEntityId","entityId","entityName","totalTaxAmount","totalAmount","totalAllocatedAmount","totalOpenAmount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/adHocDocumentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List ad hoc documents.","description":"Lists ad hoc documents. Each row carries the document's scalar fields, including every uuid reference a create needs — the posting account, the posting period and the counterparty — but not its lines: a list row cannot hold a nested collection. For the full record with its lines use GET accounting/ad-hoc-documents/:id, and to match on a name, a number or free text use POST accounting/ad-hoc-documents/search.\n\nFilter with `filter[<field>][<op>]=`, order with `sort=`, project with `fields=` and page with `page[size]=` and `page[cursor]=`. A field not named in the route's filterable or orderable list is rejected; prose fields are deliberately absent from both, because naming one would grant `like` and turn this route into the free-text search that belongs in the body of POST accounting/ad-hoc-documents/search.\n\nThis resource replaces GET tax-documents/manual-taxable-documents, which is served in v1 only. Every request carries an `Api-Version` header; without it the request is rejected with 400, and a route that exists in another version answers 404.","tags":["taxDocumentAdHocDocuments"]},"post":{"operationId":"createAdHocDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAdHocDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, FIELD_REQUIRED, INVALID_FIELD_VALUE, INVALID_PARTNER, INVALID_ACCOUNT, INVALID_LINE_TAX, INVALID_REPORTING_TAG, ACCOUNTING_PERIOD_CLOSED, ENTITY_NOT_IN_BOOK, EXCHANGE_RATE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"resource":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","resource","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARTNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_LINE_TAX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineNumber":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["lineNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_REPORTING_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineNumber":{"type":"number"},"dimensionCode":{"type":"string"},"modelId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["lineNumber","dimensionCode","modelId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"invoiceDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["fromCurrency","toCurrency","invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"resource":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","resource","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARTNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_LINE_TAX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineNumber":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["lineNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_REPORTING_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineNumber":{"type":"number"},"dimensionCode":{"type":"string"},"modelId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["lineNumber","dimensionCode","modelId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"invoiceDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["fromCurrency","toCurrency","invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"resource":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","resource","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIELD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARTNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_LINE_TAX"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineNumber":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["lineNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_REPORTING_TAG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineNumber":{"type":"number"},"dimensionCode":{"type":"string"},"modelId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["lineNumber","dimensionCode","modelId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_IN_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXCHANGE_RATE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fromCurrency":{"type":"string"},"toCurrency":{"type":"string"},"invoiceDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["fromCurrency","toCurrency","invoiceDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAdHocDocumentInput"}}}},"summary":"Create an ad hoc document and post it.","description":"Creates an ad hoc document and posts it, in one call. The response is the new document's id and nothing else; read it back with GET accounting/ad-hoc-documents/:id for the fields the server filled in — the assigned taxDocumentNumber, the derived postingPeriodId and paymentStatus, and the computed totals.\n\nThere are no drafts over this API. A created document is posted: it draws a document number, books one journal entry per controlling book through the financial processor, stores its account mappings and recomputes its allocation balances. A document is changed afterwards only by voiding it with POST accounting/ad-hoc-documents/:id/void; there is no PATCH.\n\nSend exactly one counterparty — customerId, vendorId, employeeId or intercompanyEntityId. Every reference is a uuid. A field that does not apply is rejected rather than ignored, so a payload that names something this resource does not own comes back as an error instead of being silently dropped.\n\nEvery request carries an `Api-Version` header; without it the request is rejected with 400, and a route that exists in another version answers 404.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["taxDocumentAdHocDocuments"]}},"/people/absences":{"get":{"operationId":"absences","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[absenceTypeId]","in":"query","required":false,"description":"Filter absenceTypeId (equality)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][ne]","in":"query","required":false,"description":"Filter absenceTypeId (ne)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][gt]","in":"query","required":false,"description":"Filter absenceTypeId (gt)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][gte]","in":"query","required":false,"description":"Filter absenceTypeId (gte)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][lt]","in":"query","required":false,"description":"Filter absenceTypeId (lt)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][lte]","in":"query","required":false,"description":"Filter absenceTypeId (lte)","schema":{"type":"string"}},{"name":"filter[absenceTypeId][in]","in":"query","required":false,"description":"Filter absenceTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[absenceTypeId][notIn]","in":"query","required":false,"description":"Filter absenceTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[absenceTypeId][between]","in":"query","required":false,"description":"Filter absenceTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[absenceTypeId][like]","in":"query","required":false,"description":"Filter absenceTypeId (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[days]","in":"query","required":false,"description":"Filter days (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][ne]","in":"query","required":false,"description":"Filter days (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][gt]","in":"query","required":false,"description":"Filter days (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][gte]","in":"query","required":false,"description":"Filter days (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][lt]","in":"query","required":false,"description":"Filter days (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][lte]","in":"query","required":false,"description":"Filter days (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[days][in]","in":"query","required":false,"description":"Filter days (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[days][notIn]","in":"query","required":false,"description":"Filter days (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[days][between]","in":"query","required":false,"description":"Filter days (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","leaveNumber","-leaveNumber","startDate","-startDate","endDate","-endDate","days","-days","status","-status"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","leaveNumber","employeeId","absenceTypeId","startDate","endDate","days","status","leaveDescription"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/absencesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List absences","description":"Lists absences. To filter by employee or by text in the description, use POST people/absences/search.","tags":["hrAbsences"]},"post":{"operationId":"createAbsence","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAbsenceOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: EMPLOYEE_NOT_FOUND, ABSENCE_TYPE_NOT_FOUND, ABSENCE_TYPE_OR_POLICY_REQUIRED, ABSENCE_POLICY_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_OR_POLICY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyId":{"type":"string"}},"additionalProperties":false,"required":["absencePolicyId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_OR_POLICY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyId":{"type":"string"}},"additionalProperties":false,"required":["absencePolicyId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absenceTypeId":{"type":"string"}},"additionalProperties":false,"required":["absenceTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_TYPE_OR_POLICY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ABSENCE_POLICY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"absencePolicyId":{"type":"string"}},"additionalProperties":false,"required":["absencePolicyId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAbsenceInput"}}}},"summary":"Create an absence","description":"Creates an absence. The response contains only the new absence's id. Read the record with GET people/absences/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrAbsences"]}},"/people/recruitments":{"get":{"operationId":"recruitments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[published]","in":"query","required":false,"description":"Filter published (equality)","schema":{"type":"boolean"}},{"name":"filter[published][ne]","in":"query","required":false,"description":"Filter published (ne)","schema":{"type":"boolean"}},{"name":"filter[published][gt]","in":"query","required":false,"description":"Filter published (gt)","schema":{"type":"boolean"}},{"name":"filter[published][gte]","in":"query","required":false,"description":"Filter published (gte)","schema":{"type":"boolean"}},{"name":"filter[published][lt]","in":"query","required":false,"description":"Filter published (lt)","schema":{"type":"boolean"}},{"name":"filter[published][lte]","in":"query","required":false,"description":"Filter published (lte)","schema":{"type":"boolean"}},{"name":"filter[published][in]","in":"query","required":false,"description":"Filter published (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[published][notIn]","in":"query","required":false,"description":"Filter published (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[published][between]","in":"query","required":false,"description":"Filter published (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unsolicited]","in":"query","required":false,"description":"Filter unsolicited (equality)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][ne]","in":"query","required":false,"description":"Filter unsolicited (ne)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][gt]","in":"query","required":false,"description":"Filter unsolicited (gt)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][gte]","in":"query","required":false,"description":"Filter unsolicited (gte)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][lt]","in":"query","required":false,"description":"Filter unsolicited (lt)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][lte]","in":"query","required":false,"description":"Filter unsolicited (lte)","schema":{"type":"boolean"}},{"name":"filter[unsolicited][in]","in":"query","required":false,"description":"Filter unsolicited (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unsolicited][notIn]","in":"query","required":false,"description":"Filter unsolicited (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unsolicited][between]","in":"query","required":false,"description":"Filter unsolicited (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[deadline]","in":"query","required":false,"description":"Filter deadline (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][ne]","in":"query","required":false,"description":"Filter deadline (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][gt]","in":"query","required":false,"description":"Filter deadline (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][gte]","in":"query","required":false,"description":"Filter deadline (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][lt]","in":"query","required":false,"description":"Filter deadline (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][lte]","in":"query","required":false,"description":"Filter deadline (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[deadline][in]","in":"query","required":false,"description":"Filter deadline (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deadline][notIn]","in":"query","required":false,"description":"Filter deadline (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[deadline][between]","in":"query","required":false,"description":"Filter deadline (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vacancies]","in":"query","required":false,"description":"Filter vacancies (equality)","schema":{"type":"number"}},{"name":"filter[vacancies][ne]","in":"query","required":false,"description":"Filter vacancies (ne)","schema":{"type":"number"}},{"name":"filter[vacancies][gt]","in":"query","required":false,"description":"Filter vacancies (gt)","schema":{"type":"number"}},{"name":"filter[vacancies][gte]","in":"query","required":false,"description":"Filter vacancies (gte)","schema":{"type":"number"}},{"name":"filter[vacancies][lt]","in":"query","required":false,"description":"Filter vacancies (lt)","schema":{"type":"number"}},{"name":"filter[vacancies][lte]","in":"query","required":false,"description":"Filter vacancies (lte)","schema":{"type":"number"}},{"name":"filter[vacancies][in]","in":"query","required":false,"description":"Filter vacancies (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vacancies][notIn]","in":"query","required":false,"description":"Filter vacancies (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vacancies][between]","in":"query","required":false,"description":"Filter vacancies (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId]","in":"query","required":false,"description":"Filter departmentId (equality)","schema":{"type":"string"}},{"name":"filter[departmentId][ne]","in":"query","required":false,"description":"Filter departmentId (ne)","schema":{"type":"string"}},{"name":"filter[departmentId][gt]","in":"query","required":false,"description":"Filter departmentId (gt)","schema":{"type":"string"}},{"name":"filter[departmentId][gte]","in":"query","required":false,"description":"Filter departmentId (gte)","schema":{"type":"string"}},{"name":"filter[departmentId][lt]","in":"query","required":false,"description":"Filter departmentId (lt)","schema":{"type":"string"}},{"name":"filter[departmentId][lte]","in":"query","required":false,"description":"Filter departmentId (lte)","schema":{"type":"string"}},{"name":"filter[departmentId][in]","in":"query","required":false,"description":"Filter departmentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][notIn]","in":"query","required":false,"description":"Filter departmentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][between]","in":"query","required":false,"description":"Filter departmentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId][like]","in":"query","required":false,"description":"Filter departmentId (like)","schema":{"type":"string"}},{"name":"filter[positionId]","in":"query","required":false,"description":"Filter positionId (equality)","schema":{"type":"string"}},{"name":"filter[positionId][ne]","in":"query","required":false,"description":"Filter positionId (ne)","schema":{"type":"string"}},{"name":"filter[positionId][gt]","in":"query","required":false,"description":"Filter positionId (gt)","schema":{"type":"string"}},{"name":"filter[positionId][gte]","in":"query","required":false,"description":"Filter positionId (gte)","schema":{"type":"string"}},{"name":"filter[positionId][lt]","in":"query","required":false,"description":"Filter positionId (lt)","schema":{"type":"string"}},{"name":"filter[positionId][lte]","in":"query","required":false,"description":"Filter positionId (lte)","schema":{"type":"string"}},{"name":"filter[positionId][in]","in":"query","required":false,"description":"Filter positionId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionId][notIn]","in":"query","required":false,"description":"Filter positionId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[positionId][between]","in":"query","required":false,"description":"Filter positionId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[positionId][like]","in":"query","required":false,"description":"Filter positionId (like)","schema":{"type":"string"}},{"name":"filter[teamId]","in":"query","required":false,"description":"Filter teamId (equality)","schema":{"type":"string"}},{"name":"filter[teamId][ne]","in":"query","required":false,"description":"Filter teamId (ne)","schema":{"type":"string"}},{"name":"filter[teamId][gt]","in":"query","required":false,"description":"Filter teamId (gt)","schema":{"type":"string"}},{"name":"filter[teamId][gte]","in":"query","required":false,"description":"Filter teamId (gte)","schema":{"type":"string"}},{"name":"filter[teamId][lt]","in":"query","required":false,"description":"Filter teamId (lt)","schema":{"type":"string"}},{"name":"filter[teamId][lte]","in":"query","required":false,"description":"Filter teamId (lte)","schema":{"type":"string"}},{"name":"filter[teamId][in]","in":"query","required":false,"description":"Filter teamId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamId][notIn]","in":"query","required":false,"description":"Filter teamId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamId][between]","in":"query","required":false,"description":"Filter teamId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[teamId][like]","in":"query","required":false,"description":"Filter teamId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId]","in":"query","required":false,"description":"Filter employmentCategoryId (equality)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][ne]","in":"query","required":false,"description":"Filter employmentCategoryId (ne)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][gt]","in":"query","required":false,"description":"Filter employmentCategoryId (gt)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][gte]","in":"query","required":false,"description":"Filter employmentCategoryId (gte)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][lt]","in":"query","required":false,"description":"Filter employmentCategoryId (lt)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][lte]","in":"query","required":false,"description":"Filter employmentCategoryId (lte)","schema":{"type":"string"}},{"name":"filter[employmentCategoryId][in]","in":"query","required":false,"description":"Filter employmentCategoryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employmentCategoryId][notIn]","in":"query","required":false,"description":"Filter employmentCategoryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employmentCategoryId][between]","in":"query","required":false,"description":"Filter employmentCategoryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employmentCategoryId][like]","in":"query","required":false,"description":"Filter employmentCategoryId (like)","schema":{"type":"string"}},{"name":"filter[hiringManagerId]","in":"query","required":false,"description":"Filter hiringManagerId (equality)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][ne]","in":"query","required":false,"description":"Filter hiringManagerId (ne)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][gt]","in":"query","required":false,"description":"Filter hiringManagerId (gt)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][gte]","in":"query","required":false,"description":"Filter hiringManagerId (gte)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][lt]","in":"query","required":false,"description":"Filter hiringManagerId (lt)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][lte]","in":"query","required":false,"description":"Filter hiringManagerId (lte)","schema":{"type":"string"}},{"name":"filter[hiringManagerId][in]","in":"query","required":false,"description":"Filter hiringManagerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hiringManagerId][notIn]","in":"query","required":false,"description":"Filter hiringManagerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hiringManagerId][between]","in":"query","required":false,"description":"Filter hiringManagerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hiringManagerId][like]","in":"query","required":false,"description":"Filter hiringManagerId (like)","schema":{"type":"string"}},{"name":"filter[ownerId]","in":"query","required":false,"description":"Filter ownerId (equality)","schema":{"type":"string"}},{"name":"filter[ownerId][ne]","in":"query","required":false,"description":"Filter ownerId (ne)","schema":{"type":"string"}},{"name":"filter[ownerId][gt]","in":"query","required":false,"description":"Filter ownerId (gt)","schema":{"type":"string"}},{"name":"filter[ownerId][gte]","in":"query","required":false,"description":"Filter ownerId (gte)","schema":{"type":"string"}},{"name":"filter[ownerId][lt]","in":"query","required":false,"description":"Filter ownerId (lt)","schema":{"type":"string"}},{"name":"filter[ownerId][lte]","in":"query","required":false,"description":"Filter ownerId (lte)","schema":{"type":"string"}},{"name":"filter[ownerId][in]","in":"query","required":false,"description":"Filter ownerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[ownerId][notIn]","in":"query","required":false,"description":"Filter ownerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[ownerId][between]","in":"query","required":false,"description":"Filter ownerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[ownerId][like]","in":"query","required":false,"description":"Filter ownerId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","recruitmentNumber","-recruitmentNumber","name","-name","category","-category","status","-status","published","-published","unsolicited","-unsolicited","deadline","-deadline","vacancies","-vacancies","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","recruitmentNumber","name","category","status","published","unsolicited","deadline","vacancies","departmentId","departmentName","positionId","positionName","teamId","teamName","locationId","locationName","entityId","entityName","employmentCategoryId","hiringManagerId","hiringManagerName","ownerId","ownerName","jobDescription","viabilityCriteria","website","relocationRequired","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/recruitmentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List recruitments","description":"Lists recruitments.","tags":["peopleRecruitments"]},"post":{"operationId":"createRecruitment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createRecruitmentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DEPARTMENT_OR_POSITION_REQUIRED, REFERENCE_NOT_FOUND, INVALID_DEADLINE, INVALID_VACANCIES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DEPARTMENT_OR_POSITION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DEPARTMENT_OR_POSITION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DEPARTMENT_OR_POSITION_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reference":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["reference","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DEADLINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"deadline":{"type":"string"}},"additionalProperties":false,"required":["deadline"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VACANCIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vacancies":{"type":"number"}},"additionalProperties":false,"required":["vacancies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createRecruitmentInput"}}}},"summary":"Create a recruitment","description":"Creates a recruitment. You must name a department, a position, or both. If you leave out name, the recruitment takes the department's name, or the position's name when there is no department.\n\nThe hiring manager and the owner each get a permission role so they can work on the opening.\n\nThe response contains only the new recruitment's id. Read the full record with GET people/recruitments/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["peopleRecruitments"]}},"/people/positions/{id}/assign-permissions":{"post":{"operationId":"assignPositionPermissions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/assignPositionPermissionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PERMISSIONS_NOT_PROVIDED, ROLES_NOT_FOUND, TASKS_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERMISSIONS_NOT_PROVIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROLES_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["roleUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TASKS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"taskUUIDs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["taskUUIDs"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/assignPositionPermissionsInput"}}}},"summary":"Assign roles and tasks to a position","description":"Assigns roles and tasks to a position.","tags":["hrPositions"]}},"/tax-documents/manual-taxable-documents/search":{"post":{"operationId":"searchManualTaxableDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchManualTaxableDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DATE, INVALID_TIMESTAMP","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TIMESTAMP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchManualTaxableDocumentInput"}}}},"summary":"Search manual taxable documents","description":"Searches manual taxable documents, also called ad hoc documents. Each match is the full record, including its lines. Use it to match on customer name, document number, or the text of the title or description. Retired: this route is served in v1 only and answers 404 from v2 onward. Its successor is POST accounting/ad-hoc-documents/search, which returns the same fields plus the uuid references a write needs.","tags":["taxDocumentManualTaxableDocuments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/ad-hoc-documents/search":{"post":{"operationId":"searchAdHocDocuments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAdHocDocumentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAdHocDocumentsInput"}}}},"summary":"Search ad hoc documents.","description":"Searches ad hoc documents. Each match is the full record, including its lines and every uuid reference a create needs. Use it for the queries a URL cannot carry: a customer or entity name, a document number, free text in the title or description, and the counterparty identifiers GET accounting/ad-hoc-documents deliberately keeps out of its filters.\n\nThe body has exactly two members, both optional: `filters`, holding every predicate, and `page`. An empty body is a valid first page of everything. Predicates are ANDed. Paging matches the list route's vocabulary, at this mechanism's own limits — default 50, capped at 200 — and the cursor is opaque and forward-only.\n\nThis resource replaces POST tax-documents/manual-taxable-documents/search, which is served in v1 only. Every request carries an `Api-Version` header; without it the request is rejected with 400, and a route that exists in another version answers 404.","tags":["taxDocumentAdHocDocuments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/documents/{id}":{"delete":{"operationId":"deleteDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the document you want to delete."}],"summary":"Delete a document","description":"Deletes a document. Only the document record is removed. The uploaded file is kept.\n\nYou may delete your own documents and, if you manage people, your direct reports'; an HR admin may delete any. An approved document cannot be deleted by its owner, only by their direct manager or an HR admin. A document outside your reach fails with NOT_FOUND, like a missing one.\n\nA second delete request for the same document fails with NOT_FOUND.","tags":["hrDocuments"]}},"/people/person/{id}":{"patch":{"operationId":"updatePerson","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePersonOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNKNOWN_EXTERNAL_IDENTIFIER, DUPLICATE_EXTERNAL_IDENTIFIER, EXTERNAL_IDENTIFIER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_IDENTIFIER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldName":{"type":"string"}},"additionalProperties":false,"required":["fieldName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the person you want to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePersonInput"}}}},"summary":"Update a person","description":"Updates a person with the fields you send. A field you leave out keeps its current value. External identifiers aren't replaced as a list: add, change, and remove them with createExternalIdentifiers, updateExternalIdentifiers, and deleteExternalIdentifiers.\n\nUse the person's id, not their employeeNumber.\n\nThe job assignment, employment status, and compensation can't be changed with this endpoint. The response is empty. Read the updated person with GET people/person/:id.","tags":["hrPeople"]},"get":{"operationId":"getPerson","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPersonOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the person you want to retrieve."}],"summary":"Retrieve a person","description":"Retrieves a person. Use the person's id, not their employeeNumber.","tags":["hrPeople"]}},"/people/person/search":{"post":{"operationId":"searchPeople","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPeopleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNKNOWN_EXTERNAL_IDENTIFIER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fieldNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["fieldNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPeopleInput"}}}},"summary":"Search people","description":"Searches people.","tags":["hrPeople"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/positions/{id}/permissions":{"get":{"operationId":"getPositionPermissions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPositionPermissionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier for the position."}],"summary":"Retrieve a position's roles and tasks","description":"Retrieves a position's roles and tasks.","tags":["hrPositions"]}},"/banking/reconciliations":{"get":{"operationId":"reconciliations","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[accountId]","in":"query","required":false,"description":"Filter accountId (equality)","schema":{"type":"string"}},{"name":"filter[accountId][ne]","in":"query","required":false,"description":"Filter accountId (ne)","schema":{"type":"string"}},{"name":"filter[accountId][gt]","in":"query","required":false,"description":"Filter accountId (gt)","schema":{"type":"string"}},{"name":"filter[accountId][gte]","in":"query","required":false,"description":"Filter accountId (gte)","schema":{"type":"string"}},{"name":"filter[accountId][lt]","in":"query","required":false,"description":"Filter accountId (lt)","schema":{"type":"string"}},{"name":"filter[accountId][lte]","in":"query","required":false,"description":"Filter accountId (lte)","schema":{"type":"string"}},{"name":"filter[accountId][in]","in":"query","required":false,"description":"Filter accountId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountId][notIn]","in":"query","required":false,"description":"Filter accountId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountId][between]","in":"query","required":false,"description":"Filter accountId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountId][like]","in":"query","required":false,"description":"Filter accountId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId]","in":"query","required":false,"description":"Filter accountingPeriodId (equality)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][ne]","in":"query","required":false,"description":"Filter accountingPeriodId (ne)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gt]","in":"query","required":false,"description":"Filter accountingPeriodId (gt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][gte]","in":"query","required":false,"description":"Filter accountingPeriodId (gte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lt]","in":"query","required":false,"description":"Filter accountingPeriodId (lt)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][lte]","in":"query","required":false,"description":"Filter accountingPeriodId (lte)","schema":{"type":"string"}},{"name":"filter[accountingPeriodId][in]","in":"query","required":false,"description":"Filter accountingPeriodId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][notIn]","in":"query","required":false,"description":"Filter accountingPeriodId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[accountingPeriodId][between]","in":"query","required":false,"description":"Filter accountingPeriodId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[accountingPeriodId][like]","in":"query","required":false,"description":"Filter accountingPeriodId (like)","schema":{"type":"string"}},{"name":"filter[statementEndDate]","in":"query","required":false,"description":"Filter statementEndDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[statementEndDate][ne]","in":"query","required":false,"description":"Filter statementEndDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[statementEndDate][gt]","in":"query","required":false,"description":"Filter statementEndDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[statementEndDate][gte]","in":"query","required":false,"description":"Filter statementEndDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[statementEndDate][lt]","in":"query","required":false,"description":"Filter statementEndDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[statementEndDate][lte]","in":"query","required":false,"description":"Filter statementEndDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[statementEndDate][in]","in":"query","required":false,"description":"Filter statementEndDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[statementEndDate][notIn]","in":"query","required":false,"description":"Filter statementEndDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[statementEndDate][between]","in":"query","required":false,"description":"Filter statementEndDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[statementEndBalance]","in":"query","required":false,"description":"Filter statementEndBalance (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[statementEndBalance][ne]","in":"query","required":false,"description":"Filter statementEndBalance (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[statementEndBalance][gt]","in":"query","required":false,"description":"Filter statementEndBalance (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[statementEndBalance][gte]","in":"query","required":false,"description":"Filter statementEndBalance (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[statementEndBalance][lt]","in":"query","required":false,"description":"Filter statementEndBalance (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[statementEndBalance][lte]","in":"query","required":false,"description":"Filter statementEndBalance (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[statementEndBalance][in]","in":"query","required":false,"description":"Filter statementEndBalance (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[statementEndBalance][notIn]","in":"query","required":false,"description":"Filter statementEndBalance (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[statementEndBalance][between]","in":"query","required":false,"description":"Filter statementEndBalance (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[reconciledOn]","in":"query","required":false,"description":"Filter reconciledOn (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciledOn][ne]","in":"query","required":false,"description":"Filter reconciledOn (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciledOn][gt]","in":"query","required":false,"description":"Filter reconciledOn (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciledOn][gte]","in":"query","required":false,"description":"Filter reconciledOn (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciledOn][lt]","in":"query","required":false,"description":"Filter reconciledOn (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciledOn][lte]","in":"query","required":false,"description":"Filter reconciledOn (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[reconciledOn][in]","in":"query","required":false,"description":"Filter reconciledOn (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reconciledOn][notIn]","in":"query","required":false,"description":"Filter reconciledOn (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[reconciledOn][between]","in":"query","required":false,"description":"Filter reconciledOn (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","reconciliationNumber","-reconciliationNumber","statementEndDate","-statementEndDate","statementEndBalance","-statementEndBalance","currency","-currency","status","-status","reconciledOn","-reconciledOn","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","reconciliationNumber","accountId","accountNumber","accountName","entityId","entityName","accountingPeriodId","periodName","statementEndDate","statementEndBalance","currency","status","reconciledOn","reconciledBy","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/reconciliationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","reconciliationNumber":"AR-000117","accountId":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7","accountNumber":"1010","accountName":"Operating Account USD","entityId":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b","entityName":"Everest US Inc.","accountingPeriodId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","periodName":"Jul 2026","statementEndDate":"2026-07-31","statementEndBalance":"184320.55","currency":"USD","status":"inProgress","lastModifiedDate":"2026-08-04T14:12:09.418Z"},{"id":"a1c4d7e0-2b58-4e91-8d03-6f7b19ac52de","reconciliationNumber":"AR-000116","accountId":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7","accountNumber":"1010","accountName":"Operating Account USD","entityId":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b","entityName":"Everest US Inc.","accountingPeriodId":"6f9a2b1c-3d47-4a80-b5e2-91c8d0374fab","periodName":"Jun 2026","statementEndDate":"2026-06-30","statementEndBalance":"171905.12","currency":"USD","status":"complete","reconciledOn":"2026-07-03","reconciledBy":"Dana Whitfield","lastModifiedDate":"2026-07-03T09:41:55.002Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List and filter account reconciliations","description":"The reconciliation worklist, with structured filtering, ordering, sparse field selection and cursor pagination in the query string.\n\n```\nGET banking/reconciliations?filter[status][in]=inProgress,unreconciled&filter[accountId][eq]=<account-uuid>&sort=-statementEndDate&fields=id,status,statementEndDate&page[size]=50\n```\n\nA response is `{ \"data\": [ … ], \"pagination\": { \"hasMore\": …, \"nextCursor\": … } }`. Page forward by passing the previous `nextCursor` as `page[cursor]`; it is opaque and keyset-based, so do not construct or decode one. `hasMore` is the loop condition — a page that fills completely may still be the last. Page size defaults to 25 and is capped at 100.\n\n**This is the scalar half of the item schema.** Every field here is named and typed exactly as `GET banking/reconciliations/{id}` names and types it, so one model deserializes both. What the row cannot carry is the nested `balances` object: a data-set field is scalar-only. Fetch one reconciliation to get the roll-forward.\n\n**`difference` is not here.** It is not a stored column but a roll-forward over the ledger and the in-transit rows, computed per reconciliation, so it is available on `GET banking/reconciliations/{id}` inside `balances` and nowhere else. A caller looking for the unbalanced reconciliations filters this collection by `status` and then fetches the candidates.\n\n**Filtering and ordering are opt-in per field.** A field is queryable only if this route designates it, and a request naming any other field is rejected rather than silently ignored. The names and numbers of accounts and entities — `accountNumber`, `accountName`, `entityName` — are returned but appear in neither list: they identify counterparties and internal structure, and both a filter and a sort would put them in an access log. `reconciledBy` is personal data and is excluded for the same reason. Filter by `accountId` or `entityId` instead, and by `accountingPeriodId` rather than `periodName`.\n\nTwo value formats are worth knowing before a filter is written. The id fields (`id`, `accountId`, `entityId`, `accountingPeriodId`) hold **uuids**, not the numeric keys the UI works with. `lastModifiedDate` is an instant and needs milliseconds and a trailing `Z` (`2026-01-01T00:00:00.000Z`); a numeric offset is not accepted. `filter[lastModifiedDate][gte]=…` with `sort=lastModifiedDate` is the incremental-sync cursor.","tags":["bankReconciliations"]},"post":{"operationId":"startReconciliation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/startReconciliationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"resumed":{"value":{"data":{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}},"summary":"The same call once the account already has an open reconciliation: the existing one's id comes back and the supplied figures are ignored"},"started":{"value":{"data":{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}},"summary":"A fresh reconciliation, with the statement figures supplied"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ACCOUNT_NOT_FOUND, RECONCILIATION_INVALID_ACCOUNT_TYPE, RECONCILIATION_NO_PERIOD_FOUND, RECONCILIATION_ACCOUNT_NOT_LINKED, STATEMENT_END_DATE_OUTSIDE_PERIOD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_NO_PERIOD_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_ACCOUNT_NOT_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATEMENT_END_DATE_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"statementEndDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"},"periodEndDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["statementEndDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_NO_PERIOD_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_ACCOUNT_NOT_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATEMENT_END_DATE_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"statementEndDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"},"periodEndDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["statementEndDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_ACCOUNT_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_NO_PERIOD_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_ACCOUNT_NOT_LINKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"}},"additionalProperties":false,"required":["accountId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATEMENT_END_DATE_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"statementEndDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"},"periodEndDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["statementEndDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/startReconciliationInput"},"examples":{"resumed":{"value":{"accountId":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"},"summary":"The same call once the account already has an open reconciliation: the existing one's id comes back and the supplied figures are ignored"},"started":{"value":{"accountId":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7","statementEndBalance":"184320.55","statementEndDate":"2026-07-31"},"summary":"A fresh reconciliation, with the statement figures supplied"}}}}},"summary":"Start or resume an account reconciliation","description":"Opens the next reconciliation for a bank or credit-card account. This is the only route that does not name a reconciliation: it is how one comes into existence, and every other route addresses the `id` it returns.\n\n**The period is derived, not chosen.** An account reconciles in order, so the server picks the period: the one after the account's last completed reconciliation, or — for an account that has never been reconciled — the period containing its configured reconciliation start date. A caller cannot skip ahead.\n\n**The call resumes rather than duplicates.** If the account already has a reconciliation that is not complete, that one's `id` is returned and nothing is created; `statementEndBalance` and `statementEndDate` are then ignored, and adjusting them is `PATCH banking/reconciliations/{id}`. Calling this repeatedly is therefore safe, and is the intended way to get at the account's open reconciliation without knowing its id. The response is the `id` alone: read `GET banking/reconciliations/{id}` for the period the server derived and the figures it stored.\n\n**Both statement figures default.** Omit `statementEndDate` and the period end date is used; omit `statementEndBalance` and the account's own balance as of that date is used, which is a starting point to correct rather than a statement figure. Supply them when the bank statement is already in hand.\n\nTwo failures are foreseeable. `RECONCILIATION_INVALID_ACCOUNT_TYPE` means the account is not a bank or credit-card account — nothing else reconciles this way. `RECONCILIATION_NO_PERIOD_FOUND` means no accounting period covers the account's reconciliation start date, which is fiscal-calendar configuration rather than anything about this request. Both arrive under HTTP **400**, as does `ACCOUNT_NOT_FOUND`; branch on the `code` in the error body. A `statementEndDate` outside the derived period is refused with `STATEMENT_END_DATE_OUTSIDE_PERIOD` when a reconciliation would be created.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankReconciliations"]}},"/banking/bank-transactions/{id}/unmatch":{"post":{"operationId":"unmatchBankTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/unmatchBankTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_MATCHED, ENTRY_MUST_BE_VOIDED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_MUST_BE_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sfdType":{"type":"string"}},"additionalProperties":false,"required":["sfdType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_MUST_BE_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sfdType":{"type":"string"}},"additionalProperties":false,"required":["sfdType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_MUST_BE_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sfdType":{"type":"string"}},"additionalProperties":false,"required":["sfdType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank transaction you want to unmatch.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/unmatchBankTransactionInput"}}}},"summary":"Unmatch a bank transaction","description":"Unmatches a bank transaction. Unmatching one bank transaction removes its whole match. Every other bank transaction in the match also becomes unmatched, and the documents become available to match again. The documents are not deleted or reversed.\n\nA fund transfer is the exception. Each leg has its own match, so unmatching one leg leaves the other matched.\n\nA match that includes a bank entry or credit card entry cannot be removed until that entry is voided. A bank entry or credit card entry that came from an integration is exempt.","tags":["bankingBankTransactions"]}},"/people/applicants":{"post":{"operationId":"createApplicant","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createApplicantOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: RECRUITMENT_NOT_FOUND, DUPLICATE_APPLICATION","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"RECRUITMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_APPLICATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"recruitmentId":{"type":"string"}},"additionalProperties":false,"required":["recruitmentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createApplicantInput"}}}},"summary":"Create an applicant","description":"Creates an applicant and their first application. The request creates a person and their first application to a recruitment together. If a person with the same email already exists, the request uses that person instead of creating a new one.\n\nThe application starts in status 'new'. The response contains only the new application's id.\n\nTo apply an existing person to another recruitment, use POST people/applications.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrApplicants"]}},"/tax-documents/manual-taxable-documents":{"get":{"operationId":"manualTaxableDocuments","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[invoiceDate]","in":"query","required":false,"description":"Filter invoiceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][ne]","in":"query","required":false,"description":"Filter invoiceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][gt]","in":"query","required":false,"description":"Filter invoiceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][gte]","in":"query","required":false,"description":"Filter invoiceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][lt]","in":"query","required":false,"description":"Filter invoiceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][lte]","in":"query","required":false,"description":"Filter invoiceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[invoiceDate][in]","in":"query","required":false,"description":"Filter invoiceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceDate][notIn]","in":"query","required":false,"description":"Filter invoiceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiceDate][between]","in":"query","required":false,"description":"Filter invoiceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceDate]","in":"query","required":false,"description":"Filter serviceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][ne]","in":"query","required":false,"description":"Filter serviceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gt]","in":"query","required":false,"description":"Filter serviceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gte]","in":"query","required":false,"description":"Filter serviceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lt]","in":"query","required":false,"description":"Filter serviceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lte]","in":"query","required":false,"description":"Filter serviceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][in]","in":"query","required":false,"description":"Filter serviceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][notIn]","in":"query","required":false,"description":"Filter serviceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][between]","in":"query","required":false,"description":"Filter serviceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[paymentStatus]","in":"query","required":false,"description":"Filter paymentStatus (equality)","schema":{"type":"string"}},{"name":"filter[paymentStatus][ne]","in":"query","required":false,"description":"Filter paymentStatus (ne)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gt]","in":"query","required":false,"description":"Filter paymentStatus (gt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gte]","in":"query","required":false,"description":"Filter paymentStatus (gte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lt]","in":"query","required":false,"description":"Filter paymentStatus (lt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lte]","in":"query","required":false,"description":"Filter paymentStatus (lte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][in]","in":"query","required":false,"description":"Filter paymentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][notIn]","in":"query","required":false,"description":"Filter paymentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][between]","in":"query","required":false,"description":"Filter paymentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentStatus][like]","in":"query","required":false,"description":"Filter paymentStatus (like)","schema":{"type":"string"}},{"name":"filter[hasAttachment]","in":"query","required":false,"description":"Filter hasAttachment (equality)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][ne]","in":"query","required":false,"description":"Filter hasAttachment (ne)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][gt]","in":"query","required":false,"description":"Filter hasAttachment (gt)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][gte]","in":"query","required":false,"description":"Filter hasAttachment (gte)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][lt]","in":"query","required":false,"description":"Filter hasAttachment (lt)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][lte]","in":"query","required":false,"description":"Filter hasAttachment (lte)","schema":{"type":"boolean"}},{"name":"filter[hasAttachment][in]","in":"query","required":false,"description":"Filter hasAttachment (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasAttachment][notIn]","in":"query","required":false,"description":"Filter hasAttachment (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hasAttachment][between]","in":"query","required":false,"description":"Filter hasAttachment (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[totalTaxAmount]","in":"query","required":false,"description":"Filter totalTaxAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][ne]","in":"query","required":false,"description":"Filter totalTaxAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][gt]","in":"query","required":false,"description":"Filter totalTaxAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][gte]","in":"query","required":false,"description":"Filter totalTaxAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][lt]","in":"query","required":false,"description":"Filter totalTaxAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][lte]","in":"query","required":false,"description":"Filter totalTaxAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalTaxAmount][in]","in":"query","required":false,"description":"Filter totalTaxAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalTaxAmount][notIn]","in":"query","required":false,"description":"Filter totalTaxAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalTaxAmount][between]","in":"query","required":false,"description":"Filter totalTaxAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalAmount]","in":"query","required":false,"description":"Filter totalAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][ne]","in":"query","required":false,"description":"Filter totalAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][gt]","in":"query","required":false,"description":"Filter totalAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][gte]","in":"query","required":false,"description":"Filter totalAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][lt]","in":"query","required":false,"description":"Filter totalAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][lte]","in":"query","required":false,"description":"Filter totalAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAmount][in]","in":"query","required":false,"description":"Filter totalAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAmount][notIn]","in":"query","required":false,"description":"Filter totalAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAmount][between]","in":"query","required":false,"description":"Filter totalAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalAllocatedAmount]","in":"query","required":false,"description":"Filter totalAllocatedAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][ne]","in":"query","required":false,"description":"Filter totalAllocatedAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][gt]","in":"query","required":false,"description":"Filter totalAllocatedAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][gte]","in":"query","required":false,"description":"Filter totalAllocatedAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][lt]","in":"query","required":false,"description":"Filter totalAllocatedAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][lte]","in":"query","required":false,"description":"Filter totalAllocatedAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalAllocatedAmount][in]","in":"query","required":false,"description":"Filter totalAllocatedAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAllocatedAmount][notIn]","in":"query","required":false,"description":"Filter totalAllocatedAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalAllocatedAmount][between]","in":"query","required":false,"description":"Filter totalAllocatedAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[totalOpenAmount]","in":"query","required":false,"description":"Filter totalOpenAmount (equality)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][ne]","in":"query","required":false,"description":"Filter totalOpenAmount (ne)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][gt]","in":"query","required":false,"description":"Filter totalOpenAmount (gt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][gte]","in":"query","required":false,"description":"Filter totalOpenAmount (gte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][lt]","in":"query","required":false,"description":"Filter totalOpenAmount (lt)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][lte]","in":"query","required":false,"description":"Filter totalOpenAmount (lte)","schema":{"type":"string","format":"decimal"}},{"name":"filter[totalOpenAmount][in]","in":"query","required":false,"description":"Filter totalOpenAmount (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalOpenAmount][notIn]","in":"query","required":false,"description":"Filter totalOpenAmount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[totalOpenAmount][between]","in":"query","required":false,"description":"Filter totalOpenAmount (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"decimal"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","type","-type","invoiceDate","-invoiceDate","serviceDate","-serviceDate","dueDate","-dueDate","currency","-currency","paymentStatus","-paymentStatus","hasAttachment","-hasAttachment","customerId","-customerId","entityId","-entityId","totalTaxAmount","-totalTaxAmount","totalAmount","-totalAmount","totalAllocatedAmount","-totalAllocatedAmount","totalOpenAmount","-totalOpenAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","type","taxDocumentNumber","documentNumber","title","description","invoiceDate","serviceDate","dueDate","currency","paymentStatus","paymentTerms","hasAttachment","customerId","customerName","customerNumber","entityId","entityName","totalTaxAmount","totalAmount","totalAllocatedAmount","totalOpenAmount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/manualTaxableDocumentsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List manual taxable documents","description":"Lists manual taxable documents, also called ad hoc documents. Each document has its main fields only. For the full record, with its lines, use GET tax-documents/manual-taxable-documents/:id or POST tax-documents/manual-taxable-documents/search. To match on customer name, document number, or text, use POST tax-documents/manual-taxable-documents/search. Retired: this route is served in v1 only and answers 404 from v2 onward. Its successor is GET accounting/ad-hoc-documents, which returns the same fields plus the uuid references a write needs.","tags":["taxDocumentManualTaxableDocuments"]}},"/tax-documents/manual-taxable-documents/{id}":{"get":{"operationId":"getManualTaxableDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getManualTaxableDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id of the manual taxable document to fetch (a UUID); bound from the :id path segment."}],"summary":"Retrieve a manual taxable document","description":"Retrieves a manual taxable document, also called an ad hoc document. The response is the full record, including its lines. POST tax-documents/manual-taxable-documents/search returns the same fields. Retired: this route is served in v1 only and answers 404 from v2 onward. Its successor is GET accounting/ad-hoc-documents/:id, which returns the same fields plus the uuid references a write needs.","tags":["taxDocumentManualTaxableDocuments"]}},"/accounting/ad-hoc-documents/{id}":{"get":{"operationId":"getAdHocDocument","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAdHocDocumentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id of the ad hoc document to fetch (a UUID); bound from the :id path segment.","example":"3f2a9c14-7b6d-4e58-9a01-2c8f5d6e7a0b"}],"summary":"Fetch a single ad hoc document by its id.","description":"Retrieves one ad hoc document by its id. The response is the full record, including its lines and the uuid references a write needs — the posting account, the posting period, the counterparty and, on each line, its account, tax configuration line and reporting tags. POST accounting/ad-hoc-documents/search returns the same fields for many documents at once.\n\nThis resource replaces GET tax-documents/manual-taxable-documents/:id, which is served in v1 only. Every request carries an `Api-Version` header; without it the request is rejected with 400, and a route that exists in another version answers 404.","tags":["taxDocumentAdHocDocuments"]}},"/banking/bank-rules/{id}":{"get":{"operationId":"getBankRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBankRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank rule you want to retrieve.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"summary":"Retrieve a bank rule","description":"Retrieves a bank rule. The response is the whole rule, including its criteria, the bank accounts or credit card accounts it applies to and its action object. `GET banking/bank-rules` returns the rule fields only.","tags":["bankingBankRules"]},"delete":{"operationId":"deleteBankRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteBankRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank rule you want to delete.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"summary":"Delete a bank rule","description":"Deletes a bank rule. The rule is deleted, together with its criteria, its bank account mappings and its action object. Bank entries and credit card entries the rule already created, and the matches it made, are not changed.\n\nTo stop a rule from running but keep it, set its `status` to `inactive` with `PATCH banking/bank-rules/:id` instead.","tags":["bankingBankRules"]},"patch":{"operationId":"updateBankRule","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBankRuleOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, ACCOUNTS_REQUIRED, CRITERIA_REQUIRED, ACCOUNTS_SPAN_ENTITIES, MIXED_ACCOUNT_TYPES, ACTION_ACCOUNT_TYPE_MISMATCH, RULE_ACTION_NOT_SUPPORTED, DUPLICATE_RULE_NAME, INVALID_FUND_TRANSFER, INVALID_CRITERIA, ACCOUNT_NOT_POSTABLE, BUSINESS_PARTNER_REQUIRED, TAX_CODE_NOT_USABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CRITERIA_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_SPAN_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityCount":{"type":"number"}},"additionalProperties":false,"required":["entityCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_ACCOUNT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_ACCOUNT_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"},"creditCard":{"type":"boolean"}},"additionalProperties":false,"required":["action","creditCard"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_ACTION_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"}},"additionalProperties":false,"required":["action"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FUND_TRANSFER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CRITERIA"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_POSTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CRITERIA_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_SPAN_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityCount":{"type":"number"}},"additionalProperties":false,"required":["entityCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_ACCOUNT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_ACCOUNT_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"},"creditCard":{"type":"boolean"}},"additionalProperties":false,"required":["action","creditCard"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_ACTION_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"}},"additionalProperties":false,"required":["action"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FUND_TRANSFER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CRITERIA"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_POSTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CRITERIA_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNTS_SPAN_ENTITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityCount":{"type":"number"}},"additionalProperties":false,"required":["entityCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_ACCOUNT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTION_ACCOUNT_TYPE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"},"creditCard":{"type":"boolean"}},"additionalProperties":false,"required":["action","creditCard"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_ACTION_NOT_SUPPORTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"action":{"type":"string"}},"additionalProperties":false,"required":["action"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_RULE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FUND_TRANSFER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CRITERIA"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_POSTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["accountId","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUSINESS_PARTNER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_USABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank rule you want to update.","example":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBankRuleInput"}}}},"summary":"Update a bank rule","description":"Updates a bank rule with the fields you send. `bankAccountIds` and `criteria` are the exception: each is replaced as a whole when sent, so send the complete list. A bank account or criterion left out is removed. In `actionObject`, only the fields you send are changed, and a field left out keeps its current value.\n\nThe checks that apply on create also apply to the new values. A new action must fit the rule's bank accounts, new bank accounts must fit the rule's action, and a new name must be unique.","tags":["bankingBankRules"]}},"/people/absences/approve":{"post":{"operationId":"approveAbsences","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveAbsencesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_APPROVAL_POLICY, NOT_FOUND, EMPLOYEE_NOT_FOUND, ALREADY_DECIDED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_APPROVAL_POLICY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"employeeId":{"type":"string"}},"additionalProperties":false,"required":["employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_DECIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveAbsencesInput"}}}},"summary":"Approve absence requests","description":"Approves one or more absence requests. Each absence must have status 'requested'. Unless you are an HR admin, each absence must also match an absence approval policy, you must be one of its approvers or the employee's direct manager, and it may not be your own absence. If any absence can't be approved, none are.\n\nThe response lists the approved absences' ids in the order you sent them.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["hrAbsences"]}},"/people/documents/match":{"post":{"operationId":"matchDocuments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/matchDocumentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NO_FILES, TOO_MANY_FILES, INVALID_NAMING_SETTINGS, CATEGORY_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_FILES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_FILES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"},"maximum":{"type":"number"}},"additionalProperties":false,"required":["count","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_NAMING_SETTINGS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"problems":{"type":"array","items":{"oneOf":[{"const":"emptySeparator","description":"separator is empty."},{"const":"separatorInEmployeeNumberPrefix","description":"separator occurs in the tenant's employee number prefix."},{"const":"missingIdentifierPart","description":"fileNameParts has no 'identifier' part, or for 'name' no 'firstName' and 'lastName' parts."},{"const":"missingCategoryPart","description":"fileNameParts has no 'category' part and categoryId is absent."},{"const":"missingExpiryDateFormat","description":"fileNameParts has an 'expiryDate' part and expiryDateFormat is absent."},{"const":"noEmployeeStatuses","description":"employeeStatuses is empty."}]}}},"additionalProperties":false,"required":["problems"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_FILES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_FILES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"},"maximum":{"type":"number"}},"additionalProperties":false,"required":["count","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_NAMING_SETTINGS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"problems":{"type":"array","items":{"oneOf":[{"const":"emptySeparator","description":"separator is empty."},{"const":"separatorInEmployeeNumberPrefix","description":"separator occurs in the tenant's employee number prefix."},{"const":"missingIdentifierPart","description":"fileNameParts has no 'identifier' part, or for 'name' no 'firstName' and 'lastName' parts."},{"const":"missingCategoryPart","description":"fileNameParts has no 'category' part and categoryId is absent."},{"const":"missingExpiryDateFormat","description":"fileNameParts has an 'expiryDate' part and expiryDateFormat is absent."},{"const":"noEmployeeStatuses","description":"employeeStatuses is empty."}]}}},"additionalProperties":false,"required":["problems"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/matchDocumentsInput"}}}},"summary":"Match file names to employees and document categories","description":"Matches file names to employees and document categories using the same naming rules as the bulk document upload in Everest. Use it to check a batch of file names before you import the files with POST people/documents/import.\n\nEach file name is split at the separator into parts, read in the order given by fileNameParts. The part named by employeeIdentifier identifies the employee; a 'category' part names the document category by its label or name, unless you send one categoryId for every file. An 'expiryDate' part is read with expiryDateFormat. A trailing 'ignored' part takes all remaining text.\n\nThe response has one item per file name, in the order you sent them. A file name that does not match is not an error: its item says what was found and lists its problems. Only HR administrators can call this endpoint.","tags":["hrDocuments"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/people/teams":{"post":{"operationId":"createTeam","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTeamOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_TEAM_NAME, PARENT_TEAM_NOT_FOUND, INVALID_DATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_TEAM_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_TEAM_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_TEAM_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTeamInput"}}}},"summary":"Create a team","description":"Creates a team. The response contains only the new team's id. Read the full record with GET people/teams/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["peopleTeams"]},"get":{"operationId":"teams","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[teamType]","in":"query","required":false,"description":"Filter teamType (equality)","schema":{"type":"string"}},{"name":"filter[teamType][ne]","in":"query","required":false,"description":"Filter teamType (ne)","schema":{"type":"string"}},{"name":"filter[teamType][gt]","in":"query","required":false,"description":"Filter teamType (gt)","schema":{"type":"string"}},{"name":"filter[teamType][gte]","in":"query","required":false,"description":"Filter teamType (gte)","schema":{"type":"string"}},{"name":"filter[teamType][lt]","in":"query","required":false,"description":"Filter teamType (lt)","schema":{"type":"string"}},{"name":"filter[teamType][lte]","in":"query","required":false,"description":"Filter teamType (lte)","schema":{"type":"string"}},{"name":"filter[teamType][in]","in":"query","required":false,"description":"Filter teamType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamType][notIn]","in":"query","required":false,"description":"Filter teamType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamType][between]","in":"query","required":false,"description":"Filter teamType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[teamType][like]","in":"query","required":false,"description":"Filter teamType (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeCount]","in":"query","required":false,"description":"Filter employeeCount (equality)","schema":{"type":"number"}},{"name":"filter[employeeCount][ne]","in":"query","required":false,"description":"Filter employeeCount (ne)","schema":{"type":"number"}},{"name":"filter[employeeCount][gt]","in":"query","required":false,"description":"Filter employeeCount (gt)","schema":{"type":"number"}},{"name":"filter[employeeCount][gte]","in":"query","required":false,"description":"Filter employeeCount (gte)","schema":{"type":"number"}},{"name":"filter[employeeCount][lt]","in":"query","required":false,"description":"Filter employeeCount (lt)","schema":{"type":"number"}},{"name":"filter[employeeCount][lte]","in":"query","required":false,"description":"Filter employeeCount (lte)","schema":{"type":"number"}},{"name":"filter[employeeCount][in]","in":"query","required":false,"description":"Filter employeeCount (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeCount][notIn]","in":"query","required":false,"description":"Filter employeeCount (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeCount][between]","in":"query","required":false,"description":"Filter employeeCount (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentId]","in":"query","required":false,"description":"Filter parentId (equality)","schema":{"type":"string"}},{"name":"filter[parentId][ne]","in":"query","required":false,"description":"Filter parentId (ne)","schema":{"type":"string"}},{"name":"filter[parentId][gt]","in":"query","required":false,"description":"Filter parentId (gt)","schema":{"type":"string"}},{"name":"filter[parentId][gte]","in":"query","required":false,"description":"Filter parentId (gte)","schema":{"type":"string"}},{"name":"filter[parentId][lt]","in":"query","required":false,"description":"Filter parentId (lt)","schema":{"type":"string"}},{"name":"filter[parentId][lte]","in":"query","required":false,"description":"Filter parentId (lte)","schema":{"type":"string"}},{"name":"filter[parentId][in]","in":"query","required":false,"description":"Filter parentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][notIn]","in":"query","required":false,"description":"Filter parentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][between]","in":"query","required":false,"description":"Filter parentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentId][like]","in":"query","required":false,"description":"Filter parentId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","teamNumber","-teamNumber","name","-name","teamType","-teamType","status","-status","startDate","-startDate","endDate","-endDate","employeeCount","-employeeCount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","teamNumber","name","teamType","status","startDate","endDate","employeeCount","parentId","parentName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/teamsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List teams","description":"Lists teams. To list one team's direct child teams, filter by parentId.","tags":["peopleTeams"]}},"/people/absence-types":{"get":{"operationId":"absenceTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","category","-category"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","category","description"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/absenceTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List absence types","description":"Lists absence types.","tags":["hrAbsenceTypes"]}},"/banking/reconciliations/{id}/in-transit/gl-transactions":{"patch":{"operationId":"updateReconciliationInTransitGlTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateReconciliationInTransitGlTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"flagUncashedCheque":{"value":{"data":{}},"summary":"An issued cheque is posted but will not reach the statement until next month"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, RECONCILIATION_INVALID_STATUS, UNKNOWN_GL_TRANSACTIONS, TRANSACTION_ALREADY_MATCHED, TRANSACTIONS_NOT_IN_ACCOUNT, GL_TRANSACTIONS_OUTSIDE_PERIOD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_GL_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_NOT_IN_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GL_TRANSACTIONS_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_GL_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_NOT_IN_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GL_TRANSACTIONS_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_GL_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_NOT_IN_ACCOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"GL_TRANSACTIONS_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation; bound from the :id path segment.","examples":{"flagUncashedCheque":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateReconciliationInTransitGlTransactionsInput"},"examples":{"flagUncashedCheque":{"value":{"set":["7c3e91a5-4b28-4f60-9d17-c05a8e2b4361"]},"summary":"An issued cheque is posted but will not reach the statement until next month"}}}}},"summary":"Set and clear the in-transit flag on GL transactions","description":"Flags ledger postings as in transit, and clears the flag again — the mirror of the bank-side endpoint, and the same shape for the same reason: the ordinary edit is a swap, and doing it in two requests would leave the roll-forward briefly wrong.\n\n`set` and `reset` name **journal entry line** ids, the ones `outstanding/gl-transactions` and `in-transit/gl-transactions` return — not the ids of the in-transit flags themselves. Both are optional; a call may do either, both, or nothing. When both are present the resets are applied first, so the same id in both lists ends up flagged.\n\n**There is no `resetFromDate` here.** The bank side has one because a wrongly flagged bank transaction can be dragged forward through several periods and needs unwinding in bulk; the ledger side has no equivalent operation, and inventing one in this layer would put a rule in the api that the reconciliation UI does not have. Clear the flag period by period instead.\n\n**Flags the platform set itself are left alone.** A row marked `automaticallySet` is not disturbed, so this is a set of instructions rather than a whole-collection replace.\n\n**Matching and the in-transit flag interact.** Matching a journal entry line clears its in-transit flag, and a matched line is refused in both lists: `set` and `reset` alike return `TRANSACTION_ALREADY_MATCHED`, even when the line is no longer flagged. Unlike the bank side, a `reset` on a matched line is not a no-op — unmatch it first. Flag only rows taken from the outstanding collection: every id must be a line of the account this reconciliation covers (`TRANSACTIONS_NOT_IN_ACCOUNT`), and a line in `set` must be posted in this reconciliation's period or carried into it from the previous one (`GL_TRANSACTIONS_OUTSIDE_PERIOD`).\n\nEvery amount that moves in or out of the in-transit set changes `balances` on `GET banking/reconciliations/{id}`, so re-read the reconciliation afterwards rather than adjusting a cached difference.","tags":["bankReconciliations"]},"get":{"operationId":"getReconciliationInTransitGlTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReconciliationInTransitGlTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation; bound from the :id path segment.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque forward cursor from a previous response's nextCursor; omit for the first page. Do not construct or decode one."},{"name":"size","in":"query","required":false,"schema":{"type":"number"},"description":"Maximum number of items to return. Default 50, capped at 200; a larger value is clamped rather than rejected."}],"summary":"List the in-transit GL transactions of a reconciliation","description":"The ledger postings this reconciliation has set aside as in transit: posted in this period, but not expected on the bank statement until a later one — an issued cheque not yet cashed being the ordinary case.\n\nThis is the mirror image of `in-transit/bank-transactions`. Each row here is excluded from `outstanding/gl-transactions` and adjusts the statement side of the roll-forward, appearing in `balances.incomingGlTransactionsInTransit` or `balances.outgoingGlTransactionsInTransit` on `GET banking/reconciliations/{id}`.\n\n**`automaticallySet` says who decided.** A row the system carried forward on its own is marked true; one a person flagged is false. `PATCH banking/reconciliations/{id}/in-transit/gl-transactions` preserves the automatic ones.\n\n`nextAccountingPeriodId` is the period the posting is expected to clear the bank in, derived when it was flagged rather than chosen.\n\nPaginate with the `cursor` and `size` query parameters: pass the previous response's `nextCursor` back as `cursor`, and stop when `hasMore` is false. Default page size 50, capped at 200. The cursor is opaque — do not construct or decode one.","tags":["bankReconciliations"]}},"/banking/bank-transactions/match":{"post":{"operationId":"matchBankTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/matchBankTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ALREADY_MATCHED, NO_DOCUMENTS, NO_TRANSACTIONS, INVALID_DOCUMENT_REFERENCE, DOCUMENT_NOT_MATCHABLE, MULTIPLE_FUND_TRANSFERS, FUND_TRANSFER_MUST_BE_ALONE, TOO_MANY_FUND_TRANSFER_TRANSACTIONS, ACCOUNT_NOT_IN_RECONCILIATION_BOOK, AMOUNT_MISMATCH, TRANSACTIONS_SPAN_ACCOUNTS, CURRENCY_MISMATCH, BEFORE_RECONCILIATION_START_DATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_DOCUMENTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DOCUMENT_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_MATCHABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sfdType":{"type":"string"},"sfdId":{"type":"string"}},"additionalProperties":false,"required":["sfdType","sfdId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_FUND_TRANSFERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUND_TRANSFER_MUST_BE_ALONE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"otherSfdType":{"type":"string"}},"additionalProperties":false,"required":["otherSfdType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_FUND_TRANSFER_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_IN_RECONCILIATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionTotal":{"type":"string"},"documentTotal":{"type":"string"}},"additionalProperties":false,"required":["transactionTotal","documentTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_SPAN_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionCurrency":{"type":"string"},"documentCurrency":{"type":"string"}},"additionalProperties":false,"required":["transactionCurrency","documentCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BEFORE_RECONCILIATION_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_DOCUMENTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DOCUMENT_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_MATCHABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sfdType":{"type":"string"},"sfdId":{"type":"string"}},"additionalProperties":false,"required":["sfdType","sfdId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_FUND_TRANSFERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUND_TRANSFER_MUST_BE_ALONE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"otherSfdType":{"type":"string"}},"additionalProperties":false,"required":["otherSfdType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_FUND_TRANSFER_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_IN_RECONCILIATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionTotal":{"type":"string"},"documentTotal":{"type":"string"}},"additionalProperties":false,"required":["transactionTotal","documentTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_SPAN_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionCurrency":{"type":"string"},"documentCurrency":{"type":"string"}},"additionalProperties":false,"required":["transactionCurrency","documentCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BEFORE_RECONCILIATION_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false,"required":["id","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_DOCUMENTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DOCUMENT_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_MATCHABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"sfdType":{"type":"string"},"sfdId":{"type":"string"}},"additionalProperties":false,"required":["sfdType","sfdId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_FUND_TRANSFERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUND_TRANSFER_MUST_BE_ALONE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"otherSfdType":{"type":"string"}},"additionalProperties":false,"required":["otherSfdType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_FUND_TRANSFER_TRANSACTIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_NOT_IN_RECONCILIATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionTotal":{"type":"string"},"documentTotal":{"type":"string"}},"additionalProperties":false,"required":["transactionTotal","documentTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTIONS_SPAN_ACCOUNTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"transactionCurrency":{"type":"string"},"documentCurrency":{"type":"string"}},"additionalProperties":false,"required":["transactionCurrency","documentCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BEFORE_RECONCILIATION_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/matchBankTransactionsInput"}}}},"summary":"Match bank transactions","description":"Matches bank transactions. Name each document by its `sfdType` and `sfdId`. The documents must be in the same currency as the bank transactions and total the same amount, to two decimal places.\n\nAll the bank transactions must belong to the same bank account and legal entity. Each document must be unmatched and belong to that legal entity. It must also have a line that posts to the bank account's linked chart-of-accounts account, unless `journalEntryLineId` names the line to use.\n\nA fund transfer is matched on its own. Send it as the only document, with one or both of its legs as the bank transactions. The legs can be on different bank accounts and in different legal entities. Each leg gets its own match, so `matches` has one item per leg sent. The sending and receiving amounts are each checked against the fund transfer.\n\nTo reverse a match, use `POST banking/bank-transactions/:id/unmatch`.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingBankTransactions"]}},"/banking/reconciliations/{id}/outstanding/bank-transactions":{"get":{"operationId":"getReconciliationOutstandingBankTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReconciliationOutstandingBankTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation; bound from the :id path segment.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque forward cursor from a previous response's nextCursor; omit for the first page. Do not construct or decode one."},{"name":"size","in":"query","required":false,"schema":{"type":"number"},"description":"Maximum number of items to return. Default 50, capped at 200; a larger value is clamped rather than rejected.","example":50}],"summary":"List the outstanding bank transactions of a reconciliation","description":"The bank-feed transactions this reconciliation still has to account for: on the statement, not yet matched to anything in the ledger, and not flagged as in transit.\n\nThis is the working list on the bank side of a reconciliation. A transaction leaves it in one of two ways — it gets matched to a ledger entry, or it gets flagged in transit through `PATCH banking/reconciliations/{id}/in-transit/bank-transactions` because it will only reach the ledger in a later period. Either way it stops being outstanding and stops contributing to `difference`.\n\nIt is scoped to the reconciliation's own period and the periods before it, so a transaction left outstanding in an earlier period keeps showing up until it is dealt with rather than quietly falling off.\n\nPaginate with the `cursor` and `size` query parameters: pass the previous response's `nextCursor` back as `cursor`, and stop when `hasMore` is false. Default page size 50, capped at 200. The cursor is opaque — do not construct or decode one.\n\nAmounts are bare decimals in the account currency; a positive amount is money arriving, a negative one money leaving.","tags":["bankReconciliations"]}},"/accounting/purchase-types":{"post":{"operationId":"createPurchaseType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPurchaseTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PURCHASE_TYPES_DISABLED, NAME_REQUIRED, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the purchase type that already has this name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the purchase type that already has this name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that is already in use."},"existingId":{"type":"string","description":"The identifier of the purchase type that already has this name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseTypeInput"}}}},"summary":"Create a purchase type","description":"Creates a purchase type. A new type is always active, so it can be chosen for purchase orders at once. The response contains only its id.\n\nThe name is required and must be unique within the tenant, ignoring case and surrounding spaces. These are the rules of the Purchase Types settings page.\n\nRead the new record with GET accounting/purchase-types/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPurchaseTypes"]},"get":{"operationId":"purchaseTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","status","-status","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","status","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/purchaseTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List purchase types","description":"Lists purchase types. Filter on status 'active' to get the types that can be chosen for a new purchase order.","tags":["accountingPurchaseTypes"]}},"/accounting/purchase-orders":{"get":{"operationId":"purchaseOrders","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[poNumber]","in":"query","required":false,"description":"Filter poNumber (equality)","schema":{"type":"string"}},{"name":"filter[poNumber][ne]","in":"query","required":false,"description":"Filter poNumber (ne)","schema":{"type":"string"}},{"name":"filter[poNumber][gt]","in":"query","required":false,"description":"Filter poNumber (gt)","schema":{"type":"string"}},{"name":"filter[poNumber][gte]","in":"query","required":false,"description":"Filter poNumber (gte)","schema":{"type":"string"}},{"name":"filter[poNumber][lt]","in":"query","required":false,"description":"Filter poNumber (lt)","schema":{"type":"string"}},{"name":"filter[poNumber][lte]","in":"query","required":false,"description":"Filter poNumber (lte)","schema":{"type":"string"}},{"name":"filter[poNumber][in]","in":"query","required":false,"description":"Filter poNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[poNumber][notIn]","in":"query","required":false,"description":"Filter poNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[poNumber][between]","in":"query","required":false,"description":"Filter poNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[poNumber][like]","in":"query","required":false,"description":"Filter poNumber (like)","schema":{"type":"string"}},{"name":"filter[externalPONumber]","in":"query","required":false,"description":"Filter externalPONumber (equality)","schema":{"type":"string"}},{"name":"filter[externalPONumber][ne]","in":"query","required":false,"description":"Filter externalPONumber (ne)","schema":{"type":"string"}},{"name":"filter[externalPONumber][gt]","in":"query","required":false,"description":"Filter externalPONumber (gt)","schema":{"type":"string"}},{"name":"filter[externalPONumber][gte]","in":"query","required":false,"description":"Filter externalPONumber (gte)","schema":{"type":"string"}},{"name":"filter[externalPONumber][lt]","in":"query","required":false,"description":"Filter externalPONumber (lt)","schema":{"type":"string"}},{"name":"filter[externalPONumber][lte]","in":"query","required":false,"description":"Filter externalPONumber (lte)","schema":{"type":"string"}},{"name":"filter[externalPONumber][in]","in":"query","required":false,"description":"Filter externalPONumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalPONumber][notIn]","in":"query","required":false,"description":"Filter externalPONumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalPONumber][between]","in":"query","required":false,"description":"Filter externalPONumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalPONumber][like]","in":"query","required":false,"description":"Filter externalPONumber (like)","schema":{"type":"string"}},{"name":"filter[approvalStatus]","in":"query","required":false,"description":"Filter approvalStatus (equality)","schema":{"type":"string"}},{"name":"filter[approvalStatus][ne]","in":"query","required":false,"description":"Filter approvalStatus (ne)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gt]","in":"query","required":false,"description":"Filter approvalStatus (gt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][gte]","in":"query","required":false,"description":"Filter approvalStatus (gte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lt]","in":"query","required":false,"description":"Filter approvalStatus (lt)","schema":{"type":"string"}},{"name":"filter[approvalStatus][lte]","in":"query","required":false,"description":"Filter approvalStatus (lte)","schema":{"type":"string"}},{"name":"filter[approvalStatus][in]","in":"query","required":false,"description":"Filter approvalStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][notIn]","in":"query","required":false,"description":"Filter approvalStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[approvalStatus][between]","in":"query","required":false,"description":"Filter approvalStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[approvalStatus][like]","in":"query","required":false,"description":"Filter approvalStatus (like)","schema":{"type":"string"}},{"name":"filter[budgetStatus]","in":"query","required":false,"description":"Filter budgetStatus (equality)","schema":{"type":"string"}},{"name":"filter[budgetStatus][ne]","in":"query","required":false,"description":"Filter budgetStatus (ne)","schema":{"type":"string"}},{"name":"filter[budgetStatus][gt]","in":"query","required":false,"description":"Filter budgetStatus (gt)","schema":{"type":"string"}},{"name":"filter[budgetStatus][gte]","in":"query","required":false,"description":"Filter budgetStatus (gte)","schema":{"type":"string"}},{"name":"filter[budgetStatus][lt]","in":"query","required":false,"description":"Filter budgetStatus (lt)","schema":{"type":"string"}},{"name":"filter[budgetStatus][lte]","in":"query","required":false,"description":"Filter budgetStatus (lte)","schema":{"type":"string"}},{"name":"filter[budgetStatus][in]","in":"query","required":false,"description":"Filter budgetStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[budgetStatus][notIn]","in":"query","required":false,"description":"Filter budgetStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[budgetStatus][between]","in":"query","required":false,"description":"Filter budgetStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[budgetStatus][like]","in":"query","required":false,"description":"Filter budgetStatus (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[needByDate]","in":"query","required":false,"description":"Filter needByDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][ne]","in":"query","required":false,"description":"Filter needByDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][gt]","in":"query","required":false,"description":"Filter needByDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][gte]","in":"query","required":false,"description":"Filter needByDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][lt]","in":"query","required":false,"description":"Filter needByDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][lte]","in":"query","required":false,"description":"Filter needByDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][in]","in":"query","required":false,"description":"Filter needByDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[needByDate][notIn]","in":"query","required":false,"description":"Filter needByDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[needByDate][between]","in":"query","required":false,"description":"Filter needByDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms]","in":"query","required":false,"description":"Filter paymentTerms (equality)","schema":{"type":"string"}},{"name":"filter[paymentTerms][ne]","in":"query","required":false,"description":"Filter paymentTerms (ne)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gt]","in":"query","required":false,"description":"Filter paymentTerms (gt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gte]","in":"query","required":false,"description":"Filter paymentTerms (gte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lt]","in":"query","required":false,"description":"Filter paymentTerms (lt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lte]","in":"query","required":false,"description":"Filter paymentTerms (lte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][in]","in":"query","required":false,"description":"Filter paymentTerms (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][notIn]","in":"query","required":false,"description":"Filter paymentTerms (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][between]","in":"query","required":false,"description":"Filter paymentTerms (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms][like]","in":"query","required":false,"description":"Filter paymentTerms (like)","schema":{"type":"string"}},{"name":"filter[purchaseTypeId]","in":"query","required":false,"description":"Filter purchaseTypeId (equality)","schema":{"type":"string"}},{"name":"filter[purchaseTypeId][ne]","in":"query","required":false,"description":"Filter purchaseTypeId (ne)","schema":{"type":"string"}},{"name":"filter[purchaseTypeId][gt]","in":"query","required":false,"description":"Filter purchaseTypeId (gt)","schema":{"type":"string"}},{"name":"filter[purchaseTypeId][gte]","in":"query","required":false,"description":"Filter purchaseTypeId (gte)","schema":{"type":"string"}},{"name":"filter[purchaseTypeId][lt]","in":"query","required":false,"description":"Filter purchaseTypeId (lt)","schema":{"type":"string"}},{"name":"filter[purchaseTypeId][lte]","in":"query","required":false,"description":"Filter purchaseTypeId (lte)","schema":{"type":"string"}},{"name":"filter[purchaseTypeId][in]","in":"query","required":false,"description":"Filter purchaseTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[purchaseTypeId][notIn]","in":"query","required":false,"description":"Filter purchaseTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[purchaseTypeId][between]","in":"query","required":false,"description":"Filter purchaseTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[purchaseTypeId][like]","in":"query","required":false,"description":"Filter purchaseTypeId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","poNumber","-poNumber","approvalStatus","-approvalStatus","budgetStatus","-budgetStatus","status","-status","currency","-currency","totalAmount","-totalAmount","invoicedTotalAmount","-invoicedTotalAmount","receivedTotalAmount","-receivedTotalAmount","startDate","-startDate","endDate","-endDate","needByDate","-needByDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","poNumber","description","internalDescription","externalMemo","externalPONumber","approvalStatus","budgetStatus","status","currency","totalAmount","invoicedTotalAmount","receivedTotalAmount","startDate","endDate","needByDate","paymentTerms","vendorName","vendorContactEmail","entityName","purchaseTypeId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/purchaseOrdersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List purchase orders","description":"Lists purchase orders. Each item is the order's main fields, without its lines. To get the lines, use GET accounting/purchase-orders/:id or POST accounting/purchase-orders/search.\n\nTo filter by vendor or legal entity, use POST accounting/purchase-orders/search.","tags":["accountingPurchaseOrders"]},"post":{"operationId":"createPurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, PURCHASE_TYPES_DISABLED, PURCHASE_TYPE_NOT_ACTIVE, TOO_MANY_LINES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURCHASE_TYPE_NOT_ACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purchaseTypeId":{"type":"string","description":"The purchase type id you sent, returned unchanged."}},"additionalProperties":false,"required":["purchaseTypeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseOrderInput"}}}},"summary":"Create a purchase order","description":"Creates a purchase order. The order is created with its lines, and the response contains only its id. The order starts as 'pendingApproval' and then goes through your tenant's approval policy, which approves it at once when no approvers are configured.\n\nEach line is an item line or an expense line, set by isItem. An item line is priced by quantity times price and uses itemId and unitOfMeasureId. An expense line is priced by editableAmount and uses accountId.\n\nEvery amount is a plain decimal in the order's currency.\n\nTo see the order, including its poNumber, use GET accounting/purchase-orders/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPurchaseOrders"]}},"/accounting/outbound-payments/{id}":{"patch":{"operationId":"updateOutboundPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateOutboundPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PAYMENT_NOT_EDITABLE, REFERENCE_NOT_FOUND, ITEM_NOT_FOUND, NO_PAYMENT_ITEMS, DOCUMENT_NOT_PAYABLE, PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT, DOCUMENT_CURRENCY_MISMATCH","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be changed."},"status":{"type":"string","description":"The status blocking the change."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string","description":"The item id that does not belong to this payment."}},"additionalProperties":false,"required":["itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PAYMENT_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that would have been left empty."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be changed."},"status":{"type":"string","description":"The status blocking the change."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string","description":"The item id that does not belong to this payment."}},"additionalProperties":false,"required":["itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PAYMENT_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that would have been left empty."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be changed."},"status":{"type":"string","description":"The status blocking the change."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"itemId":{"type":"string","description":"The item id that does not belong to this payment."}},"additionalProperties":false,"required":["itemId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_PAYMENT_ITEMS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that would have been left empty."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_PAYABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that cannot be paid."},"status":{"type":"string","description":"The document's current status."},"reason":{"type":"string","description":"Why the document cannot be paid, either 'not-approved', 'voided' or 'non-reimbursable'."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","status","reason","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_AMOUNT_EXCEEDS_OPEN_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The number of the document that would have been over-applied."},"openAmount":{"type":"string","description":"The amount still outstanding on the document, as a decimal."},"requestedAmount":{"type":"string","description":"The amount the payment item tried to apply, as a decimal."},"alreadyPaid":{"type":"boolean","description":"True when the document is already settled in full and has nothing left to pay."},"lineIndex":{"type":"number","description":"The zero-based position of the payment item that names the document."}},"additionalProperties":false,"required":["documentNumber","openAmount","requestedAmount","alreadyPaid","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currencies":{"type":"array","items":{"type":"string"},"description":"The distinct currencies found across the documents."}},"additionalProperties":false,"required":["currencies"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the outbound payment you want to update.","example":"e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateOutboundPaymentInput"}}}},"summary":"Update an outbound payment","description":"Updates an outbound payment with the fields you send. A field you leave out keeps its current value.\n\nUse the outbound payment's id, not its outboundPaymentNumber.\n\nPayment items change through three separate arrays, applied in this order: deletePaymentItems, updatePaymentItems, createPaymentItems. Leave out all three to keep the items as they are. When the payment currency differs from the bank account's currency, leaving out actualExchangeRate sets it to systemExchangeRate. If you leave that out too, both are set to the system rate for the payment date. This doesn't apply to a draft payment.\n\nOnly a payment that hasn't been executed can be changed. Its payment items can change too.\n\nFor a payment that isn't a draft, the status must be 'manuallyRecorded', 'scheduled', 'unknown', 'rejected', or 'cancelled'. For any other status, the request fails with PAYMENT_NOT_EDITABLE. To withdraw a payment that is 'successful', 'partiallySuccessful', or 'processing', use POST accounting/outbound-payments/:id/void.\n\nThe payment must keep at least one item. New and changed items are checked the same way as on create.\n\nWhen an item's amount changes, its old amount is credited back first, so sending the same amount again doesn't count as a second payment.\n\nThe response is empty. To see the updated payment, use GET accounting/outbound-payments/:id.","tags":["accountingOutboundPayments"]},"delete":{"operationId":"deleteOutboundPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteOutboundPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PAYMENT_NOT_EDITABLE, POSTING_PERIOD_CLOSED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."},"status":{"type":"string","description":"The status blocking the delete."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."},"status":{"type":"string","description":"The status blocking the delete."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_EDITABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."},"status":{"type":"string","description":"The status blocking the delete."}},"additionalProperties":false,"required":["outboundPaymentNumber","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentNumber":{"type":"string","description":"The number of the payment that could not be deleted."}},"additionalProperties":false,"required":["outboundPaymentNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the outbound payment you want to delete.","example":"e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12"}],"summary":"Delete an outbound payment","description":"Deletes an outbound payment. Only a payment that hasn't been executed can be deleted. The documents the payment paid become unpaid again.\n\nFor a payment that isn't a draft, the status must be 'manuallyRecorded', 'scheduled', 'unknown', 'rejected', or 'cancelled'. For any other status, the request fails with PAYMENT_NOT_EDITABLE. To withdraw a payment that is 'successful', 'partiallySuccessful', or 'processing', use POST accounting/outbound-payments/:id/void instead.\n\nThe accounting period of the payment's journal entry must be open for the payment's legal entity and for the legal entity of every payment item. A draft payment skips this check too.\n\nThe response is empty.","tags":["accountingOutboundPayments"]},"get":{"operationId":"getOutboundPayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getOutboundPaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the outbound payment you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve an outbound payment","description":"Retrieves an outbound payment. Use the outbound payment's id, not its outboundPaymentNumber.\n\nAn outbound payment has one or more lines. The response includes the lines, which GET accounting/outbound-payments doesn't return.\n\nPOST accounting/outbound-payments/search returns the same record for each match.","tags":["accountingOutboundPayments"]}},"/banking/reconciliations/{id}/outstanding/gl-transactions":{"get":{"operationId":"getReconciliationOutstandingGlTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReconciliationOutstandingGlTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation; bound from the :id path segment.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque forward cursor from a previous response's nextCursor; omit for the first page. Do not construct or decode one."},{"name":"size","in":"query","required":false,"schema":{"type":"number"},"description":"Maximum number of items to return. Default 50, capped at 200; a larger value is clamped rather than rejected.","example":50}],"summary":"List the outstanding GL transactions of a reconciliation","description":"The ledger postings this reconciliation still has to account for: posted against the account, not yet matched to anything on the bank feed, and not flagged as in transit.\n\nThis is the mirror image of `outstanding/bank-transactions` — the same job on the ledger side. A posting leaves the list by being matched to a bank transaction, or by being flagged in transit through `PATCH banking/reconciliations/{id}/in-transit/gl-transactions` when the bank will only see it in a later period.\n\n**These are ledger transactions, not journal entry lines in the raw sense.** Non-cash entries are excluded — revaluations, revaluation reversals and realised-FX closing journals carry only functional amounts and move no cash, so they have nothing to reconcile against a statement.\n\nPaginate with the `cursor` and `size` query parameters: pass the previous response's `nextCursor` back as `cursor`, and stop when `hasMore` is false. Default page size 50, capped at 200. The cursor is opaque — do not construct or decode one.\n\nAmounts are bare decimals in the account currency, signed the way the statement sees them: positive is money arriving in the account.","tags":["bankReconciliations"]}},"/banking/reconciliations/{id}":{"get":{"operationId":"getReconciliation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReconciliationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"balanced":{"value":{"data":{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","reconciliationNumber":"AR-000117","accountId":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7","accountNumber":"1010","accountName":"Operating Account USD","entityId":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b","entityName":"Everest US Inc.","accountingPeriodId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","periodName":"Jul 2026","statementEndDate":"2026-07-31","statementEndBalance":"184320.55","currency":"USD","status":"inProgress","lastModifiedDate":"2026-08-04T14:12:09.418Z","balances":{"currency":"USD","statementBeginningBalance":"171905.12","statementEndingBalance":"184320.55","glBeginningBalance":"171905.12","glEndingBalance":"186470.55","clearedIncoming":"43120.00","clearedOutgoing":"-30704.57","incomingBankTransactionsInTransit":"0","outgoingBankTransactionsInTransit":"-2150.00","incomingGlTransactionsInTransit":"0","outgoingGlTransactionsInTransit":"0","difference":"0"}}},"summary":"An in-progress reconciliation whose difference has been worked down to zero and is ready to submit"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation to fetch; bound from the :id path segment.","examples":{"balanced":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"summary":"Fetch an account reconciliation by id","description":"Fetches one reconciliation by the `id` that start returned and that the worklist reports.\n\nThe scalar fields are named and typed exactly as `GET banking/reconciliations` names and types them, so one model deserializes both. What only this route carries is `balances`: the roll-forward that shows how the statement side and the ledger side each reach an ending balance, and what is left between them.\n\n**Read `balances` as two columns that must meet.** The statement side starts at `statementBeginningBalance` — the previous period's closing balance, or the account's configured opening balance for a first reconciliation — and ends at `statementEndingBalance`, the figure the bank reports. The ledger side runs from `glBeginningBalance` to `glEndingBalance`. `clearedIncoming` and `clearedOutgoing` are the movements matched on both sides, so they appear in both columns. What has been seen by only one side is in transit: `incomingBankTransactionsInTransit` and `outgoingBankTransactionsInTransit` are on the bank feed but not yet in the ledger, and the two `…GlTransactionsInTransit` figures are the reverse. `difference` is what remains once both sides are adjusted for what is in transit; a reconciliation balances when it is zero.\n\n**`difference` is computed on every call, not stored.** It is not available on the worklist for that reason, and it moves as transactions are matched or flagged in transit — do not cache it against a `lastModifiedDate` that only tracks the reconciliation row.\n\nEvery amount in `balances` is a bare decimal in the account currency, named by the sibling `currency` field.\n\nA miss is reported as the diagnostic `NOT_FOUND` — but under HTTP **400**, not 404. A route cannot yet declare a status per diagnostic code, so business failures share the 400 slot. Branch on the `code` in the error body, not on the status.","tags":["bankReconciliations"]},"patch":{"operationId":"updateReconciliation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateReconciliationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"correctBalance":{"value":{"data":{}},"summary":"The statement arrived with a different closing balance than the one defaulted at start"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, RECONCILIATION_INVALID_STATUS, STATEMENT_END_DATE_OUTSIDE_PERIOD","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATEMENT_END_DATE_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"statementEndDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"},"periodEndDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["statementEndDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATEMENT_END_DATE_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"statementEndDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"},"periodEndDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["statementEndDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATEMENT_END_DATE_OUTSIDE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"statementEndDate":{"type":"string","format":"date"},"periodStartDate":{"type":"string","format":"date"},"periodEndDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["statementEndDate","periodStartDate","periodEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation to update; bound from the :id path segment.","examples":{"correctBalance":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateReconciliationInput"},"examples":{"correctBalance":{"value":{"statementEndBalance":"184320.55"},"summary":"The statement arrived with a different closing balance than the one defaulted at start"}}}}},"summary":"Update the statement figures on a reconciliation","description":"Corrects the statement figures on a reconciliation — the closing balance the bank reports and the date it closes on.\n\nThose two fields are all this route changes. Everything else about a reconciliation is derived or is the result of another operation: the account and period are fixed when it starts, the status moves through submit and reopen, and `difference` is computed rather than stored. There is no field here that could be set to make a reconciliation balance.\n\nBoth inputs are optional and omitting one leaves it unchanged, so a request may carry either, both, or — pointlessly but harmlessly — neither. Neither field can be cleared once set: pass a corrected value rather than null.\n\nA successful call returns an empty body.\n\n**Changing `statementEndBalance` moves `difference`.** It is one side of the comparison, so re-read `GET banking/reconciliations/{id}` after a change rather than assuming the roll-forward you last saw still holds.\n\n**A completed reconciliation cannot be edited.** Its closing balance is the next period's opening balance, so the call is refused with `RECONCILIATION_INVALID_STATUS`; reopen it first. `statementEndDate` must fall inside the reconciliation's accounting period (`STATEMENT_END_DATE_OUTSIDE_PERIOD`).","tags":["bankReconciliations"]}},"/banking/reconciliations/{id}/matches":{"get":{"operationId":"getReconciliationMatches","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getReconciliationMatchesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation; bound from the :id path segment.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque forward cursor from a previous response's nextCursor; omit for the first page. Do not construct or decode one."},{"name":"size","in":"query","required":false,"schema":{"type":"number"},"description":"Maximum number of match groups to return. Default 50, capped at 200; a larger value is clamped rather than rejected.","example":50}],"summary":"List the matches of a reconciliation","description":"What this reconciliation has already tied together: the bank transactions and ledger postings that have been matched to each other, grouped by match.\n\nA match is a group, not a pair. One bank transaction can settle several invoices and one payment run can appear as a single line on the statement, so each entry here carries a `documents` array and a `documentCount` rather than two ids. `amount` is the group's net amount and `matchDate` the date it was matched on.\n\n**Two kinds of group come back, told apart by `type`.** A `match` is the ordinary case — bank meets ledger. A `netZero` is a group of ledger postings that cancel each other out and therefore never appear on a statement at all; they are matched to each other rather than to the bank, and they are what stops a pair of offsetting corrections from sitting in `outstanding/gl-transactions` forever.\n\n**This collection is read-only in v1.** Creating and removing net-zero matches, and reversing ordinary bank-to-ledger matches, are not exposed here yet — the latter belongs to the matching surface rather than to reconciliation. Reading is enough to explain a reconciliation's difference, which is what this endpoint is for.\n\nPaginate with the `cursor` and `size` query parameters: pass the previous response's `nextCursor` back as `cursor`, and stop when `hasMore` is false. Default page size 50, capped at 200. The cursor is opaque — do not construct or decode one. Groups come oldest match first.","tags":["bankReconciliations"]}},"/accounting/expense-reports/search":{"post":{"operationId":"searchExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchExpenseReportInput"}}}},"summary":"Search expense reports","description":"Searches expense reports. Each match includes the report's main fields, its expense items and the files on the report. Results are returned newest first.\n\nYou can filter by employee or legal entity, by id or by name. GET accounting/expense-reports has none of these filters.","tags":["accountingExpenseReports"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/vendors/{id}/mark-duplicate":{"post":{"operationId":"markVendorDuplicate","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/markVendorDuplicateOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, VENDOR_IS_DRAFT, EMPTY_CHILDREN, PARENT_INACTIVE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft parent vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Always present, for a consistent shape across this endpoint's diagnostics."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentVendorNumber":{"type":"string","description":"Number of the parent vendor."}},"additionalProperties":false,"required":["parentVendorNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft parent vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Always present, for a consistent shape across this endpoint's diagnostics."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentVendorNumber":{"type":"string","description":"Number of the parent vendor."}},"additionalProperties":false,"required":["parentVendorNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VENDOR_IS_DRAFT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id of the draft parent vendor."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPTY_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Always present, for a consistent shape across this endpoint's diagnostics."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentVendorNumber":{"type":"string","description":"Number of the parent vendor."}},"additionalProperties":false,"required":["parentVendorNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the parent vendor the duplicates are folded into; bound from the :id path segment.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/markVendorDuplicateInput"}}}},"summary":"Mark duplicate vendors","description":"Marks duplicate vendors. The vendor in the path becomes the parent of each vendor in duplicateVendorIds. The duplicates are deactivated. Their vendor bills and vendor credits that are unposted, or posted only in open accounting periods, are reassigned to the parent. Documents in locked periods stay with the duplicate. Vendors already marked as duplicates of a listed vendor are reassigned to the new parent too.\n\nThe parent vendor must be active. If any id in duplicateVendorIds doesn't exist, nothing is written. The request fails if a reassigned bill has the same bill number as one of the parent's bills.\n\nThe response gives foldedCount, the number of ids in duplicateVendorIds. Vendors reassigned from a listed vendor aren't counted.","tags":["accountingVendors"]}},"/accounting/expense-categories/search":{"post":{"operationId":"searchExpenseCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchExpenseCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchExpenseCategoryInput"}}}},"summary":"Search expense categories","description":"Searches expense categories. You can filter by id, name, kind, status, or external identifier. Results are returned newest first, and each item has the same fields as GET accounting/expense-categories/:id.","tags":["accountingExpenseCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/purchase-requests":{"get":{"operationId":"purchaseRequests","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[purchaseRequestNumber]","in":"query","required":false,"description":"Filter purchaseRequestNumber (equality)","schema":{"type":"string"}},{"name":"filter[purchaseRequestNumber][ne]","in":"query","required":false,"description":"Filter purchaseRequestNumber (ne)","schema":{"type":"string"}},{"name":"filter[purchaseRequestNumber][gt]","in":"query","required":false,"description":"Filter purchaseRequestNumber (gt)","schema":{"type":"string"}},{"name":"filter[purchaseRequestNumber][gte]","in":"query","required":false,"description":"Filter purchaseRequestNumber (gte)","schema":{"type":"string"}},{"name":"filter[purchaseRequestNumber][lt]","in":"query","required":false,"description":"Filter purchaseRequestNumber (lt)","schema":{"type":"string"}},{"name":"filter[purchaseRequestNumber][lte]","in":"query","required":false,"description":"Filter purchaseRequestNumber (lte)","schema":{"type":"string"}},{"name":"filter[purchaseRequestNumber][in]","in":"query","required":false,"description":"Filter purchaseRequestNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[purchaseRequestNumber][notIn]","in":"query","required":false,"description":"Filter purchaseRequestNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[purchaseRequestNumber][between]","in":"query","required":false,"description":"Filter purchaseRequestNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[purchaseRequestNumber][like]","in":"query","required":false,"description":"Filter purchaseRequestNumber (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[needByDate]","in":"query","required":false,"description":"Filter needByDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][ne]","in":"query","required":false,"description":"Filter needByDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][gt]","in":"query","required":false,"description":"Filter needByDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][gte]","in":"query","required":false,"description":"Filter needByDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][lt]","in":"query","required":false,"description":"Filter needByDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][lte]","in":"query","required":false,"description":"Filter needByDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[needByDate][in]","in":"query","required":false,"description":"Filter needByDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[needByDate][notIn]","in":"query","required":false,"description":"Filter needByDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[needByDate][between]","in":"query","required":false,"description":"Filter needByDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms]","in":"query","required":false,"description":"Filter paymentTerms (equality)","schema":{"type":"string"}},{"name":"filter[paymentTerms][ne]","in":"query","required":false,"description":"Filter paymentTerms (ne)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gt]","in":"query","required":false,"description":"Filter paymentTerms (gt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gte]","in":"query","required":false,"description":"Filter paymentTerms (gte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lt]","in":"query","required":false,"description":"Filter paymentTerms (lt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lte]","in":"query","required":false,"description":"Filter paymentTerms (lte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][in]","in":"query","required":false,"description":"Filter paymentTerms (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][notIn]","in":"query","required":false,"description":"Filter paymentTerms (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][between]","in":"query","required":false,"description":"Filter paymentTerms (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms][like]","in":"query","required":false,"description":"Filter paymentTerms (like)","schema":{"type":"string"}},{"name":"filter[externalId]","in":"query","required":false,"description":"Filter externalId (equality)","schema":{"type":"string"}},{"name":"filter[externalId][ne]","in":"query","required":false,"description":"Filter externalId (ne)","schema":{"type":"string"}},{"name":"filter[externalId][gt]","in":"query","required":false,"description":"Filter externalId (gt)","schema":{"type":"string"}},{"name":"filter[externalId][gte]","in":"query","required":false,"description":"Filter externalId (gte)","schema":{"type":"string"}},{"name":"filter[externalId][lt]","in":"query","required":false,"description":"Filter externalId (lt)","schema":{"type":"string"}},{"name":"filter[externalId][lte]","in":"query","required":false,"description":"Filter externalId (lte)","schema":{"type":"string"}},{"name":"filter[externalId][in]","in":"query","required":false,"description":"Filter externalId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][notIn]","in":"query","required":false,"description":"Filter externalId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalId][between]","in":"query","required":false,"description":"Filter externalId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalId][like]","in":"query","required":false,"description":"Filter externalId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","purchaseRequestNumber","-purchaseRequestNumber","status","-status","currency","-currency","startDate","-startDate","endDate","-endDate","needByDate","-needByDate","totalAmount","-totalAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","purchaseRequestNumber","description","internalDescription","externalMemo","status","currency","totalAmount","startDate","endDate","needByDate","paymentTerms","externalId","entityName","departmentName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/purchaseRequestsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List purchase requests","description":"Lists purchase requests. Each item is the request's main fields, without its lines. To get the lines, use GET accounting/purchase-requests/:id or POST accounting/purchase-requests/search.\n\nTo filter by vendor, legal entity, or department, use POST accounting/purchase-requests/search.","tags":["accountingPurchaseRequests"]},"post":{"operationId":"createPurchaseRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPurchaseRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, REFERENCE_NOT_FOUND, TOO_MANY_LINES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseRequestInput"}}}},"summary":"Create a purchase request","description":"Creates a purchase request. The purchase request is created with its lines, and the response contains only its id. The request starts as 'pendingApproval' and then goes through your tenant's approval policy, which approves it at once when no approvers are configured.\n\nEach line is an item line or an expense line, set by isItem. A line that leaves out isItem is an expense line. An item line is priced by quantity times price and uses itemId and unitOfMeasureId. An expense line is priced by editableAmount.\n\nIf your tenant makes department required, send departmentId on every line. If it makes any other tag dimension required, this endpoint can't create the request. Either failure returns an error that has no code in the error list.\n\nTo stop a purchase request, reject it with POST accounting/purchase-requests/:id/reject.\n\nTo see the request, including its purchaseRequestNumber and the itemId and departmentId of each line, use GET accounting/purchase-requests/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingPurchaseRequests"]}},"/accounting/vendor-credits/{id}/unapply":{"post":{"operationId":"unapplyVendorCredit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/unapplyVendorCreditOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, NO_APPLICATIONS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the application that carried the reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_APPLICATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorCreditNumber":{"type":"string","description":"The number of the vendor credit."}},"additionalProperties":false,"required":["vendorCreditNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor credit you want to detach.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/unapplyVendorCreditInput"}}}},"summary":"Unapply a vendor credit from vendor bills","description":"Unapplies a vendor credit from vendor bills. The applied amounts go back to the credit's available balance.\n\nA bill with credits applied to it can't be reversed, so unapply them before you use POST accounting/vendor-bills/:id/reverse.\n\nThe response is empty.","tags":["accountingVendorCredits"]}},"/banking/bank-transactions":{"post":{"operationId":"createBankTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBankTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_FIELD_VALUE, DUPLICATE_EXTERNAL_TRANSACTION_ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Always 'bankAccount' on this endpoint."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_TRANSACTION_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalTransactionId":{"type":"string","description":"The externalTransactionId that is already taken."},"existingId":{"type":"string","description":"The unique identifier for the transaction already using it."}},"additionalProperties":false,"required":["externalTransactionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Always 'bankAccount' on this endpoint."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_TRANSACTION_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalTransactionId":{"type":"string","description":"The externalTransactionId that is already taken."},"existingId":{"type":"string","description":"The unique identifier for the transaction already using it."}},"additionalProperties":false,"required":["externalTransactionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found. Always 'bankAccount' on this endpoint."},"referenceId":{"type":"string","description":"The identifier that matched no record."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_FIELD_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field whose value was rejected."},"value":{"type":"string","description":"The value that was rejected."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"The values the field accepts."}},"additionalProperties":false,"required":["field","value","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_EXTERNAL_TRANSACTION_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"externalTransactionId":{"type":"string","description":"The externalTransactionId that is already taken."},"existingId":{"type":"string","description":"The unique identifier for the transaction already using it."}},"additionalProperties":false,"required":["externalTransactionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBankTransactionInput"}}}},"summary":"Create a bank transaction","description":"Creates a bank transaction. The response contains only the new transaction's id. Read the record with GET banking/bank-transactions/:id.\n\nbankAccountId, amount, currency, externalCreationDate and externalTransactionId are required. externalTransactionId must be unique across the tenant and is how the source system's own identifier is stored. A repeat fails with DUPLICATE_EXTERNAL_TRANSACTION_ID, which names the existing transaction.\n\namount is a decimal in the transaction currency. A negative amount is money leaving the account.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["bankingBankTransactions"]},"get":{"operationId":"bankTransactions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[bankTransactionNumber]","in":"query","required":false,"description":"Filter bankTransactionNumber (equality)","schema":{"type":"string"}},{"name":"filter[bankTransactionNumber][ne]","in":"query","required":false,"description":"Filter bankTransactionNumber (ne)","schema":{"type":"string"}},{"name":"filter[bankTransactionNumber][gt]","in":"query","required":false,"description":"Filter bankTransactionNumber (gt)","schema":{"type":"string"}},{"name":"filter[bankTransactionNumber][gte]","in":"query","required":false,"description":"Filter bankTransactionNumber (gte)","schema":{"type":"string"}},{"name":"filter[bankTransactionNumber][lt]","in":"query","required":false,"description":"Filter bankTransactionNumber (lt)","schema":{"type":"string"}},{"name":"filter[bankTransactionNumber][lte]","in":"query","required":false,"description":"Filter bankTransactionNumber (lte)","schema":{"type":"string"}},{"name":"filter[bankTransactionNumber][in]","in":"query","required":false,"description":"Filter bankTransactionNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bankTransactionNumber][notIn]","in":"query","required":false,"description":"Filter bankTransactionNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[bankTransactionNumber][between]","in":"query","required":false,"description":"Filter bankTransactionNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[bankTransactionNumber][like]","in":"query","required":false,"description":"Filter bankTransactionNumber (like)","schema":{"type":"string"}},{"name":"filter[externalTransactionId]","in":"query","required":false,"description":"Filter externalTransactionId (equality)","schema":{"type":"string"}},{"name":"filter[externalTransactionId][ne]","in":"query","required":false,"description":"Filter externalTransactionId (ne)","schema":{"type":"string"}},{"name":"filter[externalTransactionId][gt]","in":"query","required":false,"description":"Filter externalTransactionId (gt)","schema":{"type":"string"}},{"name":"filter[externalTransactionId][gte]","in":"query","required":false,"description":"Filter externalTransactionId (gte)","schema":{"type":"string"}},{"name":"filter[externalTransactionId][lt]","in":"query","required":false,"description":"Filter externalTransactionId (lt)","schema":{"type":"string"}},{"name":"filter[externalTransactionId][lte]","in":"query","required":false,"description":"Filter externalTransactionId (lte)","schema":{"type":"string"}},{"name":"filter[externalTransactionId][in]","in":"query","required":false,"description":"Filter externalTransactionId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalTransactionId][notIn]","in":"query","required":false,"description":"Filter externalTransactionId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalTransactionId][between]","in":"query","required":false,"description":"Filter externalTransactionId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalTransactionId][like]","in":"query","required":false,"description":"Filter externalTransactionId (like)","schema":{"type":"string"}},{"name":"filter[externalPaymentId]","in":"query","required":false,"description":"Filter externalPaymentId (equality)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][ne]","in":"query","required":false,"description":"Filter externalPaymentId (ne)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][gt]","in":"query","required":false,"description":"Filter externalPaymentId (gt)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][gte]","in":"query","required":false,"description":"Filter externalPaymentId (gte)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][lt]","in":"query","required":false,"description":"Filter externalPaymentId (lt)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][lte]","in":"query","required":false,"description":"Filter externalPaymentId (lte)","schema":{"type":"string"}},{"name":"filter[externalPaymentId][in]","in":"query","required":false,"description":"Filter externalPaymentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalPaymentId][notIn]","in":"query","required":false,"description":"Filter externalPaymentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalPaymentId][between]","in":"query","required":false,"description":"Filter externalPaymentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalPaymentId][like]","in":"query","required":false,"description":"Filter externalPaymentId (like)","schema":{"type":"string"}},{"name":"filter[externalCreationDate]","in":"query","required":false,"description":"Filter externalCreationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[externalCreationDate][ne]","in":"query","required":false,"description":"Filter externalCreationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[externalCreationDate][gt]","in":"query","required":false,"description":"Filter externalCreationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[externalCreationDate][gte]","in":"query","required":false,"description":"Filter externalCreationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[externalCreationDate][lt]","in":"query","required":false,"description":"Filter externalCreationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[externalCreationDate][lte]","in":"query","required":false,"description":"Filter externalCreationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[externalCreationDate][in]","in":"query","required":false,"description":"Filter externalCreationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalCreationDate][notIn]","in":"query","required":false,"description":"Filter externalCreationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalCreationDate][between]","in":"query","required":false,"description":"Filter externalCreationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[matchStatus]","in":"query","required":false,"description":"Filter matchStatus (equality)","schema":{"type":"string"}},{"name":"filter[matchStatus][ne]","in":"query","required":false,"description":"Filter matchStatus (ne)","schema":{"type":"string"}},{"name":"filter[matchStatus][gt]","in":"query","required":false,"description":"Filter matchStatus (gt)","schema":{"type":"string"}},{"name":"filter[matchStatus][gte]","in":"query","required":false,"description":"Filter matchStatus (gte)","schema":{"type":"string"}},{"name":"filter[matchStatus][lt]","in":"query","required":false,"description":"Filter matchStatus (lt)","schema":{"type":"string"}},{"name":"filter[matchStatus][lte]","in":"query","required":false,"description":"Filter matchStatus (lte)","schema":{"type":"string"}},{"name":"filter[matchStatus][in]","in":"query","required":false,"description":"Filter matchStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[matchStatus][notIn]","in":"query","required":false,"description":"Filter matchStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[matchStatus][between]","in":"query","required":false,"description":"Filter matchStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[matchStatus][like]","in":"query","required":false,"description":"Filter matchStatus (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","bankTransactionNumber","-bankTransactionNumber","externalTransactionId","-externalTransactionId","externalCreationDate","-externalCreationDate","amount","-amount","currency","-currency","matchStatus","-matchStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","bankTransactionNumber","externalTransactionId","externalPaymentId","endToEndId","externalCreationDate","description","externalDescription","additionalInformation","payeeOrPayor","amount","currency","matchStatus","notes","transactionPaymentMethod","accountName","sourceBankName","entityName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/bankTransactionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List bank transactions","description":"Lists bank transactions. To filter by bank account or legal entity, use POST banking/bank-transactions/search.","tags":["bankingBankTransactions"]}},"/banking/reconciliations/{id}/submit":{"post":{"operationId":"submitReconciliation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/submitReconciliationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"submitted":{"value":{"data":{}},"summary":"Closing a balanced, in-progress reconciliation"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, RECONCILIATION_INVALID_STATUS, RECONCILIATION_PREVIOUS_NOT_COMPLETE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_PREVIOUS_NOT_COMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_PREVIOUS_NOT_COMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_INVALID_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECONCILIATION_PREVIOUS_NOT_COMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the reconciliation to submit; bound from the :id path segment.","examples":{"submitted":{"value":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitReconciliationInput"},"examples":{"submitted":{"value":{},"summary":"Closing a balanced, in-progress reconciliation"}}}}},"summary":"Submit an account reconciliation","description":"Closes a reconciliation, moving it to `complete` and stamping who reconciled it and when. A successful call returns an empty body; the stamps are on `GET banking/reconciliations/{id}`.\n\nThis is a named operation rather than a status write, because it is not only a field change: the stamping is part of it, and the ordering rule below is enforced at this moment. There is deliberately no way to set `status` through `PATCH`.\n\n**Reconciliations close in order.** A period cannot be submitted while the same account's previous period is still open, and attempting it fails with `RECONCILIATION_PREVIOUS_NOT_COMPLETE`. This is what makes each period's beginning balance meaningful: it is the previous period's closing statement balance.\n\n**Only an open reconciliation can be submitted** — one that is `inProgress` or `unreconciled` (reopened). Submitting one that is already `complete` fails with `RECONCILIATION_INVALID_STATUS`, so this route is **not** idempotent: a retry after a successful call is an error, not a no-op. Treat a `RECONCILIATION_INVALID_STATUS` on a retry as confirmation the first call landed, or read the reconciliation to be sure.\n\nNote what this route does **not** check: it does not require `difference` to be zero. A reconciliation can be closed while it still shows a difference, and it is the caller's job to read `GET banking/reconciliations/{id}` and decide whether that is acceptable. Both declared failures arrive under HTTP **400**; branch on the `code` in the error body.","tags":["bankReconciliations"]}},"/banking/bank-transactions/search":{"post":{"operationId":"searchBankTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBankTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBankTransactionInput"}}}},"summary":"Search bank transactions","description":"Searches bank transactions. Every filter is optional and they are combined with AND. Omit them all to return every bank transaction. Each match is the full transaction record.","tags":["bankingBankTransactions"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/vendor-bills/search":{"post":{"operationId":"searchVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchVendorBillInput"}}}},"summary":"Search vendor bills","description":"Searches vendor bills. Each match has the same fields GET accounting/vendor-bills/:id returns, with its line items and their amortization schedules, but without the bill's approval decisions.\n\nThe purchase-order filters match at line level. A bill matches when any of its lines is linked to a line of that purchase order.","tags":["accountingVendorBills"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/vendor-bills":{"post":{"operationId":"createVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, ACCOUNT_ENTITY_MISMATCH, CROSS_CHARGE_INVALID, TOO_MANY_LINES, INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, FILE_TOO_LARGE, ATTACHMENT_REQUIRED, TAX_CODE_NOT_FOUND, TAX_CODE_AMBIGUOUS, TAX_CODE_ACCOUNT_NOT_CONFIGURED, PAYABLE_ACCOUNT_NOT_CONFIGURED, AMORTIZATION_NOT_ALLOWED_ON_LINE, AMORTIZATION_DATE_RANGE_INVALID, AMORTIZATION_BOOK_NOT_CONFIGURED, DUPLICATE_AMORTIZATION_BOOK, AMORTIZATION_TERM_MISMATCH, AMORTIZATION_METHOD_INVALID, AMORTIZATION_SCHEDULE_NOT_FOUND, AMORTIZATION_SCHEDULE_POSTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account you sent that does not belong to the entity's chart of accounts."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The uploaded file's stored name."},"maxSizeMb":{"type":"number","description":"The largest file size accepted, in MB."}},"additionalProperties":false,"required":["attachmentIndex","fileName","maxSizeMb"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYABLE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity identifier you sent."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts missing the assignment. See id on GET accounting/charts-of-accounts/:id. Empty when only the default book's lookup failed."}},"additionalProperties":false,"required":["entityId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string","description":"Which kind of record was not found."},"referenceId":{"type":"string","description":"The identifier that matched no record."},"lineIndex":{"type":"number","description":"The zero-based position of the line that carried the reference. Absent for a header reference."}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACCOUNT_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountId":{"type":"string","description":"The account you sent that does not belong to the entity's chart of accounts."},"lineIndex":{"type":"number","description":"The zero-based position of the offending line."}},"additionalProperties":false,"required":["accountId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CROSS_CHARGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasons":{"type":"array","items":{"type":"string"},"description":"One message per problem found."}},"additionalProperties":false,"required":["reasons"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number","description":"The number of lines the request carried."},"maxLineCount":{"type":"number","description":"The most that can be written in one call."}},"additionalProperties":false,"required":["lineCount","maxLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FILE_TOO_LARGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The uploaded file's stored name."},"maxSizeMb":{"type":"number","description":"The largest file size accepted, in MB."}},"additionalProperties":false,"required":["attachmentIndex","fileName","maxSizeMb"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction. Absent when you sent none."},"taxCodeId":{"type":"string","description":"The tax code identifier you sent. Absent when you sent none."}},"additionalProperties":false,"required":["lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_AMBIGUOUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"vatPercentage":{"type":"string","description":"The VAT rate you sent, as a decimal fraction."},"candidateTaxCodeIds":{"type":"array","items":{"type":"string"},"description":"The tax codes with that rate. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["lineIndex","vatPercentage","candidateTaxCodeIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TAX_CODE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The zero-based position of the offending line."},"taxCodeId":{"type":"string","description":"The tax code the line resolved to. See lines[].id on GET accounting/tax-configurations/:id."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts the tax code has no account in. See id on GET accounting/charts-of-accounts/:id."}},"additionalProperties":false,"required":["lineIndex","taxCodeId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYABLE_ACCOUNT_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity identifier you sent."},"chartOfAccountsIds":{"type":"array","items":{"type":"string"},"description":"The charts of accounts missing the assignment. See id on GET accounting/charts-of-accounts/:id. Empty when only the default book's lookup failed."}},"additionalProperties":false,"required":["entityId","chartOfAccountsIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_NOT_ALLOWED_ON_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"lineType":{"type":"string","description":"The line type that refused the schedule."}},"additionalProperties":false,"required":["lineIndex","lineType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_DATE_RANGE_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationStartDate":{"type":"string","description":"The start date you sent. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","description":"The end date you sent. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["lineIndex","amortizationStartDate","amortizationEndDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_BOOK_NOT_CONFIGURED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier you sent, returned unchanged. Empty when you omitted it and the entity has no default transaction book."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_AMORTIZATION_BOOK"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"bookId":{"type":"string","description":"The book identifier that was repeated."}},"additionalProperties":false,"required":["lineIndex","bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_TERM_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"term":{"type":"string","description":"The term you sent, in months."},"expectedTerm":{"type":"string","description":"The term the start and end dates actually span, in months."}},"additionalProperties":false,"required":["lineIndex","term","expectedTerm"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_METHOD_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."},"amortizationMethod":{"type":"string","description":"The amortization method you sent, returned unchanged."},"allowedValues":{"type":"array","items":{"type":"string"},"description":"Every accepted amortization method."}},"additionalProperties":false,"required":["lineIndex","amortizationMethod","allowedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMORTIZATION_SCHEDULE_POSTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"scheduleId":{"type":"string","description":"The schedule identifier you sent, returned unchanged."},"lineIndex":{"type":"number","description":"The position of the offending line in the lines array, counting from zero."}},"additionalProperties":false,"required":["scheduleId","lineIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVendorBillInput"}}}},"summary":"Create a vendor bill","description":"Creates a vendor bill. The bill is created with its line items, and the response contains only its id. The bill always starts in 'pendingApproval' status. To approve it, use POST accounting/vendor-bills/:id/approve.\n\nIf the bill has more lines than your tenant allows in one request, the request fails with TOO_MANY_LINES.\n\nTo attach the invoice PDF: upload it to `POST /public/files/{namespace}/createVendorBill` (multipart/form-data), then send the returned reference as `attachments[].file` in this call. `{namespace}` is the segment after `/public/api/` in your base URL. Uploading needs the same permission as this call.\n\nTo see the bill, including its vendorBillNumber and its attachments, use GET accounting/vendor-bills/:id.","tags":["accountingVendorBills"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]},"get":{"operationId":"vendorBills","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[vendorBillNumber]","in":"query","required":false,"description":"Filter vendorBillNumber (equality)","schema":{"type":"string"}},{"name":"filter[vendorBillNumber][ne]","in":"query","required":false,"description":"Filter vendorBillNumber (ne)","schema":{"type":"string"}},{"name":"filter[vendorBillNumber][gt]","in":"query","required":false,"description":"Filter vendorBillNumber (gt)","schema":{"type":"string"}},{"name":"filter[vendorBillNumber][gte]","in":"query","required":false,"description":"Filter vendorBillNumber (gte)","schema":{"type":"string"}},{"name":"filter[vendorBillNumber][lt]","in":"query","required":false,"description":"Filter vendorBillNumber (lt)","schema":{"type":"string"}},{"name":"filter[vendorBillNumber][lte]","in":"query","required":false,"description":"Filter vendorBillNumber (lte)","schema":{"type":"string"}},{"name":"filter[vendorBillNumber][in]","in":"query","required":false,"description":"Filter vendorBillNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorBillNumber][notIn]","in":"query","required":false,"description":"Filter vendorBillNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorBillNumber][between]","in":"query","required":false,"description":"Filter vendorBillNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorBillNumber][like]","in":"query","required":false,"description":"Filter vendorBillNumber (like)","schema":{"type":"string"}},{"name":"filter[billNumber]","in":"query","required":false,"description":"Filter billNumber (equality)","schema":{"type":"string"}},{"name":"filter[billNumber][ne]","in":"query","required":false,"description":"Filter billNumber (ne)","schema":{"type":"string"}},{"name":"filter[billNumber][gt]","in":"query","required":false,"description":"Filter billNumber (gt)","schema":{"type":"string"}},{"name":"filter[billNumber][gte]","in":"query","required":false,"description":"Filter billNumber (gte)","schema":{"type":"string"}},{"name":"filter[billNumber][lt]","in":"query","required":false,"description":"Filter billNumber (lt)","schema":{"type":"string"}},{"name":"filter[billNumber][lte]","in":"query","required":false,"description":"Filter billNumber (lte)","schema":{"type":"string"}},{"name":"filter[billNumber][in]","in":"query","required":false,"description":"Filter billNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billNumber][notIn]","in":"query","required":false,"description":"Filter billNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billNumber][between]","in":"query","required":false,"description":"Filter billNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billNumber][like]","in":"query","required":false,"description":"Filter billNumber (like)","schema":{"type":"string"}},{"name":"filter[billDate]","in":"query","required":false,"description":"Filter billDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][ne]","in":"query","required":false,"description":"Filter billDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][gt]","in":"query","required":false,"description":"Filter billDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][gte]","in":"query","required":false,"description":"Filter billDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][lt]","in":"query","required":false,"description":"Filter billDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][lte]","in":"query","required":false,"description":"Filter billDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[billDate][in]","in":"query","required":false,"description":"Filter billDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billDate][notIn]","in":"query","required":false,"description":"Filter billDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billDate][between]","in":"query","required":false,"description":"Filter billDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serviceDate]","in":"query","required":false,"description":"Filter serviceDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][ne]","in":"query","required":false,"description":"Filter serviceDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gt]","in":"query","required":false,"description":"Filter serviceDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][gte]","in":"query","required":false,"description":"Filter serviceDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lt]","in":"query","required":false,"description":"Filter serviceDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][lte]","in":"query","required":false,"description":"Filter serviceDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[serviceDate][in]","in":"query","required":false,"description":"Filter serviceDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][notIn]","in":"query","required":false,"description":"Filter serviceDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serviceDate][between]","in":"query","required":false,"description":"Filter serviceDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[paymentStatus]","in":"query","required":false,"description":"Filter paymentStatus (equality)","schema":{"type":"string"}},{"name":"filter[paymentStatus][ne]","in":"query","required":false,"description":"Filter paymentStatus (ne)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gt]","in":"query","required":false,"description":"Filter paymentStatus (gt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][gte]","in":"query","required":false,"description":"Filter paymentStatus (gte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lt]","in":"query","required":false,"description":"Filter paymentStatus (lt)","schema":{"type":"string"}},{"name":"filter[paymentStatus][lte]","in":"query","required":false,"description":"Filter paymentStatus (lte)","schema":{"type":"string"}},{"name":"filter[paymentStatus][in]","in":"query","required":false,"description":"Filter paymentStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][notIn]","in":"query","required":false,"description":"Filter paymentStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentStatus][between]","in":"query","required":false,"description":"Filter paymentStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentStatus][like]","in":"query","required":false,"description":"Filter paymentStatus (like)","schema":{"type":"string"}},{"name":"filter[postingStatus]","in":"query","required":false,"description":"Filter postingStatus (equality)","schema":{"type":"string"}},{"name":"filter[postingStatus][ne]","in":"query","required":false,"description":"Filter postingStatus (ne)","schema":{"type":"string"}},{"name":"filter[postingStatus][gt]","in":"query","required":false,"description":"Filter postingStatus (gt)","schema":{"type":"string"}},{"name":"filter[postingStatus][gte]","in":"query","required":false,"description":"Filter postingStatus (gte)","schema":{"type":"string"}},{"name":"filter[postingStatus][lt]","in":"query","required":false,"description":"Filter postingStatus (lt)","schema":{"type":"string"}},{"name":"filter[postingStatus][lte]","in":"query","required":false,"description":"Filter postingStatus (lte)","schema":{"type":"string"}},{"name":"filter[postingStatus][in]","in":"query","required":false,"description":"Filter postingStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postingStatus][notIn]","in":"query","required":false,"description":"Filter postingStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[postingStatus][between]","in":"query","required":false,"description":"Filter postingStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[postingStatus][like]","in":"query","required":false,"description":"Filter postingStatus (like)","schema":{"type":"string"}},{"name":"filter[paymentTerms]","in":"query","required":false,"description":"Filter paymentTerms (equality)","schema":{"type":"string"}},{"name":"filter[paymentTerms][ne]","in":"query","required":false,"description":"Filter paymentTerms (ne)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gt]","in":"query","required":false,"description":"Filter paymentTerms (gt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][gte]","in":"query","required":false,"description":"Filter paymentTerms (gte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lt]","in":"query","required":false,"description":"Filter paymentTerms (lt)","schema":{"type":"string"}},{"name":"filter[paymentTerms][lte]","in":"query","required":false,"description":"Filter paymentTerms (lte)","schema":{"type":"string"}},{"name":"filter[paymentTerms][in]","in":"query","required":false,"description":"Filter paymentTerms (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][notIn]","in":"query","required":false,"description":"Filter paymentTerms (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[paymentTerms][between]","in":"query","required":false,"description":"Filter paymentTerms (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[paymentTerms][like]","in":"query","required":false,"description":"Filter paymentTerms (like)","schema":{"type":"string"}},{"name":"filter[markAsPaid]","in":"query","required":false,"description":"Filter markAsPaid (equality)","schema":{"type":"boolean"}},{"name":"filter[markAsPaid][ne]","in":"query","required":false,"description":"Filter markAsPaid (ne)","schema":{"type":"boolean"}},{"name":"filter[markAsPaid][gt]","in":"query","required":false,"description":"Filter markAsPaid (gt)","schema":{"type":"boolean"}},{"name":"filter[markAsPaid][gte]","in":"query","required":false,"description":"Filter markAsPaid (gte)","schema":{"type":"boolean"}},{"name":"filter[markAsPaid][lt]","in":"query","required":false,"description":"Filter markAsPaid (lt)","schema":{"type":"boolean"}},{"name":"filter[markAsPaid][lte]","in":"query","required":false,"description":"Filter markAsPaid (lte)","schema":{"type":"boolean"}},{"name":"filter[markAsPaid][in]","in":"query","required":false,"description":"Filter markAsPaid (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[markAsPaid][notIn]","in":"query","required":false,"description":"Filter markAsPaid (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[markAsPaid][between]","in":"query","required":false,"description":"Filter markAsPaid (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalVendorBillId]","in":"query","required":false,"description":"Filter externalVendorBillId (equality)","schema":{"type":"string"}},{"name":"filter[externalVendorBillId][ne]","in":"query","required":false,"description":"Filter externalVendorBillId (ne)","schema":{"type":"string"}},{"name":"filter[externalVendorBillId][gt]","in":"query","required":false,"description":"Filter externalVendorBillId (gt)","schema":{"type":"string"}},{"name":"filter[externalVendorBillId][gte]","in":"query","required":false,"description":"Filter externalVendorBillId (gte)","schema":{"type":"string"}},{"name":"filter[externalVendorBillId][lt]","in":"query","required":false,"description":"Filter externalVendorBillId (lt)","schema":{"type":"string"}},{"name":"filter[externalVendorBillId][lte]","in":"query","required":false,"description":"Filter externalVendorBillId (lte)","schema":{"type":"string"}},{"name":"filter[externalVendorBillId][in]","in":"query","required":false,"description":"Filter externalVendorBillId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalVendorBillId][notIn]","in":"query","required":false,"description":"Filter externalVendorBillId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[externalVendorBillId][between]","in":"query","required":false,"description":"Filter externalVendorBillId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[externalVendorBillId][like]","in":"query","required":false,"description":"Filter externalVendorBillId (like)","schema":{"type":"string"}},{"name":"filter[vendorId]","in":"query","required":false,"description":"Filter vendorId (equality)","schema":{"type":"string"}},{"name":"filter[vendorId][ne]","in":"query","required":false,"description":"Filter vendorId (ne)","schema":{"type":"string"}},{"name":"filter[vendorId][gt]","in":"query","required":false,"description":"Filter vendorId (gt)","schema":{"type":"string"}},{"name":"filter[vendorId][gte]","in":"query","required":false,"description":"Filter vendorId (gte)","schema":{"type":"string"}},{"name":"filter[vendorId][lt]","in":"query","required":false,"description":"Filter vendorId (lt)","schema":{"type":"string"}},{"name":"filter[vendorId][lte]","in":"query","required":false,"description":"Filter vendorId (lte)","schema":{"type":"string"}},{"name":"filter[vendorId][in]","in":"query","required":false,"description":"Filter vendorId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorId][notIn]","in":"query","required":false,"description":"Filter vendorId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[vendorId][between]","in":"query","required":false,"description":"Filter vendorId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[vendorId][like]","in":"query","required":false,"description":"Filter vendorId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","vendorBillNumber","-vendorBillNumber","billNumber","-billNumber","billDate","-billDate","serviceDate","-serviceDate","dueDate","-dueDate","currency","-currency","status","-status","paymentStatus","-paymentStatus","postingStatus","-postingStatus","paymentTerms","-paymentTerms","total","-total","amountPaid","-amountPaid","openAmount","-openAmount","payableAmount","-payableAmount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","vendorBillNumber","billNumber","billDate","serviceDate","dueDate","currency","status","paymentStatus","postingStatus","paymentTerms","total","amountPaid","openAmount","payableAmount","markAsPaid","externalVendorBillId","vendorName","vendorId","entityName","entityId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/vendorBillsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List vendor bills","description":"Lists vendor bills, without their line items. To filter by vendor or legal entity, or to read line items, use POST accounting/vendor-bills/search.","tags":["accountingVendorBills"]}},"/banking/reconciliations/{id}/reopen":{"post":{"operationId":"reopenReconciliation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reopenReconciliationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"alreadyOpen":{"value":{"data":{}},"summary":"The same call once nothing is left to reopen: still a success"},"cascade":{"value":{"data":{}},"summary":"Reopening June also reopens the completed July that was built on it"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Platform id (a UUID) of the earliest reconciliation to reopen; bound from the :id path segment. Every later completed reconciliation for the same account is reopened with it.","examples":{"alreadyOpen":{"value":"a1c4d7e0-2b58-4e91-8d03-6f7b19ac52de"},"cascade":{"value":"a1c4d7e0-2b58-4e91-8d03-6f7b19ac52de"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reopenReconciliationInput"},"examples":{"alreadyOpen":{"value":{},"summary":"The same call once nothing is left to reopen: still a success"},"cascade":{"value":{},"summary":"Reopening June also reopens the completed July that was built on it"}}}}},"summary":"Reopen an account reconciliation and every later one","description":"Reverses a submit, moving a completed reconciliation back to `unreconciled` so it can be worked on and submitted again.\n\n**This cascades forward, and that is the important thing to know before calling it.** Every *later* completed reconciliation for the same account is reopened too, not just the one named. It has to be: each period's beginning balance is the previous period's closing statement balance, so reopening a period invalidates the ones built on top of it. A successful call returns an empty body; to see what was reopened, list the account's reconciliations (`GET banking/reconciliations?filter[accountId][eq]=<account-uuid>&filter[status][eq]=unreconciled`) rather than assuming a single row changed.\n\n**Only completed reconciliations are affected.** One that is already `inProgress` or `unreconciled` is left alone, including the one named in the path. That also makes the call idempotent: repeating it changes nothing once everything reachable is already open.\n\nSubmitting again afterwards means submitting in period order (see `POST banking/reconciliations/{id}/submit`), earliest first, because that route enforces the same ordering this one unwinds.","tags":["bankReconciliations"]}},"/accounting/purchase-orders/{id}/approve":{"post":{"operationId":"approvePurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approvePurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"approvalStatus":{"type":"string","description":"The status the order is already in."}},"additionalProperties":false,"required":["poNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["poNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"approvalStatus":{"type":"string","description":"The status the order is already in."}},"additionalProperties":false,"required":["poNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["poNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"approvalStatus":{"type":"string","description":"The status the order is already in."}},"additionalProperties":false,"required":["poNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["poNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase order you want to approve.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approvePurchaseOrderInput"}}}},"summary":"Approve a purchase order","description":"Approves a purchase order. The approval goes through your tenant's approval policy, and the response is the order's approval status afterward.\n\nWith no approvers configured, the order goes straight to 'approved'. With a multi-step policy, it moves on one step and stays 'pendingApproval'.","tags":["accountingPurchaseOrders"]}},"/accounting/purchase-orders/{id}/reject":{"post":{"operationId":"rejectPurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectPurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"approvalStatus":{"type":"string","description":"The status the order is already in."}},"additionalProperties":false,"required":["poNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["poNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"approvalStatus":{"type":"string","description":"The status the order is already in."}},"additionalProperties":false,"required":["poNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["poNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"approvalStatus":{"type":"string","description":"The status the order is already in."}},"additionalProperties":false,"required":["poNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"poNumber":{"type":"string","description":"The number of the order."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["poNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase order you want to reject.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectPurchaseOrderInput"}}}},"summary":"Reject a purchase order","description":"Rejects a purchase order. The rejection goes through your tenant's approval policy. You can send an optional reviewMessage, and the response is the order's approval status afterward.\n\nRejecting doesn't delete the order. The order keeps its number and its audit trail.","tags":["accountingPurchaseOrders"]}},"/accounting/employee-advances":{"get":{"operationId":"employeeAdvances","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[advanceRequestNumber]","in":"query","required":false,"description":"Filter advanceRequestNumber (equality)","schema":{"type":"string"}},{"name":"filter[advanceRequestNumber][ne]","in":"query","required":false,"description":"Filter advanceRequestNumber (ne)","schema":{"type":"string"}},{"name":"filter[advanceRequestNumber][gt]","in":"query","required":false,"description":"Filter advanceRequestNumber (gt)","schema":{"type":"string"}},{"name":"filter[advanceRequestNumber][gte]","in":"query","required":false,"description":"Filter advanceRequestNumber (gte)","schema":{"type":"string"}},{"name":"filter[advanceRequestNumber][lt]","in":"query","required":false,"description":"Filter advanceRequestNumber (lt)","schema":{"type":"string"}},{"name":"filter[advanceRequestNumber][lte]","in":"query","required":false,"description":"Filter advanceRequestNumber (lte)","schema":{"type":"string"}},{"name":"filter[advanceRequestNumber][in]","in":"query","required":false,"description":"Filter advanceRequestNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[advanceRequestNumber][notIn]","in":"query","required":false,"description":"Filter advanceRequestNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[advanceRequestNumber][between]","in":"query","required":false,"description":"Filter advanceRequestNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[advanceRequestNumber][like]","in":"query","required":false,"description":"Filter advanceRequestNumber (like)","schema":{"type":"string"}},{"name":"filter[employeeId]","in":"query","required":false,"description":"Filter employeeId (equality)","schema":{"type":"string"}},{"name":"filter[employeeId][ne]","in":"query","required":false,"description":"Filter employeeId (ne)","schema":{"type":"string"}},{"name":"filter[employeeId][gt]","in":"query","required":false,"description":"Filter employeeId (gt)","schema":{"type":"string"}},{"name":"filter[employeeId][gte]","in":"query","required":false,"description":"Filter employeeId (gte)","schema":{"type":"string"}},{"name":"filter[employeeId][lt]","in":"query","required":false,"description":"Filter employeeId (lt)","schema":{"type":"string"}},{"name":"filter[employeeId][lte]","in":"query","required":false,"description":"Filter employeeId (lte)","schema":{"type":"string"}},{"name":"filter[employeeId][in]","in":"query","required":false,"description":"Filter employeeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][notIn]","in":"query","required":false,"description":"Filter employeeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][between]","in":"query","required":false,"description":"Filter employeeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId][like]","in":"query","required":false,"description":"Filter employeeId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[categoryId]","in":"query","required":false,"description":"Filter categoryId (equality)","schema":{"type":"string"}},{"name":"filter[categoryId][ne]","in":"query","required":false,"description":"Filter categoryId (ne)","schema":{"type":"string"}},{"name":"filter[categoryId][gt]","in":"query","required":false,"description":"Filter categoryId (gt)","schema":{"type":"string"}},{"name":"filter[categoryId][gte]","in":"query","required":false,"description":"Filter categoryId (gte)","schema":{"type":"string"}},{"name":"filter[categoryId][lt]","in":"query","required":false,"description":"Filter categoryId (lt)","schema":{"type":"string"}},{"name":"filter[categoryId][lte]","in":"query","required":false,"description":"Filter categoryId (lte)","schema":{"type":"string"}},{"name":"filter[categoryId][in]","in":"query","required":false,"description":"Filter categoryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][notIn]","in":"query","required":false,"description":"Filter categoryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][between]","in":"query","required":false,"description":"Filter categoryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[categoryId][like]","in":"query","required":false,"description":"Filter categoryId (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[requestDate]","in":"query","required":false,"description":"Filter requestDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[requestDate][ne]","in":"query","required":false,"description":"Filter requestDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[requestDate][gt]","in":"query","required":false,"description":"Filter requestDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[requestDate][gte]","in":"query","required":false,"description":"Filter requestDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[requestDate][lt]","in":"query","required":false,"description":"Filter requestDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[requestDate][lte]","in":"query","required":false,"description":"Filter requestDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[requestDate][in]","in":"query","required":false,"description":"Filter requestDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requestDate][notIn]","in":"query","required":false,"description":"Filter requestDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[requestDate][between]","in":"query","required":false,"description":"Filter requestDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","advanceRequestNumber","-advanceRequestNumber","status","-status","requestDate","-requestDate","amount","-amount","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","advanceRequestNumber","employeeId","entityId","categoryId","amount","currency","purpose","status","requestDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/employeeAdvancesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List employee advance requests","description":"Lists employee advance requests. Each item is a summary of the request, with its amount, currency, status, and request date.\n\nFor employeeName, the trip dates, notes, the decision note, and the issued payment, use GET accounting/employee-advances/:id or POST accounting/employee-advances/search.","tags":["accountingEmployeeAdvances"]},"post":{"operationId":"createEmployeeAdvanceRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createEmployeeAdvanceRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_ATTACHMENT, UNSUPPORTED_FILE_TYPE, CATEGORY_NOT_FOUND, CATEGORY_WRONG_ENTITY, NO_FUNCTIONAL_CURRENCY, INVALID_AMOUNT, MISSING_PURPOSE, PURPOSE_NOT_FOUND, INVALID_TRIP_DATES, ATTACHMENT_REQUIRED, ADVANCE_LIMIT_EXCEEDED, UNEXPECTED_ERROR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that was not found."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_WRONG_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that belongs to another entity."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_FUNCTIONAL_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_PURPOSE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURPOSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purpose":{"type":"string","description":"The purpose text that did not resolve."}},"additionalProperties":false,"required":["purpose"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TRIP_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADVANCE_LIMIT_EXCEEDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of which limit was exceeded."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_ERROR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"The action's raw failure message."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that was not found."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_WRONG_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that belongs to another entity."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_FUNCTIONAL_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_PURPOSE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURPOSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purpose":{"type":"string","description":"The purpose text that did not resolve."}},"additionalProperties":false,"required":["purpose"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TRIP_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADVANCE_LIMIT_EXCEEDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of which limit was exceeded."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_ERROR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"The action's raw failure message."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_ATTACHMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"reason":{"type":"string","description":"What is wrong with the attachment."}},"additionalProperties":false,"required":["attachmentIndex","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_FILE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"attachmentIndex":{"type":"number","description":"The zero-based position of the offending attachment."},"fileName":{"type":"string","description":"The name that was refused: the uploaded file's stored name, or the fileName you gave it."}},"additionalProperties":false,"required":["attachmentIndex","fileName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that was not found."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_WRONG_ENTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id (a UUID) that belongs to another entity."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_FUNCTIONAL_CURRENCY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_AMOUNT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_PURPOSE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PURPOSE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"purpose":{"type":"string","description":"The purpose text that did not resolve."}},"additionalProperties":false,"required":["purpose"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_TRIP_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ATTACHMENT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ADVANCE_LIMIT_EXCEEDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of which limit was exceeded."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNEXPECTED_ERROR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string","description":"The action's raw failure message."}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createEmployeeAdvanceRequestInput"}}}},"summary":"Create an employee advance request","description":"Creates an employee advance request for the employee who sends it. The advance is in that employee's legal entity. There is no field to name another employee. The response is only the new request's id.\n\nThe request is created in 'pendingApproval' and goes straight into your tenant's approval policy. The request can already be approved by the time the response arrives, for example when that employee is also the policy's approver.\n\nNo payment or journal entry is created until the approved request is issued with POST accounting/employee-advances/:id/issue.\n\nRead the request's status with GET accounting/employee-advances/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingEmployeeAdvances"]}},"/accounting/standalone-payments/apply":{"post":{"operationId":"applyStandalonePayment","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/applyStandalonePaymentOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: EMPTY_BATCH, PAYMENT_NOT_FOUND, DOCUMENT_NOT_FOUND, APPLICATION_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPTY_BATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentId":{"type":"string"}},"additionalProperties":false,"required":["outboundPaymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedDocumentType":{"type":"string"},"appliedDocumentId":{"type":"string"}},"additionalProperties":false,"required":["appliedDocumentType","appliedDocumentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPTY_BATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentId":{"type":"string"}},"additionalProperties":false,"required":["outboundPaymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedDocumentType":{"type":"string"},"appliedDocumentId":{"type":"string"}},"additionalProperties":false,"required":["appliedDocumentType","appliedDocumentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPTY_BATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PAYMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"outboundPaymentId":{"type":"string"}},"additionalProperties":false,"required":["outboundPaymentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DOCUMENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"appliedDocumentType":{"type":"string"},"appliedDocumentId":{"type":"string"}},"additionalProperties":false,"required":["appliedDocumentType","appliedDocumentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPLICATION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyStandalonePaymentInput"}}}},"summary":"Apply a standalone payment","description":"Applies a standalone payment to bills, expense reports, or tax entries. Each line is one application: an outbound payment to a vendor bill, expense report, or withholding tax entry. If any line fails a check, nothing is applied.\n\nOnly a standalone payment can be applied: one created with POST accounting/outbound-payments whose lines name no source document. A payment created against a source document is already linked to that document and is refused.\n\nOn each line, the payment and the document must have the same business partner and currency, and the same offset account when both have one. The document must have an open balance, and a vendor bill or expense report must be approved. A voided vendor bill is refused. An expense report must be reimbursable, unless it is an employee advance. A withholding tax entry needs a payment that has an offset account. Each payment and document pair can appear only once in a request.\n\nThe amount must be above zero. The amount can't be more than the payment's unapplied amount or the document's open balance, counting earlier lines in the same request.\n\nappliedDate can't be earlier than the payment date. The accounting period must be open on that date for the legal entities of both the payment and the document.\n\nApplying to a vendor bill also records any realized foreign exchange gain or loss in a journal entry. Applying to an expense report or a withholding tax entry does not.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["accountingStandalonePayments"]}},"/accounting/expense-reports/{id}/approve":{"post":{"operationId":"approveExpenseReport","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveExpenseReportOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"approvalStatus":{"type":"string","description":"The status the report is already in."}},"additionalProperties":false,"required":["expenseNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"reason":{"type":"string","description":"The reason the workflow gave for refusing."}},"additionalProperties":false,"required":["expenseNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense report you want to approve.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveExpenseReportInput"}}}},"summary":"Approve an expense report","description":"Approves an expense report. The approval goes through your tenant's approval policy, and the response is the status that results.\n\nWith no approvers configured, the report goes straight to 'approved'. With a multi-step policy, it moves on one step. For a report that is already approved, the request fails with STATUS_CONFLICT.","tags":["accountingExpenseReports"]}},"/accounting/expense-reports/{id}/cancel-submission":{"post":{"operationId":"cancelExpenseReportSubmission","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/cancelExpenseReportSubmissionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, POSTING_PERIOD_CLOSED, POSTED_AMORTIZATION","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"periodName":{"type":"string","description":"The name of the period that is closed or locked."}},"additionalProperties":false,"required":["expenseNumber","periodName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."}},"additionalProperties":false,"required":["expenseNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"periodName":{"type":"string","description":"The name of the period that is closed or locked."}},"additionalProperties":false,"required":["expenseNumber","periodName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."}},"additionalProperties":false,"required":["expenseNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."},"periodName":{"type":"string","description":"The name of the period that is closed or locked."}},"additionalProperties":false,"required":["expenseNumber","periodName"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTED_AMORTIZATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"expenseNumber":{"type":"string","description":"The number of the report."}},"additionalProperties":false,"required":["expenseNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the expense report whose submission you want to cancel.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cancelExpenseReportSubmissionInput"}}}},"summary":"Cancel an expense report","description":"Cancels an expense report's submission. Canceling deletes the report but keeps its expense items, their attachments, and its business-trip details, which remain without a report. On an approved report, amortization schedules that haven't created a journal entry are deleted.\n\nAn approved report can't be canceled while the accounting period of its submitted date is closed or locked. It also can't be canceled while an amortization schedule on one of its items has created a journal entry. Any other report has neither check.\n\nTo delete the report with its items, attachments, and business-trip details, use DELETE accounting/expense-reports/:id.","tags":["accountingExpenseReports"]}},"/accounting/purchase-orders/search":{"post":{"operationId":"searchPurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPurchaseOrderInput"}}}},"summary":"Search purchase orders","description":"Searches purchase orders. Each match is the full order with its lines. The vendorId, vendorName, entityId, and entityName filters are available here and not on GET accounting/purchase-orders.","tags":["accountingPurchaseOrders"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/banking/bank-transactions/{id}":{"patch":{"operationId":"updateBankTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBankTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, TRANSACTION_MATCHED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transaction that was refused."},"matchStatus":{"type":"string","description":"The match status blocking the update: 'matched', 'autoMatched', 'pending' or 'needsAttention'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transaction that was refused."},"matchStatus":{"type":"string","description":"The match status blocking the update: 'matched', 'autoMatched', 'pending' or 'needsAttention'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transaction that was refused."},"matchStatus":{"type":"string","description":"The match status blocking the update: 'matched', 'autoMatched', 'pending' or 'needsAttention'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank transaction you want to update.","example":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBankTransactionInput"}}}},"summary":"Update a bank transaction","description":"Updates a bank transaction's externalCreationDate, the only editable field, and only while the transaction is unmatched. A bank transaction is the bank's record of what happened, so amount, currency, externalTransactionId, bankAccountId and the other fields cannot be changed, and sending any of them is rejected. To correct anything else, delete the transaction and re-import it.\n\nOmitting externalCreationDate leaves the stored date unchanged. The response is empty. Read the result with GET banking/bank-transactions/:id.\n\nA matched, auto-matched, pending or needs-attention transaction is refused with TRANSACTION_MATCHED. Unmatch it first.","tags":["bankingBankTransactions"]},"get":{"operationId":"getBankTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBankTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank transaction you want to retrieve.","example":"c31f8a76-40b2-4d5e-9a03-6f18b7e2c904"}],"summary":"Retrieve a bank transaction","description":"Retrieves a bank transaction. A bank transaction is a single movement of funds on a bank account. Use the transaction's id, not its bankTransactionNumber. There is no direction field: a negative amount is money out and a positive amount is money in.","tags":["bankingBankTransactions"]},"delete":{"operationId":"deleteBankTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteBankTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, TRANSACTION_MATCHED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transaction that was refused."},"matchStatus":{"type":"string","description":"The match status blocking the delete: 'matched', 'autoMatched', 'pending' or 'needsAttention'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transaction that was refused."},"matchStatus":{"type":"string","description":"The match status blocking the delete: 'matched', 'autoMatched', 'pending' or 'needsAttention'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TRANSACTION_MATCHED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transaction that was refused."},"matchStatus":{"type":"string","description":"The match status blocking the delete: 'matched', 'autoMatched', 'pending' or 'needsAttention'."}},"additionalProperties":false,"required":["id","matchStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the bank transaction you want to delete.","example":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"}],"summary":"Delete a bank transaction","description":"Deletes a bank transaction. A matched transaction is refused, so unmatch it first. The delete can't be undone through this API. Unlike DELETE banking/bank-accounts/:id, which is a recoverable soft delete, the transaction is removed outright. The response is empty.\n\nA transaction that is matched, auto-matched, pending or needs-attention is refused with TRANSACTION_MATCHED rather than deleted. Unmatch it first.\n\nFor a transaction whose bank account came from an integration, the delete also records that the transaction was removed, so the bank feed does not re-create it on the next sync. A manually created account has no such guard, and the row is deleted with nothing to prevent re-import.","tags":["bankingBankTransactions"]}},"/accounting/purchase-types/search":{"post":{"operationId":"searchPurchaseType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchPurchaseTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchPurchaseTypeInput"}}}},"summary":"Search purchase types","description":"Searches purchase types. You can filter by id, name, or status. Results are returned newest first, and each item has the same fields as GET accounting/purchase-types/:id.","tags":["accountingPurchaseTypes"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/accounting/purchase-types/{id}/deactivate":{"post":{"operationId":"deactivatePurchaseType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deactivatePurchaseTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PURCHASE_TYPES_DISABLED, NOT_FOUND, ALREADY_IN_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["name","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["name","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PURCHASE_TYPES_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALREADY_IN_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type."},"status":{"type":"string","description":"The status it is already in."}},"additionalProperties":false,"required":["name","status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase type you want to deactivate.","example":"a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deactivatePurchaseTypeInput"}}}},"summary":"Deactivate a purchase type","description":"Deactivates a purchase type. Purchase orders that already carry it keep it and can still be saved, but it can no longer be chosen for a new order or a change of type.\n\nA type that active approval policies or active purchase orders use cannot be deleted with DELETE accounting/purchase-types/:id. Deactivating is the alternative.\n\nThe response is empty. To see the type, use GET accounting/purchase-types/:id.","tags":["accountingPurchaseTypes"]}},"/accounting/employee-advances/{id}/reject":{"post":{"operationId":"rejectEmployeeAdvanceRequest","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectEmployeeAdvanceRequestOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, STATUS_CONFLICT, APPROVAL_FAILED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"approvalStatus":{"type":"string","description":"The status it is currently in."}},"additionalProperties":false,"required":["advanceRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"reason":{"type":"string","description":"The approval framework's own message, verbatim."}},"additionalProperties":false,"required":["advanceRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"approvalStatus":{"type":"string","description":"The status it is currently in."}},"additionalProperties":false,"required":["advanceRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"reason":{"type":"string","description":"The approval framework's own message, verbatim."}},"additionalProperties":false,"required":["advanceRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no record."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_CONFLICT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"approvalStatus":{"type":"string","description":"The status it is currently in."}},"additionalProperties":false,"required":["advanceRequestNumber","approvalStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"APPROVAL_FAILED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"advanceRequestNumber":{"type":"string","description":"Business number of the request."},"reason":{"type":"string","description":"The approval framework's own message, verbatim."}},"additionalProperties":false,"required":["advanceRequestNumber","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the advance request; bound from the :id path segment.","example":"b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectEmployeeAdvanceRequestInput"}}}},"summary":"Reject an employee advance request","description":"Rejects an employee advance request. The rejection goes through your tenant's approval policy, and the response is the status that results.\n\nOnly a request in 'pendingApproval' can be rejected. For any other status, the request fails with STATUS_CONFLICT.\n\nA rejected request is kept, with its number and audit trail. The employee can change it and resubmit it with PATCH accounting/employee-advances/:id. To remove it, use DELETE accounting/employee-advances/:id.","tags":["accountingEmployeeAdvances"]}},"/accounting/vendor-bills/{id}/reverse":{"post":{"operationId":"reverseVendorBill","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reverseVendorBillOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, BILL_NOT_APPROVED, BILL_ALREADY_VOIDED, BILL_PAID, WITHHOLDING_REMITTED, BILL_ALREADY_REVERSED, BILL_HAS_APPLIED_CREDITS, NO_ACCOUNTING_PERIOD, POSTING_PERIOD_CLOSED, JOURNAL_ENTRY_VOIDED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_HAS_APPLIED_CREDITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reversalDate":{"type":"string","description":"The reversal date that no period covers."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reversalDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOURNAL_ENTRY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_HAS_APPLIED_CREDITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reversalDate":{"type":"string","description":"The reversal date that no period covers."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reversalDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOURNAL_ENTRY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The identifier you sent, returned unchanged."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_NOT_APPROVED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill that could not be changed."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_PAID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"paymentStatus":{"type":"string","description":"The payment status blocking the operation."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","paymentStatus"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WITHHOLDING_REMITTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_ALREADY_REVERSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_HAS_APPLIED_CREDITS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_ACCOUNTING_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."},"reversalDate":{"type":"string","description":"The reversal date that no period covers."}},"additionalProperties":false,"required":["vendorBillHeaderNumber","reversalDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_PERIOD_CLOSED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"JOURNAL_ENTRY_VOIDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorBillHeaderNumber":{"type":"string","description":"The number of the bill."}},"additionalProperties":false,"required":["vendorBillHeaderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the vendor bill you want to reverse.","example":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reverseVendorBillInput"}}}},"summary":"Reverse a vendor bill","description":"Reverses a vendor bill. Backs the vendor bill out of the ledger with a reversing journal entry dated reversalDate. A void instead voids the bill's journal entry, which needs the bill's own accounting period to be open. A reversal dates its journal entry on the date you choose, so it works when the bill's period is closed.\n\nA bill in 'pendingApproval' can't be reversed, and neither can a voided or reversed bill. The bill must have no payments, settled or pending. Any vendor credits applied to it must first be removed with POST accounting/vendor-credits/:id/unapply.\n\nA reversed bill can't be approved, rejected, voided or reversed again. The response is empty.","tags":["accountingVendorBills"]}},"/inventory/unit-of-measures/bulk-delete":{"post":{"operationId":"bulkDeleteUnitOfMeasures","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteUnitOfMeasuresOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNIT_OF_MEASURE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"unitOfMeasureGroupLineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","unitOfMeasureGroupLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"unitOfMeasureGroupLineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","unitOfMeasureGroupLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"unitOfMeasureGroupLineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","unitOfMeasureGroupLineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteUnitOfMeasuresInput"}}}},"summary":"Bulk delete units of measure","description":"Deletes multiple units of measure in one request. If any id is unknown, or names a unit of measure that items or unit of measure group lines still reference, none are deleted.\n\nThe response lists the deleted units of measure in the order you sent them, each with its id and the code it had. To delete a single unit of measure, use DELETE inventory/unit-of-measures/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasures"]}},"/inventory/bins/bulk":{"post":{"operationId":"bulkCreateBins","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateBinsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"layOutARack":{"value":{"data":{"created":[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1"},{"id":"f0472b19-8c35-4e61-b7a2-6d05e83c1947","binCode":"A-01-2"}]}},"summary":"Two shelf levels of one rack"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DUPLICATE_CODE, WAREHOUSE_NOT_BIN_TRACKABLE, UNKNOWN_VALUE, INCOMPLETE_LIMIT, NON_POSITIVE_LIMIT, INVALID_RANGE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["dimension","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["tempMin","tempMax","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["dimension","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["tempMin","tempMax","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","allowed","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["dimension","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["tempMin","tempMax","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateBinsInput"},"examples":{"layOutARack":{"value":{"bins":[{"binCode":"A-01-1","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"1","isPickingBin":true},{"binCode":"A-01-2","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"2","isPickingBin":true}]},"summary":"Two shelf levels of one rack"}}}}},"summary":"Bulk create bins","description":"Creates multiple bins in one request. Every bin is checked the same way as on POST inventory/bins. If any bin can't be created, none are. The response lists the new bins' ids and codes in the order you sent them.\n\nThe duplicate check also compares the bins in the request with each other. Two bins with the same binCode or barcode are duplicates.\n\nTo create a single bin, use POST inventory/bins.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryBins"]}},"/inventory/receipts/{id}/commit":{"post":{"operationId":"commitReceipt","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitReceiptOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"postTheReceipt":{"value":{"data":{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentStatus":"COMMITTED","journalEntryId":"7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07","warnings":[]}},"summary":"The goods are booked in and the accrual raised"}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, LOCATION_ENTITY_MISMATCH, POSTING_REJECTED. Sending an Idempotency-Key is answered with `IDEMPOTENCY_NOT_SUPPORTED`: this action does not run in its own transaction, so the replay guarantee cannot be offered and the header is refused rather than ignored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"}},"additionalProperties":false,"required":["lineIndex","locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the receipt you want to commit. Every line's warehouse must belong to the receipt's legal entity, or the commit is refused.","examples":{"postTheReceipt":{"value":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitReceiptInput"},"examples":{"postTheReceipt":{"value":{},"summary":"The goods are booked in and the accrual raised"}}}}},"summary":"Commit a receipt","description":"Commits a draft receipt, bringing the stock in. It also creates a journal entry for the goods received but not yet invoiced by the vendor. The response gives the receipt's new status and, when a journal entry was created, its id in journalEntryId.\n\nOnly Inventory lines create inventory transactions. Service and Expense lines go only into that journal entry.\n\nEvery line's warehouse must belong to the receipt's legal entity. Otherwise the request fails with LOCATION_ENTITY_MISMATCH.\n\nOther checks also run at commit. For example, all Inventory lines must use the same warehouse, a line received against a purchase order must not exceed that line's open quantity, account determination must find the general ledger accounts for the journal entry, and a batch- or serial-tracked line's batches or serials must add up to the line's quantity. If any of these checks fails, the request fails with POSTING_REJECTED and 'reason' gives the message.\n\nA committed receipt can't be changed or deleted, and no endpoint cancels it. A purchase return has no endpoint. To record money back from the vendor, use POST accounting/vendor-credits.","tags":["inventoryReceipts"]}},"/inventory/shipment-carriers/bulk-delete":{"post":{"operationId":"bulkDeleteShipmentCarriers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteShipmentCarriersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SHIPMENT_CARRIER_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"shipmentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","shipmentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"shipmentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","shipmentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHIPMENT_CARRIER_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"shipmentCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","shipmentCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteShipmentCarriersInput"}}}},"summary":"Bulk delete shipment carriers","description":"Deletes multiple shipment carriers in one request. If any id is unknown, or names a carrier that outbound shipments still reference, none are deleted. The error gives that id's position in the request.\n\nThe response lists the deleted carriers in the order you sent them, each with its id and the name it had. To retire a carrier that is still in use, set active to false with PATCH inventory/shipment-carriers/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryShipmentCarriers"]}},"/inventory/item-types":{"get":{"operationId":"itemTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[procurable]","in":"query","required":false,"description":"Filter procurable (equality)","schema":{"type":"boolean"}},{"name":"filter[procurable][ne]","in":"query","required":false,"description":"Filter procurable (ne)","schema":{"type":"boolean"}},{"name":"filter[procurable][gt]","in":"query","required":false,"description":"Filter procurable (gt)","schema":{"type":"boolean"}},{"name":"filter[procurable][gte]","in":"query","required":false,"description":"Filter procurable (gte)","schema":{"type":"boolean"}},{"name":"filter[procurable][lt]","in":"query","required":false,"description":"Filter procurable (lt)","schema":{"type":"boolean"}},{"name":"filter[procurable][lte]","in":"query","required":false,"description":"Filter procurable (lte)","schema":{"type":"boolean"}},{"name":"filter[procurable][in]","in":"query","required":false,"description":"Filter procurable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[procurable][notIn]","in":"query","required":false,"description":"Filter procurable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[procurable][between]","in":"query","required":false,"description":"Filter procurable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[stockable]","in":"query","required":false,"description":"Filter stockable (equality)","schema":{"type":"boolean"}},{"name":"filter[stockable][ne]","in":"query","required":false,"description":"Filter stockable (ne)","schema":{"type":"boolean"}},{"name":"filter[stockable][gt]","in":"query","required":false,"description":"Filter stockable (gt)","schema":{"type":"boolean"}},{"name":"filter[stockable][gte]","in":"query","required":false,"description":"Filter stockable (gte)","schema":{"type":"boolean"}},{"name":"filter[stockable][lt]","in":"query","required":false,"description":"Filter stockable (lt)","schema":{"type":"boolean"}},{"name":"filter[stockable][lte]","in":"query","required":false,"description":"Filter stockable (lte)","schema":{"type":"boolean"}},{"name":"filter[stockable][in]","in":"query","required":false,"description":"Filter stockable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[stockable][notIn]","in":"query","required":false,"description":"Filter stockable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[stockable][between]","in":"query","required":false,"description":"Filter stockable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","active","-active","createdDate","-createdDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","procurable","stockable","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/itemTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","name":"Stocked good","description":"Physical goods held in a warehouse","procurable":true,"stockable":true,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"b1d47e29-3c86-4a05-9f72-04e5c13b8a60","name":"Service","procurable":true,"stockable":false,"active":true,"lastModifiedDate":"2026-08-18T09:15:02.108Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List item types","description":"Lists item types. Item types are the values itemTypeId accepts when you create an item.\n\nThe collection leaves out itemCount, the number of items that use each item type. Read it from GET inventory/item-types/:id or POST inventory/item-types/search.","tags":["inventoryItemTypes"]}},"/inventory/bins":{"get":{"operationId":"bins","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[binCode]","in":"query","required":false,"description":"Filter binCode (equality)","schema":{"type":"string"}},{"name":"filter[binCode][ne]","in":"query","required":false,"description":"Filter binCode (ne)","schema":{"type":"string"}},{"name":"filter[binCode][gt]","in":"query","required":false,"description":"Filter binCode (gt)","schema":{"type":"string"}},{"name":"filter[binCode][gte]","in":"query","required":false,"description":"Filter binCode (gte)","schema":{"type":"string"}},{"name":"filter[binCode][lt]","in":"query","required":false,"description":"Filter binCode (lt)","schema":{"type":"string"}},{"name":"filter[binCode][lte]","in":"query","required":false,"description":"Filter binCode (lte)","schema":{"type":"string"}},{"name":"filter[binCode][in]","in":"query","required":false,"description":"Filter binCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[binCode][notIn]","in":"query","required":false,"description":"Filter binCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[binCode][between]","in":"query","required":false,"description":"Filter binCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[binCode][like]","in":"query","required":false,"description":"Filter binCode (like)","schema":{"type":"string"}},{"name":"filter[barcode]","in":"query","required":false,"description":"Filter barcode (equality)","schema":{"type":"string"}},{"name":"filter[barcode][ne]","in":"query","required":false,"description":"Filter barcode (ne)","schema":{"type":"string"}},{"name":"filter[barcode][gt]","in":"query","required":false,"description":"Filter barcode (gt)","schema":{"type":"string"}},{"name":"filter[barcode][gte]","in":"query","required":false,"description":"Filter barcode (gte)","schema":{"type":"string"}},{"name":"filter[barcode][lt]","in":"query","required":false,"description":"Filter barcode (lt)","schema":{"type":"string"}},{"name":"filter[barcode][lte]","in":"query","required":false,"description":"Filter barcode (lte)","schema":{"type":"string"}},{"name":"filter[barcode][in]","in":"query","required":false,"description":"Filter barcode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[barcode][notIn]","in":"query","required":false,"description":"Filter barcode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[barcode][between]","in":"query","required":false,"description":"Filter barcode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[barcode][like]","in":"query","required":false,"description":"Filter barcode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[aisle]","in":"query","required":false,"description":"Filter aisle (equality)","schema":{"type":"string"}},{"name":"filter[aisle][ne]","in":"query","required":false,"description":"Filter aisle (ne)","schema":{"type":"string"}},{"name":"filter[aisle][gt]","in":"query","required":false,"description":"Filter aisle (gt)","schema":{"type":"string"}},{"name":"filter[aisle][gte]","in":"query","required":false,"description":"Filter aisle (gte)","schema":{"type":"string"}},{"name":"filter[aisle][lt]","in":"query","required":false,"description":"Filter aisle (lt)","schema":{"type":"string"}},{"name":"filter[aisle][lte]","in":"query","required":false,"description":"Filter aisle (lte)","schema":{"type":"string"}},{"name":"filter[aisle][in]","in":"query","required":false,"description":"Filter aisle (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[aisle][notIn]","in":"query","required":false,"description":"Filter aisle (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[aisle][between]","in":"query","required":false,"description":"Filter aisle (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[aisle][like]","in":"query","required":false,"description":"Filter aisle (like)","schema":{"type":"string"}},{"name":"filter[rack]","in":"query","required":false,"description":"Filter rack (equality)","schema":{"type":"string"}},{"name":"filter[rack][ne]","in":"query","required":false,"description":"Filter rack (ne)","schema":{"type":"string"}},{"name":"filter[rack][gt]","in":"query","required":false,"description":"Filter rack (gt)","schema":{"type":"string"}},{"name":"filter[rack][gte]","in":"query","required":false,"description":"Filter rack (gte)","schema":{"type":"string"}},{"name":"filter[rack][lt]","in":"query","required":false,"description":"Filter rack (lt)","schema":{"type":"string"}},{"name":"filter[rack][lte]","in":"query","required":false,"description":"Filter rack (lte)","schema":{"type":"string"}},{"name":"filter[rack][in]","in":"query","required":false,"description":"Filter rack (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[rack][notIn]","in":"query","required":false,"description":"Filter rack (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[rack][between]","in":"query","required":false,"description":"Filter rack (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[rack][like]","in":"query","required":false,"description":"Filter rack (like)","schema":{"type":"string"}},{"name":"filter[zone]","in":"query","required":false,"description":"Filter zone (equality)","schema":{"type":"string"}},{"name":"filter[zone][ne]","in":"query","required":false,"description":"Filter zone (ne)","schema":{"type":"string"}},{"name":"filter[zone][gt]","in":"query","required":false,"description":"Filter zone (gt)","schema":{"type":"string"}},{"name":"filter[zone][gte]","in":"query","required":false,"description":"Filter zone (gte)","schema":{"type":"string"}},{"name":"filter[zone][lt]","in":"query","required":false,"description":"Filter zone (lt)","schema":{"type":"string"}},{"name":"filter[zone][lte]","in":"query","required":false,"description":"Filter zone (lte)","schema":{"type":"string"}},{"name":"filter[zone][in]","in":"query","required":false,"description":"Filter zone (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[zone][notIn]","in":"query","required":false,"description":"Filter zone (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[zone][between]","in":"query","required":false,"description":"Filter zone (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[zone][like]","in":"query","required":false,"description":"Filter zone (like)","schema":{"type":"string"}},{"name":"filter[isPickingBin]","in":"query","required":false,"description":"Filter isPickingBin (equality)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][ne]","in":"query","required":false,"description":"Filter isPickingBin (ne)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][gt]","in":"query","required":false,"description":"Filter isPickingBin (gt)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][gte]","in":"query","required":false,"description":"Filter isPickingBin (gte)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][lt]","in":"query","required":false,"description":"Filter isPickingBin (lt)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][lte]","in":"query","required":false,"description":"Filter isPickingBin (lte)","schema":{"type":"boolean"}},{"name":"filter[isPickingBin][in]","in":"query","required":false,"description":"Filter isPickingBin (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPickingBin][notIn]","in":"query","required":false,"description":"Filter isPickingBin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPickingBin][between]","in":"query","required":false,"description":"Filter isPickingBin (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isReceivingBin]","in":"query","required":false,"description":"Filter isReceivingBin (equality)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][ne]","in":"query","required":false,"description":"Filter isReceivingBin (ne)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][gt]","in":"query","required":false,"description":"Filter isReceivingBin (gt)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][gte]","in":"query","required":false,"description":"Filter isReceivingBin (gte)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][lt]","in":"query","required":false,"description":"Filter isReceivingBin (lt)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][lte]","in":"query","required":false,"description":"Filter isReceivingBin (lte)","schema":{"type":"boolean"}},{"name":"filter[isReceivingBin][in]","in":"query","required":false,"description":"Filter isReceivingBin (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReceivingBin][notIn]","in":"query","required":false,"description":"Filter isReceivingBin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReceivingBin][between]","in":"query","required":false,"description":"Filter isReceivingBin (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isProductionBin]","in":"query","required":false,"description":"Filter isProductionBin (equality)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][ne]","in":"query","required":false,"description":"Filter isProductionBin (ne)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][gt]","in":"query","required":false,"description":"Filter isProductionBin (gt)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][gte]","in":"query","required":false,"description":"Filter isProductionBin (gte)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][lt]","in":"query","required":false,"description":"Filter isProductionBin (lt)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][lte]","in":"query","required":false,"description":"Filter isProductionBin (lte)","schema":{"type":"boolean"}},{"name":"filter[isProductionBin][in]","in":"query","required":false,"description":"Filter isProductionBin (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isProductionBin][notIn]","in":"query","required":false,"description":"Filter isProductionBin (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isProductionBin][between]","in":"query","required":false,"description":"Filter isProductionBin (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[capacityCheckMode]","in":"query","required":false,"description":"Filter capacityCheckMode (equality)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][ne]","in":"query","required":false,"description":"Filter capacityCheckMode (ne)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][gt]","in":"query","required":false,"description":"Filter capacityCheckMode (gt)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][gte]","in":"query","required":false,"description":"Filter capacityCheckMode (gte)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][lt]","in":"query","required":false,"description":"Filter capacityCheckMode (lt)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][lte]","in":"query","required":false,"description":"Filter capacityCheckMode (lte)","schema":{"type":"string"}},{"name":"filter[capacityCheckMode][in]","in":"query","required":false,"description":"Filter capacityCheckMode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[capacityCheckMode][notIn]","in":"query","required":false,"description":"Filter capacityCheckMode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[capacityCheckMode][between]","in":"query","required":false,"description":"Filter capacityCheckMode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[capacityCheckMode][like]","in":"query","required":false,"description":"Filter capacityCheckMode (like)","schema":{"type":"string"}},{"name":"filter[tempZone]","in":"query","required":false,"description":"Filter tempZone (equality)","schema":{"type":"string"}},{"name":"filter[tempZone][ne]","in":"query","required":false,"description":"Filter tempZone (ne)","schema":{"type":"string"}},{"name":"filter[tempZone][gt]","in":"query","required":false,"description":"Filter tempZone (gt)","schema":{"type":"string"}},{"name":"filter[tempZone][gte]","in":"query","required":false,"description":"Filter tempZone (gte)","schema":{"type":"string"}},{"name":"filter[tempZone][lt]","in":"query","required":false,"description":"Filter tempZone (lt)","schema":{"type":"string"}},{"name":"filter[tempZone][lte]","in":"query","required":false,"description":"Filter tempZone (lte)","schema":{"type":"string"}},{"name":"filter[tempZone][in]","in":"query","required":false,"description":"Filter tempZone (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[tempZone][notIn]","in":"query","required":false,"description":"Filter tempZone (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[tempZone][between]","in":"query","required":false,"description":"Filter tempZone (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[tempZone][like]","in":"query","required":false,"description":"Filter tempZone (like)","schema":{"type":"string"}},{"name":"filter[supportsPerishable]","in":"query","required":false,"description":"Filter supportsPerishable (equality)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][ne]","in":"query","required":false,"description":"Filter supportsPerishable (ne)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][gt]","in":"query","required":false,"description":"Filter supportsPerishable (gt)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][gte]","in":"query","required":false,"description":"Filter supportsPerishable (gte)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][lt]","in":"query","required":false,"description":"Filter supportsPerishable (lt)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][lte]","in":"query","required":false,"description":"Filter supportsPerishable (lte)","schema":{"type":"boolean"}},{"name":"filter[supportsPerishable][in]","in":"query","required":false,"description":"Filter supportsPerishable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[supportsPerishable][notIn]","in":"query","required":false,"description":"Filter supportsPerishable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[supportsPerishable][between]","in":"query","required":false,"description":"Filter supportsPerishable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","binCode","-binCode","aisle","-aisle","rack","-rack","shelfLevel","-shelfLevel","active","-active","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","binCode","barcode","locationId","locationCode","locationName","aisle","rack","shelfLevel","zone","itemPosition","isPickingBin","isReceivingBin","isProductionBin","maxQuantity","maxWeight","maxWeightUnit","maxVolume","maxVolumeUnit","capacityCheckMode","tempZone","tempMin","tempMax","supportsPerishable","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/binsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"},{"id":"2b6f81d4-9e07-4a53-8c16-70d9a4e2f318","binCode":"C-02-3","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","zone":"Chilled","tempZone":"Chilled","tempMin":"2","tempMax":"8","supportsPerishable":true,"capacityCheckMode":"SoftWarning","active":true,"lastModifiedDate":"2026-08-18T09:16:41.220Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List bins","description":"Lists bins. Each bin comes back with its layout, limits, and settings, but not capacity. Only GET inventory/bins/:id returns capacity.\n\nSort on aisle, rack, and shelfLevel to list the bins in warehouse layout order.\n\nTo find bins that have no capacity limit, use POST inventory/bins/search.","tags":["inventoryBins"]},"post":{"operationId":"createBin","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBinOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"chilled":{"value":{"data":{"id":"2b6f81d4-9e07-4a53-8c16-70d9a4e2f318","binCode":"C-02-3"}},"summary":"A chilled bin for perishable stock"},"pickingBin":{"value":{"data":{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1"}},"summary":"A picking bin with a weight limit that will actually be enforced"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, DUPLICATE_CODE, WAREHOUSE_NOT_BIN_TRACKABLE, UNKNOWN_VALUE, INCOMPLETE_LIMIT, NON_POSITIVE_LIMIT, INVALID_RANGE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["kind","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_NOT_BIN_TRACKABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"}},"additionalProperties":false,"required":["locationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["field","value","allowed"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimension":{"type":"string"},"missing":{"type":"string"}},"additionalProperties":false,"required":["dimension","missing"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_POSITIVE_LIMIT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["field","value"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"tempMin":{"type":"string","format":"decimal"},"tempMax":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["tempMin","tempMax"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBinInput"},"examples":{"chilled":{"value":{"binCode":"C-02-3","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","zone":"Chilled","tempZone":"Chilled","tempMin":"2","tempMax":"8","supportsPerishable":true,"capacityCheckMode":"SoftWarning"},"summary":"A chilled bin for perishable stock"},"pickingBin":{"value":{"binCode":"A-01-1","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock"},"summary":"A picking bin with a weight limit that will actually be enforced"}}}}},"summary":"Create a bin","description":"Creates a bin. The bin belongs to one warehouse. The response is the bin's id and binCode.\n\nA warehouse must be given its bins before any stock moves in it. Once a warehouse has inventory transactions that recorded no bin, no bin can be created for it, and the request fails with WAREHOUSE_NOT_BIN_TRACKABLE.\n\nThat warehouse can never become bin-tracked. A warehouse that already has a bin can always have more.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryBins"]}},"/inventory/bins/search":{"post":{"operationId":"searchBins","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBinsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"coldChain":{"value":{"data":{"items":[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"isReceivingBin":false,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","supportsPerishable":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Every bin that may hold perishable stock"},"unprotected":{"value":{"data":{"items":[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"isReceivingBin":false,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","supportsPerishable":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Picking bins with no limit configured — nothing will stop them being overfilled"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBinsInput"},"examples":{"coldChain":{"value":{"filters":{"supportsPerishable":true}},"summary":"Every bin that may hold perishable stock"},"unprotected":{"value":{"filters":{"withoutLimits":true,"isPickingBin":true}},"summary":"Picking bins with no limit configured — nothing will stop them being overfilled"}}}}},"summary":"Search bins","description":"Searches bins. The fields are the same as on the collection. The filters include some the collection doesn't have, such as withoutLimits.\n\nOnly GET inventory/bins/:id returns capacity.","tags":["inventoryBins"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/reason-codes/bulk":{"post":{"operationId":"bulkCreateReasonCodes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateReasonCodesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"seedingAVocabulary":{"value":{"data":{"created":[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"},{"id":"1f5b83d0-6c47-4a92-b8e1-0d472a95c3f6"}]}},"summary":"Two reason codes created together; match the response to the request by index"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_CODE, DUPLICATE_CODE_IN_REQUEST, UNKNOWN_DOCUMENT_TYPES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["code","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["code","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["documentTypes","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["code","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["code","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["documentTypes","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["code","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"code":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["code","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_DOCUMENT_TYPES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"documentTypes":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["documentTypes","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateReasonCodesInput"},"examples":{"seedingAVocabulary":{"value":{"reasonCodes":[{"code":"DAMAGE","description":"Stock damaged in the warehouse","requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"]},{"code":"CYCLECOUNT","description":"Correction from a cycle count","documentTypes":["InventoryIncrease","InventoryDecrease"]}]},"summary":"Two reason codes created together; match the response to the request by index"}}}}},"summary":"Bulk create reason codes","description":"Creates multiple reason codes in one request. Send documentTypes with every reason code. It can be an empty list. If any reason code can't be created, none are. The response lists the new reason codes' ids in the order you sent them.\n\nEach reason code is checked against existing reason codes and against the others in the request before anything is written.\n\nTo create a single reason code, use POST inventory/reason-codes.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReasonCodes"]}},"/inventory/item-categories/bulk-delete":{"post":{"operationId":"bulkDeleteItemCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteItemCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ITEM_CATEGORY_IN_USE, ITEM_CATEGORY_HAS_CHILDREN","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"inventoryTransactionCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","inventoryTransactionCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ITEM_CATEGORY_HAS_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteItemCategoriesInput"}}}},"summary":"Bulk delete item categories","description":"Deletes multiple item categories in one request. Every id is checked before anything is deleted. If any category can't be deleted, none are. A category can't be deleted while items or inventory transactions use it, or while it has categories beneath it.\n\nThe response lists each deleted category's id and name in the order you sent the ids.\n\nA category can't be deleted in the same request as the categories beneath it. Delete the lower categories first, in an earlier request.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryItemCategories"]}},"/inventory/item-categories/search":{"post":{"operationId":"searchItemCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchItemCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"incrementalSync":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Everything changed since the last run, one page at a time"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchItemCategoriesInput"},"examples":{"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-01T00:00:00.000Z"},"page":{"cursor":"1042","size":200}},"summary":"Everything changed since the last run, one page at a time"}}}}},"summary":"Search item categories","description":"Searches item categories. The filters are name, active, and modifiedSince, sent in the request body. The fields are the same as on GET inventory/item-categories/:id.","tags":["inventoryItemCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/shipments/bulk":{"post":{"operationId":"bulkCreateShipments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateShipmentsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadAnRmaBatch":{"value":{"data":{"items":[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]},{"id":"b81c4f30-27de-4a95-8106-3fd7e5a2c914","documentNumber":"SR-1043","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4418","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}]}},"summary":"Two shipments prepared together from a picking run"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, SOURCE_LINE_NOT_PROJECTED, INVALID_QUANTITY, MIXED_LOCATIONS, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["locationIds","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["locationIds","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SOURCE_LINE_NOT_PROJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["referenceId","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MIXED_LOCATIONS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationIds":{"type":"array","items":{"type":"string"}},"index":{"type":"number"}},"additionalProperties":false,"required":["locationIds","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateShipmentsInput"},"examples":{"loadAnRmaBatch":{"value":{"shipments":[{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-19","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","currency":"EUR","notes":"Palletised","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","notes":"Ship complete"}]},{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-19","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4418","currency":"EUR","notes":"Palletised","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","notes":"Ship complete"}]}]},"summary":"Two shipments prepared together from a picking run"}}}}},"summary":"Bulk create shipments","description":"Creates multiple shipments in one request, each as a draft. Each shipment in shipments takes the same fields as the body of POST inventory/shipments. The response lists the created shipments in the order you sent them.\n\nIf any shipment can't be created, none are.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryShipments"]}},"/inventory/warehouse-transfer-orders/{id}/commit":{"post":{"operationId":"commitTransferOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/commitTransferOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"convertTheOrder":{"value":{"data":{"id":"7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38","documentStatus":"IN_TRANSFER","transferId":"5b2e9d14-8a37-4c06-91f5-2d7b3e08a6c9","transferDocumentNumber":"WT-2287"}},"summary":"A fully sourced order becomes a transfer"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, NO_LINES, UNRESOLVED_SOURCE_LINES, CONVERSION_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNRESOLVED_SOURCE_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number"}},"additionalProperties":false,"required":["lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONVERSION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNRESOLVED_SOURCE_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number"}},"additionalProperties":false,"required":["lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONVERSION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNRESOLVED_SOURCE_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineCount":{"type":"number"}},"additionalProperties":false,"required":["lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONVERSION_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the transfer order you want to convert.","examples":{"convertTheOrder":{"value":"7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"}}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/commitTransferOrderInput"},"examples":{"convertTheOrder":{"value":{},"summary":"A fully sourced order becomes a transfer"}}}}},"summary":"Commit a warehouse transfer order","description":"Commits a warehouse transfer order, converting it into a draft warehouse transfer. Creates a warehouse transfer for everything the order still has open and sets the order to 'IN_TRANSFER'. transferId is the new transfer's id and transferDocumentNumber its number.\n\nThe transfer is a draft and moves nothing until you commit it with POST inventory/warehouse-transfers/:id/commit. Committing the transfer updates the order's processed and open quantities.\n\nEvery line with open quantity needs a source warehouse that differs from its destination. If any line is at 'NEEDS_SOURCE' or has no locationId, the request fails with UNRESOLVED_SOURCE_LINES. To fix such a line on a 'DRAFT' order, remove it with deleteLines and add a replacement with a locationId through createLines in one PATCH inventory/warehouse-transfer-orders/:id request, then send this request again.\n\nOnly an order at 'DRAFT' or 'PARTIALLY_PROCESSED' can be converted. While its transfer is uncommitted the order is 'IN_TRANSFER', and a second request fails. If the transfer commits less than was asked for, the order becomes 'PARTIALLY_PROCESSED', and this endpoint then creates a transfer for what is left.","tags":["inventoryWarehouseTransferOrders"]}},"/inventory/serial-numbers":{"get":{"operationId":"serialNumbers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[serialNumber]","in":"query","required":false,"description":"Filter serialNumber (equality)","schema":{"type":"string"}},{"name":"filter[serialNumber][ne]","in":"query","required":false,"description":"Filter serialNumber (ne)","schema":{"type":"string"}},{"name":"filter[serialNumber][gt]","in":"query","required":false,"description":"Filter serialNumber (gt)","schema":{"type":"string"}},{"name":"filter[serialNumber][gte]","in":"query","required":false,"description":"Filter serialNumber (gte)","schema":{"type":"string"}},{"name":"filter[serialNumber][lt]","in":"query","required":false,"description":"Filter serialNumber (lt)","schema":{"type":"string"}},{"name":"filter[serialNumber][lte]","in":"query","required":false,"description":"Filter serialNumber (lte)","schema":{"type":"string"}},{"name":"filter[serialNumber][in]","in":"query","required":false,"description":"Filter serialNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumber][notIn]","in":"query","required":false,"description":"Filter serialNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[serialNumber][between]","in":"query","required":false,"description":"Filter serialNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[serialNumber][like]","in":"query","required":false,"description":"Filter serialNumber (like)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (equality)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][ne]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (ne)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][gt]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (gt)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][gte]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (gte)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][lt]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (lt)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][lte]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (lte)","schema":{"type":"string"}},{"name":"filter[manufacturerSerialNumber][in]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][notIn]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][between]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[manufacturerSerialNumber][like]","in":"query","required":false,"description":"Filter manufacturerSerialNumber (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[isSold]","in":"query","required":false,"description":"Filter isSold (equality)","schema":{"type":"boolean"}},{"name":"filter[isSold][ne]","in":"query","required":false,"description":"Filter isSold (ne)","schema":{"type":"boolean"}},{"name":"filter[isSold][gt]","in":"query","required":false,"description":"Filter isSold (gt)","schema":{"type":"boolean"}},{"name":"filter[isSold][gte]","in":"query","required":false,"description":"Filter isSold (gte)","schema":{"type":"boolean"}},{"name":"filter[isSold][lt]","in":"query","required":false,"description":"Filter isSold (lt)","schema":{"type":"boolean"}},{"name":"filter[isSold][lte]","in":"query","required":false,"description":"Filter isSold (lte)","schema":{"type":"boolean"}},{"name":"filter[isSold][in]","in":"query","required":false,"description":"Filter isSold (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSold][notIn]","in":"query","required":false,"description":"Filter isSold (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSold][between]","in":"query","required":false,"description":"Filter isSold (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[expirationDate]","in":"query","required":false,"description":"Filter expirationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][ne]","in":"query","required":false,"description":"Filter expirationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gt]","in":"query","required":false,"description":"Filter expirationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gte]","in":"query","required":false,"description":"Filter expirationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lt]","in":"query","required":false,"description":"Filter expirationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lte]","in":"query","required":false,"description":"Filter expirationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][in]","in":"query","required":false,"description":"Filter expirationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][notIn]","in":"query","required":false,"description":"Filter expirationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][between]","in":"query","required":false,"description":"Filter expirationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","serialNumber","-serialNumber","expirationDate","-expirationDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","serialNumber","manufacturerSerialNumber","itemId","itemCode","itemName","locationId","locationCode","locationName","entityId","inStock","isSold","lastCostChangeDate","expirationDate","entryDate","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/serialNumbersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List serial numbers","description":"Lists serial numbers, without their costs. For `cost`, `originalCost`, `afterSaleCost`, and `currency`, use POST inventory/serial-numbers/search or GET inventory/serial-numbers/:id.","tags":["inventorySerialNumbers"]}},"/inventory/receipts/bulk":{"post":{"operationId":"bulkCreateReceipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateReceiptsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadADaysReceipts":{"value":{"data":{"items":[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]},{"id":"b81c4f30-27de-4a95-8106-3fd7e5a2c914","documentNumber":"SR-1043","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"PO-BAKKER-4418","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}]}},"summary":"Two receipts prepared together from a picking run"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, LINE_TOTAL_MISMATCH, INCOMPLETE_LINE, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, LOCATION_ENTITY_MISMATCH, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","lineType","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","lineType","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_TOTAL_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"expected":{"type":"string","format":"decimal"},"lineTotal":{"type":"string","format":"decimal"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","expected","lineTotal","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"lineType":{"type":"string"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","lineType","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LOCATION_ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateReceiptsInput"},"examples":{"loadADaysReceipts":{"value":{"receipts":[{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-14","deliveryDate":"2026-08-14","referenceNumber":"DN-77120","currency":"EUR","notes":"Received at the back dock","lines":[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]},{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-14","deliveryDate":"2026-08-14","referenceNumber":"PO-BAKKER-4418","currency":"EUR","notes":"Received at the back dock","lines":[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]}]},"summary":"Two receipts prepared together from a picking run"}}}}},"summary":"Bulk create receipts","description":"Creates multiple receipts in one request. Each receipt in receipts takes the same fields as the body of POST inventory/receipts, and every receipt is created in draft status. The response lists the created receipts in the order you sent them.\n\nIf any receipt can't be created, none are.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReceipts"]}},"/inventory/purchase-returns/bulk":{"post":{"operationId":"bulkCreatePurchaseReturns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreatePurchaseReturnsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, INVALID_RETURN_TYPE, NO_LINES, INVALID_QUANTITY, INCOMPLETE_LINE, UNSUPPORTED_SOURCE_TYPE, MULTIPLE_PURCHASE_ORDERS, MISSING_TRACKING_SELECTION, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","path","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","kind","itemId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","path","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","kind","itemId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","path","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INCOMPLETE_LINE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"missing":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_SOURCE_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"sourceDocumentLineType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","sourceDocumentLineType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MULTIPLE_PURCHASE_ORDERS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MISSING_TRACKING_SELECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineIndex":{"type":"number"},"kind":{"type":"string"},"itemId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["lineIndex","kind","itemId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreatePurchaseReturnsInput"}}}},"summary":"Bulk create purchase returns","description":"Creates multiple purchase returns in one request, each with the `documentStatus` 'DRAFT'. If one purchase return cannot be created, the request fails and no purchase returns are created.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryPurchaseReturns"]}},"/inventory/purchase-returns/{id}/ship":{"post":{"operationId":"shipPurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/shipPurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase return you want to ship. Format: UUID.","example":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/shipPurchaseReturnInput"}}}},"summary":"Ship a purchase return","description":"Ships a purchase return with the `documentStatus` 'APPROVED' or 'PREPARED'. Shipping fails when the warehouse does not have enough stock. For a purchase return line that draws on a purchase order line, shipping chooses the receipt lines that the quantity comes from and records them in `applications`. To undo a shipped purchase return, cancel it with POST inventory/purchase-returns/:id/cancel.","tags":["inventoryPurchaseReturns"]}},"/inventory/shipment-carriers/search":{"post":{"operationId":"searchShipmentCarriers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchShipmentCarriersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byVendor":{"value":{"data":{"items":[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332","name":"DHL Express","active":true,"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47","vendorName":"DHL International GmbH","lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every carrier billing through one vendor"},"incrementalSync":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Everything changed since the last run, one page at a time"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchShipmentCarriersInput"},"examples":{"byVendor":{"value":{"filters":{"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47"}},"summary":"Every carrier billing through one vendor"},"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-01T00:00:00.000Z"},"page":{"cursor":"1042","size":200}},"summary":"Everything changed since the last run, one page at a time"}}}}},"summary":"Search shipment carriers","description":"Searches shipment carriers. The filters are name, whether the carrier is active, vendorId, and when the carrier last changed. There is no filter on vendorName.","tags":["inventoryShipmentCarriers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/account-determination-rules/search":{"post":{"operationId":"searchAccountDeterminationRules","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchAccountDeterminationRulesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"oneEntitysConfiguration":{"value":{"data":{"items":[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts","priority":10,"isActive":true,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"},"reasonCodeOverrides":[],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every active rule of one legal entity. GET inventory/account-determination-rules cannot filter by legal entity."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchAccountDeterminationRulesInput"},"examples":{"oneEntitysConfiguration":{"value":{"filters":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","isActive":true}},"summary":"Every active rule of one legal entity. GET inventory/account-determination-rules cannot filter by legal entity."}}}}},"summary":"Search account determination rules","description":"Searches account determination rules, and returns each matching rule with its dimensions, accounts, and reason-code overrides.","tags":["inventoryAccountDeterminationRules"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/inventory-decreases/bulk":{"post":{"operationId":"bulkCreateInventoryDecreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateInventoryDecreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadAMonthOfCorrections":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]},{"id":"0f5c8a24-91b7-4e63-8d02-4a7e1b96c380","documentNumber":"DEC-43","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Second count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]}},"summary":"Two write-offs raised together"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, REASON_CODE_NOT_APPLICABLE, NO_LINES, INVALID_QUANTITY, UNKNOWN_TRACKING_NUMBER, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reasonCodeId","documentType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reasonCodeId","documentType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reasonCodeId","documentType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateInventoryDecreasesInput"},"examples":{"loadAMonthOfCorrections":{"value":{"decreases":[{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Forklift damage, aisle 4","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]},{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Second count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]},"summary":"Two write-offs raised together"}}}}},"summary":"Bulk create inventory decreases","description":"Creates multiple inventory decreases in one request, each as a draft. Each inventory decrease takes the same fields as POST inventory/inventory-decreases. If any inventory decrease can't be created, none are. The response lists each new draft in full, in the order you sent them.\n\nNo stock is removed and no journal entry is created until you commit each draft with POST inventory/inventory-decreases/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryDecreases"]}},"/inventory/purchase-returns/{id}/cancel":{"post":{"operationId":"cancelPurchaseReturn","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/cancelPurchaseReturnOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["status","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the purchase return you want to cancel. Format: UUID.","example":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cancelPurchaseReturnInput"}}}},"summary":"Cancel a purchase return","description":"Cancels a purchase return with the `documentStatus` 'DRAFT', 'APPROVED', 'PREPARED', or 'COMMITTED'. If the purchase return has not been shipped, only its `documentStatus` changes. If the purchase return has been shipped ('COMMITTED'), canceling also:\n\n- puts the stock back in the warehouse\n- creates a reversing journal entry\n- lowers the returned quantities on the receipt lines again\n\nCanceling a shipped purchase return fails when the quantity it puts back on a purchase order line is more than the received quantity on that line that has not yet been invoiced.","tags":["inventoryPurchaseReturns"]}},"/inventory/landed-costs/search":{"post":{"operationId":"searchLandedCosts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchLandedCostsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"byReceipt":{"value":{"data":{"items":[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","currency":"GBP","totalChargeAmount":"240","receiptCount":1,"chargeCount":1,"allocationLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","receipts":[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40","unitPrice":"12","lineTotal":"480"}]}],"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}],"allocationLines":[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]}],"pagination":{"hasMore":false}}},"summary":"Landed costs that include one receipt."},"openDrafts":{"value":{"data":{"items":[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","currency":"GBP","totalChargeAmount":"240","receiptCount":1,"chargeCount":1,"allocationLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","receipts":[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40","unitPrice":"12","lineTotal":"480"}]}],"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}],"allocationLines":[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]}],"pagination":{"hasMore":false}}},"summary":"Landed costs that are still drafts."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchLandedCostsInput"},"examples":{"byReceipt":{"value":{"filters":{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}},"summary":"Landed costs that include one receipt."},"openDrafts":{"value":{"filters":{"documentStatus":"DRAFT"},"page":{"size":50}},"summary":"Landed costs that are still drafts."}}}}},"summary":"Search landed costs","description":"Searches landed costs, with their receipts, charges, and allocation.","tags":["inventoryLandedCosts"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/batch-numbers":{"get":{"operationId":"batchNumbers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[batchNumber]","in":"query","required":false,"description":"Filter batchNumber (equality)","schema":{"type":"string"}},{"name":"filter[batchNumber][ne]","in":"query","required":false,"description":"Filter batchNumber (ne)","schema":{"type":"string"}},{"name":"filter[batchNumber][gt]","in":"query","required":false,"description":"Filter batchNumber (gt)","schema":{"type":"string"}},{"name":"filter[batchNumber][gte]","in":"query","required":false,"description":"Filter batchNumber (gte)","schema":{"type":"string"}},{"name":"filter[batchNumber][lt]","in":"query","required":false,"description":"Filter batchNumber (lt)","schema":{"type":"string"}},{"name":"filter[batchNumber][lte]","in":"query","required":false,"description":"Filter batchNumber (lte)","schema":{"type":"string"}},{"name":"filter[batchNumber][in]","in":"query","required":false,"description":"Filter batchNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumber][notIn]","in":"query","required":false,"description":"Filter batchNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchNumber][between]","in":"query","required":false,"description":"Filter batchNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchNumber][like]","in":"query","required":false,"description":"Filter batchNumber (like)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (equality)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][ne]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (ne)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][gt]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (gt)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][gte]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (gte)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][lt]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (lt)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][lte]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (lte)","schema":{"type":"string"}},{"name":"filter[manufacturerBatchNumber][in]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerBatchNumber][notIn]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[manufacturerBatchNumber][between]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[manufacturerBatchNumber][like]","in":"query","required":false,"description":"Filter manufacturerBatchNumber (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[expirationDate]","in":"query","required":false,"description":"Filter expirationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][ne]","in":"query","required":false,"description":"Filter expirationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gt]","in":"query","required":false,"description":"Filter expirationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][gte]","in":"query","required":false,"description":"Filter expirationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lt]","in":"query","required":false,"description":"Filter expirationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][lte]","in":"query","required":false,"description":"Filter expirationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[expirationDate][in]","in":"query","required":false,"description":"Filter expirationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][notIn]","in":"query","required":false,"description":"Filter expirationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[expirationDate][between]","in":"query","required":false,"description":"Filter expirationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchStatus]","in":"query","required":false,"description":"Filter batchStatus (equality)","schema":{"type":"string"}},{"name":"filter[batchStatus][ne]","in":"query","required":false,"description":"Filter batchStatus (ne)","schema":{"type":"string"}},{"name":"filter[batchStatus][gt]","in":"query","required":false,"description":"Filter batchStatus (gt)","schema":{"type":"string"}},{"name":"filter[batchStatus][gte]","in":"query","required":false,"description":"Filter batchStatus (gte)","schema":{"type":"string"}},{"name":"filter[batchStatus][lt]","in":"query","required":false,"description":"Filter batchStatus (lt)","schema":{"type":"string"}},{"name":"filter[batchStatus][lte]","in":"query","required":false,"description":"Filter batchStatus (lte)","schema":{"type":"string"}},{"name":"filter[batchStatus][in]","in":"query","required":false,"description":"Filter batchStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchStatus][notIn]","in":"query","required":false,"description":"Filter batchStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[batchStatus][between]","in":"query","required":false,"description":"Filter batchStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[batchStatus][like]","in":"query","required":false,"description":"Filter batchStatus (like)","schema":{"type":"string"}},{"name":"filter[temperatureBreach]","in":"query","required":false,"description":"Filter temperatureBreach (equality)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][ne]","in":"query","required":false,"description":"Filter temperatureBreach (ne)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][gt]","in":"query","required":false,"description":"Filter temperatureBreach (gt)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][gte]","in":"query","required":false,"description":"Filter temperatureBreach (gte)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][lt]","in":"query","required":false,"description":"Filter temperatureBreach (lt)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][lte]","in":"query","required":false,"description":"Filter temperatureBreach (lte)","schema":{"type":"boolean"}},{"name":"filter[temperatureBreach][in]","in":"query","required":false,"description":"Filter temperatureBreach (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[temperatureBreach][notIn]","in":"query","required":false,"description":"Filter temperatureBreach (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[temperatureBreach][between]","in":"query","required":false,"description":"Filter temperatureBreach (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[qcStatus]","in":"query","required":false,"description":"Filter qcStatus (equality)","schema":{"type":"string"}},{"name":"filter[qcStatus][ne]","in":"query","required":false,"description":"Filter qcStatus (ne)","schema":{"type":"string"}},{"name":"filter[qcStatus][gt]","in":"query","required":false,"description":"Filter qcStatus (gt)","schema":{"type":"string"}},{"name":"filter[qcStatus][gte]","in":"query","required":false,"description":"Filter qcStatus (gte)","schema":{"type":"string"}},{"name":"filter[qcStatus][lt]","in":"query","required":false,"description":"Filter qcStatus (lt)","schema":{"type":"string"}},{"name":"filter[qcStatus][lte]","in":"query","required":false,"description":"Filter qcStatus (lte)","schema":{"type":"string"}},{"name":"filter[qcStatus][in]","in":"query","required":false,"description":"Filter qcStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[qcStatus][notIn]","in":"query","required":false,"description":"Filter qcStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[qcStatus][between]","in":"query","required":false,"description":"Filter qcStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[qcStatus][like]","in":"query","required":false,"description":"Filter qcStatus (like)","schema":{"type":"string"}},{"name":"filter[active]","in":"query","required":false,"description":"Filter active (equality)","schema":{"type":"boolean"}},{"name":"filter[active][ne]","in":"query","required":false,"description":"Filter active (ne)","schema":{"type":"boolean"}},{"name":"filter[active][gt]","in":"query","required":false,"description":"Filter active (gt)","schema":{"type":"boolean"}},{"name":"filter[active][gte]","in":"query","required":false,"description":"Filter active (gte)","schema":{"type":"boolean"}},{"name":"filter[active][lt]","in":"query","required":false,"description":"Filter active (lt)","schema":{"type":"boolean"}},{"name":"filter[active][lte]","in":"query","required":false,"description":"Filter active (lte)","schema":{"type":"boolean"}},{"name":"filter[active][in]","in":"query","required":false,"description":"Filter active (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][notIn]","in":"query","required":false,"description":"Filter active (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[active][between]","in":"query","required":false,"description":"Filter active (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","batchNumber","-batchNumber","expirationDate","-expirationDate","batchStatus","-batchStatus","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","batchNumber","manufacturerBatchNumber","itemId","itemCode","itemName","locationId","locationCode","locationName","quantity","inStock","expirationDate","manufactureDate","bestBeforeDate","entryDate","batchStatus","temperatureBreach","qcStatus","active","createdDate","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/batchNumbersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchNumber":"LOT-2026-0448","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","quantity":"400","inStock":"260","expirationDate":"2027-03-31","batchStatus":"ACTIVE","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List batch numbers","description":"Lists batch numbers, without their costs. For `cost`, `originalCost`, and `currency`, use POST inventory/batch-numbers/search or GET inventory/batch-numbers/:id.","tags":["inventoryBatchNumbers"]}},"/inventory/item-categories/tree":{"get":{"operationId":"readItemCategoryTree","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/readItemCategoryTreeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"Retrieve the item category tree","description":"Retrieves the item category tree. Each category comes back with its parent, its depth in level, and in path the names from the top level down to the category itself. A category that has never been placed under a parent is at the top level, with level 0.\n\nCategories are ordered by name, not by position in the tree, so build the tree from parentId.","tags":["inventoryItemCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/inventory-transactions":{"get":{"operationId":"inventoryTransactions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[itemId]","in":"query","required":false,"description":"Filter itemId (equality)","schema":{"type":"string"}},{"name":"filter[itemId][ne]","in":"query","required":false,"description":"Filter itemId (ne)","schema":{"type":"string"}},{"name":"filter[itemId][gt]","in":"query","required":false,"description":"Filter itemId (gt)","schema":{"type":"string"}},{"name":"filter[itemId][gte]","in":"query","required":false,"description":"Filter itemId (gte)","schema":{"type":"string"}},{"name":"filter[itemId][lt]","in":"query","required":false,"description":"Filter itemId (lt)","schema":{"type":"string"}},{"name":"filter[itemId][lte]","in":"query","required":false,"description":"Filter itemId (lte)","schema":{"type":"string"}},{"name":"filter[itemId][in]","in":"query","required":false,"description":"Filter itemId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][notIn]","in":"query","required":false,"description":"Filter itemId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemId][between]","in":"query","required":false,"description":"Filter itemId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemId][like]","in":"query","required":false,"description":"Filter itemId (like)","schema":{"type":"string"}},{"name":"filter[itemCode]","in":"query","required":false,"description":"Filter itemCode (equality)","schema":{"type":"string"}},{"name":"filter[itemCode][ne]","in":"query","required":false,"description":"Filter itemCode (ne)","schema":{"type":"string"}},{"name":"filter[itemCode][gt]","in":"query","required":false,"description":"Filter itemCode (gt)","schema":{"type":"string"}},{"name":"filter[itemCode][gte]","in":"query","required":false,"description":"Filter itemCode (gte)","schema":{"type":"string"}},{"name":"filter[itemCode][lt]","in":"query","required":false,"description":"Filter itemCode (lt)","schema":{"type":"string"}},{"name":"filter[itemCode][lte]","in":"query","required":false,"description":"Filter itemCode (lte)","schema":{"type":"string"}},{"name":"filter[itemCode][in]","in":"query","required":false,"description":"Filter itemCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][notIn]","in":"query","required":false,"description":"Filter itemCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[itemCode][between]","in":"query","required":false,"description":"Filter itemCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[itemCode][like]","in":"query","required":false,"description":"Filter itemCode (like)","schema":{"type":"string"}},{"name":"filter[locationId]","in":"query","required":false,"description":"Filter locationId (equality)","schema":{"type":"string"}},{"name":"filter[locationId][ne]","in":"query","required":false,"description":"Filter locationId (ne)","schema":{"type":"string"}},{"name":"filter[locationId][gt]","in":"query","required":false,"description":"Filter locationId (gt)","schema":{"type":"string"}},{"name":"filter[locationId][gte]","in":"query","required":false,"description":"Filter locationId (gte)","schema":{"type":"string"}},{"name":"filter[locationId][lt]","in":"query","required":false,"description":"Filter locationId (lt)","schema":{"type":"string"}},{"name":"filter[locationId][lte]","in":"query","required":false,"description":"Filter locationId (lte)","schema":{"type":"string"}},{"name":"filter[locationId][in]","in":"query","required":false,"description":"Filter locationId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][notIn]","in":"query","required":false,"description":"Filter locationId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationId][between]","in":"query","required":false,"description":"Filter locationId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationId][like]","in":"query","required":false,"description":"Filter locationId (like)","schema":{"type":"string"}},{"name":"filter[locationCode]","in":"query","required":false,"description":"Filter locationCode (equality)","schema":{"type":"string"}},{"name":"filter[locationCode][ne]","in":"query","required":false,"description":"Filter locationCode (ne)","schema":{"type":"string"}},{"name":"filter[locationCode][gt]","in":"query","required":false,"description":"Filter locationCode (gt)","schema":{"type":"string"}},{"name":"filter[locationCode][gte]","in":"query","required":false,"description":"Filter locationCode (gte)","schema":{"type":"string"}},{"name":"filter[locationCode][lt]","in":"query","required":false,"description":"Filter locationCode (lt)","schema":{"type":"string"}},{"name":"filter[locationCode][lte]","in":"query","required":false,"description":"Filter locationCode (lte)","schema":{"type":"string"}},{"name":"filter[locationCode][in]","in":"query","required":false,"description":"Filter locationCode (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][notIn]","in":"query","required":false,"description":"Filter locationCode (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[locationCode][between]","in":"query","required":false,"description":"Filter locationCode (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[locationCode][like]","in":"query","required":false,"description":"Filter locationCode (like)","schema":{"type":"string"}},{"name":"filter[transactionDate]","in":"query","required":false,"description":"Filter transactionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][ne]","in":"query","required":false,"description":"Filter transactionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gt]","in":"query","required":false,"description":"Filter transactionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][gte]","in":"query","required":false,"description":"Filter transactionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lt]","in":"query","required":false,"description":"Filter transactionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][lte]","in":"query","required":false,"description":"Filter transactionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[transactionDate][in]","in":"query","required":false,"description":"Filter transactionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][notIn]","in":"query","required":false,"description":"Filter transactionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[transactionDate][between]","in":"query","required":false,"description":"Filter transactionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType]","in":"query","required":false,"description":"Filter sourceDocumentLineType (equality)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][ne]","in":"query","required":false,"description":"Filter sourceDocumentLineType (ne)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][gte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (gte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lt]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lt)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][lte]","in":"query","required":false,"description":"Filter sourceDocumentLineType (lte)","schema":{"type":"string"}},{"name":"filter[sourceDocumentLineType][in]","in":"query","required":false,"description":"Filter sourceDocumentLineType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][notIn]","in":"query","required":false,"description":"Filter sourceDocumentLineType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][between]","in":"query","required":false,"description":"Filter sourceDocumentLineType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[sourceDocumentLineType][like]","in":"query","required":false,"description":"Filter sourceDocumentLineType (like)","schema":{"type":"string"}},{"name":"filter[isReturn]","in":"query","required":false,"description":"Filter isReturn (equality)","schema":{"type":"boolean"}},{"name":"filter[isReturn][ne]","in":"query","required":false,"description":"Filter isReturn (ne)","schema":{"type":"boolean"}},{"name":"filter[isReturn][gt]","in":"query","required":false,"description":"Filter isReturn (gt)","schema":{"type":"boolean"}},{"name":"filter[isReturn][gte]","in":"query","required":false,"description":"Filter isReturn (gte)","schema":{"type":"boolean"}},{"name":"filter[isReturn][lt]","in":"query","required":false,"description":"Filter isReturn (lt)","schema":{"type":"boolean"}},{"name":"filter[isReturn][lte]","in":"query","required":false,"description":"Filter isReturn (lte)","schema":{"type":"boolean"}},{"name":"filter[isReturn][in]","in":"query","required":false,"description":"Filter isReturn (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReturn][notIn]","in":"query","required":false,"description":"Filter isReturn (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isReturn][between]","in":"query","required":false,"description":"Filter isReturn (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isPriceDiff]","in":"query","required":false,"description":"Filter isPriceDiff (equality)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][ne]","in":"query","required":false,"description":"Filter isPriceDiff (ne)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][gt]","in":"query","required":false,"description":"Filter isPriceDiff (gt)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][gte]","in":"query","required":false,"description":"Filter isPriceDiff (gte)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][lt]","in":"query","required":false,"description":"Filter isPriceDiff (lt)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][lte]","in":"query","required":false,"description":"Filter isPriceDiff (lte)","schema":{"type":"boolean"}},{"name":"filter[isPriceDiff][in]","in":"query","required":false,"description":"Filter isPriceDiff (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPriceDiff][notIn]","in":"query","required":false,"description":"Filter isPriceDiff (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isPriceDiff][between]","in":"query","required":false,"description":"Filter isPriceDiff (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","transactionDate","-transactionDate","inQuantity","-inQuantity","outQuantity","-outQuantity","totalCost","-totalCost","itemCode","-itemCode","locationCode","-locationCode","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","itemId","itemCode","itemName","locationId","locationCode","locationName","unitId","unitCode","unitName","transactionDate","inQuantity","outQuantity","unitInQuantity","unitOutQuantity","unitCost","totalCost","salesAmount","currency","sourceDocumentLineType","sourceDocumentId","sourceDocumentLineId","isReturn","isPriceDiff","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/inventoryTransactionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-03","inQuantity":"500.00","outQuantity":"0.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"b91e7d02-5c48-4a36-90f7-1e4c8b","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-04","inQuantity":"0.00","outQuantity":"20.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"75.00","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-04T09:02:00.000Z","unitOutQuantity":"20.00"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List inventory transactions","description":"Lists inventory transactions. To order them, use the `sort` parameter, for example `sort=-transactionDate` for newest first.","tags":["inventoryInventoryTransactions"]}},"/inventory/inventory-revaluations/search":{"post":{"operationId":"searchInventoryRevaluations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInventoryRevaluationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"whatHasThisItemBeenRevaluedTo":{"value":{"data":{"items":[{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"COMMITTED","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Every posted revaluation touching one item, newest page first"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInventoryRevaluationsInput"},"examples":{"whatHasThisItemBeenRevaluedTo":{"value":{"filters":{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","documentStatus":"COMMITTED"},"page":{"size":25}},"summary":"Every posted revaluation touching one item, newest page first"}}}}},"summary":"Search inventory revaluations","description":"Searches inventory revaluations. Each revaluation comes back with its lines, in the same shape as GET inventory/inventory-revaluations/:id.\n\nOnly this endpoint filters by itemId or locationId. A revaluation matches when any of its lines has that item or warehouse.","tags":["inventoryInventoryRevaluations"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/inventory-increases/bulk":{"post":{"operationId":"bulkCreateInventoryIncreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateInventoryIncreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"loadAMonthOfCorrections":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]},{"id":"0f5c8a24-91b7-4e63-8d02-4a7e1b96c380","documentNumber":"INC-43","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"Second count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]}},"summary":"Two count corrections raised together"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, REASON_CODE_NOT_APPLICABLE, NO_LINES, INVALID_QUANTITY, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reasonCodeId","documentType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reasonCodeId","documentType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REASON_CODE_NOT_APPLICABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reasonCodeId":{"type":"string"},"documentType":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reasonCodeId","documentType","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateInventoryIncreasesInput"},"examples":{"loadAMonthOfCorrections":{"value":{"increases":[{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"August cycle count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]},{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Second count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]},"summary":"Two count corrections raised together"}}}}},"summary":"Bulk create inventory increases","description":"Creates multiple inventory increases in one request, each as a draft. Each inventory increase takes the same fields as POST inventory/inventory-increases. If any inventory increase can't be created, none are. The response lists each new draft in full, in the order you sent them.\n\nNo stock is added and no journal entry is created until you commit each draft with POST inventory/inventory-increases/:id/commit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryIncreases"]}},"/inventory/shipment-carriers/bulk":{"post":{"operationId":"bulkCreateShipmentCarriers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateShipmentCarriersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"seedingACarrierSet":{"value":{"data":{"created":[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"},{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714"}]}},"summary":"Two carriers created together; match the response to the request by index"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: VENDOR_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["vendorId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["vendorId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"VENDOR_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"vendorId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["vendorId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateShipmentCarriersInput"},"examples":{"seedingACarrierSet":{"value":{"shipmentCarriers":[{"name":"DHL Express","vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47"},{"name":"In-house fleet","active":false}]},"summary":"Two carriers created together; match the response to the request by index"}}}}},"summary":"Bulk create shipment carriers","description":"Creates multiple shipment carriers in one request. Each carrier in the request takes the same fields as the body of POST inventory/shipment-carriers.\n\nIf any carrier can't be created, none are, and the error gives that carrier's position in the request.\n\nThe response lists the created carriers in the order you sent them, each with only its id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryShipmentCarriers"]}},"/inventory/landed-cost-items/bulk":{"post":{"operationId":"bulkCreateLandedCostItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateLandedCostItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"setUp":{"value":{"data":{"created":[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"},{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}]}},"summary":"Two landed cost items created in one request: one covers a freight service item, the other a customs duty account."}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NO_SELECTOR, REFERENCE_NOT_FOUND, UNKNOWN_ALLOCATION_MODE, DUPLICATE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NO_SELECTOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_ALLOCATION_MODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["value","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateLandedCostItemsInput"},"examples":{"setUp":{"value":{"landedCostItems":[{"itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","allocationMode":"Weight"},{"accountId":"7e21b508-4a93-4c67-b0d5-19f6a3e84c72","allocationMode":"LineTotal"}]},"summary":"Two landed cost items created in one request: one covers a freight service item, the other a customs duty account."}}}}},"summary":"Bulk create landed cost items","description":"Creates multiple landed cost items in one request. Each landed cost item follows the same rules as on POST inventory/landed-cost-items, and two landed cost items in the request cannot share an `itemId` or an `accountId`. If one landed cost item cannot be created, the request fails and no landed cost items are created.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryLandedCostItems"]}},"/inventory/receipts/bulk-delete":{"post":{"operationId":"bulkDeleteReceipts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteReceiptsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteReceiptsInput"}}}},"summary":"Bulk delete receipts","description":"Deletes multiple receipts in one request. Only draft receipts can be deleted. The response lists the deleted ids in the order you sent them.\n\nIf any id matches no receipt, or names a receipt that is not in draft status, none are deleted. To delete one receipt, use DELETE inventory/receipts/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryReceipts"]}},"/inventory/inventory-increases/search":{"post":{"operationId":"searchInventoryIncreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInventoryIncreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"draftsAtOneWarehouse":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Everything still drafted at one warehouse, waiting to be committed"},"everyAdjustmentOfOneItem":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T10:03:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Every increase touching one item in August — the stock-investigation question"},"incrementalSync":{"value":{"data":{"items":[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"COMMITTED","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T10:03:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}],"pagination":{"hasMore":false}}},"summary":"Everything changed since the last sync, for a caller keeping a copy"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInventoryIncreasesInput"},"examples":{"draftsAtOneWarehouse":{"value":{"filters":{"documentStatus":"DRAFT","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}},"summary":"Everything still drafted at one warehouse, waiting to be committed"},"everyAdjustmentOfOneItem":{"value":{"filters":{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","fromDate":"2026-08-01","toDate":"2026-08-31"}},"summary":"Every increase touching one item in August — the stock-investigation question"},"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-14T00:00:00.000Z"}},"summary":"Everything changed since the last sync, for a caller keeping a copy"}}}}},"summary":"Search inventory increases","description":"Searches inventory increases. Each matching inventory increase comes back with its main fields, its lines, and each line's batch, serial, and bin details. The fields are the same as on GET inventory/inventory-increases/:id.\n\nThis is the only endpoint that filters by item. itemId matches inventory increases that have a line for that item.","tags":["inventoryInventoryIncreases"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/unit-of-measure-groups/bulk-delete":{"post":{"operationId":"bulkDeleteUnitOfMeasureGroups","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteUnitOfMeasureGroupsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, UNIT_OF_MEASURE_GROUP_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_GROUP_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"},"itemCount":{"type":"number"},"lineCount":{"type":"number"}},"additionalProperties":false,"required":["id","index","itemCount","lineCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteUnitOfMeasureGroupsInput"}}}},"summary":"Bulk delete unit of measure groups","description":"Deletes multiple unit of measure groups in one request. Each group must be empty first, with no items assigned to it and no conversion lines, the base unit's line included. Reassign the items, then remove the lines with deleteLines on PATCH inventory/unit-of-measure-groups/:id.\n\nIf any id is unknown, or names a group still in use, none are deleted.\n\nThe response lists the deleted groups in the order you sent them, each with its id and the name it had. To delete a single group, use DELETE inventory/unit-of-measure-groups/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryUnitOfMeasureGroups"]}},"/inventory/serial-transactions/{id}":{"get":{"operationId":"getSerialTransaction","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getSerialTransactionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aSerialReceipt":{"value":{"data":{"id":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"}},"summary":"One laptop received on a receipt."},"theSameUnitLeaving":{"value":{"data":{"id":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"8d17b4e2-3c95-4a60-b7f8-01e5d9c26a43","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-11","outQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-11T09:02:00.000Z"}},"summary":"The same laptop going out on a shipment eight days later."}}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the serial transaction you want to retrieve. Format: UUID.","examples":{"aSerialReceipt":{"value":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92"},"theSameUnitLeaving":{"value":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018"}}}],"summary":"Retrieve a serial transaction","description":"Retrieves a serial transaction.","tags":["inventorySerialTransactions"]}},"/inventory/purchase-returns/from-purchase-order":{"post":{"operationId":"createPurchaseReturnFromPurchaseOrder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPurchaseReturnFromPurchaseOrderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, INVALID_RETURN_TYPE, NOTHING_RETURNABLE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"required":["value","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_RETURNABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"required":["value","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_RETURNABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_RETURN_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"value":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"required":["value","path"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOTHING_RETURNABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseReturnFromPurchaseOrderInput"}}}},"summary":"Draft a purchase order return","description":"Drafts a return for the returnable lines in a purchase order. The vendor, legal entity, and currency come from the purchase order. Each purchase order line for an item that still has something to return gets one purchase return line:\n\n- The quantity is the quantity received on the purchase order line minus the quantity already returned. Only shipped purchase returns count as returned.\n- For a batch-tracked or serialized item, the line gets the batches or serialized units received on the purchase order line that are not returned yet.\n\nThe batches and serialized units are chosen for you, so check them before you approve the purchase return.\n\nA closed or rejected purchase order is refused with POSTING_REJECTED. A purchase order that is still pending approval gets a purchase return, with a warning in `warnings`.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryPurchaseReturns"]}},"/inventory/warehouse-transfer-orders/search":{"post":{"operationId":"searchTransferOrders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchTransferOrdersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"whatIsWaitingOnASource":{"value":{"data":{"items":[{"id":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6","documentNumber":"WTO-1044","documentStatus":"DRAFT","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T10:02:41.883Z","lines":[{"id":"9a4e2c76-1b38-4f05-8d92-6c7a3e15b204","quantity":"12","status":"NEEDS_SOURCE"}]}],"pagination":{"hasMore":false}}},"summary":"Every draft order still missing a donor warehouse, so a planner can resolve them before converting"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchTransferOrdersInput"},"examples":{"whatIsWaitingOnASource":{"value":{"filters":{"documentStatus":"DRAFT"},"page":{"size":25}},"summary":"Every draft order still missing a donor warehouse, so a planner can resolve them before converting"}}}}},"summary":"Search warehouse transfer orders","description":"Searches warehouse transfer orders. Each order comes back in full, lines included, with the same fields as GET inventory/warehouse-transfer-orders/:id.\n\nThis endpoint can filter by itemId and referenceNumber, which the collection GET inventory/warehouse-transfer-orders can't. itemId matches orders that have at least one line for the item.","tags":["inventoryWarehouseTransferOrders"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/warehouse-transfers/bulk-delete":{"post":{"operationId":"bulkDeleteWarehouseTransfers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteWarehouseTransfersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteWarehouseTransfersInput"}}}},"summary":"Bulk delete warehouse transfers","description":"Deletes multiple draft warehouse transfers in one request. If any id matches no transfer, or names a transfer that is not a draft, none are deleted.\n\nThe response lists the deleted ids in the order you sent them. To delete one transfer, use DELETE inventory/warehouse-transfers/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransfers"]}},"/inventory/landed-cost-items/search":{"post":{"operationId":"searchLandedCostItems","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchLandedCostItemsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"weightBased":{"value":{"data":{"items":[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Weight","costingElementTypeId":"c4a90e21-7b35-4d18-9e02-6f13a85c7d40","costingElementTypeCode":"FRT","costingElementTypeName":"Freight","active":true,"createdDate":"2026-08-01T11:02:19.880Z","lastModifiedDate":"2026-08-18T09:14:22.517Z"}],"pagination":{"hasMore":false}}},"summary":"Active landed cost items allocated by 'Weight', which need a weight on every received item."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchLandedCostItemsInput"},"examples":{"weightBased":{"value":{"filters":{"allocationMode":"Weight","active":true},"page":{"size":50}},"summary":"Active landed cost items allocated by 'Weight', which need a weight on every received item."}}}}},"summary":"Search landed cost items","description":"Searches landed cost items, with the names of their items, accounts, and costing element types.","tags":["inventoryLandedCostItems"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/landed-costs/vendor-bill-lines":{"get":{"operationId":"getAvailableCharges","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAvailableChargesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"nothingConfigured":{"value":{"data":{"charges":[]}},"summary":"No vendor bill lines, because no landed cost item matches any bill line."},"whatIsAvailable":{"value":{"data":{"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillId":"e0b41f76-38c9-4d52-9a1e-7c5b02d6a834","vendorBillNumber":"VB-8842","description":"Sea freight, Shanghai to Felixstowe","poNumber":"PO-4471","billStatus":"approved","billDate":"2026-08-10","vendorName":"Meridian Logistics","entityId":"7039b992-696a-40c7-a181-51759304ef83","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Quantity","lineTotal":"300","allocatedAmount":"60","currency":"GBP","functionalLineTotal":"300","functionalAllocatedAmount":"60","functionalCurrency":"GBP"}]}},"summary":"The vendor bill lines one legal entity can add to a landed cost."}}}}},"400":{"description":"Invalid request or business failure. Codes: ENTITY_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"entityId","in":"query","required":true,"schema":{"type":"string"},"description":"The unique identifier of the legal entity whose vendor bill lines you want. Format: UUID. See `id` on GET base/entities (entities).","examples":{"nothingConfigured":{"value":"7039b992-696a-40c7-a181-51759304ef83"},"whatIsAvailable":{"value":"7039b992-696a-40c7-a181-51759304ef83"}}},{"name":"excludeFullyAllocated","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether to leave out vendor bill lines with nothing left to use, because committed landed costs have already used their whole amount. Defaults to true."}],"summary":"List available landed cost charges","description":"Lists the vendor bill lines of a legal entity that you can add to a landed cost as charges. A line is included when:\n\n- its vendor bill is approved\n- the line's item or general ledger account matches an active landed cost item\n- its currency can be converted to the legal entity's functional currency on the bill date\n\nTo set up landed cost items, use POST inventory/landed-cost-items. If the list is empty, check that landed cost items are set up. Without them, no line is included, even when there are approved vendor bills.","tags":["inventoryLandedCosts"]}},"/inventory/inventory-decreases/bulk-delete":{"post":{"operationId":"bulkDeleteInventoryDecreases","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteInventoryDecreasesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_DELETE, NOT_FOUND, WRONG_STATUS, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_DELETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WRONG_STATUS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"expected":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["id","status","expected","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteInventoryDecreasesInput"}}}},"summary":"Bulk delete inventory decreases","description":"Deletes multiple inventory decreases in one request. A draft or a canceled inventory decrease can be deleted. A committed one can't. If any inventory decrease can't be deleted, none are deleted.\n\nThe response lists the deleted ids in the order you sent them.\n\nTo delete a single inventory decrease, use DELETE inventory/inventory-decreases/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryInventoryDecreases"]}},"/inventory/warehouse-transfers/bulk":{"post":{"operationId":"bulkCreateWarehouseTransfers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateWarehouseTransfersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"aNightlyReplenishment":{"value":{"data":{"warehouseTransfers":[{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentStatus":"DRAFT","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]}},"summary":"One transfer per receiving warehouse, raised in a single call"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOTHING_TO_CREATE, REFERENCE_NOT_FOUND, NO_LINES, INVALID_QUANTITY, SAME_LOCATION, INTERCOMPANY_CONFIG_MISSING, DUPLICATE_TRACKING_NUMBER, UNKNOWN_TRACKING_REFERENCE, POSTING_REJECTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOTHING_TO_CREATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{},"additionalProperties":false}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"referenceId":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","referenceId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_LINES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_QUANTITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["field","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SAME_LOCATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INTERCOMPANY_CONFIG_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missing":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["missing","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TRACKING_NUMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNKNOWN_TRACKING_REFERENCE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"kind":{"type":"string"},"number":{"type":"string"},"lineIndex":{"type":"number"},"index":{"type":"number"}},"additionalProperties":false,"required":["kind","number","lineIndex","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSTING_REJECTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"},"code":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["reason","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateWarehouseTransfersInput"},"examples":{"aNightlyReplenishment":{"value":{"warehouseTransfers":[{"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"24"}]}]},"summary":"One transfer per receiving warehouse, raised in a single call"}}}}},"summary":"Bulk create warehouse transfers","description":"Creates multiple warehouse transfers in one request. Every transfer is created as a draft. If any transfer can't be created, none are.\n\nThe response lists the created transfers in the order you sent them, without their lines. To see a transfer's lines, use GET inventory/warehouse-transfers/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouseTransfers"]}},"/inventory/inventory-levels/search":{"post":{"operationId":"searchInventoryLevels","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchInventoryLevelsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"stockOfOneItemEverywhere":{"value":{"data":{"items":[{"id":"0b6d4c93-71ea-4f28-9c05-83a1e7f6204d","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","onHandQuantity":"1200.00","availableQuantity":"1150.00","allocatedQuantity":"50.00","averageCost":"3.75","onHandValue":"4500.00","currency":"EUR","lastTransactionTimestamp":"2026-08-03T11:15:00","lastModifiedDate":"2026-08-03T11:15:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every location holding one item — omit locationId to sweep the network"}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchInventoryLevelsInput"},"examples":{"stockOfOneItemEverywhere":{"value":{"filters":{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"}},"summary":"Every location holding one item — omit locationId to sweep the network"}}}}},"summary":"Search inventory levels","description":"Searches inventory levels. The fields are the same as on GET inventory/inventory-levels/:id and the collection GET inventory/inventory-levels.","tags":["inventoryInventoryLevels"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/serial-transactions/search":{"post":{"operationId":"searchSerialTransactions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchSerialTransactionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"incrementalSync":{"value":{"data":{"items":[{"id":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"8d17b4e2-3c95-4a60-b7f8-01e5d9c26a43","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-11","outQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-11T09:02:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Serial transactions changed since your last request, to keep a copy up to date."},"traceOneUnit":{"value":{"data":{"items":[{"id":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"8d17b4e2-3c95-4a60-b7f8-01e5d9c26a43","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-11","outQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-11T09:02:00.000Z"}],"pagination":{"hasMore":false}}},"summary":"Every serial transaction for one unit, found by its serial number."},"unitsStillHeld":{"value":{"data":{"items":[],"pagination":{"hasMore":false}}},"summary":"Serial transactions in August for unsold units in one warehouse. None match in this example."}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchSerialTransactionsInput"},"examples":{"incrementalSync":{"value":{"filters":{"modifiedSince":"2026-08-11T00:00:00.000Z"}},"summary":"Serial transactions changed since your last request, to keep a copy up to date."},"traceOneUnit":{"value":{"filters":{"serialNumber":"SN-000412"}},"summary":"Every serial transaction for one unit, found by its serial number."},"unitsStillHeld":{"value":{"filters":{"isSold":false,"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","fromDate":"2026-08-01","toDate":"2026-08-31"},"page":{"size":50}},"summary":"Serial transactions in August for unsold units in one warehouse. None match in this example."}}}}},"summary":"Search serial transactions","description":"Searches serial transactions. Results are in the order the serial transactions were created, not in order of `transactionDate`.","tags":["inventorySerialTransactions"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/inventory/warehouses/bulk":{"post":{"operationId":"bulkCreateWarehouses","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateWarehousesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false},"examples":{"standingUpASiteNetwork":{"value":{"data":{"created":[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"},{"id":"b5390f6a-1c72-4e84-9a03-8f2d61c74e59"}]}},"summary":"Two warehouses created together; match the response to the request by index"}}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_LOCATION_CODE, DUPLICATE_LOCATION_CODE_IN_REQUEST, ENTITY_NOT_FOUND, WAREHOUSE_TYPE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["locationCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["entityId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["warehouseTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["locationCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["entityId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["warehouseTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"existingId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["locationCode","existingId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_LOCATION_CODE_IN_REQUEST"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"locationCode":{"type":"string"},"index":{"type":"number"},"firstIndex":{"type":"number"}},"additionalProperties":false,"required":["locationCode","index","firstIndex"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["entityId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"WAREHOUSE_TYPE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"warehouseTypeId":{"type":"string"},"index":{"type":"number"}},"additionalProperties":false,"required":["warehouseTypeId","index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateWarehousesInput"},"examples":{"standingUpASiteNetwork":{"value":{"warehouses":[{"locationCode":"WH-01","name":"Rotterdam Distribution Centre","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","countryCode":"NL"},{"locationCode":"WH-02","name":"Antwerp Overflow","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","countryCode":"BE"}]},"summary":"Two warehouses created together; match the response to the request by index"}}}}},"summary":"Bulk create warehouses","description":"Creates multiple warehouses in one request. If any warehouse can't be created, none are. 'index' on an error is that warehouse's position in the request, counting from zero.\n\nThe response has the id of each created warehouse, in the order you sent them. To create one warehouse, use POST inventory/warehouses.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["inventoryWarehouses"]}},"/psa/projects/bulk-delete":{"post":{"operationId":"deletePsaProjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePsaProjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deletePsaProjectsInput"}}}},"summary":"Archive or delete projects","description":"Archives or deletes projects. By default the projects are archived, and POST psa/projects/bulk-restore brings them back. Set irreversible to true to delete them instead, which can't be undone.\n\nDeleting a project also deletes its milestones, fixed fees, expense budgets, and files, and its time-tracking data, including positions, position assignments, activities, allocations, and time entries. Deleting or archiving a project makes its team inactive, and the team is kept. A permanent delete fails if any of the project's positions, position assignments, or activities has been invoiced or has billed time.\n\nIf any project can't be deleted, none are. The response is empty. DELETE psa/projects/:id archives a single project and can't delete it.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-projects"]}},"/psa/placeholders/{id}":{"delete":{"operationId":"deletePlaceholder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePlaceholderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the placeholder you want to delete. Its project assignments are deleted with it, and this cannot be undone.","example":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"}],"summary":"Delete a placeholder","description":"Deletes a placeholder. Every position assignment for the placeholder is deleted too, with its allocations, time entries, and activity assignments. If any of those position assignments has been invoiced or has billed time, the request fails.","tags":["psa-placeholders"]},"get":{"operationId":"getPlaceholder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPlaceholderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the placeholder you want to retrieve.","example":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"}],"summary":"Retrieve a placeholder","description":"Retrieves a placeholder.","tags":["psa-placeholders"]},"patch":{"operationId":"updatePlaceholder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePlaceholderOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NAME_REQUIRED, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the placeholder you want to update.","example":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePlaceholderInput"}}}},"summary":"Update a placeholder","description":"Updates a placeholder with the fields you send. A field you leave out keeps its current value.\n\nThe response is empty. Read the placeholder with GET psa/placeholders/:id.","tags":["psa-placeholders"]}},"/psa/positions/{id}":{"get":{"operationId":"getPsaPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPsaPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position you want to retrieve.","example":"7c2e91a4-58fd-4b30-9e17-3a6d05fb824c"}],"summary":"Retrieve a position","description":"Retrieves a position. The psaProjectId and the other reference ids on a position are numeric ids, not UUIDs, so you can't use them to read the project or any other record they point to.","tags":["psa-positions"]},"patch":{"operationId":"updatePsaPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePsaPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, FORBIDDEN, POSITION_INVOICED, PROJECT_SETTINGS_MISSING, REFERENCE_NOT_FOUND, NAME_REQUIRED, VALUE_NEGATIVE, CURRENCY_MISMATCH, BILLING_REFERENCE_NOT_ALLOWED, LINE_NOT_BILLABLE_TIME, SALES_ORDER_NOT_IN_SALES_ARRANGEMENT, RATE_CARD_ENTRY_REQUIRED, RATE_CARD_ENTRY_MISMATCH, BILL_RATE_REQUIRED, BILL_RATE_NOT_ALLOWED, UNIT_OF_MEASURE_LOCKED, BILLABLE_NOT_ALLOWED, SALES_ORDER_USED_BY_OTHER_PROJECT, BILLABLE_REQUIRED_BY_ACTIVITIES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_SETTINGS_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"currency":{"type":"string"},"projectCurrency":{"type":"string"}},"additionalProperties":false,"required":["field","currency","projectCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_BILLABLE_TIME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_IN_SALES_ARRANGEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineRateCardEntryId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineRateCardEntryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasure":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasure","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_USED_BY_OTHER_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_REQUIRED_BY_ACTIVITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"activities":{"type":"string"}},"additionalProperties":false,"required":["activities"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_SETTINGS_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"currency":{"type":"string"},"projectCurrency":{"type":"string"}},"additionalProperties":false,"required":["field","currency","projectCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_BILLABLE_TIME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_IN_SALES_ARRANGEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineRateCardEntryId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineRateCardEntryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasure":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasure","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_USED_BY_OTHER_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_REQUIRED_BY_ACTIVITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"activities":{"type":"string"}},"additionalProperties":false,"required":["activities"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_SETTINGS_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"currency":{"type":"string"},"projectCurrency":{"type":"string"}},"additionalProperties":false,"required":["field","currency","projectCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_BILLABLE_TIME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_IN_SALES_ARRANGEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineRateCardEntryId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineRateCardEntryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false,"required":["reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitOfMeasure":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["unitOfMeasure","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_USED_BY_OTHER_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_REQUIRED_BY_ACTIVITIES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"activities":{"type":"string"}},"additionalProperties":false,"required":["activities"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position to update. Updating needs edit permission on its project.","example":"5c1e0a7d-3b92-4f64-8e21-d07a9b4c6f15"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePsaPositionInput"}}}},"summary":"Update a position","description":"Updates one position (project role). Fields you leave out keep their stored value; null clears a reference or hoursBudget. The result is checked as a whole before anything is written, and every problem found is returned.\n\nAs in the Roles tab: an invoiced position cannot be changed; making a position non-billable clears its sales order links, and is rejected while its members are assigned to client-billable hours activities; product line links an older position may still carry are cleared. Rates are hourly and always stored in the project currency. A new sales order line supplies the bill rate and unit, and fills in what you leave out: the name, the cost rate, the HR position and the skill level, as on POST psa/positions. Product details are never taken from the request.\n\nEvery identifier is a UUID, the same one the matching GET endpoint returns.","tags":["psa-positions"]}},"/psa/team-members/bulk":{"post":{"operationId":"createTeamMembers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTeamMembersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PROJECT_NOT_FOUND, FORBIDDEN, INVALID_ASSIGNMENT, REFERENCE_NOT_FOUND, EMPLOYEE_INACTIVE, ANONYMIZATION_PLACEHOLDER, POSITION_NOT_IN_PROJECT, POSITION_ALREADY_ASSIGNED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"employeeId":{"type":"string"}},"additionalProperties":false,"required":["index","employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANONYMIZATION_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_IN_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectPositionId":{"type":"string"}},"additionalProperties":false,"required":["index","projectPositionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_ALREADY_ASSIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectPositionId":{"type":"string"}},"additionalProperties":false,"required":["index","projectPositionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"employeeId":{"type":"string"}},"additionalProperties":false,"required":["index","employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANONYMIZATION_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_IN_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectPositionId":{"type":"string"}},"additionalProperties":false,"required":["index","projectPositionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_ALREADY_ASSIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectPositionId":{"type":"string"}},"additionalProperties":false,"required":["index","projectPositionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_ASSIGNMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"employeeId":{"type":"string"}},"additionalProperties":false,"required":["index","employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANONYMIZATION_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_NOT_IN_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectPositionId":{"type":"string"}},"additionalProperties":false,"required":["index","projectPositionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"POSITION_ALREADY_ASSIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectPositionId":{"type":"string"}},"additionalProperties":false,"required":["index","projectPositionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTeamMembersInput"}}}},"summary":"Add people or placeholders to a project team. When the project has a default task (created with the project's 'Create default task' option) that still exists, every position assignment created here is also assigned to that task, without an hours budget.","description":"Adds people or placeholders to a PSA project's team. Closed at v1: use Api-Version v2, which takes uuids. Each item names exactly one of employeeId or placeholderId, and can also name a projectPositionId. An item with a projectPositionId creates a position assignment. An item without one adds the person to the team but creates no position assignment.\n\nIf any item can't be added, none are. Adding people needs edit permission on the project.\n\nThe response lists the ids of the created position assignments in the order you sent them. An item that creates no position assignment adds no id, so you can't match ids to items by their place in the list.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-team-members"]}},"/psa/positions":{"get":{"operationId":"psaPositions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billable]","in":"query","required":false,"description":"Filter billable (equality)","schema":{"type":"boolean"}},{"name":"filter[billable][ne]","in":"query","required":false,"description":"Filter billable (ne)","schema":{"type":"boolean"}},{"name":"filter[billable][gt]","in":"query","required":false,"description":"Filter billable (gt)","schema":{"type":"boolean"}},{"name":"filter[billable][gte]","in":"query","required":false,"description":"Filter billable (gte)","schema":{"type":"boolean"}},{"name":"filter[billable][lt]","in":"query","required":false,"description":"Filter billable (lt)","schema":{"type":"boolean"}},{"name":"filter[billable][lte]","in":"query","required":false,"description":"Filter billable (lte)","schema":{"type":"boolean"}},{"name":"filter[billable][in]","in":"query","required":false,"description":"Filter billable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][notIn]","in":"query","required":false,"description":"Filter billable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][between]","in":"query","required":false,"description":"Filter billable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitOfMeasure]","in":"query","required":false,"description":"Filter unitOfMeasure (equality)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][ne]","in":"query","required":false,"description":"Filter unitOfMeasure (ne)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][gt]","in":"query","required":false,"description":"Filter unitOfMeasure (gt)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][gte]","in":"query","required":false,"description":"Filter unitOfMeasure (gte)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][lt]","in":"query","required":false,"description":"Filter unitOfMeasure (lt)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][lte]","in":"query","required":false,"description":"Filter unitOfMeasure (lte)","schema":{"type":"string"}},{"name":"filter[unitOfMeasure][in]","in":"query","required":false,"description":"Filter unitOfMeasure (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitOfMeasure][notIn]","in":"query","required":false,"description":"Filter unitOfMeasure (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitOfMeasure][between]","in":"query","required":false,"description":"Filter unitOfMeasure (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitOfMeasure][like]","in":"query","required":false,"description":"Filter unitOfMeasure (like)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (equality)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][ne]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (ne)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][gt]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (gt)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][gte]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (gte)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][lt]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (lt)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][lte]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (lte)","schema":{"type":"string"}},{"name":"filter[hourlyBillRateCurrency][in]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hourlyBillRateCurrency][notIn]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hourlyBillRateCurrency][between]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hourlyBillRateCurrency][like]","in":"query","required":false,"description":"Filter hourlyBillRateCurrency (like)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (equality)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][ne]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (ne)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][gt]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (gt)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][gte]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (gte)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][lt]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (lt)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][lte]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (lte)","schema":{"type":"string"}},{"name":"filter[hourlyCostRateCurrency][in]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hourlyCostRateCurrency][notIn]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[hourlyCostRateCurrency][between]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[hourlyCostRateCurrency][like]","in":"query","required":false,"description":"Filter hourlyCostRateCurrency (like)","schema":{"type":"string"}},{"name":"filter[invoiced]","in":"query","required":false,"description":"Filter invoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[invoiced][ne]","in":"query","required":false,"description":"Filter invoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gt]","in":"query","required":false,"description":"Filter invoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gte]","in":"query","required":false,"description":"Filter invoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lt]","in":"query","required":false,"description":"Filter invoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lte]","in":"query","required":false,"description":"Filter invoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][in]","in":"query","required":false,"description":"Filter invoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][notIn]","in":"query","required":false,"description":"Filter invoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][between]","in":"query","required":false,"description":"Filter invoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","psaProjectId","-psaProjectId","unitOfMeasure","-unitOfMeasure","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","psaProjectId","name","description","salesOrderProductLineId","salesOrderProductLineRateCardEntryId","productId","productLineId","productLineRateCardEntryId","billable","unitOfMeasure","hourlyBillRate","hourlyBillRateCurrency","hourlyCostRate","hourlyCostRateCurrency","hoursBudget","invoiced","hrPositionId","skillLevelId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/psaPositionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7c2e91a4-58fd-4b30-9e17-3a6d05fb824c","psaProjectId":32341,"name":"Senior Consultant","billable":true,"unitOfMeasure":"hour","hourlyBillRate":"185.00","hourlyBillRateCurrency":"USD","hoursBudget":"120.00","invoiced":false,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"b40f6d82-1c95-42ae-8d73-5e0a9b16fc37","psaProjectId":32341,"name":"Project Manager","billable":true,"unitOfMeasure":"day","hourlyBillRate":"210.00","hourlyBillRateCurrency":"USD","hoursBudget":"80.00","invoiced":false,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List positions","description":"Lists positions. The psaProjectId and the other reference ids on a position are numeric ids, not UUIDs, so you can't use them to read the project or any other record they point to.\n\nPositions can't be filtered by name or description, and there is no search endpoint for positions.","tags":["psa-positions"]},"post":{"operationId":"createPsaPositions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPsaPositionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PROJECT_NOT_FOUND, FORBIDDEN, PROJECT_SETTINGS_MISSING, REFERENCE_NOT_FOUND, NAME_REQUIRED, VALUE_NEGATIVE, CURRENCY_MISMATCH, BILLING_REFERENCE_NOT_ALLOWED, LINE_NOT_BILLABLE_TIME, SALES_ORDER_NOT_IN_SALES_ARRANGEMENT, RATE_CARD_ENTRY_REQUIRED, RATE_CARD_ENTRY_MISMATCH, BILL_RATE_REQUIRED, BILL_RATE_NOT_ALLOWED, UNIT_OF_MEASURE_LOCKED, BILLABLE_NOT_ALLOWED, SALES_ORDER_USED_BY_OTHER_PROJECT","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_SETTINGS_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"currency":{"type":"string"},"projectCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","field","currency","projectCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_BILLABLE_TIME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_IN_SALES_ARRANGEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineRateCardEntryId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineRateCardEntryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"unitOfMeasure":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["index","unitOfMeasure","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["index","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_USED_BY_OTHER_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_SETTINGS_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"currency":{"type":"string"},"projectCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","field","currency","projectCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_BILLABLE_TIME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_IN_SALES_ARRANGEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineRateCardEntryId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineRateCardEntryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"unitOfMeasure":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["index","unitOfMeasure","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["index","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_USED_BY_OTHER_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_SETTINGS_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"}},"additionalProperties":false,"required":["index","field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"currency":{"type":"string"},"projectCurrency":{"type":"string"}},"additionalProperties":false,"required":["index","field","currency","projectCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","field","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_BILLABLE_TIME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_NOT_IN_SALES_ARRANGEMENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RATE_CARD_ENTRY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineRateCardEntryId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineRateCardEntryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILL_RATE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_OF_MEASURE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"unitOfMeasure":{"type":"string"},"expected":{"type":"string"}},"additionalProperties":false,"required":["index","unitOfMeasure","expected"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["index","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_USED_BY_OTHER_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"salesOrderProductLineId":{"type":"string"}},"additionalProperties":false,"required":["index","salesOrderProductLineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPsaPositionsInput"}}}},"summary":"Create positions","description":"Creates one or more positions (project roles) on one PSA project. Every entry is checked before anything is written, and every problem found is returned, each with the index of its entry. If any entry fails, nothing is created.\n\nOnly the entries you send are validated; other positions of the project are not re-checked.\n\nEvery identifier is a UUID, the same one the matching GET endpoint returns. As in the Roles tab, a billable position bills a sales order line (salesOrderProductLineId, and its rate card entry when the line prices by rate card). The line supplies the bill rate and unit of measure, and fills in what you leave out: the name (the rate card entry's identifier and description, otherwise the product name), the cost rate, the HR position and the skill level (from the role catalog of the line's product line). Product details are never taken from the request. Without a line, send hourlyBillRate. Rates are hourly and in the project currency.\n\nUse the returned ids as position ids, for example on GET psa/positions/:id or as projectPositionId when adding team members.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-positions"]}},"/psa/time-entries/approve":{"post":{"operationId":"approveTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/approveTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_STATUS_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/approveTimeEntriesInput"}}}},"summary":"Approve time entries","description":"Approves submitted time entries. Each time entry's status changes from 'pending' to 'approved'. If any time entry isn't 'pending', the request fails with ENTRY_STATUS_INVALID and none are approved.\n\nThe request also fails if ids is empty.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/activities/{id}":{"patch":{"operationId":"updateActivity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateActivityOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASK_BUDGET_EXCEEDS_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NO_CHANGES, ACTIVITY_INVOICED, ACTIVITY_BILLED, NAME_REQUIRED, INVALID_DATE_RANGE, INVALID_HOURS_BUDGET, MILESTONE_NOT_FOUND, FIXED_FEE_NOT_FOUND, MILESTONE_REQUIRED, FIXED_FEE_REQUIRED, BILLING_REFERENCE_MISMATCH, CATEGORY_NOT_ALLOWED, NON_VALUABLE_NOT_ALLOWED, OUTSIDE_FIXED_FEE_PERIOD, STATUS_NOT_FOUND, PARENT_NOT_FOUND, INVALID_PARENT, NESTING_TOO_DEEP, NON_BILLABLE_MEMBER, MEMBER_BUDGET_REQUIRED, BUDGET_MISMATCH","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHANGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"milestoneId":{"type":"string"}},"additionalProperties":false,"required":["milestoneId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingType":{"type":"string"}},"additionalProperties":false,"required":["billingType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingType":{"type":"string"},"category":{"type":"string"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["billingType","category","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_VALUABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OUTSIDE_FIXED_FEE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"activityStatusId":{"type":"string"}},"additionalProperties":false,"required":["activityStatusId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NESTING_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"hoursBudget":{"type":"string","format":"decimal"},"memberHoursBudgetTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["hoursBudget","memberHoursBudgetTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASK_BUDGET_EXCEEDS_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHANGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"milestoneId":{"type":"string"}},"additionalProperties":false,"required":["milestoneId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingType":{"type":"string"}},"additionalProperties":false,"required":["billingType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingType":{"type":"string"},"category":{"type":"string"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["billingType","category","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_VALUABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OUTSIDE_FIXED_FEE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"activityStatusId":{"type":"string"}},"additionalProperties":false,"required":["activityStatusId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NESTING_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"hoursBudget":{"type":"string","format":"decimal"},"memberHoursBudgetTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["hoursBudget","memberHoursBudgetTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASK_BUDGET_EXCEEDS_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NO_CHANGES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"milestoneId":{"type":"string"}},"additionalProperties":false,"required":["milestoneId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingType":{"type":"string"}},"additionalProperties":false,"required":["billingType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"billingType":{"type":"string"},"category":{"type":"string"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["billingType","category","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_VALUABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OUTSIDE_FIXED_FEE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"activityStatusId":{"type":"string"}},"additionalProperties":false,"required":["activityStatusId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NESTING_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"hoursBudget":{"type":"string","format":"decimal"},"memberHoursBudgetTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["hoursBudget","memberHoursBudgetTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASK_BUDGET_EXCEEDS_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the activity to update. Needs edit permission on its project.","example":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateActivityInput"}}}},"summary":"Update an activity","description":"Changes an activity (project task). Only the fields you send change; send null to clear a nullable field. Members are not changed here: use POST psa/activities/:id/members and POST psa/activities/:id/members/unassign.\n\nThe request is checked before anything is written, and every problem found is returned. Only what the request changes is validated: a stored value you leave alone does not fail the request even if it no longer meets a rule.\n\nChanging billingType clears a stored milestone or fixed fee the new billing type cannot use. An activity that is invoiced, or carries time submitted for invoicing, cannot be changed.","tags":["psa-activities"]},"get":{"operationId":"getActivity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getActivityOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the activity you want to retrieve.","example":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"}],"summary":"Retrieve an activity","description":"Retrieves an activity. The response does not include who is assigned to the activity, and no endpoint returns activity assignments.","tags":["psa-activities"]},"delete":{"operationId":"deleteActivity","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteActivityOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"RECORDED_TIME_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"submissionStatus":{"type":"string"},"hours":{"type":"string","format":"decimal"},"entryCount":{"type":"number"}},"additionalProperties":false,"required":["submissionStatus","hours","entryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASKS_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ACTIVITY_INVOICED, ACTIVITY_BILLED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORDED_TIME_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"submissionStatus":{"type":"string"},"hours":{"type":"string","format":"decimal"},"entryCount":{"type":"number"}},"additionalProperties":false,"required":["submissionStatus","hours","entryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASKS_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORDED_TIME_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"submissionStatus":{"type":"string"},"hours":{"type":"string","format":"decimal"},"entryCount":{"type":"number"}},"additionalProperties":false,"required":["submissionStatus","hours","entryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASKS_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORDED_TIME_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"submissionStatus":{"type":"string"},"hours":{"type":"string","format":"decimal"},"entryCount":{"type":"number"}},"additionalProperties":false,"required":["submissionStatus","hours","entryCount"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASKS_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"count":{"type":"number"}},"additionalProperties":false,"required":["count"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the activity to delete. Needs edit permission on its project.","example":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"}],"summary":"Delete an activity and its sub-tasks","description":"Deletes an activity (project task) together with all of its sub-tasks, as the Tasks tab does. Their time entries, allocations and member assignments are deleted too, and project files linked to them are unlinked.\n\nAn activity that is invoiced, or carries time submitted for invoicing, cannot be deleted. Time someone already acted on (approved or pending) does not block the delete; it is deleted and reported in RECORDED_TIME_DELETED warnings.","tags":["psa-activities"]}},"/psa/team-members/{id}":{"get":{"operationId":"getTeamMember","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTeamMemberOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the team-roster record you want to retrieve.","example":"5f2e1c40-9a3b-4d71-8e05-6b4c2d1a7f93"}],"summary":"Retrieve a team member","description":"Retrieves a team member. A team member is one person on one PSA project's team. The response does not include the person's position assignments. To get those, use GET psa/team-member-positions.","tags":["psa-team-members"]}},"/psa/expenses/summary":{"get":{"operationId":"getExpensesSummary","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getExpensesSummaryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: EMPLOYEE_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"EMPLOYEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"psaProjectId","in":"query","required":true,"schema":{"type":"number"},"description":"The id of the PSA project. It is the numeric key, not the UUID that GET psa/projects/:id takes.","example":32341},{"name":"pageCursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of expenses per page, between 1 and 200. Defaults to 50. The maximum is 200.","example":50}],"summary":"Retrieve a project's expenses and budgets","description":"Retrieves a project's expenses and budgets. The response also lists every budget defined for the project in expenseBudgets, and the default catch-all budget in defaultBudget, when one is set. Send the project's numeric psaProjectId in the query string.\n\nOnly the expenses array is paginated. budgetMappings covers only the expenses on the current page, and expenseBudgets is the same on every page. The cursor counts expenses from the start, so a page can skip or repeat an expense if expenses are added or removed between requests.\n\nWith only View permission on the project, you see only your own expenses. With Edit permission, you see all of the project's expenses.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200, minimum 1) and `pageCursor`, not `page[size]` and `page[cursor]`.\n- The response contains the records in `data.expenses` and the next page's cursor in `data.pagination.nextCursor`.\n- Apart from `psaProjectId`, it takes no filters.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["psa-expenses"]}},"/psa/allocations":{"post":{"operationId":"createAllocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createAllocationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAllocationsInput"}}}},"summary":"Bulk create allocations","description":"Creates multiple allocations in one request. Each allocation also gets daily planned-hours entries, spread over its working days. If any allocation can't be created, none are.\n\nThe response lists the new allocations' ids in the order you sent them. Read an allocation with GET psa/allocations/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-allocations"]},"patch":{"operationId":"updateAllocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateAllocationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAllocationsInput"}}}},"summary":"Bulk update allocations","description":"Updates multiple allocations in one request, with the fields you send. A field you leave out keeps its current value. To clear notes or workingDays, send null.\n\nTo reassign an allocation, send a new memberId. memberEmployeeId, memberPlaceholderId, and psaProjectId are ignored, and an allocation can't move to another project. Every update recalculates the allocation's daily entries from its dates, totalHours, method, and workingDays.\n\nIf any id matches no allocation, the request fails with NOT_FOUND and nothing is updated. The response is empty. Read an updated allocation with GET psa/allocations/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-allocations"]},"get":{"operationId":"allocations","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[method]","in":"query","required":false,"description":"Filter method (equality)","schema":{"type":"string"}},{"name":"filter[method][ne]","in":"query","required":false,"description":"Filter method (ne)","schema":{"type":"string"}},{"name":"filter[method][gt]","in":"query","required":false,"description":"Filter method (gt)","schema":{"type":"string"}},{"name":"filter[method][gte]","in":"query","required":false,"description":"Filter method (gte)","schema":{"type":"string"}},{"name":"filter[method][lt]","in":"query","required":false,"description":"Filter method (lt)","schema":{"type":"string"}},{"name":"filter[method][lte]","in":"query","required":false,"description":"Filter method (lte)","schema":{"type":"string"}},{"name":"filter[method][in]","in":"query","required":false,"description":"Filter method (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[method][notIn]","in":"query","required":false,"description":"Filter method (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[method][between]","in":"query","required":false,"description":"Filter method (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[method][like]","in":"query","required":false,"description":"Filter method (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["startDate","-startDate","endDate","-endDate","totalHours","-totalHours","method","-method","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","startDate","endDate","totalHours","notes","method","memberId","employeeId","projectActivityId","projectPositionId","psaProjectId","memberName","memberPlaceholderName","projectActivityName","projectPositionName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/allocationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List allocations","description":"Lists allocations. The ids that link an allocation to other records (memberId, employeeId, projectActivityId, projectPositionId, and psaProjectId) are numeric, not UUIDs. You can't use them with the GET endpoints for team members, activities, positions, or projects.\n\nYou can't filter allocations by team member, project, or activity, and there is no search endpoint for allocations. To find one person's allocations, you have to read the whole list.","tags":["psa-allocations"]}},"/psa/team-members/assign-placeholder":{"post":{"operationId":"assignEmployeesToPlaceholders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/assignEmployeesToPlaceholdersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PROJECT_NOT_FOUND, FORBIDDEN, REFERENCE_NOT_FOUND, EMPLOYEE_INACTIVE, ANONYMIZATION_PLACEHOLDER, PLACEHOLDER_NOT_ON_PROJECT, DUPLICATE_PLACEHOLDER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["index","psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["index","psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"employeeId":{"type":"string"}},"additionalProperties":false,"required":["index","employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANONYMIZATION_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLACEHOLDER_NOT_ON_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["index","psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["index","psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"employeeId":{"type":"string"}},"additionalProperties":false,"required":["index","employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANONYMIZATION_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLACEHOLDER_NOT_ON_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["index","psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"psaProjectId":{"type":"string"}},"additionalProperties":false,"required":["index","psaProjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"employeeId":{"type":"string"}},"additionalProperties":false,"required":["index","employeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ANONYMIZATION_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLACEHOLDER_NOT_ON_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_PLACEHOLDER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"placeholderId":{"type":"string"}},"additionalProperties":false,"required":["index","placeholderId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/assignEmployeesToPlaceholdersInput"}}}},"summary":"Replace placeholders with employees","description":"Replaces placeholders with employees. Closed at v1: use Api-Version v2, which takes uuids. Each item moves one placeholder's position assignments to an employee. When the employee already has the same position, the placeholder's assignment is merged into the employee's and then removed. If any placeholder can't be replaced, none are.\n\nYou need edit permission on each project. The response lists the ids of the resulting position assignments. A merged assignment adds no id, so you can't match ids to items by their place in the list.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-team-members"]}},"/psa/project-types/{id}":{"get":{"operationId":"getProjectType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getProjectTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project type you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a project type","description":"Retrieves a project type. There is no endpoint to find a project type by name.","tags":["psa-project-types"]},"patch":{"operationId":"updateProjectType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateProjectTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project type you want to update.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateProjectTypeInput"}}}},"summary":"Update a project type","description":"Updates a project type with the fields you send. A field you leave out keeps its current value.\n\nIf another project type already has the name you send, the request fails with DUPLICATE_NAME.\n\nThe response is empty. Read the project type with GET psa/project-types/:id.","tags":["psa-project-types"]},"delete":{"operationId":"deleteProjectType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteProjectTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, PROJECT_TYPE_IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","name","projectNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","name","projectNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PROJECT_TYPE_IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectNames":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["id","name","projectNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project type you want to delete.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Delete a project type","description":"Deletes a project type. A project type that a project still uses can't be deleted, and the request fails with PROJECT_TYPE_IN_USE.\n\nThe response is empty.","tags":["psa-project-types"]}},"/psa/projects/bulk-restore":{"post":{"operationId":"restorePsaProjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/restorePsaProjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/restorePsaProjectsInput"}}}},"summary":"Restore projects","description":"Restores one or more archived projects. You can restore a project archived by DELETE psa/projects/:id or by POST psa/projects/bulk-delete without irreversible. A permanently deleted project can't be restored.\n\nRestoring a project also makes its team active again, until the project's endDate. A project whose endDate has passed comes back with an inactive team.\n\nIf any project can't be restored, none are. The response is empty.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-projects"]}},"/psa/team-member-positions":{"get":{"operationId":"teamMemberPositions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectPositionId]","in":"query","required":false,"description":"Filter projectPositionId (equality)","schema":{"type":"number"}},{"name":"filter[projectPositionId][ne]","in":"query","required":false,"description":"Filter projectPositionId (ne)","schema":{"type":"number"}},{"name":"filter[projectPositionId][gt]","in":"query","required":false,"description":"Filter projectPositionId (gt)","schema":{"type":"number"}},{"name":"filter[projectPositionId][gte]","in":"query","required":false,"description":"Filter projectPositionId (gte)","schema":{"type":"number"}},{"name":"filter[projectPositionId][lt]","in":"query","required":false,"description":"Filter projectPositionId (lt)","schema":{"type":"number"}},{"name":"filter[projectPositionId][lte]","in":"query","required":false,"description":"Filter projectPositionId (lte)","schema":{"type":"number"}},{"name":"filter[projectPositionId][in]","in":"query","required":false,"description":"Filter projectPositionId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectPositionId][notIn]","in":"query","required":false,"description":"Filter projectPositionId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectPositionId][between]","in":"query","required":false,"description":"Filter projectPositionId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[teamMemberId]","in":"query","required":false,"description":"Filter teamMemberId (equality)","schema":{"type":"number"}},{"name":"filter[teamMemberId][ne]","in":"query","required":false,"description":"Filter teamMemberId (ne)","schema":{"type":"number"}},{"name":"filter[teamMemberId][gt]","in":"query","required":false,"description":"Filter teamMemberId (gt)","schema":{"type":"number"}},{"name":"filter[teamMemberId][gte]","in":"query","required":false,"description":"Filter teamMemberId (gte)","schema":{"type":"number"}},{"name":"filter[teamMemberId][lt]","in":"query","required":false,"description":"Filter teamMemberId (lt)","schema":{"type":"number"}},{"name":"filter[teamMemberId][lte]","in":"query","required":false,"description":"Filter teamMemberId (lte)","schema":{"type":"number"}},{"name":"filter[teamMemberId][in]","in":"query","required":false,"description":"Filter teamMemberId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamMemberId][notIn]","in":"query","required":false,"description":"Filter teamMemberId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[teamMemberId][between]","in":"query","required":false,"description":"Filter teamMemberId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[placeholderId]","in":"query","required":false,"description":"Filter placeholderId (equality)","schema":{"type":"number"}},{"name":"filter[placeholderId][ne]","in":"query","required":false,"description":"Filter placeholderId (ne)","schema":{"type":"number"}},{"name":"filter[placeholderId][gt]","in":"query","required":false,"description":"Filter placeholderId (gt)","schema":{"type":"number"}},{"name":"filter[placeholderId][gte]","in":"query","required":false,"description":"Filter placeholderId (gte)","schema":{"type":"number"}},{"name":"filter[placeholderId][lt]","in":"query","required":false,"description":"Filter placeholderId (lt)","schema":{"type":"number"}},{"name":"filter[placeholderId][lte]","in":"query","required":false,"description":"Filter placeholderId (lte)","schema":{"type":"number"}},{"name":"filter[placeholderId][in]","in":"query","required":false,"description":"Filter placeholderId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[placeholderId][notIn]","in":"query","required":false,"description":"Filter placeholderId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[placeholderId][between]","in":"query","required":false,"description":"Filter placeholderId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiced]","in":"query","required":false,"description":"Filter invoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[invoiced][ne]","in":"query","required":false,"description":"Filter invoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gt]","in":"query","required":false,"description":"Filter invoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gte]","in":"query","required":false,"description":"Filter invoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lt]","in":"query","required":false,"description":"Filter invoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lte]","in":"query","required":false,"description":"Filter invoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][in]","in":"query","required":false,"description":"Filter invoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][notIn]","in":"query","required":false,"description":"Filter invoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][between]","in":"query","required":false,"description":"Filter invoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["psaProjectId","-psaProjectId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","psaProjectId","projectPositionId","positionName","teamMemberId","placeholderId","invoiced","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/teamMemberPositionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List position assignments","description":"Lists position assignments. Each position assignment links one person or placeholder to one project position. For the people on a project's team regardless of position, use GET psa/team-members.","tags":["psa-team-members"]}},"/psa/placeholders":{"get":{"operationId":"placeholders","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["name","-name","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","weeklyWorkingHours","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/placeholdersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13","name":"Unassigned Backend Engineer","weeklyWorkingHours":"40.00","lastModifiedDate":"2026-08-14T09:12:33.184Z"},{"id":"b7c40e29-1af6-42d8-8e55-6d3b9c018a74","name":"Unassigned Designer","lastModifiedDate":"2026-08-02T16:45:07.902Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List placeholders","description":"Lists placeholders. The list includes only active placeholders.","tags":["psa-placeholders"]},"post":{"operationId":"createPlaceholders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPlaceholdersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_REQUIRED, DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPlaceholdersInput"}}}},"summary":"Create placeholders","description":"Creates one or more placeholders. If any placeholder can't be created, none are. The response lists the new placeholders' ids in the order you sent them.\n\nA new placeholder isn't assigned to any project position.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-placeholders"]}},"/psa/activities/{id}/members/unassign":{"post":{"operationId":"unassignActivityMembers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/unassignActivityMembersOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"ASSIGNMENT_ENDS_LATER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["memberId","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRAFT_TIME_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"},"hours":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["memberId","hours"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ACTIVITY_INVOICED, ACTIVITY_BILLED, MEMBER_NOT_ASSIGNED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_ASSIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_ENDS_LATER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["memberId","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRAFT_TIME_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"},"hours":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["memberId","hours"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_ASSIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_ENDS_LATER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["memberId","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRAFT_TIME_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"},"hours":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["memberId","hours"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_ASSIGNED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ASSIGNMENT_ENDS_LATER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["memberId","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRAFT_TIME_DELETED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"},"hours":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["memberId","hours"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the activity. Needs edit permission on its project.","example":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/unassignActivityMembersInput"}}}},"summary":"Unassign members from an activity","description":"Unassigns members from an activity (project task). Each member's assignment ends today, or on the day of their last pending, approved or billed time on the activity if that is later; the assignment is then kept, so that time stays attributed. Draft and rejected time after the end date is deleted, and allocations after it are deleted or shortened. Warnings report the later end dates and the deleted draft hours.\n\nOnce the remaining members carry an hoursBudget, the activity's hours budget becomes their total, and the response returns it.","tags":["psa-activities"]}},"/psa/time-entries/reject":{"post":{"operationId":"rejectTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/rejectTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_STATUS_INVALID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/rejectTimeEntriesInput"}}}},"summary":"Reject time entries","description":"Rejects submitted time entries. Each time entry's status changes from 'pending' to 'rejected'. If any time entry isn't 'pending', the request fails with ENTRY_STATUS_INVALID and none are rejected.\n\nOnly the first time entry's rejectionReason is used, and that reason replaces the notes of every rejected time entry. The request fails if timeEntries is empty.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/activities":{"post":{"operationId":"createActivities","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createActivitiesOutput"},"diagnostics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASK_BUDGET_EXCEEDS_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]}]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PROJECT_NOT_FOUND, NAME_REQUIRED, INVALID_DATE_RANGE, INVALID_HOURS_BUDGET, MILESTONE_NOT_FOUND, FIXED_FEE_NOT_FOUND, MILESTONE_REQUIRED, FIXED_FEE_REQUIRED, BILLING_REFERENCE_MISMATCH, CATEGORY_NOT_ALLOWED, NON_VALUABLE_NOT_ALLOWED, OUTSIDE_FIXED_FEE_PERIOD, STATUS_NOT_FOUND, PARENT_NOT_FOUND, NESTING_TOO_DEEP, MEMBER_NOT_FOUND, DUPLICATE_MEMBER, NON_BILLABLE_MEMBER, MEMBER_BUDGET_REQUIRED, BUDGET_MISMATCH","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"milestoneId":{"type":"string"}},"additionalProperties":false,"required":["index","milestoneId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["index","fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingType":{"type":"string"}},"additionalProperties":false,"required":["index","billingType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingType":{"type":"string"},"category":{"type":"string"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["index","billingType","category","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_VALUABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OUTSIDE_FIXED_FEE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["index","fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"activityStatusId":{"type":"string"}},"additionalProperties":false,"required":["index","activityStatusId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NESTING_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"hoursBudget":{"type":"string","format":"decimal"},"memberHoursBudgetTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["index","hoursBudget","memberHoursBudgetTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASK_BUDGET_EXCEEDS_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"milestoneId":{"type":"string"}},"additionalProperties":false,"required":["index","milestoneId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["index","fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingType":{"type":"string"}},"additionalProperties":false,"required":["index","billingType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingType":{"type":"string"},"category":{"type":"string"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["index","billingType","category","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_VALUABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OUTSIDE_FIXED_FEE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["index","fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"activityStatusId":{"type":"string"}},"additionalProperties":false,"required":["index","activityStatusId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NESTING_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"hoursBudget":{"type":"string","format":"decimal"},"memberHoursBudgetTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["index","hoursBudget","memberHoursBudgetTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASK_BUDGET_EXCEEDS_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectId":{"type":"string"}},"additionalProperties":false,"required":["projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"milestoneId":{"type":"string"}},"additionalProperties":false,"required":["index","milestoneId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["index","fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLING_REFERENCE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingType":{"type":"string"}},"additionalProperties":false,"required":["index","billingType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"billingType":{"type":"string"},"category":{"type":"string"},"projectCategory":{"type":"string"}},"additionalProperties":false,"required":["index","billingType","category","projectCategory"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_VALUABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OUTSIDE_FIXED_FEE_PERIOD"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"fixedFeeId":{"type":"string"}},"additionalProperties":false,"required":["index","fixedFeeId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"activityStatusId":{"type":"string"}},"additionalProperties":false,"required":["index","activityStatusId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NESTING_TOO_DEEP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"memberId":{"type":"string"}},"additionalProperties":false,"required":["index","memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"hoursBudget":{"type":"string","format":"decimal"},"memberHoursBudgetTotal":{"type":"string","format":"decimal"}},"additionalProperties":false,"required":["index","hoursBudget","memberHoursBudgetTotal"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DATES_OUTSIDE_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SUBTASK_BUDGET_EXCEEDS_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"parentActivityId":{"type":"string"}},"additionalProperties":false,"required":["index","parentActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createActivitiesInput"}}}},"summary":"Create activities","description":"Creates one or more activities (project tasks) on one PSA project. Every entry is checked before anything is written, and every problem found is returned, each with the index of its entry. If any entry fails, nothing is created.\n\nOnly the entries you send are validated; other activities of the project are not re-checked.\n\nReferences are the uuids the GET endpoints return: milestones and fixed fees of the same project (GET psa/milestones, psa/fixed-fees), members of its team (memberId on GET psa/team-member-positions), and an existing activity as parent. Use the returned ids as activity ids, for example on GET psa/activities/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-activities"]},"get":{"operationId":"activities","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[billable]","in":"query","required":false,"description":"Filter billable (equality)","schema":{"type":"boolean"}},{"name":"filter[billable][ne]","in":"query","required":false,"description":"Filter billable (ne)","schema":{"type":"boolean"}},{"name":"filter[billable][gt]","in":"query","required":false,"description":"Filter billable (gt)","schema":{"type":"boolean"}},{"name":"filter[billable][gte]","in":"query","required":false,"description":"Filter billable (gte)","schema":{"type":"boolean"}},{"name":"filter[billable][lt]","in":"query","required":false,"description":"Filter billable (lt)","schema":{"type":"boolean"}},{"name":"filter[billable][lte]","in":"query","required":false,"description":"Filter billable (lte)","schema":{"type":"boolean"}},{"name":"filter[billable][in]","in":"query","required":false,"description":"Filter billable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][notIn]","in":"query","required":false,"description":"Filter billable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][between]","in":"query","required":false,"description":"Filter billable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[invoiced]","in":"query","required":false,"description":"Filter invoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[invoiced][ne]","in":"query","required":false,"description":"Filter invoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gt]","in":"query","required":false,"description":"Filter invoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gte]","in":"query","required":false,"description":"Filter invoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lt]","in":"query","required":false,"description":"Filter invoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lte]","in":"query","required":false,"description":"Filter invoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][in]","in":"query","required":false,"description":"Filter invoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][notIn]","in":"query","required":false,"description":"Filter invoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][between]","in":"query","required":false,"description":"Filter invoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billingType]","in":"query","required":false,"description":"Filter billingType (equality)","schema":{"type":"string"}},{"name":"filter[billingType][ne]","in":"query","required":false,"description":"Filter billingType (ne)","schema":{"type":"string"}},{"name":"filter[billingType][gt]","in":"query","required":false,"description":"Filter billingType (gt)","schema":{"type":"string"}},{"name":"filter[billingType][gte]","in":"query","required":false,"description":"Filter billingType (gte)","schema":{"type":"string"}},{"name":"filter[billingType][lt]","in":"query","required":false,"description":"Filter billingType (lt)","schema":{"type":"string"}},{"name":"filter[billingType][lte]","in":"query","required":false,"description":"Filter billingType (lte)","schema":{"type":"string"}},{"name":"filter[billingType][in]","in":"query","required":false,"description":"Filter billingType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billingType][notIn]","in":"query","required":false,"description":"Filter billingType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billingType][between]","in":"query","required":false,"description":"Filter billingType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billingType][like]","in":"query","required":false,"description":"Filter billingType (like)","schema":{"type":"string"}},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","startDate","-startDate","endDate","-endDate","hoursBudget","-hoursBudget","billingType","-billingType","category","-category","psaProjectId","-psaProjectId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","hoursBudget","billable","invoiced","startDate","endDate","billingType","category","milestoneId","fixedFeeId","activityStatusId","statusName","parentActivityId","psaProjectId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/activitiesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6","name":"Discovery workshop","hoursBudget":"40.00","billable":true,"invoiced":false,"startDate":"2026-09-01","endDate":"2026-09-02","billingType":"Hours","category":"ClientBillable","statusName":"In progress","psaProjectId":32341,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"7d2e5a19-4b60-4c8f-8e31-15af9c0b62d4","name":"Phase 1 delivery","hoursBudget":"120.00","billable":true,"invoiced":true,"startDate":"2026-09-15","endDate":"2026-11-30","billingType":"Milestone","category":"ClientBillable","statusName":"Done","psaProjectId":32341,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List activities","description":"Lists activities. Each activity appears once in the list. The list does not say who is assigned to each activity.\n\nYou can't filter activities by name or description, and there is no search endpoint for activities.","tags":["psa-activities"]}},"/psa/time-entries":{"get":{"operationId":"timeEntries","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[date]","in":"query","required":false,"description":"Filter date (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[date][ne]","in":"query","required":false,"description":"Filter date (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[date][gt]","in":"query","required":false,"description":"Filter date (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[date][gte]","in":"query","required":false,"description":"Filter date (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[date][lt]","in":"query","required":false,"description":"Filter date (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[date][lte]","in":"query","required":false,"description":"Filter date (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[date][in]","in":"query","required":false,"description":"Filter date (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[date][notIn]","in":"query","required":false,"description":"Filter date (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[date][between]","in":"query","required":false,"description":"Filter date (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[submissionStatus]","in":"query","required":false,"description":"Filter submissionStatus (equality)","schema":{"type":"string"}},{"name":"filter[submissionStatus][ne]","in":"query","required":false,"description":"Filter submissionStatus (ne)","schema":{"type":"string"}},{"name":"filter[submissionStatus][gt]","in":"query","required":false,"description":"Filter submissionStatus (gt)","schema":{"type":"string"}},{"name":"filter[submissionStatus][gte]","in":"query","required":false,"description":"Filter submissionStatus (gte)","schema":{"type":"string"}},{"name":"filter[submissionStatus][lt]","in":"query","required":false,"description":"Filter submissionStatus (lt)","schema":{"type":"string"}},{"name":"filter[submissionStatus][lte]","in":"query","required":false,"description":"Filter submissionStatus (lte)","schema":{"type":"string"}},{"name":"filter[submissionStatus][in]","in":"query","required":false,"description":"Filter submissionStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionStatus][notIn]","in":"query","required":false,"description":"Filter submissionStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionStatus][between]","in":"query","required":false,"description":"Filter submissionStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[submissionStatus][like]","in":"query","required":false,"description":"Filter submissionStatus (like)","schema":{"type":"string"}},{"name":"filter[submissionDate]","in":"query","required":false,"description":"Filter submissionDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][ne]","in":"query","required":false,"description":"Filter submissionDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][gt]","in":"query","required":false,"description":"Filter submissionDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][gte]","in":"query","required":false,"description":"Filter submissionDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][lt]","in":"query","required":false,"description":"Filter submissionDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][lte]","in":"query","required":false,"description":"Filter submissionDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[submissionDate][in]","in":"query","required":false,"description":"Filter submissionDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionDate][notIn]","in":"query","required":false,"description":"Filter submissionDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionDate][between]","in":"query","required":false,"description":"Filter submissionDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[month]","in":"query","required":false,"description":"Filter month (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[month][ne]","in":"query","required":false,"description":"Filter month (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[month][gt]","in":"query","required":false,"description":"Filter month (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[month][gte]","in":"query","required":false,"description":"Filter month (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[month][lt]","in":"query","required":false,"description":"Filter month (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[month][lte]","in":"query","required":false,"description":"Filter month (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[month][in]","in":"query","required":false,"description":"Filter month (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[month][notIn]","in":"query","required":false,"description":"Filter month (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[month][between]","in":"query","required":false,"description":"Filter month (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectActivityId]","in":"query","required":false,"description":"Filter projectActivityId (equality)","schema":{"type":"number"}},{"name":"filter[projectActivityId][ne]","in":"query","required":false,"description":"Filter projectActivityId (ne)","schema":{"type":"number"}},{"name":"filter[projectActivityId][gt]","in":"query","required":false,"description":"Filter projectActivityId (gt)","schema":{"type":"number"}},{"name":"filter[projectActivityId][gte]","in":"query","required":false,"description":"Filter projectActivityId (gte)","schema":{"type":"number"}},{"name":"filter[projectActivityId][lt]","in":"query","required":false,"description":"Filter projectActivityId (lt)","schema":{"type":"number"}},{"name":"filter[projectActivityId][lte]","in":"query","required":false,"description":"Filter projectActivityId (lte)","schema":{"type":"number"}},{"name":"filter[projectActivityId][in]","in":"query","required":false,"description":"Filter projectActivityId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityId][notIn]","in":"query","required":false,"description":"Filter projectActivityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityId][between]","in":"query","required":false,"description":"Filter projectActivityId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","date","-date","month","-month","hours","-hours","submissionStatus","-submissionStatus","submissionDate","-submissionDate","currency","-currency","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","date","hours","billableHours","nonBillableHours","internalValuableHours","internalNonValuableHours","invoicedHours","revenue","cost","currency","notes","submissionStatus","submissionDate","month","memberId","memberEmployeeId","memberEmployeeName","projectActivityId","projectActivityName","projectActivityCategory","projectPositionId","projectPositionName","psaProjectId","projectName","psaProjectStatus","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/timeEntriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","date":"2026-08-10","hours":"8","billableHours":"8","revenue":"1250.00","currency":"USD","submissionStatus":"draft","month":"2026-08-01","memberId":5001,"projectActivityId":7001,"psaProjectId":32341,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"4f0ad2e6-8c13-4b7a-9e52-6d81b30f7ac9","date":"2026-08-11","hours":"6.5","billableHours":"6.5","revenue":"1015.63","currency":"USD","submissionStatus":"pending","month":"2026-08-01","memberId":5001,"projectActivityId":7001,"psaProjectId":32341,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List time entries","description":"Lists time entries. When you call as a user, the list includes only time entries on projects where you are a team member, unless you are a super admin. A system access token sees time entries on every project. It always leaves out time entries on archived projects and on projects whose status is 'Planning' or 'PlanningDraft'.\n\nYou can't filter by memberId, memberEmployeeId, projectPositionId, or psaProjectId, so there is no way to list one employee's time entries.","tags":["psa-time-entries"]},"patch":{"operationId":"updateTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_INVOICED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateTimeEntriesInput"}}}},"summary":"Update time entries","description":"Updates the hours or notes of time entries. A field you leave out keeps its current value. To clear notes, send an empty string.\n\nhours and notes are the only fields you can change. To move time to another date, position assignment, or activity, delete the time entry and create a new one. The status changes only through POST psa/time-entries/submit, POST psa/time-entries/approve, and POST psa/time-entries/reject.\n\nCorrecting an approved time entry resets its approval and returns it to 'draft', so it must be submitted and approved again. If any time entry can't be updated, none are.\n\nYou can't change an invoiced time entry. A time entry counts as invoiced when its status is 'submittedForInvoicing' or 'invoiced', or when invoicedHours has a value, so a time entry that is part-way through invoicing is refused too. The request fails with ENTRY_INVOICED.\n\nThe request also fails with a generic error when the team is not active, or when the correction breaks the project's time-tracking settings: required notes, no time on weekends or holidays, and limits on hours per day, week, and month for each team member.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]},"post":{"operationId":"createTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: ACTIVITY_NOT_FOUND, MEMBER_NOT_ON_ACTIVITY, TIME_RULE_VIOLATION, DUPLICATE_TIME_ENTRY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACTIVITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectActivityId":{"type":"number"}},"additionalProperties":false,"required":["projectActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_ON_ACTIVITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["not-assigned","assignment-ended"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TIME_RULE_VIOLATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"enum":["team-not-active","notes-required","weekend","holiday","max-hours-day","max-hours-week","max-hours-month"]},"projectName":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TIME_ENTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"duplicates":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["already-exists","conflicting-hours-in-request"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["duplicates"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACTIVITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectActivityId":{"type":"number"}},"additionalProperties":false,"required":["projectActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_ON_ACTIVITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["not-assigned","assignment-ended"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TIME_RULE_VIOLATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"enum":["team-not-active","notes-required","weekend","holiday","max-hours-day","max-hours-week","max-hours-month"]},"projectName":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TIME_ENTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"duplicates":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["already-exists","conflicting-hours-in-request"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["duplicates"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"ACTIVITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"projectActivityId":{"type":"number"}},"additionalProperties":false,"required":["projectActivityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_ON_ACTIVITY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["not-assigned","assignment-ended"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TIME_RULE_VIOLATION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"rule":{"enum":["team-not-active","notes-required","weekend","holiday","max-hours-day","max-hours-week","max-hours-month"]},"projectName":{"type":"string"}},"additionalProperties":false,"required":["rule"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_TIME_ENTRY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"duplicates":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number"},"projectActivityId":{"type":"number"},"date":{"type":"string","format":"date"},"reason":{"enum":["already-exists","conflicting-hours-in-request"]}},"additionalProperties":false,"required":["memberId","projectActivityId","date","reason"]}}},"additionalProperties":false,"required":["duplicates"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTimeEntriesInput"}}}},"summary":"Create time entries","description":"Creates time entries. New time entries start in the 'draft' status. If any time entry can't be created, none are. The request never changes or deletes existing time entries, so you can send it for a date that already has time entries for other activities.\n\nEach position assignment can have only one time entry per activity and date. If a time entry already exists for that memberId, activity, and date, the request fails with DUPLICATE_TIME_ENTRY. If you send the same time entry twice in one request, it is created once when the hours match, and the request fails with the same error when they differ.\n\nEach time entry's project comes from its projectActivityId unless you send psaProjectId. If the activity belongs to no project, the request fails with ACTIVITY_NOT_FOUND.\n\nThe request also fails when the project's team is not active, or when the time entries break the project's time-tracking settings: required notes, no time on weekends or holidays, and limits on hours per day, week, and month for each team member. These failures return TIME_RULE_VIOLATION, whose 'rule' names the broken rule and whose message says what to fix.\n\nTo correct an existing time entry, use PATCH psa/time-entries.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/projects/{id}":{"get":{"operationId":"getPsaProject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getPsaProjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project you want to retrieve.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Retrieve a project","description":"Retrieves a project. Use the project's id, not its code or the numeric psaProjectId that other PSA endpoints return.\n\nThe response includes the project's budget, team, sales arrangement, and revenue to date, and has the same fields as each project from GET psa/projects.\n\nThe request fails with NOT_FOUND for an archived project and for a project whose status is 'Planning' or 'PlanningDraft'. When you call as a user, it also fails with NOT_FOUND when you are not a member of the project's team, unless you are a super admin. A system access token is not limited by team membership.","tags":["psa-projects"]},"delete":{"operationId":"deletePsaProject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deletePsaProjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project you want to delete. The project is archived rather than permanently deleted. Use POST psa/projects/bulk-delete with irreversible to delete permanently. A project that has been invoiced (or has an invoiced milestone) cannot be archived; the call fails and the project is left unchanged.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"summary":"Archive a project","description":"Archives a project. Archiving also makes the project's team inactive. POST psa/projects/bulk-restore brings an archived project back.\n\nThe response is empty. To delete a project permanently, use POST psa/projects/bulk-delete with irreversible set to true.","tags":["psa-projects"]},"patch":{"operationId":"updatePsaProject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updatePsaProjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED, REFERENCE_NOT_FOUND, REFERENCE_INACTIVE, SALES_ORDER_MISMATCH, PLANNING_SALES_ARRANGEMENT_NOT_ALLOWED, PLANNING_LINK_NOT_ALLOWED, SALES_ARRANGEMENT_CUSTOMER_MISMATCH, NAME_REQUIRED, END_DATE_BEFORE_START_DATE, STATUS_NOT_ALLOWED, CURRENCY_INVALID, CURRENCY_MISMATCH, ENTITY_MISMATCH, ENTITY_LOCKED, CONFIGURED_PARENT_TEAM_NOT_FOUND, SALES_ARRANGEMENT_NOT_ALLOWED, CUSTOMER_NOT_ALLOWED, HOURS_OUT_OF_RANGE, BUDGET_NEGATIVE, EXTERNAL_LINK_TOO_LONG, FORBIDDEN, MILESTONE_OUTSIDE_PROJECT_DATES, FIXED_FEE_OUTSIDE_PROJECT_DATES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"salesOrderNumber":{"type":"string"}},"additionalProperties":false,"required":["field","salesOrderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLANNING_SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLANNING_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_CUSTOMER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_DATE_BEFORE_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"},"salesArrangementCurrency":{"type":"string"}},"additionalProperties":false,"required":["currency","salesArrangementCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFIGURED_PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOURS_OUT_OF_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"max":{"type":"number"}},"additionalProperties":false,"required":["field","max"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_LINK_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxLength":{"type":"number"}},"additionalProperties":false,"required":["maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_OUTSIDE_PROJECT_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"milestoneName":{"type":"string"},"dueDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["milestoneName","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_OUTSIDE_PROJECT_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["field","date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"salesOrderNumber":{"type":"string"}},"additionalProperties":false,"required":["field","salesOrderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLANNING_SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLANNING_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_CUSTOMER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_DATE_BEFORE_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"},"salesArrangementCurrency":{"type":"string"}},"additionalProperties":false,"required":["currency","salesArrangementCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFIGURED_PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOURS_OUT_OF_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"max":{"type":"number"}},"additionalProperties":false,"required":["field","max"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_LINK_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxLength":{"type":"number"}},"additionalProperties":false,"required":["maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_OUTSIDE_PROJECT_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"milestoneName":{"type":"string"},"dueDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["milestoneName","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_OUTSIDE_PROJECT_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["field","date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"salesOrderNumber":{"type":"string"}},"additionalProperties":false,"required":["field","salesOrderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLANNING_SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PLANNING_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_CUSTOMER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_DATE_BEFORE_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"STATUS_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"status":{"type":"string"}},"additionalProperties":false,"required":["status"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"},"salesArrangementCurrency":{"type":"string"}},"additionalProperties":false,"required":["currency","salesArrangementCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CONFIGURED_PARENT_TEAM_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOURS_OUT_OF_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"max":{"type":"number"}},"additionalProperties":false,"required":["field","max"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_LINK_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxLength":{"type":"number"}},"additionalProperties":false,"required":["maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_OUTSIDE_PROJECT_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"milestoneName":{"type":"string"},"dueDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["milestoneName","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FIXED_FEE_OUTSIDE_PROJECT_DATES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["field","date"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the project you want to update.","example":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePsaProjectInput"}}}},"summary":"Update a project","description":"Updates a project with the fields you send. A field you leave out keeps its current value. To clear an optional field, send null. Null is ignored for teamStartDate, teamLeadIds, and projectSettings. A null teamEndDate removes the lock date, so time and expenses stay open indefinitely.\n\nUse the project's id, not its code or the numeric psaProjectId that other PSA endpoints return.\n\nA teamLeadIds list you send replaces the current team leads; an empty list removes every lead. Team leads get edit rights on this project only; their permission roles do not change. While the project has a sales arrangement, customerId is set to null on every update, even when you don't send it. The budget is always in the project currency, and a budget of 0 removes it. category, code, quoteId and opportunityId are ignored; the category is set when the project is created.\n\nChanging or removing salesArrangementId fails with INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED when a linked position, milestone, or fixed fee has already been invoiced. An invoiced expense budget does not block the change. A successful change also removes the links between the project's positions, milestones, and fixed fees and their sales order product items, and between its expense budgets and their sales orders.\n\nOnce the project has an allocation, time entry, or expense, its entity is locked: an entityId different from the current one, or a salesArrangementId whose arrangement belongs to another entity, fails with ENTITY_LOCKED. A project without an entity can still get one. A new entity also moves the project's team under the parent team that the Team Hierarchy settings name for that entity and the project's category, or to the top level when none is set; when that parent team no longer exists, the update fails with CONFIGURED_PARENT_TEAM_NOT_FOUND.\n\nNothing is changed when a check fails. The response is empty. Read the project with GET psa/projects/:id.","tags":["psa-projects"]}},"/psa/project-types/bulk":{"post":{"operationId":"bulkCreateProjectTypes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkCreateProjectTypesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkCreateProjectTypesInput"}}}},"summary":"Bulk create project types","description":"Creates multiple project types in one request. If any project type can't be created, none are. A name you send twice creates one project type, so the response can list fewer ids than you sent. The request fails with DUPLICATE_NAME only when a project type in your tenant already has the name.\n\nThe response contains only the new ids. Read a project type with GET psa/project-types/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-project-types"]}},"/psa/activities/{id}/members":{"post":{"operationId":"assignActivityMembers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/assignActivityMembersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ACTIVITY_INVOICED, ACTIVITY_BILLED, INVALID_HOURS_BUDGET, MEMBER_NOT_FOUND, DUPLICATE_MEMBER, NON_BILLABLE_MEMBER, MEMBER_BUDGET_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ACTIVITY_BILLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_HOURS_BUDGET"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NON_BILLABLE_MEMBER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_BUDGET_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"memberId":{"type":"string"}},"additionalProperties":false,"required":["memberId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the activity. Needs edit permission on its project.","example":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/assignActivityMembersInput"}}}},"summary":"Assign members to an activity","description":"Assigns members to an activity (project task), or changes the hours of members already assigned. Members you do not list stay assigned unchanged. A member who was unassigned earlier is assigned again.\n\nThe activity's hours budget is kept; when the members' hoursBudget add up to more than it, or it has none, it becomes their total. The response returns it.","tags":["psa-activities"]}},"/psa/fixed-fees":{"get":{"operationId":"fixedFees","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[frequency]","in":"query","required":false,"description":"Filter frequency (equality)","schema":{"type":"string"}},{"name":"filter[frequency][ne]","in":"query","required":false,"description":"Filter frequency (ne)","schema":{"type":"string"}},{"name":"filter[frequency][gt]","in":"query","required":false,"description":"Filter frequency (gt)","schema":{"type":"string"}},{"name":"filter[frequency][gte]","in":"query","required":false,"description":"Filter frequency (gte)","schema":{"type":"string"}},{"name":"filter[frequency][lt]","in":"query","required":false,"description":"Filter frequency (lt)","schema":{"type":"string"}},{"name":"filter[frequency][lte]","in":"query","required":false,"description":"Filter frequency (lte)","schema":{"type":"string"}},{"name":"filter[frequency][in]","in":"query","required":false,"description":"Filter frequency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[frequency][notIn]","in":"query","required":false,"description":"Filter frequency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[frequency][between]","in":"query","required":false,"description":"Filter frequency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[frequency][like]","in":"query","required":false,"description":"Filter frequency (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","frequency","-frequency","currency","-currency","startDate","-startDate","endDate","-endDate","psaProjectId","-psaProjectId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","amount","currency","frequency","startDate","endDate","psaProjectId","salesOrderProductLineId","productId","productLineId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/fixedFeesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"7c2e1b90-4a53-4f16-8de2-9b1035c7ef42","amount":"5000.00","currency":"USD","frequency":"Monthly","startDate":"2026-01-01","endDate":"2026-12-01","psaProjectId":32341,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"e1904a7d-62cb-4d38-b075-3fa8c6215de0","amount":"18000.00","currency":"EUR","frequency":"Once","startDate":"2026-03-01","endDate":"2026-03-01","psaProjectId":32355,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List fixed fees","description":"Lists fixed fees. Each fixed fee has both amount and currency, or neither. Both come from one money value.","tags":["psa-fixed-fees"]}},"/psa/projects":{"post":{"operationId":"createPsaProject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createPsaProjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, REFERENCE_INACTIVE, SALES_ORDER_MISMATCH, SALES_ARRANGEMENT_CUSTOMER_MISMATCH, NAME_REQUIRED, END_DATE_BEFORE_START_DATE, CURRENCY_INVALID, CURRENCY_MISMATCH, ENTITY_MISMATCH, SALES_ARRANGEMENT_NOT_ALLOWED, CUSTOMER_NOT_ALLOWED, HOURS_OUT_OF_RANGE, BUDGET_NEGATIVE, EXTERNAL_LINK_TOO_LONG, ENTITY_REQUIRED, EMPLOYEE_RECORD_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"salesOrderNumber":{"type":"string"}},"additionalProperties":false,"required":["field","salesOrderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_CUSTOMER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_DATE_BEFORE_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"},"salesArrangementCurrency":{"type":"string"}},"additionalProperties":false,"required":["currency","salesArrangementCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOURS_OUT_OF_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"max":{"type":"number"}},"additionalProperties":false,"required":["field","max"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_LINK_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxLength":{"type":"number"}},"additionalProperties":false,"required":["maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_RECORD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"salesOrderNumber":{"type":"string"}},"additionalProperties":false,"required":["field","salesOrderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_CUSTOMER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_DATE_BEFORE_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"},"salesArrangementCurrency":{"type":"string"}},"additionalProperties":false,"required":["currency","salesArrangementCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOURS_OUT_OF_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"max":{"type":"number"}},"additionalProperties":false,"required":["field","max"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_LINK_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxLength":{"type":"number"}},"additionalProperties":false,"required":["maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_RECORD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["field","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"salesOrderNumber":{"type":"string"}},"additionalProperties":false,"required":["field","salesOrderNumber"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_CUSTOMER_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_DATE_BEFORE_START_DATE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"}},"additionalProperties":false,"required":["field"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"}},"additionalProperties":false,"required":["currency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CURRENCY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"currency":{"type":"string"},"salesArrangementCurrency":{"type":"string"}},"additionalProperties":false,"required":["currency","salesArrangementCurrency"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ARRANGEMENT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOMER_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"category":{"type":"string"}},"additionalProperties":false,"required":["category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HOURS_OUT_OF_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string"},"max":{"type":"number"}},"additionalProperties":false,"required":["field","max"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BUDGET_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EXTERNAL_LINK_TOO_LONG"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"maxLength":{"type":"number"}},"additionalProperties":false,"required":["maxLength"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EMPLOYEE_RECORD_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPsaProjectInput"}}}},"summary":"Create a project","description":"Creates a project, together with its time-tracking project and team. Making an employee a team lead gives them edit rights on this project only; it does not change their permission roles. Unless you are a PSA admin, you are added to the team leads too, so you can open the project.\n\nThe budget is always in the project currency, and a budget of 0 means no budget.\n\nNothing is created when a check fails. A new project starts with status 'NotStarted', and the project code is generated automatically. status, code, quoteId and opportunityId are ignored. The response contains the new project's id; read the project with GET psa/projects/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-projects"]},"get":{"operationId":"projects","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[showArchivedProjects]","in":"query","required":false,"x-parameter":true,"schema":{"type":"boolean"},"description":"When true, archived projects are included in the results."},{"name":"filter[showPlanningProjects]","in":"query","required":false,"x-parameter":true,"schema":{"type":"boolean"},"description":"When true, projects in Planning and PlanningDraft status are included in the results."},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category]","in":"query","required":false,"description":"Filter category (equality)","schema":{"type":"string"}},{"name":"filter[category][ne]","in":"query","required":false,"description":"Filter category (ne)","schema":{"type":"string"}},{"name":"filter[category][gt]","in":"query","required":false,"description":"Filter category (gt)","schema":{"type":"string"}},{"name":"filter[category][gte]","in":"query","required":false,"description":"Filter category (gte)","schema":{"type":"string"}},{"name":"filter[category][lt]","in":"query","required":false,"description":"Filter category (lt)","schema":{"type":"string"}},{"name":"filter[category][lte]","in":"query","required":false,"description":"Filter category (lte)","schema":{"type":"string"}},{"name":"filter[category][in]","in":"query","required":false,"description":"Filter category (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][notIn]","in":"query","required":false,"description":"Filter category (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[category][between]","in":"query","required":false,"description":"Filter category (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[category][like]","in":"query","required":false,"description":"Filter category (like)","schema":{"type":"string"}},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[invoiced]","in":"query","required":false,"description":"Filter invoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[invoiced][ne]","in":"query","required":false,"description":"Filter invoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gt]","in":"query","required":false,"description":"Filter invoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][gte]","in":"query","required":false,"description":"Filter invoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lt]","in":"query","required":false,"description":"Filter invoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[invoiced][lte]","in":"query","required":false,"description":"Filter invoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[invoiced][in]","in":"query","required":false,"description":"Filter invoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][notIn]","in":"query","required":false,"description":"Filter invoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[invoiced][between]","in":"query","required":false,"description":"Filter invoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectTypeId]","in":"query","required":false,"description":"Filter projectTypeId (equality)","schema":{"type":"number"}},{"name":"filter[projectTypeId][ne]","in":"query","required":false,"description":"Filter projectTypeId (ne)","schema":{"type":"number"}},{"name":"filter[projectTypeId][gt]","in":"query","required":false,"description":"Filter projectTypeId (gt)","schema":{"type":"number"}},{"name":"filter[projectTypeId][gte]","in":"query","required":false,"description":"Filter projectTypeId (gte)","schema":{"type":"number"}},{"name":"filter[projectTypeId][lt]","in":"query","required":false,"description":"Filter projectTypeId (lt)","schema":{"type":"number"}},{"name":"filter[projectTypeId][lte]","in":"query","required":false,"description":"Filter projectTypeId (lte)","schema":{"type":"number"}},{"name":"filter[projectTypeId][in]","in":"query","required":false,"description":"Filter projectTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectTypeId][notIn]","in":"query","required":false,"description":"Filter projectTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectTypeId][between]","in":"query","required":false,"description":"Filter projectTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[quoteId]","in":"query","required":false,"description":"Filter quoteId (equality)","schema":{"type":"number"}},{"name":"filter[quoteId][ne]","in":"query","required":false,"description":"Filter quoteId (ne)","schema":{"type":"number"}},{"name":"filter[quoteId][gt]","in":"query","required":false,"description":"Filter quoteId (gt)","schema":{"type":"number"}},{"name":"filter[quoteId][gte]","in":"query","required":false,"description":"Filter quoteId (gte)","schema":{"type":"number"}},{"name":"filter[quoteId][lt]","in":"query","required":false,"description":"Filter quoteId (lt)","schema":{"type":"number"}},{"name":"filter[quoteId][lte]","in":"query","required":false,"description":"Filter quoteId (lte)","schema":{"type":"number"}},{"name":"filter[quoteId][in]","in":"query","required":false,"description":"Filter quoteId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[quoteId][notIn]","in":"query","required":false,"description":"Filter quoteId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[quoteId][between]","in":"query","required":false,"description":"Filter quoteId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[opportunityId]","in":"query","required":false,"description":"Filter opportunityId (equality)","schema":{"type":"number"}},{"name":"filter[opportunityId][ne]","in":"query","required":false,"description":"Filter opportunityId (ne)","schema":{"type":"number"}},{"name":"filter[opportunityId][gt]","in":"query","required":false,"description":"Filter opportunityId (gt)","schema":{"type":"number"}},{"name":"filter[opportunityId][gte]","in":"query","required":false,"description":"Filter opportunityId (gte)","schema":{"type":"number"}},{"name":"filter[opportunityId][lt]","in":"query","required":false,"description":"Filter opportunityId (lt)","schema":{"type":"number"}},{"name":"filter[opportunityId][lte]","in":"query","required":false,"description":"Filter opportunityId (lte)","schema":{"type":"number"}},{"name":"filter[opportunityId][in]","in":"query","required":false,"description":"Filter opportunityId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[opportunityId][notIn]","in":"query","required":false,"description":"Filter opportunityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[opportunityId][between]","in":"query","required":false,"description":"Filter opportunityId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","lastModifiedDate","-lastModifiedDate","category","-category","status","-status","currency","-currency","invoiced","-invoiced","startDate","-startDate","endDate","-endDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","lastModifiedDate","name","code","category","status","currency","invoiced","startDate","endDate","notes","enforceActivityDateRange","budgetAmount","budgetCurrency","departmentId","teamId","teamName","teamStartDate","teamEndDate","salesRepresentativeId","salesRepresentativeName","projectTypeId","projectTypeName","quoteId","quoteNumber","opportunityId","opportunityName","opportunityCurrency","salesArrangementId","salesArrangementCurrency","salesArrangementCustomerId","salesArrangementCustomerName","salesArrangementEntityId","salesArrangementEntityName","revenueRecordedTimeToDate","revenueAccomplishedMilestones","revenueFixedFeeToDate","revenueToDate","budgetRemaining"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/projectsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List projects","description":"Lists projects. When you call as a user, the list includes only projects where you are a team member, unless you are a super admin. A system access token sees every project. Archived projects and projects whose status is 'Planning' or 'PlanningDraft' are left out unless you send filter[showArchivedProjects]=true or filter[showPlanningProjects]=true.\n\nThere is no endpoint to find a project by name or code, or to list the projects of one department or one sales arrangement. To find a project by name, list the projects and match the name in your own code.","tags":["psa-projects"]}},"/psa/allocations/bulk-delete":{"post":{"operationId":"deleteAllocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteAllocationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deleteAllocationsInput"}}}},"summary":"Bulk delete allocations","description":"Deletes multiple allocations in one request. Deleting an allocation also deletes its daily planned-hours entries, and you can't restore it. Logged time entries have no link to an allocation and are never affected.\n\nIf any id matches no allocation, the request fails with NOT_FOUND and nothing is deleted.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-allocations"]}},"/psa/milestones":{"post":{"operationId":"createMilestones","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createMilestonesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: PROJECT_NOT_FOUND, FORBIDDEN, NAME_REQUIRED, BILLABLE_NOT_ALLOWED, AMOUNT_REQUIRED, AMOUNT_NOT_ALLOWED, AMOUNT_NEGATIVE, AMOUNT_TOO_PRECISE, DUE_DATE_OUTSIDE_PROJECT, SALES_ORDER_LINK_NOT_ALLOWED, SALES_ORDER_PRODUCT_LINE_NOT_AVAILABLE, INVOICE_MILESTONE_NOT_AVAILABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"category":{"type":"string"}},"additionalProperties":false,"required":["index","category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_TOO_PRECISE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"dueDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["index","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_MILESTONE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"category":{"type":"string"}},"additionalProperties":false,"required":["index","category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_TOO_PRECISE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"dueDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["index","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_MILESTONE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"PROJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"category":{"type":"string"}},"additionalProperties":false,"required":["index","category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_TOO_PRECISE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"dueDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["index","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_MILESTONE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createMilestonesInput"}}}},"summary":"Bulk create milestones","description":"Creates milestones on one or more PSA projects in one request. If any milestone can't be created, none are, and every broken rule is reported with its own error code. 'index' in an error's details is the milestone's position in the request.\n\nThe rules match the project's Milestones tab. A milestone is billable by default on a Billable project and can't be billable on an Internal or NonBillable one. A billable milestone needs an amount other than 0. A non-billable milestone is stored with amount 0 and no billing links. The amount is always in the project currency. Products and sales order links can't be set through this API. Every identifier you send or get back is a UUID.\n\nThe response lists the new milestones' ids in the order you sent them. Read one with GET psa/milestones/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-milestones"]},"patch":{"operationId":"updateMilestones","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateMilestonesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DUPLICATE_ID, FORBIDDEN, MILESTONE_INVOICED, NAME_REQUIRED, BILLABLE_NOT_ALLOWED, AMOUNT_REQUIRED, AMOUNT_NOT_ALLOWED, AMOUNT_NEGATIVE, AMOUNT_TOO_PRECISE, DUE_DATE_OUTSIDE_PROJECT, SALES_ORDER_LINK_NOT_ALLOWED, SALES_ORDER_PRODUCT_LINE_NOT_AVAILABLE, INVOICE_MILESTONE_NOT_AVAILABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"category":{"type":"string"}},"additionalProperties":false,"required":["index","category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_TOO_PRECISE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"dueDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["index","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_MILESTONE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"category":{"type":"string"}},"additionalProperties":false,"required":["index","category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_TOO_PRECISE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"dueDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["index","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_MILESTONE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_ID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FORBIDDEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"projectId":{"type":"string"}},"additionalProperties":false,"required":["index","projectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MILESTONE_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"id":{"type":"string"}},"additionalProperties":false,"required":["index","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BILLABLE_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"category":{"type":"string"}},"additionalProperties":false,"required":["index","category"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_NEGATIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"AMOUNT_TOO_PRECISE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUE_DATE_OUTSIDE_PROJECT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"dueDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"}},"additionalProperties":false,"required":["index","dueDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_LINK_NOT_ALLOWED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SALES_ORDER_PRODUCT_LINE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"}},"additionalProperties":false,"required":["index"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVOICE_MILESTONE_NOT_AVAILABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number"},"reason":{"type":"string"}},"additionalProperties":false,"required":["index","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateMilestonesInput"}}}},"summary":"Bulk update milestones","description":"Updates milestones in one request, with the fields you send. A field you leave out keeps its current value; send null to clear a nullable one. If any milestone can't be updated, none are, and every broken rule is reported with its own error code. 'index' in an error's details is the milestone's position in the request.\n\nThe rules match the project's Milestones tab, and an invoiced milestone can't be changed. A milestone can't move to another project. Products and sales order links can't be set through this API, and an update leaves the ones set in the Milestones tab as they are, with two exceptions the tab also applies: turning billable off sets the amount to 0 and removes them, and while an invoice milestone is linked, the milestone's name, and its amount when the invoice milestone has a price, come from the invoice milestone, whatever you send. Every identifier you send is a UUID.\n\nThe response is empty. Read an updated milestone with GET psa/milestones/:id.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-milestones"]},"get":{"operationId":"milestones","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[dueDate]","in":"query","required":false,"description":"Filter dueDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][ne]","in":"query","required":false,"description":"Filter dueDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gt]","in":"query","required":false,"description":"Filter dueDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][gte]","in":"query","required":false,"description":"Filter dueDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lt]","in":"query","required":false,"description":"Filter dueDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][lte]","in":"query","required":false,"description":"Filter dueDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[dueDate][in]","in":"query","required":false,"description":"Filter dueDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][notIn]","in":"query","required":false,"description":"Filter dueDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[dueDate][between]","in":"query","required":false,"description":"Filter dueDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[billable]","in":"query","required":false,"description":"Filter billable (equality)","schema":{"type":"boolean"}},{"name":"filter[billable][ne]","in":"query","required":false,"description":"Filter billable (ne)","schema":{"type":"boolean"}},{"name":"filter[billable][gt]","in":"query","required":false,"description":"Filter billable (gt)","schema":{"type":"boolean"}},{"name":"filter[billable][gte]","in":"query","required":false,"description":"Filter billable (gte)","schema":{"type":"boolean"}},{"name":"filter[billable][lt]","in":"query","required":false,"description":"Filter billable (lt)","schema":{"type":"boolean"}},{"name":"filter[billable][lte]","in":"query","required":false,"description":"Filter billable (lte)","schema":{"type":"boolean"}},{"name":"filter[billable][in]","in":"query","required":false,"description":"Filter billable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][notIn]","in":"query","required":false,"description":"Filter billable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billable][between]","in":"query","required":false,"description":"Filter billable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","status","-status","currency","-currency","dueDate","-dueDate","psaProjectId","-psaProjectId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","amount","currency","dueDate","status","billable","psaProjectId","invoiceId","productId","productLineId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/milestonesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","name":"Phase 1 delivery","amount":"15000.00","currency":"USD","dueDate":"2026-09-30","status":"pending","billable":true,"psaProjectId":32341,"lastModifiedDate":"2026-08-14T11:20:31.004Z"},{"id":"4f0ad2e6-8c13-4b7a-9e52-6d81b30f7ac9","name":"Phase 2 delivery","amount":"22500.00","currency":"USD","dueDate":"2026-12-15","status":"accomplished","billable":true,"psaProjectId":32341,"lastModifiedDate":"2026-08-16T07:02:11.550Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List milestones","description":"Lists milestones. The psaProjectId, invoiceId, productId, and productLineId on a milestone are numeric ids, not UUIDs, so you can't use them to read the project, invoice, product, or product line they point to.\n\nMilestones can't be filtered by name or description, and no other endpoint finds a milestone by name.","tags":["psa-milestones"]}},"/psa/project-revenues":{"get":{"operationId":"projectRevenues","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[startDate]","in":"query","required":true,"x-parameter":true,"schema":{"type":"string","format":"date"},"description":"The first day of the period to report. Format YYYY-MM-DD. Required: send filter[startDate]=<date>; equality only."},{"name":"filter[endDate]","in":"query","required":true,"x-parameter":true,"schema":{"type":"string","format":"date"},"description":"The last day of the period to report, inclusive. Format YYYY-MM-DD. Required: send filter[endDate]=<date>; equality only."},{"name":"filter[showArchivedProjects]","in":"query","required":false,"x-parameter":true,"schema":{"type":"boolean"},"description":"When true, archived projects are included. Send filter[showArchivedProjects]=true."},{"name":"filter[date]","in":"query","required":false,"description":"Filter date (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[date][ne]","in":"query","required":false,"description":"Filter date (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[date][gt]","in":"query","required":false,"description":"Filter date (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[date][gte]","in":"query","required":false,"description":"Filter date (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[date][lt]","in":"query","required":false,"description":"Filter date (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[date][lte]","in":"query","required":false,"description":"Filter date (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[date][in]","in":"query","required":false,"description":"Filter date (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[date][notIn]","in":"query","required":false,"description":"Filter date (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[date][between]","in":"query","required":false,"description":"Filter date (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[month]","in":"query","required":false,"description":"Filter month (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[month][ne]","in":"query","required":false,"description":"Filter month (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[month][gt]","in":"query","required":false,"description":"Filter month (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[month][gte]","in":"query","required":false,"description":"Filter month (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[month][lt]","in":"query","required":false,"description":"Filter month (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[month][lte]","in":"query","required":false,"description":"Filter month (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[month][in]","in":"query","required":false,"description":"Filter month (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[month][notIn]","in":"query","required":false,"description":"Filter month (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[month][between]","in":"query","required":false,"description":"Filter month (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[planned]","in":"query","required":false,"description":"Filter planned (equality)","schema":{"type":"boolean"}},{"name":"filter[planned][ne]","in":"query","required":false,"description":"Filter planned (ne)","schema":{"type":"boolean"}},{"name":"filter[planned][gt]","in":"query","required":false,"description":"Filter planned (gt)","schema":{"type":"boolean"}},{"name":"filter[planned][gte]","in":"query","required":false,"description":"Filter planned (gte)","schema":{"type":"boolean"}},{"name":"filter[planned][lt]","in":"query","required":false,"description":"Filter planned (lt)","schema":{"type":"boolean"}},{"name":"filter[planned][lte]","in":"query","required":false,"description":"Filter planned (lte)","schema":{"type":"boolean"}},{"name":"filter[planned][in]","in":"query","required":false,"description":"Filter planned (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[planned][notIn]","in":"query","required":false,"description":"Filter planned (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[planned][between]","in":"query","required":false,"description":"Filter planned (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectId]","in":"query","required":false,"description":"Filter projectId (equality)","schema":{"type":"string"}},{"name":"filter[projectId][ne]","in":"query","required":false,"description":"Filter projectId (ne)","schema":{"type":"string"}},{"name":"filter[projectId][gt]","in":"query","required":false,"description":"Filter projectId (gt)","schema":{"type":"string"}},{"name":"filter[projectId][gte]","in":"query","required":false,"description":"Filter projectId (gte)","schema":{"type":"string"}},{"name":"filter[projectId][lt]","in":"query","required":false,"description":"Filter projectId (lt)","schema":{"type":"string"}},{"name":"filter[projectId][lte]","in":"query","required":false,"description":"Filter projectId (lte)","schema":{"type":"string"}},{"name":"filter[projectId][in]","in":"query","required":false,"description":"Filter projectId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectId][notIn]","in":"query","required":false,"description":"Filter projectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectId][between]","in":"query","required":false,"description":"Filter projectId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectId][like]","in":"query","required":false,"description":"Filter projectId (like)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory]","in":"query","required":false,"description":"Filter psaProjectCategory (equality)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][ne]","in":"query","required":false,"description":"Filter psaProjectCategory (ne)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][gt]","in":"query","required":false,"description":"Filter psaProjectCategory (gt)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][gte]","in":"query","required":false,"description":"Filter psaProjectCategory (gte)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][lt]","in":"query","required":false,"description":"Filter psaProjectCategory (lt)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][lte]","in":"query","required":false,"description":"Filter psaProjectCategory (lte)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][in]","in":"query","required":false,"description":"Filter psaProjectCategory (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectCategory][notIn]","in":"query","required":false,"description":"Filter psaProjectCategory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectCategory][between]","in":"query","required":false,"description":"Filter psaProjectCategory (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[psaProjectCategory][like]","in":"query","required":false,"description":"Filter psaProjectCategory (like)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus]","in":"query","required":false,"description":"Filter psaProjectStatus (equality)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][ne]","in":"query","required":false,"description":"Filter psaProjectStatus (ne)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][gt]","in":"query","required":false,"description":"Filter psaProjectStatus (gt)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][gte]","in":"query","required":false,"description":"Filter psaProjectStatus (gte)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][lt]","in":"query","required":false,"description":"Filter psaProjectStatus (lt)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][lte]","in":"query","required":false,"description":"Filter psaProjectStatus (lte)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][in]","in":"query","required":false,"description":"Filter psaProjectStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectStatus][notIn]","in":"query","required":false,"description":"Filter psaProjectStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectStatus][between]","in":"query","required":false,"description":"Filter psaProjectStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[psaProjectStatus][like]","in":"query","required":false,"description":"Filter psaProjectStatus (like)","schema":{"type":"string"}},{"name":"filter[psaProjectInvoiced]","in":"query","required":false,"description":"Filter psaProjectInvoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][ne]","in":"query","required":false,"description":"Filter psaProjectInvoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][gt]","in":"query","required":false,"description":"Filter psaProjectInvoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][gte]","in":"query","required":false,"description":"Filter psaProjectInvoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][lt]","in":"query","required":false,"description":"Filter psaProjectInvoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][lte]","in":"query","required":false,"description":"Filter psaProjectInvoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][in]","in":"query","required":false,"description":"Filter psaProjectInvoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectInvoiced][notIn]","in":"query","required":false,"description":"Filter psaProjectInvoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectInvoiced][between]","in":"query","required":false,"description":"Filter psaProjectInvoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId]","in":"query","required":false,"description":"Filter departmentId (equality)","schema":{"type":"string"}},{"name":"filter[departmentId][ne]","in":"query","required":false,"description":"Filter departmentId (ne)","schema":{"type":"string"}},{"name":"filter[departmentId][gt]","in":"query","required":false,"description":"Filter departmentId (gt)","schema":{"type":"string"}},{"name":"filter[departmentId][gte]","in":"query","required":false,"description":"Filter departmentId (gte)","schema":{"type":"string"}},{"name":"filter[departmentId][lt]","in":"query","required":false,"description":"Filter departmentId (lt)","schema":{"type":"string"}},{"name":"filter[departmentId][lte]","in":"query","required":false,"description":"Filter departmentId (lte)","schema":{"type":"string"}},{"name":"filter[departmentId][in]","in":"query","required":false,"description":"Filter departmentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][notIn]","in":"query","required":false,"description":"Filter departmentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][between]","in":"query","required":false,"description":"Filter departmentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId][like]","in":"query","required":false,"description":"Filter departmentId (like)","schema":{"type":"string"}},{"name":"filter[projectTypeId]","in":"query","required":false,"description":"Filter projectTypeId (equality)","schema":{"type":"string"}},{"name":"filter[projectTypeId][ne]","in":"query","required":false,"description":"Filter projectTypeId (ne)","schema":{"type":"string"}},{"name":"filter[projectTypeId][gt]","in":"query","required":false,"description":"Filter projectTypeId (gt)","schema":{"type":"string"}},{"name":"filter[projectTypeId][gte]","in":"query","required":false,"description":"Filter projectTypeId (gte)","schema":{"type":"string"}},{"name":"filter[projectTypeId][lt]","in":"query","required":false,"description":"Filter projectTypeId (lt)","schema":{"type":"string"}},{"name":"filter[projectTypeId][lte]","in":"query","required":false,"description":"Filter projectTypeId (lte)","schema":{"type":"string"}},{"name":"filter[projectTypeId][in]","in":"query","required":false,"description":"Filter projectTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectTypeId][notIn]","in":"query","required":false,"description":"Filter projectTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectTypeId][between]","in":"query","required":false,"description":"Filter projectTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectTypeId][like]","in":"query","required":false,"description":"Filter projectTypeId (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[activityId]","in":"query","required":false,"description":"Filter activityId (equality)","schema":{"type":"string"}},{"name":"filter[activityId][ne]","in":"query","required":false,"description":"Filter activityId (ne)","schema":{"type":"string"}},{"name":"filter[activityId][gt]","in":"query","required":false,"description":"Filter activityId (gt)","schema":{"type":"string"}},{"name":"filter[activityId][gte]","in":"query","required":false,"description":"Filter activityId (gte)","schema":{"type":"string"}},{"name":"filter[activityId][lt]","in":"query","required":false,"description":"Filter activityId (lt)","schema":{"type":"string"}},{"name":"filter[activityId][lte]","in":"query","required":false,"description":"Filter activityId (lte)","schema":{"type":"string"}},{"name":"filter[activityId][in]","in":"query","required":false,"description":"Filter activityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[activityId][notIn]","in":"query","required":false,"description":"Filter activityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[activityId][between]","in":"query","required":false,"description":"Filter activityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[activityId][like]","in":"query","required":false,"description":"Filter activityId (like)","schema":{"type":"string"}},{"name":"filter[projectActivityBillable]","in":"query","required":false,"description":"Filter projectActivityBillable (equality)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][ne]","in":"query","required":false,"description":"Filter projectActivityBillable (ne)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][gt]","in":"query","required":false,"description":"Filter projectActivityBillable (gt)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][gte]","in":"query","required":false,"description":"Filter projectActivityBillable (gte)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][lt]","in":"query","required":false,"description":"Filter projectActivityBillable (lt)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][lte]","in":"query","required":false,"description":"Filter projectActivityBillable (lte)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][in]","in":"query","required":false,"description":"Filter projectActivityBillable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityBillable][notIn]","in":"query","required":false,"description":"Filter projectActivityBillable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityBillable][between]","in":"query","required":false,"description":"Filter projectActivityBillable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectActivityBillingType]","in":"query","required":false,"description":"Filter projectActivityBillingType (equality)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][ne]","in":"query","required":false,"description":"Filter projectActivityBillingType (ne)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][gt]","in":"query","required":false,"description":"Filter projectActivityBillingType (gt)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][gte]","in":"query","required":false,"description":"Filter projectActivityBillingType (gte)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][lt]","in":"query","required":false,"description":"Filter projectActivityBillingType (lt)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][lte]","in":"query","required":false,"description":"Filter projectActivityBillingType (lte)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][in]","in":"query","required":false,"description":"Filter projectActivityBillingType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityBillingType][notIn]","in":"query","required":false,"description":"Filter projectActivityBillingType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityBillingType][between]","in":"query","required":false,"description":"Filter projectActivityBillingType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectActivityBillingType][like]","in":"query","required":false,"description":"Filter projectActivityBillingType (like)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory]","in":"query","required":false,"description":"Filter projectActivityCategory (equality)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][ne]","in":"query","required":false,"description":"Filter projectActivityCategory (ne)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][gt]","in":"query","required":false,"description":"Filter projectActivityCategory (gt)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][gte]","in":"query","required":false,"description":"Filter projectActivityCategory (gte)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][lt]","in":"query","required":false,"description":"Filter projectActivityCategory (lt)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][lte]","in":"query","required":false,"description":"Filter projectActivityCategory (lte)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][in]","in":"query","required":false,"description":"Filter projectActivityCategory (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityCategory][notIn]","in":"query","required":false,"description":"Filter projectActivityCategory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityCategory][between]","in":"query","required":false,"description":"Filter projectActivityCategory (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectActivityCategory][like]","in":"query","required":false,"description":"Filter projectActivityCategory (like)","schema":{"type":"string"}},{"name":"filter[projectActivityInvoiced]","in":"query","required":false,"description":"Filter projectActivityInvoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][ne]","in":"query","required":false,"description":"Filter projectActivityInvoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][gt]","in":"query","required":false,"description":"Filter projectActivityInvoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][gte]","in":"query","required":false,"description":"Filter projectActivityInvoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][lt]","in":"query","required":false,"description":"Filter projectActivityInvoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][lte]","in":"query","required":false,"description":"Filter projectActivityInvoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][in]","in":"query","required":false,"description":"Filter projectActivityInvoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityInvoiced][notIn]","in":"query","required":false,"description":"Filter projectActivityInvoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityInvoiced][between]","in":"query","required":false,"description":"Filter projectActivityInvoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId]","in":"query","required":false,"description":"Filter employeeId (equality)","schema":{"type":"string"}},{"name":"filter[employeeId][ne]","in":"query","required":false,"description":"Filter employeeId (ne)","schema":{"type":"string"}},{"name":"filter[employeeId][gt]","in":"query","required":false,"description":"Filter employeeId (gt)","schema":{"type":"string"}},{"name":"filter[employeeId][gte]","in":"query","required":false,"description":"Filter employeeId (gte)","schema":{"type":"string"}},{"name":"filter[employeeId][lt]","in":"query","required":false,"description":"Filter employeeId (lt)","schema":{"type":"string"}},{"name":"filter[employeeId][lte]","in":"query","required":false,"description":"Filter employeeId (lte)","schema":{"type":"string"}},{"name":"filter[employeeId][in]","in":"query","required":false,"description":"Filter employeeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][notIn]","in":"query","required":false,"description":"Filter employeeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][between]","in":"query","required":false,"description":"Filter employeeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId][like]","in":"query","required":false,"description":"Filter employeeId (like)","schema":{"type":"string"}},{"name":"filter[submissionStatus]","in":"query","required":false,"description":"Filter submissionStatus (equality)","schema":{"type":"string"}},{"name":"filter[submissionStatus][ne]","in":"query","required":false,"description":"Filter submissionStatus (ne)","schema":{"type":"string"}},{"name":"filter[submissionStatus][gt]","in":"query","required":false,"description":"Filter submissionStatus (gt)","schema":{"type":"string"}},{"name":"filter[submissionStatus][gte]","in":"query","required":false,"description":"Filter submissionStatus (gte)","schema":{"type":"string"}},{"name":"filter[submissionStatus][lt]","in":"query","required":false,"description":"Filter submissionStatus (lt)","schema":{"type":"string"}},{"name":"filter[submissionStatus][lte]","in":"query","required":false,"description":"Filter submissionStatus (lte)","schema":{"type":"string"}},{"name":"filter[submissionStatus][in]","in":"query","required":false,"description":"Filter submissionStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionStatus][notIn]","in":"query","required":false,"description":"Filter submissionStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionStatus][between]","in":"query","required":false,"description":"Filter submissionStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[submissionStatus][like]","in":"query","required":false,"description":"Filter submissionStatus (like)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["date","-date","month","-month","type","-type","amount","-amount","currency","-currency","planned","-planned","psaProjectCategory","-psaProjectCategory","psaProjectStatus","-psaProjectStatus"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["date","month","type","amount","currency","planned","projectId","projectName","psaProjectCategory","psaProjectStatus","psaProjectInvoiced","psaProjectBudgetAmount","psaProjectBudgetCurrency","departmentId","salesRepresentativeId","projectTypeId","psaProjectTypeName","salesArrangementId","customerId","entityId","salesArrangementEntityName","client","customerCustomerSegment","customerCountry","activityId","projectActivityName","projectActivityBillable","projectActivityBillingType","projectActivityCategory","projectActivityInvoiced","employeeId","memberEmployeeName","employeeDisplayName","employeeEmploymentType","employeeEmploymentCategory","submissionStatus"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/projectRevenuesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List project revenue","description":"Lists PSA project revenue rows dated between startDate and endDate, both required and sent as filter[startDate] and filter[endDate]. The list covers every project in the tenant; access is granted by the endpoint's access task, not by project team membership. Projects whose status is 'Planning' or 'PlanningDraft' are always left out. Archived projects are left out unless you send filter[showArchivedProjects]=true.\n\nA row is computed, not stored, so it has no id. Every identifier on a row is the referenced record's UUID, under the name its list keys on (projectId, activityId, employeeId, ...), so a query joins those lists on it. To total revenue per project or month, page the collection and aggregate in your own code.","tags":["psa-project-revenues"]}},"/psa/team-members":{"get":{"operationId":"teamMembers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[psaProjectId]","in":"query","required":false,"description":"Filter psaProjectId (equality)","schema":{"type":"number"}},{"name":"filter[psaProjectId][ne]","in":"query","required":false,"description":"Filter psaProjectId (ne)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gt]","in":"query","required":false,"description":"Filter psaProjectId (gt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][gte]","in":"query","required":false,"description":"Filter psaProjectId (gte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lt]","in":"query","required":false,"description":"Filter psaProjectId (lt)","schema":{"type":"number"}},{"name":"filter[psaProjectId][lte]","in":"query","required":false,"description":"Filter psaProjectId (lte)","schema":{"type":"number"}},{"name":"filter[psaProjectId][in]","in":"query","required":false,"description":"Filter psaProjectId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][notIn]","in":"query","required":false,"description":"Filter psaProjectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectId][between]","in":"query","required":false,"description":"Filter psaProjectId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId]","in":"query","required":false,"description":"Filter employeeId (equality)","schema":{"type":"number"}},{"name":"filter[employeeId][ne]","in":"query","required":false,"description":"Filter employeeId (ne)","schema":{"type":"number"}},{"name":"filter[employeeId][gt]","in":"query","required":false,"description":"Filter employeeId (gt)","schema":{"type":"number"}},{"name":"filter[employeeId][gte]","in":"query","required":false,"description":"Filter employeeId (gte)","schema":{"type":"number"}},{"name":"filter[employeeId][lt]","in":"query","required":false,"description":"Filter employeeId (lt)","schema":{"type":"number"}},{"name":"filter[employeeId][lte]","in":"query","required":false,"description":"Filter employeeId (lte)","schema":{"type":"number"}},{"name":"filter[employeeId][in]","in":"query","required":false,"description":"Filter employeeId (in, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][notIn]","in":"query","required":false,"description":"Filter employeeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][between]","in":"query","required":false,"description":"Filter employeeId (between, comma-separated)","schema":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isTeamLead]","in":"query","required":false,"description":"Filter isTeamLead (equality)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][ne]","in":"query","required":false,"description":"Filter isTeamLead (ne)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][gt]","in":"query","required":false,"description":"Filter isTeamLead (gt)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][gte]","in":"query","required":false,"description":"Filter isTeamLead (gte)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][lt]","in":"query","required":false,"description":"Filter isTeamLead (lt)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][lte]","in":"query","required":false,"description":"Filter isTeamLead (lte)","schema":{"type":"boolean"}},{"name":"filter[isTeamLead][in]","in":"query","required":false,"description":"Filter isTeamLead (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isTeamLead][notIn]","in":"query","required":false,"description":"Filter isTeamLead (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isTeamLead][between]","in":"query","required":false,"description":"Filter isTeamLead (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["psaProjectId","-psaProjectId","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","psaProjectId","employeeId","isTeamLead","startDate","endDate","allocation","name","displayName","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/teamMembersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List team members","description":"Lists team members. Each team member is one person on one PSA project's team. To find who fills which project position, use GET psa/team-member-positions.","tags":["psa-team-members"]}},"/psa/project-types":{"get":{"operationId":"projectTypes","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/projectTypesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"examples":{"example":{"value":{"data":[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","name":"Retainer","lastModifiedDate":"2026-05-12T09:30:00.000Z"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","name":"Fixed Bid","lastModifiedDate":"2026-05-12T09:30:01.000Z"}],"pagination":{"hasMore":false}}}}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List project types","description":"Lists project types. Project types can't be filtered by name, and no other endpoint finds a project type by name.","tags":["psa-project-types"]},"post":{"operationId":"createProjectType","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createProjectTypeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DUPLICATE_NAME","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DUPLICATE_NAME"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false,"required":["name"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createProjectTypeInput"}}}},"summary":"Create a project type","description":"Creates a project type. The response contains only the new project type's id. Read the project type with GET psa/project-types/:id.\n\nTo create several project types in one request, use POST psa/project-types/bulk.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-project-types"]}},"/psa/expenses/budgets":{"get":{"operationId":"getExpenseBudgets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getExpenseBudgetsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"psaProjectId","in":"query","required":true,"schema":{"type":"number"},"description":"The id of the PSA project. It is the numeric key, not the UUID that GET psa/projects/:id takes.","example":32341},{"name":"isDefault","in":"query","required":false,"schema":{"type":"boolean"},"description":"When true, return only the project's default catch-all budget. When false or omitted, return all of the project's budgets. False does not filter to non-default budgets."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of budgets per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected.","example":50}],"summary":"List a project's expense budgets","description":"Lists the expense budgets defined for a PSA project. Send the project's numeric psaProjectId in the query string. You need view access to that project.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200, minimum 1) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response contains the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- Send `psaProjectId`, which is required. To get only the default budget, send `isDefault=true`.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["psa-expenses"]}},"/psa/milestones/{id}":{"get":{"operationId":"getMilestone","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getMilestoneOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the milestone you want to retrieve.","example":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}],"summary":"Retrieve a milestone","description":"Retrieves a milestone. The psaProjectId, invoiceId, productId, and productLineId on a milestone are numeric ids, not UUIDs, so you can't use them to read the project, invoice, product, or product line they point to.","tags":["psa-milestones"]}},"/psa/project-costs":{"get":{"operationId":"projectCosts","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[startDate]","in":"query","required":true,"x-parameter":true,"schema":{"type":"string","format":"date"},"description":"The first day of the period to report. Format YYYY-MM-DD. Required: send filter[startDate]=<date>; equality only."},{"name":"filter[endDate]","in":"query","required":true,"x-parameter":true,"schema":{"type":"string","format":"date"},"description":"The last day of the period to report, inclusive. Format YYYY-MM-DD. Required: send filter[endDate]=<date>; equality only."},{"name":"filter[showArchivedProjects]","in":"query","required":false,"x-parameter":true,"schema":{"type":"boolean"},"description":"When true, archived projects are included. Send filter[showArchivedProjects]=true."},{"name":"filter[date]","in":"query","required":false,"description":"Filter date (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[date][ne]","in":"query","required":false,"description":"Filter date (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[date][gt]","in":"query","required":false,"description":"Filter date (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[date][gte]","in":"query","required":false,"description":"Filter date (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[date][lt]","in":"query","required":false,"description":"Filter date (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[date][lte]","in":"query","required":false,"description":"Filter date (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[date][in]","in":"query","required":false,"description":"Filter date (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[date][notIn]","in":"query","required":false,"description":"Filter date (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[date][between]","in":"query","required":false,"description":"Filter date (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[month]","in":"query","required":false,"description":"Filter month (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[month][ne]","in":"query","required":false,"description":"Filter month (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[month][gt]","in":"query","required":false,"description":"Filter month (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[month][gte]","in":"query","required":false,"description":"Filter month (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[month][lt]","in":"query","required":false,"description":"Filter month (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[month][lte]","in":"query","required":false,"description":"Filter month (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[month][in]","in":"query","required":false,"description":"Filter month (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[month][notIn]","in":"query","required":false,"description":"Filter month (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[month][between]","in":"query","required":false,"description":"Filter month (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type]","in":"query","required":false,"description":"Filter type (equality)","schema":{"type":"string"}},{"name":"filter[type][ne]","in":"query","required":false,"description":"Filter type (ne)","schema":{"type":"string"}},{"name":"filter[type][gt]","in":"query","required":false,"description":"Filter type (gt)","schema":{"type":"string"}},{"name":"filter[type][gte]","in":"query","required":false,"description":"Filter type (gte)","schema":{"type":"string"}},{"name":"filter[type][lt]","in":"query","required":false,"description":"Filter type (lt)","schema":{"type":"string"}},{"name":"filter[type][lte]","in":"query","required":false,"description":"Filter type (lte)","schema":{"type":"string"}},{"name":"filter[type][in]","in":"query","required":false,"description":"Filter type (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][notIn]","in":"query","required":false,"description":"Filter type (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[type][between]","in":"query","required":false,"description":"Filter type (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[type][like]","in":"query","required":false,"description":"Filter type (like)","schema":{"type":"string"}},{"name":"filter[currency]","in":"query","required":false,"description":"Filter currency (equality)","schema":{"type":"string"}},{"name":"filter[currency][ne]","in":"query","required":false,"description":"Filter currency (ne)","schema":{"type":"string"}},{"name":"filter[currency][gt]","in":"query","required":false,"description":"Filter currency (gt)","schema":{"type":"string"}},{"name":"filter[currency][gte]","in":"query","required":false,"description":"Filter currency (gte)","schema":{"type":"string"}},{"name":"filter[currency][lt]","in":"query","required":false,"description":"Filter currency (lt)","schema":{"type":"string"}},{"name":"filter[currency][lte]","in":"query","required":false,"description":"Filter currency (lte)","schema":{"type":"string"}},{"name":"filter[currency][in]","in":"query","required":false,"description":"Filter currency (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][notIn]","in":"query","required":false,"description":"Filter currency (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[currency][between]","in":"query","required":false,"description":"Filter currency (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[currency][like]","in":"query","required":false,"description":"Filter currency (like)","schema":{"type":"string"}},{"name":"filter[planned]","in":"query","required":false,"description":"Filter planned (equality)","schema":{"type":"boolean"}},{"name":"filter[planned][ne]","in":"query","required":false,"description":"Filter planned (ne)","schema":{"type":"boolean"}},{"name":"filter[planned][gt]","in":"query","required":false,"description":"Filter planned (gt)","schema":{"type":"boolean"}},{"name":"filter[planned][gte]","in":"query","required":false,"description":"Filter planned (gte)","schema":{"type":"boolean"}},{"name":"filter[planned][lt]","in":"query","required":false,"description":"Filter planned (lt)","schema":{"type":"boolean"}},{"name":"filter[planned][lte]","in":"query","required":false,"description":"Filter planned (lte)","schema":{"type":"boolean"}},{"name":"filter[planned][in]","in":"query","required":false,"description":"Filter planned (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[planned][notIn]","in":"query","required":false,"description":"Filter planned (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[planned][between]","in":"query","required":false,"description":"Filter planned (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectId]","in":"query","required":false,"description":"Filter projectId (equality)","schema":{"type":"string"}},{"name":"filter[projectId][ne]","in":"query","required":false,"description":"Filter projectId (ne)","schema":{"type":"string"}},{"name":"filter[projectId][gt]","in":"query","required":false,"description":"Filter projectId (gt)","schema":{"type":"string"}},{"name":"filter[projectId][gte]","in":"query","required":false,"description":"Filter projectId (gte)","schema":{"type":"string"}},{"name":"filter[projectId][lt]","in":"query","required":false,"description":"Filter projectId (lt)","schema":{"type":"string"}},{"name":"filter[projectId][lte]","in":"query","required":false,"description":"Filter projectId (lte)","schema":{"type":"string"}},{"name":"filter[projectId][in]","in":"query","required":false,"description":"Filter projectId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectId][notIn]","in":"query","required":false,"description":"Filter projectId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectId][between]","in":"query","required":false,"description":"Filter projectId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectId][like]","in":"query","required":false,"description":"Filter projectId (like)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory]","in":"query","required":false,"description":"Filter psaProjectCategory (equality)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][ne]","in":"query","required":false,"description":"Filter psaProjectCategory (ne)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][gt]","in":"query","required":false,"description":"Filter psaProjectCategory (gt)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][gte]","in":"query","required":false,"description":"Filter psaProjectCategory (gte)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][lt]","in":"query","required":false,"description":"Filter psaProjectCategory (lt)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][lte]","in":"query","required":false,"description":"Filter psaProjectCategory (lte)","schema":{"type":"string"}},{"name":"filter[psaProjectCategory][in]","in":"query","required":false,"description":"Filter psaProjectCategory (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectCategory][notIn]","in":"query","required":false,"description":"Filter psaProjectCategory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectCategory][between]","in":"query","required":false,"description":"Filter psaProjectCategory (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[psaProjectCategory][like]","in":"query","required":false,"description":"Filter psaProjectCategory (like)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus]","in":"query","required":false,"description":"Filter psaProjectStatus (equality)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][ne]","in":"query","required":false,"description":"Filter psaProjectStatus (ne)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][gt]","in":"query","required":false,"description":"Filter psaProjectStatus (gt)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][gte]","in":"query","required":false,"description":"Filter psaProjectStatus (gte)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][lt]","in":"query","required":false,"description":"Filter psaProjectStatus (lt)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][lte]","in":"query","required":false,"description":"Filter psaProjectStatus (lte)","schema":{"type":"string"}},{"name":"filter[psaProjectStatus][in]","in":"query","required":false,"description":"Filter psaProjectStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectStatus][notIn]","in":"query","required":false,"description":"Filter psaProjectStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectStatus][between]","in":"query","required":false,"description":"Filter psaProjectStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[psaProjectStatus][like]","in":"query","required":false,"description":"Filter psaProjectStatus (like)","schema":{"type":"string"}},{"name":"filter[psaProjectInvoiced]","in":"query","required":false,"description":"Filter psaProjectInvoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][ne]","in":"query","required":false,"description":"Filter psaProjectInvoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][gt]","in":"query","required":false,"description":"Filter psaProjectInvoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][gte]","in":"query","required":false,"description":"Filter psaProjectInvoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][lt]","in":"query","required":false,"description":"Filter psaProjectInvoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][lte]","in":"query","required":false,"description":"Filter psaProjectInvoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[psaProjectInvoiced][in]","in":"query","required":false,"description":"Filter psaProjectInvoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectInvoiced][notIn]","in":"query","required":false,"description":"Filter psaProjectInvoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[psaProjectInvoiced][between]","in":"query","required":false,"description":"Filter psaProjectInvoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId]","in":"query","required":false,"description":"Filter departmentId (equality)","schema":{"type":"string"}},{"name":"filter[departmentId][ne]","in":"query","required":false,"description":"Filter departmentId (ne)","schema":{"type":"string"}},{"name":"filter[departmentId][gt]","in":"query","required":false,"description":"Filter departmentId (gt)","schema":{"type":"string"}},{"name":"filter[departmentId][gte]","in":"query","required":false,"description":"Filter departmentId (gte)","schema":{"type":"string"}},{"name":"filter[departmentId][lt]","in":"query","required":false,"description":"Filter departmentId (lt)","schema":{"type":"string"}},{"name":"filter[departmentId][lte]","in":"query","required":false,"description":"Filter departmentId (lte)","schema":{"type":"string"}},{"name":"filter[departmentId][in]","in":"query","required":false,"description":"Filter departmentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][notIn]","in":"query","required":false,"description":"Filter departmentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[departmentId][between]","in":"query","required":false,"description":"Filter departmentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[departmentId][like]","in":"query","required":false,"description":"Filter departmentId (like)","schema":{"type":"string"}},{"name":"filter[projectTypeId]","in":"query","required":false,"description":"Filter projectTypeId (equality)","schema":{"type":"string"}},{"name":"filter[projectTypeId][ne]","in":"query","required":false,"description":"Filter projectTypeId (ne)","schema":{"type":"string"}},{"name":"filter[projectTypeId][gt]","in":"query","required":false,"description":"Filter projectTypeId (gt)","schema":{"type":"string"}},{"name":"filter[projectTypeId][gte]","in":"query","required":false,"description":"Filter projectTypeId (gte)","schema":{"type":"string"}},{"name":"filter[projectTypeId][lt]","in":"query","required":false,"description":"Filter projectTypeId (lt)","schema":{"type":"string"}},{"name":"filter[projectTypeId][lte]","in":"query","required":false,"description":"Filter projectTypeId (lte)","schema":{"type":"string"}},{"name":"filter[projectTypeId][in]","in":"query","required":false,"description":"Filter projectTypeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectTypeId][notIn]","in":"query","required":false,"description":"Filter projectTypeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectTypeId][between]","in":"query","required":false,"description":"Filter projectTypeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectTypeId][like]","in":"query","required":false,"description":"Filter projectTypeId (like)","schema":{"type":"string"}},{"name":"filter[customerId]","in":"query","required":false,"description":"Filter customerId (equality)","schema":{"type":"string"}},{"name":"filter[customerId][ne]","in":"query","required":false,"description":"Filter customerId (ne)","schema":{"type":"string"}},{"name":"filter[customerId][gt]","in":"query","required":false,"description":"Filter customerId (gt)","schema":{"type":"string"}},{"name":"filter[customerId][gte]","in":"query","required":false,"description":"Filter customerId (gte)","schema":{"type":"string"}},{"name":"filter[customerId][lt]","in":"query","required":false,"description":"Filter customerId (lt)","schema":{"type":"string"}},{"name":"filter[customerId][lte]","in":"query","required":false,"description":"Filter customerId (lte)","schema":{"type":"string"}},{"name":"filter[customerId][in]","in":"query","required":false,"description":"Filter customerId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][notIn]","in":"query","required":false,"description":"Filter customerId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customerId][between]","in":"query","required":false,"description":"Filter customerId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customerId][like]","in":"query","required":false,"description":"Filter customerId (like)","schema":{"type":"string"}},{"name":"filter[entityId]","in":"query","required":false,"description":"Filter entityId (equality)","schema":{"type":"string"}},{"name":"filter[entityId][ne]","in":"query","required":false,"description":"Filter entityId (ne)","schema":{"type":"string"}},{"name":"filter[entityId][gt]","in":"query","required":false,"description":"Filter entityId (gt)","schema":{"type":"string"}},{"name":"filter[entityId][gte]","in":"query","required":false,"description":"Filter entityId (gte)","schema":{"type":"string"}},{"name":"filter[entityId][lt]","in":"query","required":false,"description":"Filter entityId (lt)","schema":{"type":"string"}},{"name":"filter[entityId][lte]","in":"query","required":false,"description":"Filter entityId (lte)","schema":{"type":"string"}},{"name":"filter[entityId][in]","in":"query","required":false,"description":"Filter entityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][notIn]","in":"query","required":false,"description":"Filter entityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[entityId][between]","in":"query","required":false,"description":"Filter entityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[entityId][like]","in":"query","required":false,"description":"Filter entityId (like)","schema":{"type":"string"}},{"name":"filter[activityId]","in":"query","required":false,"description":"Filter activityId (equality)","schema":{"type":"string"}},{"name":"filter[activityId][ne]","in":"query","required":false,"description":"Filter activityId (ne)","schema":{"type":"string"}},{"name":"filter[activityId][gt]","in":"query","required":false,"description":"Filter activityId (gt)","schema":{"type":"string"}},{"name":"filter[activityId][gte]","in":"query","required":false,"description":"Filter activityId (gte)","schema":{"type":"string"}},{"name":"filter[activityId][lt]","in":"query","required":false,"description":"Filter activityId (lt)","schema":{"type":"string"}},{"name":"filter[activityId][lte]","in":"query","required":false,"description":"Filter activityId (lte)","schema":{"type":"string"}},{"name":"filter[activityId][in]","in":"query","required":false,"description":"Filter activityId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[activityId][notIn]","in":"query","required":false,"description":"Filter activityId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[activityId][between]","in":"query","required":false,"description":"Filter activityId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[activityId][like]","in":"query","required":false,"description":"Filter activityId (like)","schema":{"type":"string"}},{"name":"filter[projectActivityBillable]","in":"query","required":false,"description":"Filter projectActivityBillable (equality)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][ne]","in":"query","required":false,"description":"Filter projectActivityBillable (ne)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][gt]","in":"query","required":false,"description":"Filter projectActivityBillable (gt)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][gte]","in":"query","required":false,"description":"Filter projectActivityBillable (gte)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][lt]","in":"query","required":false,"description":"Filter projectActivityBillable (lt)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][lte]","in":"query","required":false,"description":"Filter projectActivityBillable (lte)","schema":{"type":"boolean"}},{"name":"filter[projectActivityBillable][in]","in":"query","required":false,"description":"Filter projectActivityBillable (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityBillable][notIn]","in":"query","required":false,"description":"Filter projectActivityBillable (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityBillable][between]","in":"query","required":false,"description":"Filter projectActivityBillable (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectActivityBillingType]","in":"query","required":false,"description":"Filter projectActivityBillingType (equality)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][ne]","in":"query","required":false,"description":"Filter projectActivityBillingType (ne)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][gt]","in":"query","required":false,"description":"Filter projectActivityBillingType (gt)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][gte]","in":"query","required":false,"description":"Filter projectActivityBillingType (gte)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][lt]","in":"query","required":false,"description":"Filter projectActivityBillingType (lt)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][lte]","in":"query","required":false,"description":"Filter projectActivityBillingType (lte)","schema":{"type":"string"}},{"name":"filter[projectActivityBillingType][in]","in":"query","required":false,"description":"Filter projectActivityBillingType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityBillingType][notIn]","in":"query","required":false,"description":"Filter projectActivityBillingType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityBillingType][between]","in":"query","required":false,"description":"Filter projectActivityBillingType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectActivityBillingType][like]","in":"query","required":false,"description":"Filter projectActivityBillingType (like)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory]","in":"query","required":false,"description":"Filter projectActivityCategory (equality)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][ne]","in":"query","required":false,"description":"Filter projectActivityCategory (ne)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][gt]","in":"query","required":false,"description":"Filter projectActivityCategory (gt)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][gte]","in":"query","required":false,"description":"Filter projectActivityCategory (gte)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][lt]","in":"query","required":false,"description":"Filter projectActivityCategory (lt)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][lte]","in":"query","required":false,"description":"Filter projectActivityCategory (lte)","schema":{"type":"string"}},{"name":"filter[projectActivityCategory][in]","in":"query","required":false,"description":"Filter projectActivityCategory (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityCategory][notIn]","in":"query","required":false,"description":"Filter projectActivityCategory (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityCategory][between]","in":"query","required":false,"description":"Filter projectActivityCategory (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[projectActivityCategory][like]","in":"query","required":false,"description":"Filter projectActivityCategory (like)","schema":{"type":"string"}},{"name":"filter[projectActivityInvoiced]","in":"query","required":false,"description":"Filter projectActivityInvoiced (equality)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][ne]","in":"query","required":false,"description":"Filter projectActivityInvoiced (ne)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][gt]","in":"query","required":false,"description":"Filter projectActivityInvoiced (gt)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][gte]","in":"query","required":false,"description":"Filter projectActivityInvoiced (gte)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][lt]","in":"query","required":false,"description":"Filter projectActivityInvoiced (lt)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][lte]","in":"query","required":false,"description":"Filter projectActivityInvoiced (lte)","schema":{"type":"boolean"}},{"name":"filter[projectActivityInvoiced][in]","in":"query","required":false,"description":"Filter projectActivityInvoiced (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityInvoiced][notIn]","in":"query","required":false,"description":"Filter projectActivityInvoiced (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[projectActivityInvoiced][between]","in":"query","required":false,"description":"Filter projectActivityInvoiced (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId]","in":"query","required":false,"description":"Filter employeeId (equality)","schema":{"type":"string"}},{"name":"filter[employeeId][ne]","in":"query","required":false,"description":"Filter employeeId (ne)","schema":{"type":"string"}},{"name":"filter[employeeId][gt]","in":"query","required":false,"description":"Filter employeeId (gt)","schema":{"type":"string"}},{"name":"filter[employeeId][gte]","in":"query","required":false,"description":"Filter employeeId (gte)","schema":{"type":"string"}},{"name":"filter[employeeId][lt]","in":"query","required":false,"description":"Filter employeeId (lt)","schema":{"type":"string"}},{"name":"filter[employeeId][lte]","in":"query","required":false,"description":"Filter employeeId (lte)","schema":{"type":"string"}},{"name":"filter[employeeId][in]","in":"query","required":false,"description":"Filter employeeId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][notIn]","in":"query","required":false,"description":"Filter employeeId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[employeeId][between]","in":"query","required":false,"description":"Filter employeeId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[employeeId][like]","in":"query","required":false,"description":"Filter employeeId (like)","schema":{"type":"string"}},{"name":"filter[submissionStatus]","in":"query","required":false,"description":"Filter submissionStatus (equality)","schema":{"type":"string"}},{"name":"filter[submissionStatus][ne]","in":"query","required":false,"description":"Filter submissionStatus (ne)","schema":{"type":"string"}},{"name":"filter[submissionStatus][gt]","in":"query","required":false,"description":"Filter submissionStatus (gt)","schema":{"type":"string"}},{"name":"filter[submissionStatus][gte]","in":"query","required":false,"description":"Filter submissionStatus (gte)","schema":{"type":"string"}},{"name":"filter[submissionStatus][lt]","in":"query","required":false,"description":"Filter submissionStatus (lt)","schema":{"type":"string"}},{"name":"filter[submissionStatus][lte]","in":"query","required":false,"description":"Filter submissionStatus (lte)","schema":{"type":"string"}},{"name":"filter[submissionStatus][in]","in":"query","required":false,"description":"Filter submissionStatus (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionStatus][notIn]","in":"query","required":false,"description":"Filter submissionStatus (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[submissionStatus][between]","in":"query","required":false,"description":"Filter submissionStatus (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[submissionStatus][like]","in":"query","required":false,"description":"Filter submissionStatus (like)","schema":{"type":"string"}},{"name":"filter[billableExpense]","in":"query","required":false,"description":"Filter billableExpense (equality)","schema":{"type":"string"}},{"name":"filter[billableExpense][ne]","in":"query","required":false,"description":"Filter billableExpense (ne)","schema":{"type":"string"}},{"name":"filter[billableExpense][gt]","in":"query","required":false,"description":"Filter billableExpense (gt)","schema":{"type":"string"}},{"name":"filter[billableExpense][gte]","in":"query","required":false,"description":"Filter billableExpense (gte)","schema":{"type":"string"}},{"name":"filter[billableExpense][lt]","in":"query","required":false,"description":"Filter billableExpense (lt)","schema":{"type":"string"}},{"name":"filter[billableExpense][lte]","in":"query","required":false,"description":"Filter billableExpense (lte)","schema":{"type":"string"}},{"name":"filter[billableExpense][in]","in":"query","required":false,"description":"Filter billableExpense (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billableExpense][notIn]","in":"query","required":false,"description":"Filter billableExpense (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[billableExpense][between]","in":"query","required":false,"description":"Filter billableExpense (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[billableExpense][like]","in":"query","required":false,"description":"Filter billableExpense (like)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["date","-date","month","-month","type","-type","amount","-amount","currency","-currency","planned","-planned","psaProjectCategory","-psaProjectCategory","psaProjectStatus","-psaProjectStatus"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["date","month","type","amount","currency","planned","projectId","projectName","psaProjectCategory","psaProjectStatus","psaProjectInvoiced","psaProjectBudgetAmount","psaProjectBudgetCurrency","departmentId","salesRepresentativeId","projectTypeId","psaProjectTypeName","salesArrangementId","customerId","entityId","salesArrangementEntityName","client","customerCustomerSegment","customerCountry","activityId","projectActivityName","projectActivityBillable","projectActivityBillingType","projectActivityCategory","projectActivityInvoiced","employeeId","memberEmployeeName","employeeDisplayName","employeeEmploymentType","employeeEmploymentCategory","submissionStatus","billableExpense"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/projectCostsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List project cost","description":"Lists PSA project cost rows dated between startDate and endDate, both required and sent as filter[startDate] and filter[endDate]. The list covers every project in the tenant; access is granted by the endpoint's access task, not by project team membership. Projects whose status is 'Planning' or 'PlanningDraft' are always left out. Archived projects are left out unless you send filter[showArchivedProjects]=true.\n\nA row is computed, not stored, so it has no id. Every identifier on a row is the referenced record's UUID, under the name its list keys on (projectId, activityId, employeeId, ...), so a query joins those lists on it. To total cost per project or month, page the collection and aggregate in your own code.","tags":["psa-project-costs"]}},"/psa/time-entries/submit":{"post":{"operationId":"submitTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/submitTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_STATUS_INVALID, FUTURE_WEEK_NOT_SUBMITTABLE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUTURE_WEEK_NOT_SUBMITTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["id","date"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUTURE_WEEK_NOT_SUBMITTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["id","date"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_STATUS_INVALID"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"submissionStatus":{"type":"string"}},"additionalProperties":false,"required":["id","submissionStatus"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"FUTURE_WEEK_NOT_SUBMITTABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","format":"date"}},"additionalProperties":false,"required":["id","date"]}}},"additionalProperties":false,"required":["entries"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitTimeEntriesInput"}}}},"summary":"Submit time entries","description":"Submits time entries for approval. Each time entry's status changes to 'pending', and its submissionDate is set to the current date in UTC. Time entries go from 'draft' to 'pending' to 'approved' to 'submittedForInvoicing' to 'invoiced', and a 'pending' time entry can be 'rejected' instead.\n\nYou can submit a time entry that is 'draft' or 'rejected'. If any time entry is 'pending', 'approved', 'submittedForInvoicing', or 'invoiced', the request fails with ENTRY_STATUS_INVALID and none are submitted. The request also fails if ids is empty, or with a generic error when a time entry's team is not active.\n\nTo change an approved time entry, correct it with PATCH psa/time-entries, which returns it to 'draft'.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/team-member-positions/{id}":{"get":{"operationId":"getTeamMemberPosition","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTeamMemberPositionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the position assignment you want to retrieve.","example":"c81b0a52-7de4-4f16-9b32-0a5e8c7d4126"}],"summary":"Retrieve a position assignment","description":"Retrieves a position assignment. A position assignment links one person or placeholder to one project position. For the people on a project's team, use GET psa/team-members.","tags":["psa-team-members"]}},"/psa/time-entries/delete":{"post":{"operationId":"deleteTimeEntries","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteTimeEntriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, ENTRY_INVOICED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTRY_INVOICED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/deleteTimeEntriesInput"}}}},"summary":"Delete time entries","description":"Deletes one or more time entries. Only the time entries you name are deleted. If any time entry can't be deleted, none are.\n\nA time entry with status 'submittedForInvoicing' or 'invoiced' can't be deleted, and the request fails with ENTRY_INVOICED. The request also fails with a generic error when a time entry belongs to a project whose team is not active.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["psa-time-entries"]}},"/psa/allocations/{id}":{"get":{"operationId":"getAllocation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getAllocationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the allocation you want to retrieve.","example":"6f3c1f0e-6a2b-4d5e-9c11-2b7a8e4d0f13"}],"summary":"Retrieve an allocation","description":"Retrieves an allocation. The ids that link an allocation to other records (memberId, employeeId, projectActivityId, projectPositionId, and psaProjectId) are numeric, not UUIDs. You can't use them with the GET endpoints for team members, activities, positions, or projects.","tags":["psa-allocations"]}},"/psa/time-entries/{id}":{"get":{"operationId":"getTimeEntry","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getTimeEntryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the time entry you want to retrieve.","example":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}],"summary":"Retrieve a time entry","description":"Retrieves a time entry. The response has the same fields as each time entry from GET psa/time-entries.\n\nSome time entries come back with fewer fields. That happens when the time entry's project is in the 'Planning' or 'PlanningDraft' status, or when you call as a user who is not a team member of the project and not a super admin. A system access token is not limited by team membership. The response then leaves out psaProjectId, projectName, psaProjectStatus, projectPositionId, projectPositionName, memberEmployeeId, memberEmployeeName, projectActivityName, billableHours, nonBillableHours, internalValuableHours, and internalNonValuableHours.","tags":["psa-time-entries"]}},"/value-accounting/categories/search":{"post":{"operationId":"searchCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchCategoriesInput"}}}},"summary":"Search value accounting categories by name — the exact name, or any category whose name contains a fragment. Read-only, cursor-paginated. A category is the grouping label value objects, custom value objects and value centers are filed under. Use filters.name to resolve a full name to its id (the name is this resource's unique semantic key, so at most one row matches) and filters.nameContains for a type-ahead: its sibling, the categories data-set (GET value-accounting/categories) can only filter on the EXACT name, which is why this target exists. Omitting filters entirely returns the whole catalog, paged, exactly as the list does. A filter matching nothing returns an empty items array with HTTP 200, never a 404 — 'no category by that name' and 'no categories at all' are both simply empty. Rows carry the same fields as getCategory (GET value-accounting/categories/:id). POST rather than GET because a free-text fragment does not belong in a URL.","description":"Finds categories by name — either the exact name, or any category whose name contains a fragment, matched case-insensitively.\n\nUse `filters.name` when you hold the name a caller typed and want the one category that holds it: the name is this resource's unique semantic key, so an exact match returns at most one row. Use `filters.nameContains` for a type-ahead or a fuzzy lookup; the routed list's `filter[name][eq]` cannot do that, which is the reason this target exists beside it.\n\nAn empty `filters` is a valid request for the whole catalog, paged. A filter that matches nothing returns an empty `items` array with HTTP 200 — not a 404: a name matching no category and a catalog with no categories are both simply empty.\n\nRows carry the same fields as getCategory (GET value-accounting/categories/:id), so a search result can be used wherever a fetched category can.","tags":["valueAccountingCategories"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/base/custom-dimensions":{"get":{"operationId":"listCustomDimensions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listCustomDimensionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of dimensions per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request. A cursor is bound to this endpoint: one issued by any other endpoint, or altered by hand, fails with INVALID_CURSOR rather than restarting at the first page."}],"summary":"List custom dimensions","description":"Lists custom dimensions. A custom dimension is a reporting-tag category defined in your tenant, beyond the ten built-in ones such as department, region, and customer.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- It takes no filters.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.\n\nTo list the values inside one dimension, use listCustomDimensionValues (GET base/custom-dimensions/:customDimensionUuid/values).","tags":["baseReportingTags"]}},"/base/custom-dimensions/{customDimensionUuid}/values":{"get":{"operationId":"listCustomDimensionValues","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/listCustomDimensionValuesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customDimensionUuid":{"type":"string"}},"additionalProperties":false,"required":["customDimensionUuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customDimensionUuid":{"type":"string"}},"additionalProperties":false,"required":["customDimensionUuid"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string"}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"customDimensionUuid","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the custom value dimension whose values you want to retrieve. Take it from the customDimensionUuid of a record from listCustomDimensions (GET base/custom-dimensions). The identifier is matched case-insensitively and returned in canonical lowercase."},{"name":"includeInactive","in":"query","required":false,"schema":{"type":"boolean"},"description":"Whether to include values that are no longer active. Defaults to false."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"},"description":"The number of values per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous response's data.pagination.nextCursor. Omit on the first request. A cursor is bound to this endpoint and to the dimension in the path: one issued by listCustomDimensions (GET base/custom-dimensions), by another dimension's values, or altered by hand fails with INVALID_CURSOR rather than restarting at the first page."}],"summary":"List a custom dimension's values","description":"Lists a custom dimension's values. Inactive values — those whose end date has passed — are left out unless `includeInactive` is `true`; a value with a future end date is active and listed. Each value has the `modelUuid` that resolveReportingTags (POST base/reporting-tags/resolve) accepts. Use listCustomDimensions (GET base/custom-dimensions) first to learn which dimension identifiers exist.\n\nThis endpoint does not follow the standard collection rules in Pagination and querying.\n\n- Page with `pageSize` (default 50, maximum 200) and `cursor`, not `page[size]` and `page[cursor]`.\n- The response has the records in `data.items` and the next page's cursor in `data.pagination.nextCursor`.\n- The only filter is `includeInactive`.\n- There is no `sort` or `fields`.\n\nThis endpoint ignores any query parameter it does not declare, and returns no error. A request that follows the standard rules therefore gets the first page, unfiltered, every time.","tags":["baseReportingTags"]}},"/value-accounting/driver-values/bulk":{"post":{"operationId":"bulkRecordDriverValues","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkRecordDriverValuesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DRIVER_NOT_FOUND, ENTITY_NOT_FOUND, BOOK_NOT_FOUND, PERIOD_NOT_FOUND, UNSUPPORTED_DIMENSION_CODE, MEMBER_NOT_FOUND, MEMBER_NAME_REQUIRED, VALUE_NOT_FOUND, EDIT_VALUE_MISMATCH, COMBO_EXISTS, SYSTEM_DRIVER, INVALID_VALUE, PERIOD_CALENDAR_MISMATCH, DRIVER_INACTIVE, MEMBER_REQUIRED, MEMBERS_INCOMPLETE, MEMBER_DIMENSION_MISMATCH, MEMBER_DUPLICATE_DIMENSION, VALUE_CENTER_DISABLED, PERIOD_LOCKED, BOOK_HAS_NO_CALENDAR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this endpoint accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the member that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the nameless record."},"id":{"type":"string","description":"Id (a UUID) of the nameless record."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EDIT_VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that was refused."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_HAS_NO_CALENDAR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this endpoint accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the member that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the nameless record."},"id":{"type":"string","description":"Id (a UUID) of the nameless record."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EDIT_VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that was refused."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_HAS_NO_CALENDAR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this endpoint accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the member that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the nameless record."},"id":{"type":"string","description":"Id (a UUID) of the nameless record."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EDIT_VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that was refused."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_HAS_NO_CALENDAR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkRecordDriverValuesInput"}}}},"summary":"Record or correct many business driver values for ONE driver, entity and book in one call; returns their ids in the order sent. WRITES. Each row of driverValues is one recording as recordDriverValue (POST value-accounting/driver-values) takes it — period, value, the full member combination as {dimensionCode, id}, optional editValueId. The rows are applied NEWEST PERIOD FIRST whatever their order, so the outcome never depends on the order sent. propagate is two-valued here: omitted means false, and no row is withheld for a propagation decision. Every declared refusal — unknown ids, an editValueId of another context or period, a moved value landing on an occupied combination, a system driver (SYSTEM_DRIVER), an inactive driver, a value that is not a number, incomplete members, a period of another calendar, a locked or future period — is checked for the WHOLE batch before the first write, so a refusal means nothing was written.","description":"Records or corrects MANY business driver values for one driver, entity and book in one call, and returns their ids in the order you sent the rows.\n\nEach row of `driverValues` is one recording exactly as recordDriverValue (POST value-accounting/driver-values) takes it — period, value, the full member combination, optionally `editValueId` — minus the shared driver, entity and book.\n\nThe flow applies the rows NEWEST PERIOD FIRST, whatever order you send them in, so the result never depends on your order: an earlier period's As-of value cannot overwrite the carried rows a later row of the same batch has just set.\n\n`propagate` is two-valued here: a batch has no prompt, so leaving it out means false and no row is ever withheld.\n\nEvery refusal this endpoint declares is checked for the WHOLE batch before the first write, including `SYSTEM_DRIVER`, so a refusal means nothing was written.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingDriverValues"]}},"/base/reporting-tags/resolve":{"post":{"operationId":"resolveReportingTags","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/resolveReportingTagsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNSUPPORTED_DIMENSION_CODE, TOO_MANY_REFERENCES","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string"},"supportedDimensionCodes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number"},"maximum":{"type":"number"}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string"},"supportedDimensionCodes":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"provided":{"type":"number"},"maximum":{"type":"number"}},"additionalProperties":false,"required":["provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/resolveReportingTagsInput"}}}},"summary":"Resolve reporting tag references","description":"Resolves reporting tag references into their display names. Each reference is a `dimensionCode` and `modelUuid` pair. A `modelUuid` is unique only within its dimension, so you need both to identify a tag.\n\nReferences that don't resolve are left out of the response, so match results by the pair, not by position. A `modelUuid` is matched case-insensitively and every row carries it in canonical lowercase, so match results against the lowercased form of what you sent. Send at most 100 references per request.\n\nUse it when you hold many references at once, such as the tags on a list of journal entries. It doesn't list tag values. To find a custom dimension's values, use listCustomDimensionValues (GET base/custom-dimensions/:customDimensionUuid/values).","tags":["baseReportingTags"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/value-accounting/business-drivers/search":{"post":{"operationId":"searchBusinessDrivers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchBusinessDriversOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR, INVALID_CALCULATION_TYPE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CALCULATION_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"calculationType":{"type":"string","description":"The calculation type that was refused, exactly as it was sent."},"acceptedValues":{"type":"array","items":{"type":"string"},"description":"The accepted calculation types."}},"additionalProperties":false,"required":["calculationType","acceptedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CALCULATION_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"calculationType":{"type":"string","description":"The calculation type that was refused, exactly as it was sent."},"acceptedValues":{"type":"array","items":{"type":"string"},"description":"The accepted calculation types."}},"additionalProperties":false,"required":["calculationType","acceptedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchBusinessDriversInput"}}}},"summary":"Search the business driver definitions by a fragment of their name (case-insensitive), their active state, their calculation type, a dimension they declare, or the unit they are measured in. Read-only, cursor-paginated. Every filter member is optional and they combine with AND; omitting filters returns every driver, paged. filters.dimensionUrn finds the drivers whose values are broken down by that dimension — something the businessDrivers data-set (GET value-accounting/business-drivers) cannot filter on. A filter matching nothing returns an empty items array with HTTP 200, never a 404; only a calculationType other than 'asOf' or 'cumulative' is refused, with INVALID_CALCULATION_TYPE. Rows carry the same fields as getBusinessDriver (GET value-accounting/business-drivers/:id), dimensions included. POST rather than GET because a free-text fragment does not belong in a URL.","description":"Finds business driver definitions by a name fragment (case-insensitive), their active state, their calculation type, a dimension they declare, or the unit they are measured in. Every filter member is optional and they combine with AND.\n\nUse `filters.dimensionUrn` to answer \"which drivers can carry a breakdown by Department\" — the list cannot, because the dimension set is a list and not a column. The custom-dimension URN matches every driver declaring any custom dimension.\n\nAn empty `filters` is a valid request for every driver, paged. A filter that matches nothing returns an empty `items` array with HTTP 200 — not a 404; that includes a `unitId` naming no unit. Only a `calculationType` outside the two accepted values is refused (`INVALID_CALCULATION_TYPE`), so a typo is not mistaken for an empty result.\n\nRows carry the same fields as getBusinessDriver (GET value-accounting/business-drivers/:id), dimensions included.","tags":["valueAccountingBusinessDrivers"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/value-accounting/business-drivers":{"get":{"operationId":"businessDrivers","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[calculationType]","in":"query","required":false,"description":"Filter calculationType (equality)","schema":{"type":"string"}},{"name":"filter[calculationType][ne]","in":"query","required":false,"description":"Filter calculationType (ne)","schema":{"type":"string"}},{"name":"filter[calculationType][gt]","in":"query","required":false,"description":"Filter calculationType (gt)","schema":{"type":"string"}},{"name":"filter[calculationType][gte]","in":"query","required":false,"description":"Filter calculationType (gte)","schema":{"type":"string"}},{"name":"filter[calculationType][lt]","in":"query","required":false,"description":"Filter calculationType (lt)","schema":{"type":"string"}},{"name":"filter[calculationType][lte]","in":"query","required":false,"description":"Filter calculationType (lte)","schema":{"type":"string"}},{"name":"filter[calculationType][in]","in":"query","required":false,"description":"Filter calculationType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[calculationType][notIn]","in":"query","required":false,"description":"Filter calculationType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[calculationType][between]","in":"query","required":false,"description":"Filter calculationType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[calculationType][like]","in":"query","required":false,"description":"Filter calculationType (like)","schema":{"type":"string"}},{"name":"filter[isActive]","in":"query","required":false,"description":"Filter isActive (equality)","schema":{"type":"boolean"}},{"name":"filter[isActive][ne]","in":"query","required":false,"description":"Filter isActive (ne)","schema":{"type":"boolean"}},{"name":"filter[isActive][gt]","in":"query","required":false,"description":"Filter isActive (gt)","schema":{"type":"boolean"}},{"name":"filter[isActive][gte]","in":"query","required":false,"description":"Filter isActive (gte)","schema":{"type":"boolean"}},{"name":"filter[isActive][lt]","in":"query","required":false,"description":"Filter isActive (lt)","schema":{"type":"boolean"}},{"name":"filter[isActive][lte]","in":"query","required":false,"description":"Filter isActive (lte)","schema":{"type":"boolean"}},{"name":"filter[isActive][in]","in":"query","required":false,"description":"Filter isActive (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][notIn]","in":"query","required":false,"description":"Filter isActive (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][between]","in":"query","required":false,"description":"Filter isActive (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isSystem]","in":"query","required":false,"description":"Filter isSystem (equality)","schema":{"type":"boolean"}},{"name":"filter[isSystem][ne]","in":"query","required":false,"description":"Filter isSystem (ne)","schema":{"type":"boolean"}},{"name":"filter[isSystem][gt]","in":"query","required":false,"description":"Filter isSystem (gt)","schema":{"type":"boolean"}},{"name":"filter[isSystem][gte]","in":"query","required":false,"description":"Filter isSystem (gte)","schema":{"type":"boolean"}},{"name":"filter[isSystem][lt]","in":"query","required":false,"description":"Filter isSystem (lt)","schema":{"type":"boolean"}},{"name":"filter[isSystem][lte]","in":"query","required":false,"description":"Filter isSystem (lte)","schema":{"type":"boolean"}},{"name":"filter[isSystem][in]","in":"query","required":false,"description":"Filter isSystem (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSystem][notIn]","in":"query","required":false,"description":"Filter isSystem (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isSystem][between]","in":"query","required":false,"description":"Filter isSystem (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitId]","in":"query","required":false,"description":"Filter unitId (equality)","schema":{"type":"string"}},{"name":"filter[unitId][ne]","in":"query","required":false,"description":"Filter unitId (ne)","schema":{"type":"string"}},{"name":"filter[unitId][gt]","in":"query","required":false,"description":"Filter unitId (gt)","schema":{"type":"string"}},{"name":"filter[unitId][gte]","in":"query","required":false,"description":"Filter unitId (gte)","schema":{"type":"string"}},{"name":"filter[unitId][lt]","in":"query","required":false,"description":"Filter unitId (lt)","schema":{"type":"string"}},{"name":"filter[unitId][lte]","in":"query","required":false,"description":"Filter unitId (lte)","schema":{"type":"string"}},{"name":"filter[unitId][in]","in":"query","required":false,"description":"Filter unitId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitId][notIn]","in":"query","required":false,"description":"Filter unitId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[unitId][between]","in":"query","required":false,"description":"Filter unitId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[unitId][like]","in":"query","required":false,"description":"Filter unitId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","calculationType","-calculationType","isActive","-isActive","isSystem","-isSystem","unitId","-unitId","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","calculationType","isActive","isSystem","unitId","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/businessDriversRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List the business driver definitions — the named measures such as headcount or machine hours that value accounting allocates by — one row per driver, with structured filters. GET data-set exposing filter[field][op]= (eq/ne/gt/gte/lt/lte/in/notIn/between/like), sort=name or sort=-lastModifiedDate, sparse fields=, and page[size]/page[cursor] cursor pagination. Returns active AND deactivated drivers — filter[isActive][eq]=true for the ones in use — because a deactivated driver keeps its recorded values and its name. Driver names are unique, so filter[name][eq]= resolves a name to its id; it compares the stored text exactly, case included — for a case-insensitive fragment use searchBusinessDrivers (POST value-accounting/business-drivers/search). The declared dimensions are not in this list (a list field cannot be a column): read them with getBusinessDriver (GET value-accounting/business-drivers/:id) or the search. Recorded values are not part of this resource.","tags":["valueAccountingBusinessDrivers"]},"post":{"operationId":"createBusinessDriver","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createBusinessDriverOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_TAKEN, NAME_TAKEN_DEACTIVATED, NAME_REQUIRED, INVALID_CALCULATION_TYPE, INVALID_DIMENSION, CUSTOM_VALUE_DIMENSION_NOT_FOUND, UNIT_NOT_FOUND, VALUE_CENTER_DISABLED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the driver that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN_DEACTIVATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the deactivated driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CALCULATION_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"calculationType":{"type":"string","description":"The calculation type that was refused, exactly as it was sent."},"acceptedValues":{"type":"array","items":{"type":"string"},"description":"The accepted calculation types."}},"additionalProperties":false,"required":["calculationType","acceptedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the offending entry in the submitted dimensions."},"dimensionUrn":{"type":"string","description":"The URN of the offending entry, as it was sent."},"reason":{"type":"string","description":"Why the entry was refused: UNKNOWN_DIMENSION_URN, DUPLICATE_DIMENSION, MISSING_DIMENSION_ID or UNEXPECTED_DIMENSION_ID."}},"additionalProperties":false,"required":["index","dimensionUrn","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the entry in the submitted dimensions."},"customValueDimensionId":{"type":"string","description":"The id that matched no custom value dimension, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["index","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitId":{"type":"string","description":"The id that matched no driver unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the driver that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN_DEACTIVATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the deactivated driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CALCULATION_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"calculationType":{"type":"string","description":"The calculation type that was refused, exactly as it was sent."},"acceptedValues":{"type":"array","items":{"type":"string"},"description":"The accepted calculation types."}},"additionalProperties":false,"required":["calculationType","acceptedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the offending entry in the submitted dimensions."},"dimensionUrn":{"type":"string","description":"The URN of the offending entry, as it was sent."},"reason":{"type":"string","description":"Why the entry was refused: UNKNOWN_DIMENSION_URN, DUPLICATE_DIMENSION, MISSING_DIMENSION_ID or UNEXPECTED_DIMENSION_ID."}},"additionalProperties":false,"required":["index","dimensionUrn","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the entry in the submitted dimensions."},"customValueDimensionId":{"type":"string","description":"The id that matched no custom value dimension, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["index","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitId":{"type":"string","description":"The id that matched no driver unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the driver that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN_DEACTIVATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the deactivated driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CALCULATION_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"calculationType":{"type":"string","description":"The calculation type that was refused, exactly as it was sent."},"acceptedValues":{"type":"array","items":{"type":"string"},"description":"The accepted calculation types."}},"additionalProperties":false,"required":["calculationType","acceptedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the offending entry in the submitted dimensions."},"dimensionUrn":{"type":"string","description":"The URN of the offending entry, as it was sent."},"reason":{"type":"string","description":"Why the entry was refused: UNKNOWN_DIMENSION_URN, DUPLICATE_DIMENSION, MISSING_DIMENSION_ID or UNEXPECTED_DIMENSION_ID."}},"additionalProperties":false,"required":["index","dimensionUrn","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the entry in the submitted dimensions."},"customValueDimensionId":{"type":"string","description":"The id that matched no custom value dimension, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["index","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitId":{"type":"string","description":"The id that matched no driver unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createBusinessDriverInput"}}}},"summary":"Create one business driver definition — a named measure such as headcount or machine hours that value accounting allocates by. WRITES. Returns only the id of the new driver; read it back with getBusinessDriver (GET value-accounting/business-drivers/:id) for the stored form. Creates NO value: record values against the driver afterwards. Names are unique tenant-wide, compared trimmed and case-insensitively, and a deactivated driver keeps its name: NAME_TAKEN (an active driver holds it) and NAME_TAKEN_DEACTIVATED (a deactivated one does — reactivate it with setBusinessDriversActive (POST value-accounting/business-drivers/set-active) rather than inventing a variant) both carry the holder's id. An empty or whitespace-only name is NAME_REQUIRED. calculationType is 'asOf' or 'cumulative' (else INVALID_CALCULATION_TYPE) and, like the dimension set, freezes with the first recorded value — choose both deliberately. dimensions may be empty: such a definition holds no values until its dimensions are declared. A bad dimension entry is INVALID_DIMENSION, a custom dimension naming no custom value dimension CUSTOM_VALUE_DIMENSION_NOT_FOUND, a unitId naming no driver unit UNIT_NOT_FOUND, and declaring Value Center while the tenant setting is off VALUE_CENTER_DISABLED. Every check runs before anything is written. A system driver cannot be created here.","description":"Creates one business driver DEFINITION and returns only the `id` the platform assigns — the reference getBusinessDriver, updateBusinessDriver and deleteBusinessDriver (GET/PATCH/deleteBusinessDriver) are keyed by. No value, no period and no recording context is created: the driver holds nothing until values are recorded against it.\n\nDriver names are unique tenant-wide, compared TRIMMED and CASE-INSENSITIVELY, and a DEACTIVATED driver keeps its name: a clash with an active driver fails with `NAME_TAKEN`, one with a deactivated driver with `NAME_TAKEN_DEACTIVATED` — reactivate that one (setBusinessDriversActive, POST value-accounting/business-drivers/set-active) instead of inventing a variant spelling. An empty or whitespace-only `name` fails with `NAME_REQUIRED`.\n\nChoose `calculationType` from what the measure IS — 'asOf' for a stock that carries forward (headcount), 'cumulative' for a per-period flow (hours worked) — because it freezes with the first recorded value. Declare every dimension you will need for the same reason: the set freezes too. `dimensions: []` is a valid definition that holds no values until its dimensions are declared with PATCH.\n\nEach dimension entry is checked (`INVALID_DIMENSION` with a reason), a custom one must name an existing custom value dimension (`CUSTOM_VALUE_DIMENSION_NOT_FOUND`), `unitId` must name an existing driver unit (`UNIT_NOT_FOUND`), and declaring the Value Center dimension needs the tenant's Value Center dimension setting (`VALUE_CENTER_DISABLED`). A system driver cannot be created: `isSystem` is not an input. The call runs in a transaction: a failure writes nothing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingBusinessDrivers"]}},"/value-accounting/value-centers/bulk-delete":{"post":{"operationId":"bulkDeleteValueCenters","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteValueCentersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value center, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value center, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value center, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteValueCentersInput"}}}},"summary":"Delete several value centers in one call, SKIPPING each one with live children and DEACTIVATING each one still in use, and report each outcome. WRITES. Every id must exist: if any does not, the whole call is rejected with NOT_FOUND listing exactly those ids and NOTHING is written. Then each is handled on its own: one with a direct child reading 'active' or 'planned' is left untouched; one in use — allocation lines are tagged to it, business drivers reference it, or it is related to other master data — is kept and end-dated to today (or to its own startDate, when that is later) with every mapping still open (a mapping that would only start after that day is deleted) (one that already ended keeps its own end date and is reported deactivated again, and its mappings still open end on that same day, so reactivating re-opens them with it); any other is hard-deleted with its mappings — DESTRUCTIVE, no undo — its remaining children moving up to its parent. Outcomes are decided against the tree before the call, so a parent sent with one of its own live children is always skipped, even when the same call deletes the child: delete the children first, then the parent in a second call. A kept or skipped record is a success, not a failure of the batch: deletedIds, deactivated and skipped together name every distinct id sent. Re-open kept value centers with reactivateValueCenters (POST value-accounting/value-centers/reactivate). POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.","description":"Deletes several value centers in one call, SKIPPING each one with live children and DEACTIVATING each one still in use, and reports every outcome.\n\nEvery id is checked to exist first: if any does not, the whole call is rejected with `NOT_FOUND` listing exactly the ids that matched nothing, and nothing is written. Once every id resolves, each value center is handled on its own merits, exactly as deleteValueCenter (DELETE value-accounting/value-centers/:id) handles one — one with a direct child reading 'active' or 'planned' is left untouched; one in use is kept and end-dated with every mapping still open (one that already ended keeps its own end date and is reported deactivated again, and its mappings still open end on that same day, so reactivating re-opens them with it); any other is hard-deleted with its mappings (no undo), its remaining children moving up to its parent. All three are a success: `deletedIds`, `deactivated` and `skipped` together name every distinct id you sent.\n\nEvery outcome is decided against the tree as it was BEFORE the call wrote anything, so the order of the ids never matters — and a parent sent together with one of its own active or planned children is always SKIPPED, even when the same call deletes that child. Delete the children in one call and the parent in a second.\n\nPOST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingValueCenters"]}},"/value-accounting/custom-value-objects/bulk-delete":{"post":{"operationId":"bulkDeleteCustomValueObjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteCustomValueObjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value object, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value object, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value object, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteCustomValueObjectsInput"}}}},"summary":"Delete several custom value objects in one call, DEACTIVATING each one that is still in use instead, and report each outcome. WRITES. Every id must exist: if any does not, the whole call is rejected with NOT_FOUND listing exactly those ids and NOTHING is written. Then each value is handled on its own: an unused value is hard-deleted together with its shadow value object and mapping — DESTRUCTIVE, no undo; a value in use — tagged on allocations or business driver combinations, carrying postings on its shadow, related to other master data, or still represented by a hand-made value object — is kept and end-dated to today (or to its startDate, if that is later) with its shadow and mapping, leaving the tagging pick-lists once that day has passed while its history stays intact. A value that already ended keeps its own end date and is reported deactivated again; its legs still open — shadow, mapping and its other mapping rows — end on that same day, so reactivating re-opens them with it. A kept value is a success, not a failure of the batch: deletedIds and deactivated together name every distinct id sent. Re-open kept values with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate). POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.","description":"Deletes several custom value objects in one call, DEACTIVATING each one that is still in use instead of deleting it, and reports each outcome.\n\nEvery id is checked to exist first: if any does not, the whole call is rejected with `NOT_FOUND` listing exactly the ids that matched nothing, and nothing is written. Once every id resolves, each value is handled on its own merits — an unused value is hard-deleted with its shadow value object and mapping (no undo); a value in use is kept and end-dated together with its shadow and mapping, and one that already ended keeps its own end date and is reported deactivated again (its legs still open — shadow, mapping and its other mapping rows — end on that same day, so reactivating re-opens them with it). Both are a success: `deletedIds` and `deactivated` together name every distinct id you sent, and `deactivated[].reason` says why each kept value was kept.\n\nA kept value is NOT a failure of the batch: one value with history does not stop the free ones from being deleted. That is the difference from the custom value dimension bulk delete, which refuses a whole batch for one dimension in use — a dimension has no deactivated state to fall back to.\n\nPOST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingCustomValueObjects"]}},"/value-accounting/custom-value-dimensions/{id}":{"patch":{"operationId":"updateCustomValueDimension","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateCustomValueDimensionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NAME_TAKEN, NAME_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value dimension."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER dimension that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value dimension."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER dimension that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value dimension."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER dimension that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the dimension to rename; bound from the :id path segment. Obtain it from the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). An id that matches no dimension is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase.","example":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCustomValueDimensionInput"}}}},"summary":"Rename one tenant custom value dimension. WRITES — this changes an existing row. The name is the only field this resource has, so a rename is the whole of an update and an omitted name is a valid no-op; returns an empty body on success. NOTHING here is clearable: the value-accounting convention is omit = unchanged and explicit null = clear, but a dimension with no name is not a meaningful record, so this action has no nullable field at all — the name can only be replaced. Renaming re-labels the axis everywhere it is used and breaks nothing: its values, the business drivers declaring it and its tag rules all reference the id rather than the text, so no reference breaks and no tagged data moves. The new name must not already belong to another dimension; re-sending the name it already has is a valid no-op, not a collision. A PATCH that changes nothing — an empty body, or the name the dimension already has — does not touch lastModifiedDate, so it never makes an unchanged dimension reappear in an incremental sync on filter[lastModifiedDate][gte]; it still answers 200 with an empty body, and the checks below still run first. An unknown id is rejected with NOT_FOUND, an empty or whitespace-only name with NAME_REQUIRED and a colliding name with NAME_TAKEN; in every case NOTHING is written.","description":"Renames one tenant custom value dimension and returns an empty body.\n\n`name` is the only field this resource has, so a rename is the whole of an update; sending an empty body is a valid no-op. There is nothing NULLABLE here: the value-accounting clearing convention is omit = unchanged, explicit `null` = clear, but a nameless axis is not a meaningful record, so `name` can only be replaced, never cleared — an explicit null is refused by the input coercer rather than treated as a clear.\n\nRenaming re-labels the axis everywhere it appears and breaks nothing: its values point at the dimension id, business drivers store the id inside their declared dimension set, and tag rules key on the id. The new name must not already belong to another dimension, since the name is the resource's unique semantic key; renaming a dimension to the name it already holds is a valid no-op, not a collision.\n\nAn unknown id fails with `NOT_FOUND`, an empty or whitespace-only name with `NAME_REQUIRED` and a colliding name with `NAME_TAKEN`; all are checked before anything is written, so a rejected call writes nothing.","tags":["valueAccountingCustomValueDimensions"]},"delete":{"operationId":"deleteCustomValueDimension","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteCustomValueDimensionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value dimension."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under the dimension. Never empty when this diagnostic is raised — they are what raised it."}},"additionalProperties":false,"required":["customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value dimension."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under the dimension. Never empty when this diagnostic is raised — they are what raised it."}},"additionalProperties":false,"required":["customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value dimension."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under the dimension. Never empty when this diagnostic is raised — they are what raised it."}},"additionalProperties":false,"required":["customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the dimension to delete; bound from the :id path segment. Obtain it from the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). An id that matches no dimension is rejected with NOT_FOUND rather than treated as an already-completed delete. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Delete one tenant custom value dimension. WRITES and is DESTRUCTIVE — the row is hard-deleted, not deactivated, and there is no undo. Returns an empty body on success. GUARDED, and it REFUSES rather than cascading: a dimension that still holds any custom value object of its own is rejected with IN_USE and nothing is deleted — deleting the axis under its own values would strand them, and deleting those values for you would destroy tagged master data you never named, so delete or re-point them first. A successful delete DOES remove the dimension's tag-rule availability and requirement configuration with it, because that describes the dimension rather than outliving it. ⚠️ One reference is NOT checked: a business driver in the drivers package may DECLARE this dimension among its axes, and deleting a declared dimension leaves that driver unable to resolve its own combinations; a driver that has recorded values necessarily holds custom value objects of the dimension and IS caught by the guard, so the exposed case is a driver declaring a dimension that holds no values yet. An unknown id is rejected with NOT_FOUND and nothing is written. To delete several dimensions in one all-or-nothing transaction, use bulkDeleteCustomValueDimensions (POST value-accounting/custom-value-dimensions/bulk-delete) instead.","description":"Deletes one tenant custom value dimension and returns an empty body. DESTRUCTIVE: the row is hard-deleted, not deactivated, and there is no undo.\n\nGUARDED, and it REFUSES rather than cascading. A dimension that still holds any custom value object of its own fails with `IN_USE` and nothing is deleted: deleting the axis under its own values would strand them with a dimension that no longer resolves, and deleting those values for you would destroy tagged master data you never named. Delete or re-point them first.\n\nOne reference is NOT checked: a business driver in the drivers package may DECLARE this dimension among its axes. A driver that has recorded values necessarily holds custom value objects of the dimension, which the guard does catch, so the exposed case is a driver declaring a dimension that holds no values yet.\n\nA successful delete DOES take the dimension's tag-rule configuration with it — its availability and requirement rows are removed automatically, because those describe the dimension rather than outliving it. That cleanup is exactly why this route deletes the record individually rather than in bulk.\n\nAn unknown id fails with `NOT_FOUND` and nothing is written. To remove several dimensions in one transaction, use bulkDeleteCustomValueDimensions (POST value-accounting/custom-value-dimensions/bulk-delete).","tags":["valueAccountingCustomValueDimensions"]},"get":{"operationId":"getCustomValueDimension","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getCustomValueDimensionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value dimension."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value dimension."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the dimension to fetch; bound from the :id path segment. Obtain it from the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). An id that matches no dimension is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Fetch one custom value dimension — a tenant-defined tagging axis — by its id. Read-only. Prefer the customValueDimensions data-set (GET value-accounting/custom-value-dimensions) when browsing or resolving a name to an id; use this when you already hold an id and want just that row, or to confirm it still resolves before writing against it. An id that matches nothing is rejected with NOT_FOUND rather than returning an empty body.","description":"Fetches one custom value dimension by the id in the path.\n\nPrefer the customValueDimensions data-set (GET value-accounting/custom-value-dimensions) when browsing or resolving a name — it returns the same fields for every dimension in one call, with filters and sorting. Use this when you already hold an id and want just that row, or to confirm an id still resolves before writing against it.\n\nAn id that matches nothing fails with `NOT_FOUND` rather than returning an empty body, so a caller can tell a missing row from an empty one.","tags":["valueAccountingCustomValueDimensions"]}},"/value-accounting/custom-value-objects/{id}":{"patch":{"operationId":"updateCustomValueObject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateCustomValueObjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REACTIVATE_VIA_FLOW, NAME_REQUIRED, END_BEFORE_START, START_AFTER_MAPPING_HISTORY, CUSTOM_VALUE_DIMENSION_NOT_FOUND, DIMENSION_LOCKED, NAME_TAKEN, CATEGORY_NOT_FOUND, MAPPING_EXISTS, ONE_TO_ONE_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value the null was sent for."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate the value would have after the patch. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value would have after the patch, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The custom value object, as sent."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"The uuids of the shadow value object's mappings that ended before the new startDate."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueDimensionId":{"type":"string","description":"The dimension id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value that is in use."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the move was requested to."}},"additionalProperties":false,"required":["id","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the clash was found on."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER custom value object that already holds the name."}},"additionalProperties":false,"required":["name","customValueDimensionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object whose row would re-open — the id of getValueObject (GET value-accounting/value-objects/:id)."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that already maps the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["valueObjectId","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value the null was sent for."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate the value would have after the patch. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value would have after the patch, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The custom value object, as sent."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"The uuids of the shadow value object's mappings that ended before the new startDate."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueDimensionId":{"type":"string","description":"The dimension id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value that is in use."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the move was requested to."}},"additionalProperties":false,"required":["id","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the clash was found on."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER custom value object that already holds the name."}},"additionalProperties":false,"required":["name","customValueDimensionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object whose row would re-open — the id of getValueObject (GET value-accounting/value-objects/:id)."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that already maps the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["valueObjectId","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value the null was sent for."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate the value would have after the patch. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value would have after the patch, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The custom value object, as sent."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"The uuids of the shadow value object's mappings that ended before the new startDate."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueDimensionId":{"type":"string","description":"The dimension id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value that is in use."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the move was requested to."}},"additionalProperties":false,"required":["id","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the clash was found on."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER custom value object that already holds the name."}},"additionalProperties":false,"required":["name","customValueDimensionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object whose row would re-open — the id of getValueObject (GET value-accounting/value-objects/:id)."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that already maps the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["valueObjectId","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the custom value object to change; bound from the :id path segment. An id that matches no value is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase.","example":"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCustomValueObjectInput"}}}},"summary":"Partially update one custom value object. WRITES — this changes an existing value; returns an empty body on success. Only the fields sent are written; an omitted field keeps its value. categoryId accepts null to clear it. endDate: null clears an end of today or later (the shadow and their mapping follow) and is REFUSED with REACTIVATE_VIA_FLOW on an end before today — re-open a retired value with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate), which re-opens its shadow value object and mapping with it; setting endDate to a date on an open value (or an earlier one) ends the value with its legs — the shadow value object, their mapping and its other mapping rows still open after that day end on it, and a cluster cut back to one record is retired with it — and a LATER date on a value that already ended moves the rows its retire closed (the shadow value object, their mapping and its other mapping rows ending on the previous day) with it. A rename renames the value's shadow value object too and a new startDate moves the shadow's and the mapping's start, so tagging follows automatically; only the shadow follows — a hand-made value object linked one-to-one to the value (a duplicate from before the one-open-one-to-one rule, which refuses a second open one-to-one value object with ONE_TO_ONE_EXISTS since) keeps its own name and dates. Moving the value to another dimension is allowed only while it is not in use (DIMENSION_LOCKED otherwise). The dates the value would END UP with must form a range (END_BEFORE_START), the name must not be blank (NAME_REQUIRED) or already used on the value's dimension — the target dimension when it moves (NAME_TAKEN), and both references must exist (CUSTOM_VALUE_DIMENSION_NOT_FOUND, CATEGORY_NOT_FOUND). Every check runs first, so a rejected call writes nothing. A PATCH that changes nothing — an empty body, or every field sent with the value already stored — is not written at all, so it does not touch lastModifiedDate and an incremental sync on that column does not see the value again. An endDate moved into the future on a value that already ended re-opens the rows its retire closed (the shadow's mapping and the record's other rows) and is refused with ONE_TO_ONE_EXISTS when one of their value objects would then stand alone for a record another value object represents one-to-one with an open mapping. The same move is refused with MAPPING_EXISTS when a row it re-opens names a record its value object already maps with another mapping open today.","description":"Partially updates one custom value object and returns an empty body.\n\nOnly the fields you send are written: omit a field to leave it unchanged. Two fields can be cleared with an explicit `null`: `categoryId` (back to uncategorised) and `endDate` — but only an end of today or later, a schedule that never took effect (the shadow value object and their mapping follow). A value whose end is before today is retired and is re-opened together with its shadow value object and mapping by reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate), so `endDate: null` on it fails with `REACTIVATE_VIA_FLOW` rather than re-opening the value alone. Setting an endDate to a DATE on an open value — or an earlier one than stored — ENDS the value with its legs, as a delete's retire does: its shadow value object, their mapping and its other mapping rows still open after that day end on the same day, and a cluster value object cut back to one record is retired with it; moving the endDate of a value that already ended to a LATER day moves the rows its retire closed with it — its shadow value object, their mapping and its other mapping rows ending on the previous day. Either way reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate) re-opens them together, while a row ended on another day stays.\n\nThe value's shadow value object follows it: a rename renames the shadow, and a new startDate moves the shadow's and the mapping's start with it. Tagged allocations reference the id, not the text, so nothing breaks.\n\n`customValueDimensionId` re-files the value on another axis, which is allowed only while the value is NOT in use — once it is tagged, or a value object mapping it (its shadow, a cluster it belongs to, a hand-made one linked to it) carries allocation lines, the move fails with `DIMENSION_LOCKED`, because every posting was made against the current axis.\n\nThe dates are judged on what the value will END UP with (a date you omit keeps its stored value), so an endDate before the startDate fails with `END_BEFORE_START`. Every check runs before anything is written. A PATCH that changes nothing is not written at all and leaves lastModifiedDate untouched. Moving the end date of a value that already ended into the future re-opens the rows its retire closed and is refused with ONE_TO_ONE_EXISTS when another value object already holds an open one-to-one link to the value: end that link first.","tags":["valueAccountingCustomValueObjects"]},"delete":{"operationId":"deleteCustomValueObject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteCustomValueObjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the custom value object to delete; bound from the :id path segment. An id that matches no value is rejected with NOT_FOUND rather than treated as an already-completed delete. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Delete one custom value object, or DEACTIVATE it when it is still in use, and report which happened. WRITES. An unused value is hard-deleted together with its shadow value object and their mapping — DESTRUCTIVE, no undo. A value in use — tagged on allocations or business driver combinations, carrying postings on its shadow, related to other master data, or still represented by a hand-made value object — is kept and end-dated to today (or to its startDate, if that is later) instead, value, shadow and mapping together: it leaves the tagging pick-lists once that day has passed, while its history stays intact. A value that already ended keeps its own end date and is reported 'deactivated' again; its legs still open — shadow, mapping and its other mapping rows — end on that same day, so reactivating re-opens them with it. Both are a success with HTTP 200: read outcome ('deleted' or 'deactivated') and, for a kept value, reason. Re-open a deactivated value with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate). It cannot be re-opened while another value object holds an open one-to-one link to the value (ONE_TO_ONE_EXISTS): end that link first. A value kept only by relationships becomes deletable once they are removed with removeRelationship (POST value-accounting/associations/remove); then send this DELETE again. An unknown id is rejected with NOT_FOUND and nothing is written. For several values in one call use bulkDeleteCustomValueObjects (POST value-accounting/custom-value-objects/bulk-delete).","description":"Deletes one custom value object — or, when it is still in use, DEACTIVATES it instead — and reports which of the two happened.\n\nA value that is not in use is hard-deleted together with its shadow value object and their mapping; there is no undo. A value that IS in use is kept: the value, its shadow and the mapping are end-dated to today (or to its startDate, if that is later) together, which withdraws it from tagging pick-lists once that day has passed, while every posting made against it keeps resolving. A value that already ended keeps its own end date and is reported deactivated again; its legs still open — shadow, mapping and its other mapping rows — end on that same day, so reactivating re-opens them with it. In use means any of: tagged on an allocation line or a business driver combination, its shadow carrying postings, related to other master data through the associations resource, or a hand-made value object (one that is not its shadow) still standing for it one-to-one — a duplicate from before the one-open-one-to-one rule, which refuses it at creation since; this reason is its safety net. Both outcomes are a success (HTTP 200); read `outcome` to learn which one you got, and `reason` for why a value was kept.\n\nA deactivated value can be re-opened with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate). It cannot be re-opened while another value object holds an open one-to-one link to the value (ONE_TO_ONE_EXISTS): end that link first. A value kept only by its relationships becomes deletable once they are removed with removeRelationship (POST value-accounting/associations/remove) — send the same DELETE again and the retired value is hard-deleted.\n\nAn unknown id fails with `NOT_FOUND` and nothing is written. To handle several values in one call, use bulkDeleteCustomValueObjects (POST value-accounting/custom-value-objects/bulk-delete).","tags":["valueAccountingCustomValueObjects"]},"get":{"operationId":"getCustomValueObject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getCustomValueObjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no custom value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the custom value object to fetch; bound from the :id path segment. Obtain it from the customValueObjects data-set (GET value-accounting/custom-value-objects) or from the create response. An id that matches no value is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Fetch one custom value object — a value of a tenant-defined custom dimension, e.g. 'North' on the axis 'Region' — by its id. Read-only. Prefer the customValueObjects data-set (GET value-accounting/custom-value-objects) when browsing a dimension's values and searchCustomValueObjects (POST value-accounting/custom-value-objects/search) when looking one up by name; use this when you already hold an id, or to confirm it still resolves before writing against it. An id that matches nothing is rejected with NOT_FOUND rather than returning an empty body.","description":"Fetches one custom value object by the id in the path.\n\nPrefer the customValueObjects data-set (GET value-accounting/custom-value-objects) when browsing one dimension's values, and searchCustomValueObjects (POST value-accounting/custom-value-objects/search) when looking a value up by name — both return the same fields for many values in one call. Use this when you already hold an id and want just that value, or to confirm an id still resolves before writing against it.\n\nThe response is the value as a whole. Its shadow value object — the record value allocations tag against — and their mapping are maintained by this resource's writes and are not part of the item.\n\nAn id that matches nothing fails with `NOT_FOUND` rather than returning an empty body.","tags":["valueAccountingCustomValueObjects"]}},"/value-accounting/value-allocations/search":{"post":{"operationId":"searchValueAllocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchValueAllocationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR, UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND, VALUE_OBJECT_NOT_FOUND, VALUE_CENTER_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_OBJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectId":{"type":"string","description":"The id that matched no value object, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["valueObjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueCenterId":{"type":"string","description":"The id that matched no value center, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["valueCenterId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_OBJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectId":{"type":"string","description":"The id that matched no value object, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["valueObjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueCenterId":{"type":"string","description":"The id that matched no value center, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["valueCenterId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchValueAllocationsInput"}}}},"summary":"Search value allocations by what their lines attribute to — a master-data record (filters.record: {dimensionCode, id}), a value object or a value center — and by document type, allocation date range, draftAllocation and isOffset. 'What is allocated to department X' is filters.record: {dimensionCode: 'department', id: <the department's id>}. Read-only, cursor-paginated, and every row carries all of its lines. filters.record matches the record each line was TAGGED for — the identity every tagging flow writes, which also finds lines written while the record had no value object yet; a line tagged with a cluster value object names no single record and is found by filters.valueObjectId instead. Omitting filters returns every allocation, paged. A document type, date range or flag matching nothing returns an empty items array with HTTP 200 — but the record, value object and value center are the subject of the question: an unknown one is RECORD_NOT_FOUND / UNSUPPORTED_DIMENSION_CODE / VALUE_OBJECT_NOT_FOUND / VALUE_CENTER_NOT_FOUND. Rows carry the same fields as getValueAllocation (GET value-accounting/value-allocations/:id). The allocation does not know its document — the journal entry line holds the reference — so find a document's allocation from the document's side. POST rather than GET because a record pair does not belong in a URL.","description":"Finds value allocations by what their lines attribute to — a master-data record, a value object or a value center — and by document type, allocation date range and the two exclusion flags: the audit question 'what is allocated to department X'.\n\nThis is the lookup the routed list cannot do: the valueAllocations data-set (GET value-accounting/value-allocations) carries no lines. `filters.record` takes the same {dimensionCode, id} pair the associations resource speaks and matches every allocation with a line TAGGED for that record — the identity every tagging flow writes on its lines, including lines written while the record had no value object yet, which carry no valueObjectId at all. `filters.valueObjectId` and `filters.valueCenterId` match lines that name that value object or value center. A line tagged with a cluster value object names no single record, so it is found by the value object, not by any of its records.\n\nAn empty `filters` is a valid request for every allocation, paged. A document type, date range or flag that matches nothing returns an empty `items` array with HTTP 200. The record, value object and value center are the subject of the question, so one that does not exist is refused (`RECORD_NOT_FOUND`, `UNSUPPORTED_DIMENSION_CODE`, `VALUE_OBJECT_NOT_FOUND`, `VALUE_CENTER_NOT_FOUND`) rather than answered with an empty page that would read as 'nothing is allocated to it'.\n\nRows carry the same fields as getValueAllocation (GET value-accounting/value-allocations/:id), every line included. The journal entry lines themselves are not here: they point at the allocation, so a document's allocation is found from the document's side.","tags":["valueAccountingValueAllocations"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/value-accounting/value-allocations":{"get":{"operationId":"valueAllocations","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[documentType]","in":"query","required":false,"description":"Filter documentType (equality)","schema":{"type":"string"}},{"name":"filter[documentType][ne]","in":"query","required":false,"description":"Filter documentType (ne)","schema":{"type":"string"}},{"name":"filter[documentType][gt]","in":"query","required":false,"description":"Filter documentType (gt)","schema":{"type":"string"}},{"name":"filter[documentType][gte]","in":"query","required":false,"description":"Filter documentType (gte)","schema":{"type":"string"}},{"name":"filter[documentType][lt]","in":"query","required":false,"description":"Filter documentType (lt)","schema":{"type":"string"}},{"name":"filter[documentType][lte]","in":"query","required":false,"description":"Filter documentType (lte)","schema":{"type":"string"}},{"name":"filter[documentType][in]","in":"query","required":false,"description":"Filter documentType (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentType][notIn]","in":"query","required":false,"description":"Filter documentType (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[documentType][between]","in":"query","required":false,"description":"Filter documentType (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[documentType][like]","in":"query","required":false,"description":"Filter documentType (like)","schema":{"type":"string"}},{"name":"filter[allocationDate]","in":"query","required":false,"description":"Filter allocationDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationDate][ne]","in":"query","required":false,"description":"Filter allocationDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationDate][gt]","in":"query","required":false,"description":"Filter allocationDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationDate][gte]","in":"query","required":false,"description":"Filter allocationDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationDate][lt]","in":"query","required":false,"description":"Filter allocationDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationDate][lte]","in":"query","required":false,"description":"Filter allocationDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[allocationDate][in]","in":"query","required":false,"description":"Filter allocationDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allocationDate][notIn]","in":"query","required":false,"description":"Filter allocationDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[allocationDate][between]","in":"query","required":false,"description":"Filter allocationDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[draftAllocation]","in":"query","required":false,"description":"Filter draftAllocation (equality)","schema":{"type":"boolean"}},{"name":"filter[draftAllocation][ne]","in":"query","required":false,"description":"Filter draftAllocation (ne)","schema":{"type":"boolean"}},{"name":"filter[draftAllocation][gt]","in":"query","required":false,"description":"Filter draftAllocation (gt)","schema":{"type":"boolean"}},{"name":"filter[draftAllocation][gte]","in":"query","required":false,"description":"Filter draftAllocation (gte)","schema":{"type":"boolean"}},{"name":"filter[draftAllocation][lt]","in":"query","required":false,"description":"Filter draftAllocation (lt)","schema":{"type":"boolean"}},{"name":"filter[draftAllocation][lte]","in":"query","required":false,"description":"Filter draftAllocation (lte)","schema":{"type":"boolean"}},{"name":"filter[draftAllocation][in]","in":"query","required":false,"description":"Filter draftAllocation (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[draftAllocation][notIn]","in":"query","required":false,"description":"Filter draftAllocation (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[draftAllocation][between]","in":"query","required":false,"description":"Filter draftAllocation (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isOffset]","in":"query","required":false,"description":"Filter isOffset (equality)","schema":{"type":"boolean"}},{"name":"filter[isOffset][ne]","in":"query","required":false,"description":"Filter isOffset (ne)","schema":{"type":"boolean"}},{"name":"filter[isOffset][gt]","in":"query","required":false,"description":"Filter isOffset (gt)","schema":{"type":"boolean"}},{"name":"filter[isOffset][gte]","in":"query","required":false,"description":"Filter isOffset (gte)","schema":{"type":"boolean"}},{"name":"filter[isOffset][lt]","in":"query","required":false,"description":"Filter isOffset (lt)","schema":{"type":"boolean"}},{"name":"filter[isOffset][lte]","in":"query","required":false,"description":"Filter isOffset (lte)","schema":{"type":"boolean"}},{"name":"filter[isOffset][in]","in":"query","required":false,"description":"Filter isOffset (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isOffset][notIn]","in":"query","required":false,"description":"Filter isOffset (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isOffset][between]","in":"query","required":false,"description":"Filter isOffset (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","documentType","-documentType","allocationDate","-allocationDate","draftAllocation","-draftAllocation","isOffset","-isOffset","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","documentType","allocationDate","draftAllocation","isOffset","lineCount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/valueAllocationsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List the tenant's value allocations — the link records a posted journal entry line points at to say which value objects and value centers its amount is attributed to — one row per allocation, with structured filters. GET data-set exposing filter[field][op]= (eq/ne/gt/gte/lt/lte/in/notIn/between/like), sort=allocationDate or sort=-lastModifiedDate, sparse fields=, and page[size]/page[cursor] cursor pagination. filter[draftAllocation][eq]=false together with filter[isOffset][eq]=false keeps exactly the allocations value-accounting reporting counts. The lines are summarised as lineCount only: to read what an allocation attributes, use getValueAllocation (GET value-accounting/value-allocations/:id); to find the allocations attributed to a value object, a value center or a master-data record, use searchValueAllocations (POST value-accounting/value-allocations/search). There is no journal-line, account or amount column — the money lives on the journal entry line, which points at the allocation, never the other way round. Allocations are created by tagging a financial document, never through these routes.","tags":["valueAccountingValueAllocations"]}},"/value-accounting/categories/{id}":{"delete":{"operationId":"deleteCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no category."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects filed under this category."},"valueCenterIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers filed under this category."},"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under this category."}},"additionalProperties":false,"required":["valueObjectIds","valueCenterIds","customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no category."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects filed under this category."},"valueCenterIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers filed under this category."},"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under this category."}},"additionalProperties":false,"required":["valueObjectIds","valueCenterIds","customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no category."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects filed under this category."},"valueCenterIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers filed under this category."},"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under this category."}},"additionalProperties":false,"required":["valueObjectIds","valueCenterIds","customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the category to delete; bound from the :id path segment. Obtain it from the categories data-set (GET value-accounting/categories). An id that matches no category is rejected with NOT_FOUND rather than treated as an already-completed delete, and a category still referenced by master data is rejected with IN_USE. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Delete one value accounting category. WRITES and is DESTRUCTIVE — the row is hard-deleted, not deactivated, and there is no undo. Returns an empty body on success. GUARDED, and it REFUSES rather than cascading: a category that value objects, value centers or custom value objects are still filed under is rejected with IN_USE and NOTHING is deleted. Deleting it would leave those records pointing at a categoryId that no longer resolves and nothing cleans that up, while re-filing or deleting them for you would change master data the caller never named — so re-file them (PATCH the record with another categoryId, or null to clear it) or delete them first; the referencing ids are listed in the diagnostic's details. A category is never deactivated instead: it has no lifecycle dates to retire into. An unknown id is rejected with NOT_FOUND and nothing is written. To delete several categories in one all-or-nothing transaction, use bulkDeleteCategories (POST value-accounting/categories/bulk-delete) instead.","description":"Deletes one value accounting category and returns an empty body. DESTRUCTIVE: the row is hard-deleted, not deactivated, and there is no undo.\n\nGUARDED, and it REFUSES rather than cascading: a category that value objects, value centers or custom value objects are still filed under fails with `IN_USE` and nothing is deleted. Deleting it would leave those records pointing at a categoryId that no longer resolves and nothing cleans that up, while re-filing or deleting them for you would change master data the caller never named — so re-file them (PATCH the record with another categoryId, or null to clear it) or delete them first; the referencing ids are listed in the diagnostic's details. A category is never deactivated instead: it has no lifecycle dates to retire into.\n\nAn unknown id fails with `NOT_FOUND` and nothing is written. To remove several categories in one transaction, use bulkDeleteCategories (POST value-accounting/categories/bulk-delete).","tags":["valueAccountingCategories"]},"get":{"operationId":"getCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no category."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no category."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the category to fetch; bound from the :id path segment. Obtain it from the categories data-set (GET value-accounting/categories), from searchCategories (POST value-accounting/categories/search), or from the response of createCategory (POST value-accounting/categories). An id that matches no category is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Fetch one value accounting category — the grouping label value objects, custom value objects and value centers are filed under — by its id. Read-only. Prefer the categories data-set (GET value-accounting/categories) when browsing, and searchCategories (POST value-accounting/categories/search) when resolving a name to an id; use this when you already hold an id and want just that row, or to confirm it still resolves before writing a categoryId that points at it. An id that matches nothing is rejected with NOT_FOUND rather than returning an empty body.","description":"Fetches one value accounting category by the id in the path.\n\nPrefer the categories data-set (GET value-accounting/categories) when browsing, and searchCategories (POST value-accounting/categories/search) when looking a category up by name. Use this when you already hold an id and want just that row, or to confirm an id still resolves before writing a categoryId that points at it.\n\nAn id that matches nothing fails with `NOT_FOUND` rather than returning an empty body, so a caller can tell a missing row from an empty one.","tags":["valueAccountingCategories"]},"patch":{"operationId":"updateCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NAME_TAKEN, NAME_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no category."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER category that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no category."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER category that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no category."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER category that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the category to update; bound from the :id path segment. Obtain it from the categories data-set (GET value-accounting/categories). An id that matches no category is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase.","example":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateCategoryInput"}}}},"summary":"Partially update one value accounting category. WRITES — this changes an existing row. Only the fields you send are written; every omitted field keeps its current value, so this is a patch, never a replace. Returns an empty body on success — read the stored form back with getCategory (GET value-accounting/categories/:id). Renaming re-labels the category everywhere it is used: master data references the id rather than the text, so nothing breaks and no financial data moves, but the new name must not already belong to another category. Renaming a category to the name it already has is a valid no-op, not a collision. A PATCH that changes nothing — an empty body, or only values the category already holds — does not touch lastModifiedDate, so it never makes an unchanged category reappear in an incremental sync on filter[lastModifiedDate][gte]; it still answers 200 with an empty body, and the checks below still run first. An unknown id is rejected with NOT_FOUND, an empty or whitespace-only name with NAME_REQUIRED and a colliding name with NAME_TAKEN; in every case NOTHING is written.","description":"Partially updates one value accounting category and returns an empty body. Only the fields present in the request are written; an omitted field keeps its current value, so this is a patch and never a replace — sending `{\"description\": \"...\"}` does not clear the name.\n\nRenaming re-labels the category everywhere it is referenced. Master data points at the id, not the text, so no reference breaks and no financial data moves; but the new name must not already belong to another category, since the name is the resource's unique semantic key. Renaming a category to the name it already holds is a valid no-op, not a collision.\n\nAn unknown id fails with `NOT_FOUND`, an empty or whitespace-only name with `NAME_REQUIRED` and a colliding name with `NAME_TAKEN`; all are checked before anything is written, so a rejected call writes nothing. Clearable fields follow the value-accounting convention: omit = unchanged, explicit `null` = clear — send `{\"description\": null}` to unset the description.","tags":["valueAccountingCategories"]}},"/value-accounting/categories/bulk-delete":{"post":{"operationId":"bulkDeleteCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteCategoriesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no category, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects filed under any of the blocked categories."},"valueCenterIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers filed under any of the blocked categories."},"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under any of the blocked categories."}},"additionalProperties":false,"required":["valueObjectIds","valueCenterIds","customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no category, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects filed under any of the blocked categories."},"valueCenterIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers filed under any of the blocked categories."},"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under any of the blocked categories."}},"additionalProperties":false,"required":["valueObjectIds","valueCenterIds","customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no category, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"valueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects filed under any of the blocked categories."},"valueCenterIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers filed under any of the blocked categories."},"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under any of the blocked categories."}},"additionalProperties":false,"required":["valueObjectIds","valueCenterIds","customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteCategoriesInput"}}}},"summary":"Delete several value accounting categories in one call. WRITES and is DESTRUCTIVE — rows are hard-deleted, not deactivated, and there is no undo. Returns an empty body on success. ALL-OR-NOTHING TWICE OVER: every id is checked to exist before anything is removed, and if any does not the whole call is rejected with NOT_FOUND listing exactly the ids that matched nothing — the categories that do exist are left untouched, so re-send the request without the missing ids; then every category is checked to be unreferenced, and if any is still filed under by a value object, value center or custom value object the whole call is rejected with IN_USE and nothing is deleted, the free ones included. NOT_FOUND wins when both apply. GUARDED means it REFUSES rather than cascading: Deleting it would leave those records pointing at a categoryId that no longer resolves and nothing cleans that up, while re-filing or deleting them for you would change master data the caller never named — so re-file them (PATCH the record with another categoryId, or null to clear it) or delete them first; the referencing ids are listed in the diagnostic's details. A category is never deactivated instead: it has no lifecycle dates to retire into. POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.","description":"Deletes several value accounting categories in one all-or-nothing transaction and returns an empty body. DESTRUCTIVE: rows are hard-deleted, not deactivated, and there is no undo.\n\nAll-or-nothing: every id is checked to exist first, and if any does not the whole call is rejected with `NOT_FOUND` listing exactly the ids that matched nothing — nothing is deleted, and the ids that do exist are untouched. Re-send without the missing ones.\n\nGUARDED, and it REFUSES rather than cascading: if ANY requested category is still referenced by a value object, value center or custom value object the whole call fails with `IN_USE` and nothing is deleted — including the categories in the same batch that were free. Deleting it would leave those records pointing at a categoryId that no longer resolves and nothing cleans that up, while re-filing or deleting them for you would change master data the caller never named — so re-file them (PATCH the record with another categoryId, or null to clear it) or delete them first; the referencing ids are listed in the diagnostic's details. A category is never deactivated instead: it has no lifecycle dates to retire into.\n\nPOST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingCategories"]}},"/value-accounting/value-objects":{"get":{"operationId":"valueObjects","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[categoryId]","in":"query","required":false,"description":"Filter categoryId (equality)","schema":{"type":"string"}},{"name":"filter[categoryId][ne]","in":"query","required":false,"description":"Filter categoryId (ne)","schema":{"type":"string"}},{"name":"filter[categoryId][gt]","in":"query","required":false,"description":"Filter categoryId (gt)","schema":{"type":"string"}},{"name":"filter[categoryId][gte]","in":"query","required":false,"description":"Filter categoryId (gte)","schema":{"type":"string"}},{"name":"filter[categoryId][lt]","in":"query","required":false,"description":"Filter categoryId (lt)","schema":{"type":"string"}},{"name":"filter[categoryId][lte]","in":"query","required":false,"description":"Filter categoryId (lte)","schema":{"type":"string"}},{"name":"filter[categoryId][in]","in":"query","required":false,"description":"Filter categoryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][notIn]","in":"query","required":false,"description":"Filter categoryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][between]","in":"query","required":false,"description":"Filter categoryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[categoryId][like]","in":"query","required":false,"description":"Filter categoryId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","status","-status","categoryId","-categoryId","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","objectNumber","startDate","endDate","status","categoryId","mappingCount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/valueObjectsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List the value objects this tenant holds — the value-accounting records journal lines are allocated to, each standing for one master-data record (a department, customer, employee, …) or a cluster of several — one row per value object, with structured filters. GET data-set exposing filter[field][op]= (eq/ne/gt/gte/lt/lte/in/notIn/between/like), sort=startDate or sort=-lastModifiedDate, sparse fields=, and page[size]/page[cursor] cursor pagination. filter[status][eq]=active keeps the ones in effect today. Names and object numbers are returned but cannot be filtered or sorted on here, and the mappings are summarised as mappingCount only: to find a value object by name, by number, or by the master-data record it stands for, and to read its mappings, use searchValueObjects (POST value-accounting/value-objects/search) or getValueObject (GET value-accounting/value-objects/:id).","tags":["valueAccountingValueObjects"]},"post":{"operationId":"createValueObject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createValueObjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: MAPPING_REQUIRED, NAME_REQUIRED, UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND, DUPLICATE_MAPPING_ROW, INVALID_DATE_RANGE, MAPPING_STARTS_BEFORE_OWNER, CATEGORY_NOT_FOUND, OBJECT_NUMBER_TAKEN, VALUE_OBJECT_RETIRED, RECORD_INACTIVE, END_BEFORE_START, ONE_TO_ONE_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MAPPING_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, or the default a new mapping gets. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored, which falls before startDate. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent are refused."}},"additionalProperties":false,"required":["startDate","endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The value object's startDate, as sent. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent start before it."}},"additionalProperties":false,"required":["startDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value object that holds it."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_OBJECT_RETIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value object."},"reason":{"type":"string","description":"Why it is not re-opened: 'RECORD_INACTIVE', 'REACTIVATE_VIA_FLOW', 'REFERENCE_NOT_FOUND', 'MAPPING_EXISTS' or 'ONE_TO_ONE_EXISTS'."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The record's dimension code, as sent."},"id":{"type":"string","description":"Id (a UUID) of the record, as sent."},"endDate":{"type":"string","format":"date","description":"The record's end date (YYYY-MM-DD), before today."}},"additionalProperties":false,"required":["dimensionCode","id","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The start it would have (YYYY-MM-DD)."},"endDate":{"type":"string","format":"date","description":"The record's end it would end on, before startDate (YYYY-MM-DD)."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MAPPING_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, or the default a new mapping gets. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored, which falls before startDate. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent are refused."}},"additionalProperties":false,"required":["startDate","endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The value object's startDate, as sent. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent start before it."}},"additionalProperties":false,"required":["startDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value object that holds it."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_OBJECT_RETIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value object."},"reason":{"type":"string","description":"Why it is not re-opened: 'RECORD_INACTIVE', 'REACTIVATE_VIA_FLOW', 'REFERENCE_NOT_FOUND', 'MAPPING_EXISTS' or 'ONE_TO_ONE_EXISTS'."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The record's dimension code, as sent."},"id":{"type":"string","description":"Id (a UUID) of the record, as sent."},"endDate":{"type":"string","format":"date","description":"The record's end date (YYYY-MM-DD), before today."}},"additionalProperties":false,"required":["dimensionCode","id","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The start it would have (YYYY-MM-DD)."},"endDate":{"type":"string","format":"date","description":"The record's end it would end on, before startDate (YYYY-MM-DD)."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"MAPPING_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, or the default a new mapping gets. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored, which falls before startDate. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent are refused."}},"additionalProperties":false,"required":["startDate","endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The value object's startDate, as sent. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent start before it."}},"additionalProperties":false,"required":["startDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value object that holds it."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_OBJECT_RETIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value object."},"reason":{"type":"string","description":"Why it is not re-opened: 'RECORD_INACTIVE', 'REACTIVATE_VIA_FLOW', 'REFERENCE_NOT_FOUND', 'MAPPING_EXISTS' or 'ONE_TO_ONE_EXISTS'."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The record's dimension code, as sent."},"id":{"type":"string","description":"Id (a UUID) of the record, as sent."},"endDate":{"type":"string","format":"date","description":"The record's end date (YYYY-MM-DD), before today."}},"additionalProperties":false,"required":["dimensionCode","id","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The start it would have (YYYY-MM-DD)."},"endDate":{"type":"string","format":"date","description":"The record's end it would end on, before startDate (YYYY-MM-DD)."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createValueObjectInput"}}}},"summary":"Create the value object that stands for one or more master-data records, with its mappings, or resolve the one that exists. WRITES, in ONE transaction. mappings is required and names each record as {dimensionCode, id}; at least one (MAPPING_REQUIRED), the same record twice with the same dates counts once (with different dates it is DUPLICATE_MAPPING_ROW). ONE record: when it already has its own value object, that id is RETURNED — re-opened first if it was retired, but only while the record is ACTIVE and the reactivate screens pass, otherwise refused with VALUE_OBJECT_RETIRED; kept active (its end date cleared) when it ends TODAY — a custom value object's shadow ending today is kept as it stands while the custom value object ends today too — refused with ONE_TO_ONE_EXISTS when that clear would duplicate another value object's open one-to-one link — and name, objectNumber, categoryId and the mapping dates are IGNORED, so the call is safe to repeat and never duplicates or renames; otherwise — also when the value object the record's link moved away from now stands for another record, which is left untouched — a new 1:1 value object is created, ending with the record it stands for: on the record's end date when it has one of today or later (its mapping with it); a record that has already ENDED is refused with RECORD_INACTIVE, and a startDate after the record's end with END_BEFORE_START. SEVERAL records: a new CLUSTER value object is always created, numbered VO-n. A record has at most one open one-to-one value object: a NEW value object that stands for one record alone on some day from today on — one record sent, or several of which only one is open that day (the others start later or already ended, judged on the mappings' startDate/endDate) — is refused with ONE_TO_ONE_EXISTS when another value object holds that record's open one-to-one link on that day; several records open on the same days claim nothing. Returns only the id; read the stored form with getValueObject (GET value-accounting/value-objects/:id). Refusals, all before the first write: NAME_REQUIRED (blank name), UNSUPPORTED_DIMENSION_CODE / RECORD_NOT_FOUND (a record that does not resolve), CATEGORY_NOT_FOUND, OBJECT_NUMBER_TAKEN (the objectNumber SENT for a new 1:1 value object is already used — an omitted number never is: the record's own business number gives way to a generated VO-n when another value object holds it, so the new value object's number can differ from the record's; also answered, the call rolled back, when a concurrent create takes the number between the check and the write), VALUE_OBJECT_RETIRED (the record's own value object is retired and this call does not re-open it), RECORD_INACTIVE / END_BEFORE_START (a new 1:1 value object for a record that has ended, or starting after its end), ONE_TO_ONE_EXISTS (checked last; also re-judged after the write, rolling the call back). Making a master-data record known to value accounting this way makes it count as in use, so the record can afterwards be deactivated but no longer hard-deleted.","description":"Creates the value object that stands for one or more master-data records, with its mappings, and returns only its `id`.\n\nA value object always represents master data, so `mappings` is required and must name at least one record (`MAPPING_REQUIRED` otherwise); each record is the pair {dimensionCode, id} the associations resource speaks, and the same record sent twice with the same dates counts once — sent twice with different dates it is refused with `DUPLICATE_MAPPING_ROW` (one entry per record; a second link period is a later PATCH).\n\nRESOLVE-OR-CREATE for ONE record. When the record already has its own (non-cluster) value object, that value object's id is RETURNED and nothing is duplicated — re-opened first when it or its mapping was retired, but only while the record is ACTIVE and the reactivate screens pass — re-opened up to the record's own end date when the record ends today or later (it never outlives the record), with no end date when the record has none; a record whose end date is BEFORE today has ended and is not active; a retired value object this call will not re-open is refused with `VALUE_OBJECT_RETIRED` (details.reason says why) and nothing is written — re-open it on purpose with reactivateValueObjects (POST value-accounting/value-objects/reactivate). One whose end date is TODAY (still active) is KEPT ACTIVE: its end date is cleared — or moved to the record's own end date when the record ends later, and left as it is when the record ends today too, and for a custom value object's shadow ending today while its custom value object ends today too (the value is the record: its end of today is kept, a create never undoes a deactivation; a shadow behind a custom value object ending LATER is brought up to that end, one whose custom value object has no end is cleared) — the mappings ending with it following — refused with `ONE_TO_ONE_EXISTS` when that clear would duplicate another value object's open one-to-one link; a FUTURE end date is kept. The `name`, `objectNumber`, `categoryId` and mapping dates of the request are then IGNORED: this call never renames or re-files an existing value object (updateValueObject (PATCH value-accounting/value-objects/:id) does). This is what makes the call safe to repeat. A value object the record's link moved away from, which now stands for another record, is not its own: a new 1:1 value object is created and that one is left untouched.\n\nA CLUSTER for more than one record: a new value object is always created and its number is always a generated `VO-n` — calling twice with the same set creates two clusters.\n\nA record has at most one OPEN one-to-one value object. A NEW value object — for one record, or for several of which only one is open on some day from today on (the others start later or have already ended, judged on the mappings' own startDate and endDate) — stands for that record alone on those days, and is refused with `ONE_TO_ONE_EXISTS` when another value object already holds the record's open one-to-one link on one of them; details name that value object, its mapping and the shared days. Several records open on the same days claim nothing. End the other link first, or date the mappings so that more than one record is open on every day. The claim is re-judged after the write, in the same transaction: a link another request wrote in between fails the call with the same code and rolls it back.\n\nThe number of a new 1:1 value object is `objectNumber` when sent, the record's own business number (a department's code, a customer's number) when omitted and the record has one, and a generated `VO-n` when omitted without one or sent as null. Every check runs before the first write.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingValueObjects"]}},"/value-accounting/custom-value-objects/search":{"post":{"operationId":"searchCustomValueObjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchCustomValueObjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchCustomValueObjectsInput"}}}},"summary":"Search custom value objects — the values of the tenant's custom dimensions — by name (exact, or a case-insensitive fragment), by dimension, by category and by whether they are active. Read-only, cursor-paginated. This is where a value is looked up by NAME: its sibling, the customValueObjects data-set (GET value-accounting/custom-value-objects) returns names but cannot filter or sort on them. Names are unique per dimension, not globally, so resolve a name to its id with filters.name AND filters.customValueDimensionId together. Omitting filters entirely returns every value, paged. A filter matching nothing — including a dimension or category id that names no record — returns an empty items array with HTTP 200, never an error. Rows carry the same fields as getCustomValueObject (GET value-accounting/custom-value-objects/:id). POST rather than GET because a name fragment does not belong in a URL.","description":"Finds custom value objects by name — the exact name, or any value whose name contains a fragment, matched case-insensitively — optionally narrowed to one dimension, one category, and active or inactive values.\n\nThis is the name lookup the routed list cannot do: the customValueObjects data-set (GET value-accounting/custom-value-objects) returns names but does not filter or sort on them. Use `filters.name` together with `filters.customValueDimensionId` to resolve the one value holding a name on an axis — names are unique per dimension, not globally — and `filters.nameContains` for a type-ahead.\n\nAn empty `filters` is a valid request for every value, paged. A filter that matches nothing — including a dimension or category id that names no record — returns an empty `items` array with HTTP 200, not an error.\n\nRows carry the same fields as getCustomValueObject (GET value-accounting/custom-value-objects/:id), so a search result can be used wherever a fetched value can.","tags":["valueAccountingCustomValueObjects"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/value-accounting/custom-value-objects/reactivate":{"post":{"operationId":"reactivateCustomValueObjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reactivateCustomValueObjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SHADOW_MISSING, NOT_ENDED, MAPPING_EXISTS, ONE_TO_ONE_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value object."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHADOW_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the retired values whose shadow is incomplete."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the values that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first custom value object of the batch whose re-open was refused."},"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object holding both mappings — the id of getValueObject (GET value-accounting/value-objects/:id)."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","valueObjectId","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first custom value object of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value object."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHADOW_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the retired values whose shadow is incomplete."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the values that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first custom value object of the batch whose re-open was refused."},"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object holding both mappings — the id of getValueObject (GET value-accounting/value-objects/:id)."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","valueObjectId","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first custom value object of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value object."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SHADOW_MISSING"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the retired values whose shadow is incomplete."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the values that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first custom value object of the batch whose re-open was refused."},"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object holding both mappings — the id of getValueObject (GET value-accounting/value-objects/:id)."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","valueObjectId","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first custom value object of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reactivateCustomValueObjectsInput"}}}},"summary":"Re-open custom value objects that were retired — each value together with its shadow value object and their mapping — in one all-or-nothing call. WRITES; returns an empty body unless a value's own duplicate link stayed closed (keptClosedMappingIds). The reverse of the deactivate outcome of deleteCustomValueObject (DELETE value-accounting/custom-value-objects/:id) and the way to re-open a retired value with its legs — besides a later endDate on PATCH, which re-opens up to that day (PATCH refuses endDate: null on an end before today for that reason; an end of today or later is cleared there directly). An end of today or later is accepted here too and cleared, the same end state as PATCH with endDate: null (the shadow value object and their mapping follow) — never NOT_ENDED. A value counts as retired when the value, its shadow or their mapping carries an end date, so a half-retired value is repaired too. Every id is screened before the first write: an unknown id is rejected with NOT_FOUND, a retired value whose shadow value object or mapping no longer exists with SHADOW_MISSING, a value that is already fully open with NOT_ENDED — NOT_FOUND first, then SHADOW_MISSING, then NOT_ENDED — and in every case nothing is re-opened. ⛔ A value is not re-opened when a leg it would re-open names the record another mapping of the same value object maps open today — two open links to one record: refused with MAPPING_EXISTS (checked before ONE_TO_ONE_EXISTS), nothing is kept closed silently; end that mapping first through updateMappings of updateValueObject (PATCH value-accounting/value-objects/:id). ⛔ A value is not re-opened while ANOTHER value object holds an open one-to-one link to it — a retired value whose record got a new one-to-one value object meanwhile — or to a record another link its retire ended would stand for alone: refused with ONE_TO_ONE_EXISTS (checked last). Nothing is displaced: end the other link first. A link of the value's OWN that its retire closed on the value's day and that would come back as a second one-to-one link next to the shadow (a hand-made one-to-one value object from before the one-to-one rule, or one ended by hand on that day) is not a refusal: the shadow has priority, the value re-opens, and that link stays closed and is listed in keptClosedMappingIds. CLUSTERS: the batch is judged per value object over the whole call, so members of a cluster re-opened TOGETHER bring it back as a cluster — also a cluster value object a member's retire cut back to one record and retired with it (its rows and the value object re-open with them); re-opened one at a time, a member whose cluster's other members stay retired keeps its row in it closed and says so (keptClosedMappingIds, reactivateTogetherIds, keptClosedHint).","description":"Re-opens custom value objects that were retired, together with their shadow value objects and mappings, and returns an empty body — unless a value's own duplicate link stayed closed (`keptClosedMappingIds`).\n\nThis is the reverse of the DEACTIVATE outcome of deleteCustomValueObject (DELETE value-accounting/custom-value-objects/:id), and the only way to re-open a retired value: that delete end-dates the value, its shadow value object and their mapping together, so clearing the value's endDate on its own would leave a value that reads active while the shadow allocations tag against stays ended — which is why PATCH refuses `endDate: null` on an end that has passed (before today) and points here; an end of today or later never took effect and PATCH clears it directly. This call accepts such an end too and clears it — the same end state as PATCH with `endDate: null`, the shadow value object and their mapping following; it is not refused as `NOT_ENDED`. A value counts as retired when the value OR its shadow OR their mapping carries an end date, so this also repairs a half-retired value.\n\nALL-OR-NOTHING: every id is screened before the first write. `NOT_FOUND` names ids that match no value, `SHADOW_MISSING` retired values whose shadow value object or mapping no longer exists (they cannot be re-opened as a whole), and `NOT_ENDED` values that are already fully open. NOT_FOUND wins, then SHADOW_MISSING, then NOT_ENDED; in every case nothing is re-opened. A value is not re-opened when a leg it would re-open names the record another mapping of the same value object maps open today (MAPPING_EXISTS): end that mapping first. A value is not re-opened while another value object holds an open one-to-one link to it (ONE_TO_ONE_EXISTS): end that link first (end dates are inclusive, so ending it today frees the value from tomorrow). A link of the value's own that its retire closed on the value's day and that would come back as a second one-to-one link next to the shadow is not a refusal: the shadow has priority, that link stays closed, and the response lists it in `keptClosedMappingIds` (otherwise the body is empty).","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingCustomValueObjects"]}},"/value-accounting/driver-values":{"post":{"operationId":"recordDriverValue","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/recordDriverValueOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DRIVER_NOT_FOUND, ENTITY_NOT_FOUND, BOOK_NOT_FOUND, PERIOD_NOT_FOUND, UNSUPPORTED_DIMENSION_CODE, MEMBER_NOT_FOUND, MEMBER_NAME_REQUIRED, VALUE_NOT_FOUND, EDIT_VALUE_MISMATCH, COMBO_EXISTS, SYSTEM_DRIVER, INVALID_VALUE, PERIOD_CALENDAR_MISMATCH, DRIVER_INACTIVE, MEMBER_REQUIRED, MEMBERS_INCOMPLETE, MEMBER_DIMENSION_MISMATCH, MEMBER_DUPLICATE_DIMENSION, VALUE_CENTER_DISABLED, PERIOD_LOCKED, BOOK_HAS_NO_CALENDAR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this endpoint accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the member that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the nameless record."},"id":{"type":"string","description":"Id (a UUID) of the nameless record."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EDIT_VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that was refused."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_HAS_NO_CALENDAR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this endpoint accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the member that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the nameless record."},"id":{"type":"string","description":"Id (a UUID) of the nameless record."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EDIT_VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that was refused."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_HAS_NO_CALENDAR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this endpoint accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the member that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the nameless record."},"id":{"type":"string","description":"Id (a UUID) of the nameless record."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"EDIT_VALUE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"editValueId":{"type":"string","description":"The editValueId that was refused."}},"additionalProperties":false,"required":["editValueId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_HAS_NO_CALENDAR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/recordDriverValueInput"}}}},"summary":"Record or correct ONE business driver value for one accounting period and one full member combination; returns the value's id. WRITES. A composite flow: it finds or creates the recording context of the driver, entity and book, creates the value object a member other than a value center did not have yet, writes the value with audit history and, for an As-of driver, carries it forward to today as system-carried rows. Deleting the value does not delete that value object: it stays in use while a combination of a driver names the member, and once the driver's values and the driver are deleted, deleteValueObject (DELETE value-accounting/value-objects/:id) hard-deletes it. members names one master-data record per declared dimension, all of them, as {dimensionCode, id}; names and numbers come from the master data. Recording the same combination and period again overwrites that period's value. editValueId corrects one value row in place (EDIT_VALUE_MISMATCH if it belongs to another driver, entity, book or period) and, with other members, moves it to that combination (COMBO_EXISTS if that one already holds a recorded value in the period). Correcting a past As-of period whose later carried rows would change, without propagate, writes NOTHING and answers needsPropagationDecision true: re-send with propagate true (carry it forward) or false (this period only). The period must be open and not in the future (PERIOD_LOCKED) and of the entity and book's fiscal calendar (PERIOD_CALENDAR_MISMATCH). A system driver is refused (SYSTEM_DRIVER). Every refusal is checked before anything is written.","description":"Records ONE business driver value for one accounting period and one full combination of dimension members, or corrects an existing value, and returns its `id`.\n\nIt is a composite flow, not a row insert: it finds or creates the driver's recording context for the entity and book, resolves each member to its value tag — creating the value object a member other than a value center did not have yet — writes the value, stamps the audit history, and for an As-of driver carries the value forward as system-carried rows up to today.\n\n`members` names one master-data record per dimension the driver declares, ALL of them, as `{dimensionCode, id}`; the record's name and number are read from the master data, so you never send them. A second call for the same combination and period overwrites that period's value (a correction, with history).\n\n`editValueId` corrects one specific value row in place — it must be a value of this driver, entity, book AND period (`EDIT_VALUE_MISMATCH` otherwise). Sent with other members than the row holds, it moves the value to that combination (`COMBO_EXISTS` when that combination already has a recorded value in the period).\n\nTHE PROPAGATION DECISION: correcting a past period of an As-of driver would change the carried rows after it. Leave `propagate` out and, if that would happen, nothing is written and the answer is `needsPropagationDecision: true` with no `id`; send the identical request again with `propagate: true` (carry the correction forward) or `false` (this period only). Cumulative drivers never ask.\n\nThe period must be open for the entity and book and not in the future (`PERIOD_LOCKED`), and belong to their fiscal calendar (`PERIOD_CALENDAR_MISMATCH`). A system driver's values are refused (`SYSTEM_DRIVER`). Every refusal is checked before anything is written.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingDriverValues"]}},"/value-accounting/custom-value-dimensions":{"get":{"operationId":"customValueDimensions","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/customValueDimensionsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List the custom value dimensions this tenant has defined — the tagging axes that extend reporting tags beyond the platform's built-in dimensions — with structured filters. GET data-set exposing filter[field][op]= (eq/ne/gt/gte/lt/lte/in/notIn/between/like), sort=name or sort=-lastModifiedDate, sparse fields=, and page[size]/page[cursor] cursor pagination. A dimension is an AXIS ('Region'); its VALUES are custom value objects ('North', 'South'), listed by their own resource. Start here to learn which axes exist and to resolve a dimension name to the id its writes and its values are keyed by. The older listCustomDimensions (GET base/custom-dimensions) route reads the same rows for the reporting-tag decoding journey and reports the same UUID under a different field name; this group is where a dimension is created, renamed and removed.","tags":["valueAccountingCustomValueDimensions"]},"post":{"operationId":"createCustomValueDimension","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createCustomValueDimensionOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_TAKEN, NAME_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the dimension that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the dimension that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the dimension that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createCustomValueDimensionInput"}}}},"summary":"Create one tenant custom value dimension — a new tagging axis that extends reporting tags beyond the platform's built-in dimensions. WRITES. Returns only the id of the new dimension; read it back with getCustomValueDimension (GET value-accounting/custom-value-dimensions/:id) if you need the stored form. The name is this resource's unique semantic key, so a name already in use is rejected with NAME_TAKEN (which carries the id of the dimension holding it) and NOTHING is written — reuse that id instead of retrying with a variant spelling. An empty or whitespace-only name is rejected with NAME_REQUIRED, also before anything is written. The new dimension starts EMPTY: it holds no values, no tag rules reference it and no business driver declares it, so create its values next and pass this id as their dimension. Creating a dimension has no effect on any financial data and changes no existing tagging.","description":"Creates one tenant custom value dimension — a new tagging axis — and returns only the `id` the platform assigns, the reference getCustomValueDimension, updateCustomValueDimension and deleteCustomValueDimension (GET/PATCH/deleteCustomValueDimension) are keyed by.\n\n`name` is the resource's semantic key and is declared unique on the node, so creating a dimension whose name already exists fails with `NAME_TAKEN`, naming the id of the dimension that already holds it — reuse that id rather than retrying with a variant spelling. Matching is on the exact stored text: the name is stored verbatim, so a differently-cased or differently-spaced name is a different dimension. An empty or whitespace-only `name` fails with `NAME_REQUIRED`. The name is checked before anything is written, so a rejected call writes nothing.\n\nThe new dimension starts EMPTY: it holds no values, no tag rules reference it and no business driver declares it. Add its values through the custom value object resource, passing this id as their dimension.\n\nThe call runs in a transaction: a failure writes nothing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingCustomValueDimensions"]}},"/value-accounting/value-objects/{id}":{"get":{"operationId":"getValueObject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getValueObjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value object to fetch; bound from the :id path segment. Obtain it from the valueObjects data-set (GET value-accounting/value-objects), from the search or from the create response. An id that matches no value object is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Fetch one value object — the value-accounting record journal lines are allocated to — by its id, with every master-data mapping it carries, each naming its record as {dimensionCode, id}. Read-only. Prefer searchValueObjects (POST value-accounting/value-objects/search) to find a value object by name, number or the record it stands for; use this when you already hold an id, or to confirm it still resolves before writing against it. An id that matches nothing is rejected with NOT_FOUND rather than returning an empty body.","description":"Fetches one value object by the id in the path, with every master-data mapping it carries.\n\nEach mapping names its record as the pair {dimensionCode, id} — the same identity ensureRelationship (POST value-accounting/associations) and resolveReportingTags (POST base/reporting-tags/resolve) use — so a caller can go straight from a value object to the department, customer or employee it stands for. A mapping whose record no longer resolves keeps its row with `record` absent, so it can still be seen and removed by its id.\n\nPrefer searchValueObjects (POST value-accounting/value-objects/search) when looking a value object up by name, number or record, and the valueObjects data-set (GET value-accounting/value-objects) when browsing. An id that matches nothing fails with `NOT_FOUND` rather than returning an empty body.","tags":["valueAccountingValueObjects"]},"delete":{"operationId":"deleteValueObject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteValueObjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value object to delete; bound from the :id path segment. An id that matches no value object is rejected with NOT_FOUND rather than treated as an already-completed delete. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Delete one value object with its mappings, DEACTIVATE it when it is still in use, or SKIP it when it is a custom value object's shadow — and report which happened. WRITES. An unused value object is hard-deleted with its mappings — DESTRUCTIVE, no undo. A value object the system created as a side effect — for a record that had none, when it was tagged or recorded as a business driver member — is deleted the same way: `isSystemManaged: true` locks its name and mappings against edits, not against this delete. One in use — allocation lines point at it, one of its records is referenced as a tag, or related to other master data, or a relationship is anchored on or points at the value object itself (a cluster included) — is kept and end-dated to today (or to its own startDate, when that is later) with every mapping still open (a mapping that would only start after that day is deleted); one that already ended keeps its own end date and is reported 'deactivated' again, and its mappings still open end on that same day. A custom value object's shadow is left untouched and named by its owner: delete it through deleteCustomValueObject (DELETE value-accounting/custom-value-objects/:id). All three are a success with HTTP 200: read outcome ('deleted', 'deactivated' or 'skipped'), reason, and for a skipped shadow customValueObjectId. Re-open a deactivated value object with reactivateValueObjects (POST value-accounting/value-objects/reactivate). It cannot be re-opened while another value object holds an open one-to-one link to the record it stood for (ONE_TO_ONE_EXISTS): end that link first. An unknown id is rejected with NOT_FOUND and nothing is written. For several value objects in one call use bulkDeleteValueObjects (POST value-accounting/value-objects/bulk-delete).","description":"Deletes one value object with its mappings — or, when it is still in use, DEACTIVATES it instead — and reports which of the two happened.\n\nA value object that is not in use is hard-deleted together with its mappings; there is no undo. A value object the system created as a side effect — for a record that had none, when it was tagged or recorded as a business driver member — is deleted the same way: `isSystemManaged: true` locks its name and mappings against edits, not against this delete. A value object that IS in use is kept: it and every one of its mappings still open are end-dated to today (or to its own startDate, when that is later), which retires it once that day has passed — a mapping that would only start after that day is deleted instead and listed in deletedMappingIds — while every posting made against it keeps resolving. A value object that already ended keeps its own end date and is reported deactivated again; its mappings still open end on that same day, so reactivating re-opens them with it. In use means any of: allocation lines point at it, one of its records is referenced as a tag (business driver combinations included), or one of its records is related to other master data through the associations resource, or a relationship is stored against the value object itself — anchored on it or pointing at it — whatever record it stands for today (a cluster included). Both outcomes are a success (HTTP 200); read `outcome`, and `reason` for why a value object was kept.\n\nA custom value object's SHADOW — the value object a custom value object carries for allocations — is not this resource's to delete: the value, its shadow and their mapping are deleted or retired together through deleteCustomValueObject (DELETE value-accounting/custom-value-objects/:id). It comes back as outcome `skipped` with the owning `customValueObjectId`, and nothing is written.\n\nA deactivated value object can be re-opened with reactivateValueObjects (POST value-accounting/value-objects/reactivate). It cannot be re-opened while another value object holds an open one-to-one link to the record it stood for (ONE_TO_ONE_EXISTS): end that link first. One kept only by relationships becomes deletable once they are removed with removeRelationship (POST value-accounting/associations/remove). An unknown id fails with `NOT_FOUND` and nothing is written.","tags":["valueAccountingValueObjects"]},"patch":{"operationId":"updateValueObject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateValueObjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, MAPPING_NOT_FOUND, MAPPING_MISMATCH, UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND, DUPLICATE_MAPPING_ROW, END_BEFORE_START, INVALID_DATE_RANGE, REACTIVATE_VIA_FLOW, MAPPING_OUTLIVES_END, MAPPING_STARTS_BEFORE_OWNER, START_AFTER_MAPPING_HISTORY, REFERENCE_NOT_FOUND, SYSTEM_MANAGED, NAME_REQUIRED, OBJECT_NUMBER_REQUIRED, OBJECT_NUMBER_TAKEN, CATEGORY_NOT_FOUND, MAPPING_EXISTS, MAPPING_REQUIRED, ONE_TO_ONE_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that matched nothing, deduplicated, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that belong to another value object."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The startDate the value object would have. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value object would have, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id","startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The value object id from the path, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, the default a new mapping gets, or the stored one an update keeps. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored — the one sent, the value object's end a new mapping inherits, or the stored one an update keeps — which falls before startDate. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent."},"createRows":{"type":"number","description":"How many createMappings rows are refused."}},"additionalProperties":false,"required":["id","startDate","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows: those that sent endDate: null and, on a value object that has ended, those whose endDate would leave the mapping open after that day; empty when only the value object's own endDate was null or only createMappings rows are refused."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"endDate":{"type":"string","format":"date","description":"The value object's end date as this request leaves it, which the refused mappings end after. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send an endDate after the value object's."}},"additionalProperties":false,"required":["id","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The value object's start date as this request leaves it, which the refused mappings start before. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send a startDate before the value object's."}},"additionalProperties":false,"required":["id","startDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings that ended before the new startDate, in canonical lowercase."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer exists."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_MANAGED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value object."},"lockedFields":{"type":"array","items":{"type":"string"},"description":"The refused fields and verb arrays, in this request's vocabulary."}},"additionalProperties":false,"required":["id","lockedFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER value object that holds it."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingId":{"type":"string","description":"Id (a UUID) of the mapping that already maps the record — mappings[].id of getValueObject (GET value-accounting/value-objects/:id)."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object that would be left without a mapping."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that matched nothing, deduplicated, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that belong to another value object."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The startDate the value object would have. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value object would have, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id","startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The value object id from the path, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, the default a new mapping gets, or the stored one an update keeps. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored — the one sent, the value object's end a new mapping inherits, or the stored one an update keeps — which falls before startDate. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent."},"createRows":{"type":"number","description":"How many createMappings rows are refused."}},"additionalProperties":false,"required":["id","startDate","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows: those that sent endDate: null and, on a value object that has ended, those whose endDate would leave the mapping open after that day; empty when only the value object's own endDate was null or only createMappings rows are refused."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"endDate":{"type":"string","format":"date","description":"The value object's end date as this request leaves it, which the refused mappings end after. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send an endDate after the value object's."}},"additionalProperties":false,"required":["id","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The value object's start date as this request leaves it, which the refused mappings start before. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send a startDate before the value object's."}},"additionalProperties":false,"required":["id","startDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings that ended before the new startDate, in canonical lowercase."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer exists."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_MANAGED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value object."},"lockedFields":{"type":"array","items":{"type":"string"},"description":"The refused fields and verb arrays, in this request's vocabulary."}},"additionalProperties":false,"required":["id","lockedFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER value object that holds it."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingId":{"type":"string","description":"Id (a UUID) of the mapping that already maps the record — mappings[].id of getValueObject (GET value-accounting/value-objects/:id)."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object that would be left without a mapping."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value object."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that matched nothing, deduplicated, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that belong to another value object."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The startDate the value object would have. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value object would have, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id","startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The value object id from the path, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, the default a new mapping gets, or the stored one an update keeps. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored — the one sent, the value object's end a new mapping inherits, or the stored one an update keeps — which falls before startDate. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent."},"createRows":{"type":"number","description":"How many createMappings rows are refused."}},"additionalProperties":false,"required":["id","startDate","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows: those that sent endDate: null and, on a value object that has ended, those whose endDate would leave the mapping open after that day; empty when only the value object's own endDate was null or only createMappings rows are refused."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"endDate":{"type":"string","format":"date","description":"The value object's end date as this request leaves it, which the refused mappings end after. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send an endDate after the value object's."}},"additionalProperties":false,"required":["id","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The value object's start date as this request leaves it, which the refused mappings start before. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send a startDate before the value object's."}},"additionalProperties":false,"required":["id","startDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings that ended before the new startDate, in canonical lowercase."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer exists."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_MANAGED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value object."},"lockedFields":{"type":"array","items":{"type":"string"},"description":"The refused fields and verb arrays, in this request's vocabulary."}},"additionalProperties":false,"required":["id","lockedFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER value object that holds it."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingId":{"type":"string","description":"Id (a UUID) of the mapping that already maps the record — mappings[].id of getValueObject (GET value-accounting/value-objects/:id)."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object that would be left without a mapping."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value object to change; bound from the :id path segment. An id that matches no value object is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase.","example":"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateValueObjectInput"}}}},"summary":"Partially update one value object — its fields and its master-data mappings — in one transaction. WRITES; returns an empty body unless it deleted or healed mappings (removedMappingIds, healedMappingIds). Only what is sent is written. Fields: name, startDate, endDate (a date ends it together with every mapping still open after that day, which ends on the same day; a later date on a value object that already ended moves the mappings ending on its previous day with it; null clears an end of today or later and is REFUSED with REACTIVATE_VIA_FLOW on an end before today — re-open with reactivateValueObjects (POST value-accounting/value-objects/reactivate)), objectNumber, categoryId (null clears). Mappings: createMappings adds records (the same record on two entries with different dates is DUPLICATE_MAPPING_ROW, judged first; one this value object maps with an OPEN mapping is MAPPING_EXISTS unless the same request deletes that mapping — an ended mapping is history and does not count, judged on the end dates as the request leaves them: a mapping ended in the same request no longer counts, one re-opened in it does; a new mapping starts today, or on the value object's own startDate when that is later, unless startDate is sent, and without an endDate it ends with the value object — it inherits the value object's endDate as the request leaves it, open-ended only when there is none; a mapping never outlives its value object, so an endDate later than the value object's on a createMappings or updateMappings row is MAPPING_OUTLIVES_END), updateMappings re-dates existing mappings by their id (endDate: null refused the same way; an id sent twice counts once, its first row; on a value object that has ended — its endDate as the request leaves it, before today — an endDate today or later on a createMappings or updateMappings row is refused with REACTIVATE_VIA_FLOW too), deleteMappings removes mappings by their id; mapping ids are mappings[].id of getValueObject (GET value-accounting/value-objects/:id) and must belong to this value object (MAPPING_NOT_FOUND, MAPPING_MISMATCH). inCluster follows the OPEN mapping set: true on every mapping while more than one record is mapped by mappings open today; a mapping that ended in the past does not count, so a link moved by ending one mapping and creating another stays 1:1. It is settled by a request that adds or removes mappings, or ends or re-opens one as of today. The value object must keep at least one mapping (MAPPING_REQUIRED, counted over the whole request). A system-maintained mirror (isSystemManaged) refuses changes to name, startDate, categoryId and mappings with SYSTEM_MANAGED; re-sending a stored value is not a change. Dates are judged on the end state the request leaves: END_BEFORE_START (the value object), INVALID_DATE_RANGE (a mapping starting after its own end, an end it follows included), MAPPING_STARTS_BEFORE_OWNER (a sent mapping start before the value object's), START_AFTER_MAPPING_HISTORY (a later start past a mapping that already ended; the running mappings move with it). Ending it earlier DELETES a mapping that would only start after the new end (removedMappingIds); an updateMappings row healed to the value object's end is listed in healedMappingIds; deleteMappings, and updateMappings rows under an earlier end, are applied before the value object is written. Other refusals: NOT_FOUND, NAME_REQUIRED, OBJECT_NUMBER_REQUIRED, OBJECT_NUMBER_TAKEN, CATEGORY_NOT_FOUND, and for createMappings UNSUPPORTED_DIMENSION_CODE / RECORD_NOT_FOUND. A request leaving this value object standing alone for a record another value object already represents one-to-one (open, non-cluster) — a first mapping, or a cluster cut back to one record — is ONE_TO_ONE_EXISTS: a record has at most one open one-to-one value object, whoever made it. Every check runs first, so a rejected call writes nothing. A PATCH that changes nothing — an empty body, or every field sent with its stored value — is not written, so lastModifiedDate does not move; the same holds for each updateMappings row. An endDate moved into the future on a value object that already ended re-opens the mappings that move with it and is refused with ONE_TO_ONE_EXISTS when that leaves it standing alone for a record another value object represents one-to-one with an open mapping. That move is the one re-open door besides reactivateValueObjects (POST value-accounting/value-objects/reactivate) and runs its screens too: a later endDate or a null on a custom value object's SHADOW whose end has already passed is REACTIVATE_VIA_FLOW (the shadow's end date follows the value — re-open all three with POST value-accounting/custom-value-objects/reactivate; a shadow end of today or later is moved or cleared through the value, the three together), and a move to today or later whose re-opened mappings name a record that no longer exists is REFERENCE_NOT_FOUND.","description":"Partially updates one value object — its own fields and its master-data mappings — in one transaction, and returns an empty body — or, only when it deleted or healed mappings, their ids (`removedMappingIds`, `healedMappingIds`).\n\nOnly what you send is written: omit a field to leave it unchanged. `categoryId: null` clears the category. The mappings are edited through three verb arrays beside the fields: `createMappings` adds mappings to new records, `updateMappings` changes the dates of existing mappings (by mapping id), `deleteMappings` removes mappings (by mapping id). Mapping ids are the `mappings[].id` of getValueObject (GET value-accounting/value-objects/:id), and only this value object's own mappings can be named (`MAPPING_MISMATCH` otherwise). A record is linked once at a time: `createMappings` naming a record this value object maps with an OPEN mapping fails with `MAPPING_EXISTS` — unless the same request deletes that mapping; a mapping that already ended is history, so naming its record again (moving a link back) adds a new mapping. Openness is judged on the end dates as the request leaves them: a mapping ended by `updateMappings` in the same request no longer counts (end it yesterday and link its record afresh in one call), and one re-opened there with a future `endDate` does — re-opening an ended mapping onto a record another open mapping names fails with `MAPPING_EXISTS` too. A new mapping starts today unless you send its `startDate`, or on the value object's own start date when that is later. Whenever more than one record is mapped by mappings open today (no `endDate`, or one not yet passed), every one of the value object's mappings reads `inCluster: true` — adding a second record to a 1:1 value object makes it a cluster, and removing all but one makes it 1:1 again. A mapping that ended in the past does not count: ending the old mapping with `updateMappings` and adding the new record with `createMappings` in one request MOVES the link, and the value object stays 1:1, resolving under its new record. The flag is settled by a request that adds or removes mappings, or whose `updateMappings` end or re-open a mapping as of today; a date change that leaves every mapping open or closed today as it was leaves it as it stands.\n\nA value object must always keep at least one mapping: a request that would leave none fails with `MAPPING_REQUIRED` — counted over the whole request, so replacing the last mapping with a new one in the same call passes.\n\nEnding is a plain write, re-opening is not: an `endDate` DATE on the value object or on a mapping ends it, but `endDate: null` on the value object clears an end of today or later (a schedule that never took effect; the mappings ending with it follow), and fails with `REACTIVATE_VIA_FLOW` on an end before today and on any mapping — a value object and its mappings are re-opened together by reactivateValueObjects (POST value-accounting/value-objects/reactivate). On a value object that has ended — its `endDate`, as the request leaves it, before today — the same code refuses any mapping the request would leave open after that day: an `endDate` today or later on a `createMappings` or `updateMappings` row. A link cannot outlive its value object: a `createMappings` row sent without an `endDate` ends with the value object — it inherits the value object's `endDate` as the request leaves it (open-ended only when it has none) — and any row sending an `endDate` later than that fails with `MAPPING_OUTLIVES_END`. An `updateMappings` id sent twice counts once, its first row; a `createMappings` entry repeated with the same dates counts once, while the same record on two `createMappings` entries with different dates is refused with `DUPLICATE_MAPPING_ROW` (one entry per record per request; a second link period is a second request). Ending the value object — an `endDate` on an open one, or an earlier one than stored — ends every mapping still open after that day on the same day, as a delete would close them (a mapping that ended earlier keeps its day); a mapping that would only start after that day is never in effect inside the value object's life and is DELETED — `removedMappingIds` in the response lists it. Moving the `endDate` of a value object that already ended to a LATER day moves its mappings ending on the previous day — the ones its retirement closed — with it; that is the one re-open door besides reactivateValueObjects (POST value-accounting/value-objects/reactivate), under the same screens: on a custom value object's shadow whose end has already passed it fails with `REACTIVATE_VIA_FLOW` (the shadow's end date follows the value — re-open all three with POST value-accounting/custom-value-objects/reactivate; a shadow end of today or later is moved or cleared here, through the value, the three together), and re-opening mappings that name a record that no longer exists fails with `REFERENCE_NOT_FOUND`. Either way reactivating re-opens exactly those mappings together; a mapping ended on another day stays.\n\nDates are judged on the END STATE the request leaves: the value object must not end before it starts (`END_BEFORE_START`); a mapping must not start after its own end (`INVALID_DATE_RANGE`, on the dates it is left with — an end it follows included) nor before the value object (`MAPPING_STARTS_BEFORE_OWNER`, on a start the request sends); a `startDate` moved LATER takes the mappings still running on the new day along, and a mapping that ended before it refuses the move (`START_AFTER_MAPPING_HISTORY`). On a value object with an end date, an `updateMappings` row sending a `startDate` but no `endDate` for a mapping left open (or ending after the value object) is written with the value object's end and listed in `healedMappingIds`. `deleteMappings`, and `updateMappings` rows under an earlier end, are applied before the value object itself is written, so a mapping the request deletes or re-dates never blocks it.\n\nA value object the system maintains as the mirror of one master-data record (`isSystemManaged` on the reads) refuses changes to its name, objectNumber, startDate, categoryId and mappings with `SYSTEM_MANAGED`, because the record's next change would overwrite them (the objectNumber is how the system recognises it); its endDate stays editable. Re-sending a stored value is never a change.\n\nA record has at most one OPEN one-to-one value object, whoever made it — the automation, an import or a user; the first link stands and a second is refused. A request that leaves this value object standing alone for a record ANOTHER value object already represents one-to-one — its first mapping, or a cluster cut back to one record by `deleteMappings` or an `updateMappings` end date — fails with `ONE_TO_ONE_EXISTS`, naming the other value object and its mapping; end that link first or delete that value object (for a cut-back cluster: end or delete this whole value object). A value object that already stands alone for its record stays editable.\n\nEvery check runs before anything is written. A PATCH that changes nothing is not written at all and leaves lastModifiedDate untouched — this holds per mapping too: an `updateMappings` row that sends the stored dates is not written. Moving the end date of a value object that already ended into the future re-opens the mappings that move with it, and is refused with ONE_TO_ONE_EXISTS when another value object already holds an open one-to-one link to the record they name: end that link first.","tags":["valueAccountingValueObjects"]}},"/value-accounting/custom-value-objects":{"post":{"operationId":"createCustomValueObject","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createCustomValueObjectOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_REQUIRED, END_BEFORE_START, CUSTOM_VALUE_DIMENSION_NOT_FOUND, NAME_TAKEN, CATEGORY_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate that was sent. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate that was sent, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueDimensionId":{"type":"string","description":"The dimension id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the clash was found on."},"existingId":{"type":"string","description":"Id (a UUID) of the custom value object that already holds the name on that dimension."}},"additionalProperties":false,"required":["name","customValueDimensionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate that was sent. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate that was sent, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueDimensionId":{"type":"string","description":"The dimension id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the clash was found on."},"existingId":{"type":"string","description":"Id (a UUID) of the custom value object that already holds the name on that dimension."}},"additionalProperties":false,"required":["name","customValueDimensionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate that was sent. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate that was sent, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueDimensionId":{"type":"string","description":"The dimension id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the dimension the clash was found on."},"existingId":{"type":"string","description":"Id (a UUID) of the custom value object that already holds the name on that dimension."}},"additionalProperties":false,"required":["name","customValueDimensionId","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createCustomValueObjectInput"}}}},"summary":"Create one custom value object — a new value on an existing custom value dimension, e.g. 'North' on the axis 'Region'. WRITES — three rows in ONE transaction: the value, the shadow value object that value allocations tag against, and the mapping between them, so the value is usable for tagging as soon as this returns and there is nothing further to call. Returns only the id of the new value; read it back with getCustomValueObject (GET value-accounting/custom-value-objects/:id) for the stored form. Names are unique PER DIMENSION: a name already used on the same dimension is rejected with NAME_TAKEN (which carries the id of the value holding it — reuse that instead of retrying a variant spelling); the same name on another dimension is fine. The dimension must exist (CUSTOM_VALUE_DIMENSION_NOT_FOUND otherwise — create one with createCustomValueDimension (POST value-accounting/custom-value-dimensions)), a supplied category must exist (CATEGORY_NOT_FOUND), the name must not be blank (NAME_REQUIRED) and an endDate must not fall before the startDate (END_BEFORE_START). Every check runs before the first write, so a rejected call writes none of the three rows.","description":"Creates one custom value object — a new value on an existing custom value dimension — and returns only the `id` the platform assigns.\n\nThe create is COMPLETE: in the same transaction it writes the value, the shadow value object value allocations tag against, and the 1:1 mapping tying the two together, so the value can be tagged the moment this call returns and there is nothing further to call. The shadow takes the value's name, start date and business number (a generated VO-n instead when another value object already holds that number — object numbers are unique across all value objects), and follows every later change to the value; it is maintained by this resource and never needs to be addressed directly.\n\nUniqueness is PER DIMENSION: (customValueDimensionId, name) is the semantic key, so the same name on another dimension is fine, while a repeat on the same dimension fails with `NAME_TAKEN`, naming the value that holds it. Both references are checked before anything is written — an unknown dimension fails with `CUSTOM_VALUE_DIMENSION_NOT_FOUND`, an unknown category with `CATEGORY_NOT_FOUND`. An empty name fails with `NAME_REQUIRED`, and an endDate before the startDate with `END_BEFORE_START`. In every case none of the three rows is written.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingCustomValueObjects"]},"get":{"operationId":"customValueObjects","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[customValueDimensionId]","in":"query","required":false,"description":"Filter customValueDimensionId (equality)","schema":{"type":"string"}},{"name":"filter[customValueDimensionId][ne]","in":"query","required":false,"description":"Filter customValueDimensionId (ne)","schema":{"type":"string"}},{"name":"filter[customValueDimensionId][gt]","in":"query","required":false,"description":"Filter customValueDimensionId (gt)","schema":{"type":"string"}},{"name":"filter[customValueDimensionId][gte]","in":"query","required":false,"description":"Filter customValueDimensionId (gte)","schema":{"type":"string"}},{"name":"filter[customValueDimensionId][lt]","in":"query","required":false,"description":"Filter customValueDimensionId (lt)","schema":{"type":"string"}},{"name":"filter[customValueDimensionId][lte]","in":"query","required":false,"description":"Filter customValueDimensionId (lte)","schema":{"type":"string"}},{"name":"filter[customValueDimensionId][in]","in":"query","required":false,"description":"Filter customValueDimensionId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customValueDimensionId][notIn]","in":"query","required":false,"description":"Filter customValueDimensionId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[customValueDimensionId][between]","in":"query","required":false,"description":"Filter customValueDimensionId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[customValueDimensionId][like]","in":"query","required":false,"description":"Filter customValueDimensionId (like)","schema":{"type":"string"}},{"name":"filter[categoryId]","in":"query","required":false,"description":"Filter categoryId (equality)","schema":{"type":"string"}},{"name":"filter[categoryId][ne]","in":"query","required":false,"description":"Filter categoryId (ne)","schema":{"type":"string"}},{"name":"filter[categoryId][gt]","in":"query","required":false,"description":"Filter categoryId (gt)","schema":{"type":"string"}},{"name":"filter[categoryId][gte]","in":"query","required":false,"description":"Filter categoryId (gte)","schema":{"type":"string"}},{"name":"filter[categoryId][lt]","in":"query","required":false,"description":"Filter categoryId (lt)","schema":{"type":"string"}},{"name":"filter[categoryId][lte]","in":"query","required":false,"description":"Filter categoryId (lte)","schema":{"type":"string"}},{"name":"filter[categoryId][in]","in":"query","required":false,"description":"Filter categoryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][notIn]","in":"query","required":false,"description":"Filter categoryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][between]","in":"query","required":false,"description":"Filter categoryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[categoryId][like]","in":"query","required":false,"description":"Filter categoryId (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[isActive]","in":"query","required":false,"description":"Filter isActive (equality)","schema":{"type":"boolean"}},{"name":"filter[isActive][ne]","in":"query","required":false,"description":"Filter isActive (ne)","schema":{"type":"boolean"}},{"name":"filter[isActive][gt]","in":"query","required":false,"description":"Filter isActive (gt)","schema":{"type":"boolean"}},{"name":"filter[isActive][gte]","in":"query","required":false,"description":"Filter isActive (gte)","schema":{"type":"boolean"}},{"name":"filter[isActive][lt]","in":"query","required":false,"description":"Filter isActive (lt)","schema":{"type":"boolean"}},{"name":"filter[isActive][lte]","in":"query","required":false,"description":"Filter isActive (lte)","schema":{"type":"boolean"}},{"name":"filter[isActive][in]","in":"query","required":false,"description":"Filter isActive (in, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][notIn]","in":"query","required":false,"description":"Filter isActive (notIn, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[isActive][between]","in":"query","required":false,"description":"Filter isActive (between, comma-separated)","schema":{"type":"array","items":{"type":"boolean"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","customValueDimensionId","-customValueDimensionId","categoryId","-categoryId","isActive","-isActive","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","customObjectNumber","customValueDimensionId","categoryId","startDate","endDate","isActive","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/customValueObjectsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List the custom value objects this tenant has defined — the VALUES of its custom value dimensions ('North', 'South' on the axis 'Region') — with structured filters. GET data-set exposing filter[field][op]= (eq/ne/gt/gte/lt/lte/in/notIn/between/like), sort=startDate or sort=-lastModifiedDate, sparse fields=, and page[size]/page[cursor] cursor pagination. The usual first call is filter[customValueDimensionId][eq]=<dimension id> to see one axis's values, with filter[isActive][eq]=true to keep only the ones still offered for tagging. Names are returned but cannot be filtered or sorted on here: to find a value by name, use searchCustomValueObjects (POST value-accounting/custom-value-objects/search). Each value belongs to exactly one dimension (resolve dimensions with the customValueDimensions data-set (GET value-accounting/custom-value-dimensions)) and is validity-dated. The shadow value object every value carries for allocations is maintained by this resource's writes and is not part of its item.","tags":["valueAccountingCustomValueObjects"]}},"/value-accounting/value-centers/reactivate":{"post":{"operationId":"reactivateValueCenters","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reactivateValueCentersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NOT_ENDED, REFERENCE_NOT_FOUND, PARENT_INACTIVE, MAPPING_EXISTS, ONE_TO_ONE_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value center."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center that was asked for."},"parentId":{"type":"string","description":"Id (a UUID) of its ended parent."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but carries an end date the re-opened value center would outlive. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value center of the batch whose re-open was refused."},"mappingId":{"type":"string","description":"Id (a UUID) of that value center's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value center of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value center."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center that was asked for."},"parentId":{"type":"string","description":"Id (a UUID) of its ended parent."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but carries an end date the re-opened value center would outlive. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value center of the batch whose re-open was refused."},"mappingId":{"type":"string","description":"Id (a UUID) of that value center's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value center of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value center."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center that was asked for."},"parentId":{"type":"string","description":"Id (a UUID) of its ended parent."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but carries an end date the re-opened value center would outlive. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value center of the batch whose re-open was refused."},"mappingId":{"type":"string","description":"Id (a UUID) of that value center's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value center of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reactivateValueCentersInput"}}}},"summary":"Re-open value centers that were retired — each together with the mappings its retirement ended — in one all-or-nothing call. WRITES; returns an empty body. The reverse of the deactivate outcome of deleteValueCenter (DELETE value-accounting/value-centers/:id) and the way to re-open a value center with everything its retirement closed — besides a later endDate on PATCH, which re-opens up to that day (PATCH refuses endDate: null on an end before today for that reason; an end of today or later is cleared there directly). An end of today or later is accepted here too and cleared, the same end state as PATCH with endDate: null (the mappings ending with it follow) — never NOT_ENDED. Exactly the mappings ending on the value center's own end date are re-opened; a mapping ended on any other day is history (its link moved, or ended by itself) and stays closed, so retiring and re-opening is a round trip. A value center with no end date of its own is not retired, whatever history its mappings hold — except a half-retired one (open, but none of its mappings open), whose mappings sharing the latest end date are re-opened. A value center whose parent reads 'inactive' or 'canceled', or carries any end date (the re-opened, open-ended value center would outlive it), is refused with PARENT_INACTIVE — re-open the parent in the same call (it then counts as re-opened, in any order, and its end date is cleared too) or move the child to the root first; a 'planned' parent without an end date does not block. Every id is screened before the first write: an unknown id is rejected with NOT_FOUND, a value center with nothing to re-open with NOT_ENDED, one with a mapping to re-open whose record no longer exists with REFERENCE_NOT_FOUND, then PARENT_INACTIVE — in that order — and in every case nothing is re-opened. ⛔ A value center is not re-opened when a mapping it would re-open names a record another of its own mappings maps open today — two open links to one record: refused with MAPPING_EXISTS (checked before ONE_TO_ONE_EXISTS); end that mapping first through updateMappings of updateValueCenter (PATCH value-accounting/value-centers/:id). ⛔ A value center is not re-opened while ANOTHER value center holds an open one-to-one link to the record its re-opened mappings would stand for alone — for example a retired mirror stays retired while another value center's link to its department is open: refused with ONE_TO_ONE_EXISTS (checked last), as are two value centers of one batch re-opening one-to-one links to the same record. Nothing is displaced: end the other link first.","description":"Re-opens value centers that were retired, each together with the mappings its retirement ended, and returns an empty body.\n\nThis is the reverse of the DEACTIVATE outcome of deleteValueCenter (DELETE value-accounting/value-centers/:id), and the only way to re-open a value center: that delete end-dates the value center and every mapping still open with the same day, so clearing the value center's endDate alone would leave it reading active while the mappings that say what it stands for stay ended — which is why PATCH refuses `endDate: null` on an end that has passed (before today) and points here; an end of today or later never took effect and PATCH clears it directly. This call accepts such an end too and clears it — the same end state as PATCH with `endDate: null`, the mappings ending with it following; it is not refused as `NOT_ENDED`. It is a ROUND TRIP: exactly the mappings ending on the value center's own end date are re-opened; a mapping ended on any other day is history (its link moved to another record, or ended by itself) and stays closed. A value center with no end date of its own is not retired, whatever history its mappings hold — except a half-retired one (open, but none of its mappings open), whose mappings sharing the latest end date are re-opened. Its place in the tree never changed and is not touched.\n\nBecause value centers form a tree, the PARENT is checked too: a re-opened value center has no end date, so one whose parent reads 'inactive' or 'canceled', or carries ANY end date (a scheduled end too — it would be outlived), cannot be re-opened (`PARENT_INACTIVE`) — a live value center under an ended parent is invisible to every roll-up that starts at the parent. Re-open the parent in the SAME call (a parent in the batch counts as re-opened and its end date is cleared too, so a whole subtree revives in one call, in any order), or move the value center to the root first. A 'planned' parent without an end date does not block.\n\nALL-OR-NOTHING: every id is screened before the first write. `NOT_FOUND` names ids that match no value center; `NOT_ENDED` value centers with nothing to re-open; `REFERENCE_NOT_FOUND` mappings it would re-open whose record no longer exists, which a value center cannot be re-opened to stand for; `PARENT_INACTIVE` the first value center whose parent is ended or carries an end date. In that order; in every case nothing is re-opened. The start date is never changed, so one with a future start reads 'planned' afterwards. A value center is not re-opened when a mapping it would re-open names a record another of its own mappings maps open today (MAPPING_EXISTS): end that mapping first. A value center is not re-opened while another value center holds an open one-to-one link to the record it would stand for (ONE_TO_ONE_EXISTS): end that link first.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingValueCenters"]}},"/value-accounting/driver-values/end":{"post":{"operationId":"endDriverCombination","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/endDriverCombinationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: COMBINATION_NOT_FOUND, PERIOD_NOT_FOUND, PERIOD_CALENDAR_MISMATCH, SYSTEM_DRIVER, LINE_NOT_FOUND, LINE_ENDED, DRIVER_NOT_FOUND, DRIVER_INACTIVE, PERIOD_LOCKED, END_COMBO_EXPLICIT_AFTER","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"COMBINATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"combinationId":{"type":"string","description":"The combination id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["combinationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"COMBINATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"combinationId":{"type":"string","description":"The combination id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["combinationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"COMBINATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"combinationId":{"type":"string","description":"The combination id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["combinationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/endDriverCombinationInput"}}}},"summary":"End a combination from an accounting period on — the member set stops existing there; returns an empty body. WRITES and is DESTRUCTIVE for derived data. The combination becomes inactive from fromPeriodId (included), an End entry is written to the audit history at that boundary, and every system-carried row from there on is removed, also in later locked periods (derived data). Only the boundary period must be open and not in the future (PERIOD_LOCKED). A recorded value at or after the boundary refuses the call (END_COMBO_EXPLICIT_AFTER) — recorded values are never discarded. Reversible with reactivateDriverCombination (POST value-accounting/driver-values/reactivate). Refused for an already ended combination (LINE_ENDED), an inactive driver (DRIVER_INACTIVE) and a system driver (SYSTEM_DRIVER). It runs in one transaction, so a refusal writes nothing.","description":"Ends a combination from an accounting period on — 'this member set stops existing from here' — and returns an empty body. The alternative to deleting values one by one.\n\nThe combination is marked inactive from `fromPeriodId` (that period included), an End entry is written to the audit history at that boundary, and every system-carried row from there on is removed, also in later locked periods: they are derived data, so only the boundary period itself must be open (`PERIOD_LOCKED`).\n\nRecorded values are never discarded: if one exists at or after the boundary, the call is refused (`END_COMBO_EXPLICIT_AFTER`) — delete it first, or end later.\n\nReversible with reactivateDriverCombination (POST value-accounting/driver-values/reactivate). Refused for an already ended combination (`LINE_ENDED`), an inactive driver and a system driver. It runs in one transaction, so a refusal writes nothing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingDriverValues"]}},"/value-accounting/driver-values/bulk-delete":{"post":{"operationId":"bulkDeleteDriverValues","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteDriverValuesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SYSTEM_DRIVER, DELETE_CARRIED_BLOCKED, DELETE_FIRST_VALUE_BLOCKED, END_COMBO_EXPLICIT_AFTER, LINE_NOT_FOUND, DRIVER_NOT_FOUND, PERIOD_LOCKED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no value, deduplicated, canonical lowercase where uuid-shaped, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_CARRIED_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_FIRST_VALUE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no value, deduplicated, canonical lowercase where uuid-shaped, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_CARRIED_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_FIRST_VALUE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no value, deduplicated, canonical lowercase where uuid-shaped, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_CARRIED_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_FIRST_VALUE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteDriverValuesInput"}}}},"summary":"Delete several recorded business driver values; returns an empty body. WRITES and is DESTRUCTIVE. Each value goes through the flow of deleteDriverValue (DELETE value-accounting/driver-values/:id) (an As-of delete usually reverts the period to the carried value). The values are processed NEWEST PERIOD FIRST whatever order the ids are sent in, so one call can delete a whole As-of combination — a first value is never blocked by a later value of the same batch. All-or-nothing: every id must exist (NOT_FOUND names the missing ones) and none may belong to a system driver (SYSTEM_DRIVER), both checked before anything is deleted; a value refused partway through — a carried row, a first value whose later value is not in the batch, a locked period — answers with its code and the whole request is rolled back, the values processed before it included, so a refusal means nothing changed.","description":"Deletes several recorded business driver values and returns an empty body. Each value goes through the same flow as deleteDriverValue (DELETE value-accounting/driver-values/:id) — an As-of delete usually REVERTS the period to the carried value — so read that endpoint first.\n\nNEWEST PERIOD FIRST: the values are processed from the latest period backwards, whatever order you send the ids in. That is what lets one call delete a whole As-of combination: each later value is gone before the first value's turn comes, so the first-value rule never blocks a value whose later values are in the same batch.\n\nALL-OR-NOTHING. Every id must exist (`NOT_FOUND` names the ones that do not) and none may belong to a system driver (`SYSTEM_DRIVER`) — both checked before anything is deleted. A value refused partway through (a carried row, a first value whose later value is NOT in the batch, a locked period) answers with its code and the WHOLE request is rolled back: the values processed before it are restored too, so nothing changed. Drop or add the ids the code points at and re-send; filter carried rows out (`isCarried`) beforehand.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingDriverValues"]}},"/value-accounting/value-objects/bulk-delete":{"post":{"operationId":"bulkDeleteValueObjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteValueObjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value object, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value object, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value object, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteValueObjectsInput"}}}},"summary":"Delete several value objects in one call, DEACTIVATING each one still in use and SKIPPING each custom value object's shadow, and report each outcome. WRITES. Every id must exist: if any does not, the whole call is rejected with NOT_FOUND listing exactly those ids and NOTHING is written. Then each is handled on its own: an unused value object is hard-deleted with its mappings — DESTRUCTIVE, no undo, a value object the system created as a side effect (`isSystemManaged: true`) included; one in use — allocation lines point at it, one of its records is referenced as a tag, or related to other master data, or a relationship is anchored on or points at the value object itself (a cluster included) — is kept and end-dated to today (or to its own startDate, when that is later) with every mapping still open (a mapping that would only start after that day is deleted) (one that already ended keeps its own end date and is reported deactivated again, and its mappings still open end on that same day); a custom value object's shadow is left untouched (delete it through deleteCustomValueObject (DELETE value-accounting/custom-value-objects/:id)). A kept or skipped record is a success, not a failure of the batch: deletedIds, deactivated and skipped together name every distinct id sent. Re-open kept value objects with reactivateValueObjects (POST value-accounting/value-objects/reactivate). POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.","description":"Deletes several value objects in one call, DEACTIVATING each one still in use and SKIPPING each custom value object's shadow, and reports every outcome.\n\nEvery id is checked to exist first: if any does not, the whole call is rejected with `NOT_FOUND` listing exactly the ids that matched nothing, and nothing is written. Once every id resolves, each value object is handled on its own merits — an unused one is hard-deleted with its mappings (no undo), a value object the system created as a side effect (`isSystemManaged: true`) included; one in use is kept and end-dated with every mapping still open (one that already ended keeps its own end date and is reported deactivated again, and its mappings still open end on that same day, so reactivating re-opens them with it); a custom value object's shadow is left untouched and named by its owner. All three are a success: `deletedIds`, `deactivated` and `skipped` together name every distinct id you sent.\n\nA kept or skipped value object is NOT a failure of the batch: one record with history does not stop the free ones from being deleted.\n\nPOST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingValueObjects"]}},"/value-accounting/driver-values/search":{"post":{"operationId":"searchDriverValues","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchDriverValuesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_FILTER, TOO_MANY_REFERENCES, UNSUPPORTED_DIMENSION_CODE, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The filter list that was too long: 'accountingPeriodIds' or 'combinationIds'."},"provided":{"type":"number","description":"How many ids the list held."},"maximum":{"type":"number","description":"The most ids one list may hold."}},"additionalProperties":false,"required":["field","provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this endpoint accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_FILTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"TOO_MANY_REFERENCES"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"field":{"type":"string","description":"The filter list that was too long: 'accountingPeriodIds' or 'combinationIds'."},"provided":{"type":"number","description":"How many ids the list held."},"maximum":{"type":"number","description":"The most ids one list may hold."}},"additionalProperties":false,"required":["field","provided","maximum"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this endpoint accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchDriverValuesInput"}}}},"summary":"Read recorded business driver values: one row per value with the period it is in force in, its combination, and the combination's members nested as {dimensionCode, id, name}, so summing value never double-counts. Read-only, cursor-paginated. filters.driverId or filters.combinationIds is required (INVALID_FILTER otherwise); add entityId and bookId for one recording context. An As-of driver's later periods hold system-carried rows (isCarried true) up to its latest write or today; includeCarried false keeps only the explicitly recorded values, and materializeDriverValues (POST value-accounting/driver-values/materialize) fills in carried rows for periods no write has reached — this read writes nothing. Sum a cumulative driver across periods; for an As-of driver take the last period. A filter matching nothing — including an id naming no driver, entity, book, period, combination or member — returns an empty items array with HTTP 200; only an unknown dimension code is refused (UNSUPPORTED_DIMENSION_CODE). Rows are ordered by period start date, then id. The audit history is not part of this read.","description":"Reads recorded business driver values: one row per value, with the period it is in force in, the combination it belongs to and that combination's members nested as `{dimensionCode, id, name}`, so a value tagged to a department and a team is ONE row, and summing `value` never double-counts.\n\nName the values to read: `filters.driverId`, `filters.combinationIds`, or both — a read across every driver mixes units and is refused with `INVALID_FILTER`. Add `entityId` and `bookId` for one recording context; a driver holds a separate value set per entity and book.\n\nAn As-of driver's value carries forward: every period after a recorded value holds a system-carried row (`isCarried: true`) with the value in force, up to the period of the latest write or today. Pass `includeCarried: false` to see only what was explicitly recorded. To read an As-of driver in a period no write has reached yet, call materializeDriverValues (POST value-accounting/driver-values/materialize) for those periods first — this read does not write. For a cumulative driver every period stands alone and periods may be summed; for an As-of driver take the last period instead.\n\nA filter matching nothing returns an empty `items` array with HTTP 200 — that includes an id naming no driver, entity, book, period, combination or member. Rows are ordered by period start date, then id, and paged with a keyset cursor.","tags":["valueAccountingDriverValues"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/value-accounting/value-centers/{id}":{"patch":{"operationId":"updateValueCenter","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateValueCenterOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, MAPPING_NOT_FOUND, MAPPING_MISMATCH, UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND, DUPLICATE_MAPPING_ROW, END_BEFORE_START, INVALID_DATE_RANGE, REACTIVATE_VIA_FLOW, MAPPING_OUTLIVES_END, MAPPING_STARTS_BEFORE_OWNER, START_AFTER_MAPPING_HISTORY, SYSTEM_MANAGED, DESCRIPTION_NOT_CLEARABLE, NAME_REQUIRED, CENTER_CODE_TAKEN, PARENT_NOT_FOUND, CYCLE, CATEGORY_NOT_FOUND, MAPPING_EXISTS, PARENT_INACTIVE, HAS_ACTIVE_CHILDREN, ONE_TO_ONE_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that matched nothing, deduplicated, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that belong to another value center."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The startDate the value center would have. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value center would have, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id","startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The value center id from the path, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, the default a new mapping gets, or the stored one an update keeps. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored — the one sent, the value center's end a new mapping inherits, or the stored one an update keeps — which falls before startDate. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent."},"createRows":{"type":"number","description":"How many createMappings rows are refused."}},"additionalProperties":false,"required":["id","startDate","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows: those that sent endDate: null and, on a value center that has ended, those whose endDate would leave the mapping open after that day; empty when only the value center's own endDate was null or only createMappings rows are refused."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"endDate":{"type":"string","format":"date","description":"The value center's end date as this request leaves it, which the refused mappings end after. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send an endDate after the value center's."}},"additionalProperties":false,"required":["id","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The value center's start date as this request leaves it, which the refused mappings start before. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send a startDate before the value center's."}},"additionalProperties":false,"required":["id","startDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings that ended before the new startDate, in canonical lowercase."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_MANAGED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value center."},"lockedFields":{"type":"array","items":{"type":"string"},"description":"The refused fields and verb arrays, in this request's vocabulary."}},"additionalProperties":false,"required":["id","lockedFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DESCRIPTION_NOT_CLEARABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CENTER_CODE_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"centerCode":{"type":"string","description":"The center code that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER value center that holds it."}},"additionalProperties":false,"required":["centerCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string","description":"The parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center that was to be moved."},"parentId":{"type":"string","description":"Id (a UUID) of the requested parent — the value center itself or one of its descendants."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingId":{"type":"string","description":"Id (a UUID) of the mapping that already maps the record — mappings[].id of getValueCenter (GET value-accounting/value-centers/:id)."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center being moved or extended."},"parentId":{"type":"string","description":"Id (a UUID) of the parent it would outlive."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but ends before the value center would. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_ACTIVE_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center being ended."},"childIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the direct children that would outlive it."}},"additionalProperties":false,"required":["id","childIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that matched nothing, deduplicated, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that belong to another value center."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The startDate the value center would have. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value center would have, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id","startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The value center id from the path, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, the default a new mapping gets, or the stored one an update keeps. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored — the one sent, the value center's end a new mapping inherits, or the stored one an update keeps — which falls before startDate. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent."},"createRows":{"type":"number","description":"How many createMappings rows are refused."}},"additionalProperties":false,"required":["id","startDate","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows: those that sent endDate: null and, on a value center that has ended, those whose endDate would leave the mapping open after that day; empty when only the value center's own endDate was null or only createMappings rows are refused."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"endDate":{"type":"string","format":"date","description":"The value center's end date as this request leaves it, which the refused mappings end after. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send an endDate after the value center's."}},"additionalProperties":false,"required":["id","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The value center's start date as this request leaves it, which the refused mappings start before. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send a startDate before the value center's."}},"additionalProperties":false,"required":["id","startDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings that ended before the new startDate, in canonical lowercase."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_MANAGED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value center."},"lockedFields":{"type":"array","items":{"type":"string"},"description":"The refused fields and verb arrays, in this request's vocabulary."}},"additionalProperties":false,"required":["id","lockedFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DESCRIPTION_NOT_CLEARABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CENTER_CODE_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"centerCode":{"type":"string","description":"The center code that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER value center that holds it."}},"additionalProperties":false,"required":["centerCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string","description":"The parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center that was to be moved."},"parentId":{"type":"string","description":"Id (a UUID) of the requested parent — the value center itself or one of its descendants."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingId":{"type":"string","description":"Id (a UUID) of the mapping that already maps the record — mappings[].id of getValueCenter (GET value-accounting/value-centers/:id)."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center being moved or extended."},"parentId":{"type":"string","description":"Id (a UUID) of the parent it would outlive."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but ends before the value center would. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_ACTIVE_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center being ended."},"childIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the direct children that would outlive it."}},"additionalProperties":false,"required":["id","childIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that matched nothing, deduplicated, in the order first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The mapping ids (UUIDs) that belong to another value center."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The startDate the value center would have. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate the value center would have, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id","startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The value center id from the path, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, the default a new mapping gets, or the stored one an update keeps. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored — the one sent, the value center's end a new mapping inherits, or the stored one an update keeps — which falls before startDate. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent."},"createRows":{"type":"number","description":"How many createMappings rows are refused."}},"additionalProperties":false,"required":["id","startDate","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows: those that sent endDate: null and, on a value center that has ended, those whose endDate would leave the mapping open after that day; empty when only the value center's own endDate was null or only createMappings rows are refused."}},"additionalProperties":false,"required":["id","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"endDate":{"type":"string","format":"date","description":"The value center's end date as this request leaves it, which the refused mappings end after. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send an endDate after the value center's."}},"additionalProperties":false,"required":["id","endDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The value center's start date as this request leaves it, which the refused mappings start before. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the refused updateMappings rows, in canonical lowercase, in the order sent; empty when only createMappings rows are refused."},"createRows":{"type":"number","description":"How many createMappings rows send a startDate before the value center's."}},"additionalProperties":false,"required":["id","startDate","mappingIds","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"START_AFTER_MAPPING_HISTORY"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center, in canonical lowercase."},"startDate":{"type":"string","format":"date","description":"The new startDate sent. Format YYYY-MM-DD."},"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings that ended before the new startDate, in canonical lowercase."}},"additionalProperties":false,"required":["id","startDate","mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_MANAGED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value center."},"lockedFields":{"type":"array","items":{"type":"string"},"description":"The refused fields and verb arrays, in this request's vocabulary."}},"additionalProperties":false,"required":["id","lockedFields"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DESCRIPTION_NOT_CLEARABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system-maintained value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CENTER_CODE_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"centerCode":{"type":"string","description":"The center code that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER value center that holds it."}},"additionalProperties":false,"required":["centerCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string","description":"The parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CYCLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center that was to be moved."},"parentId":{"type":"string","description":"Id (a UUID) of the requested parent — the value center itself or one of its descendants."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingId":{"type":"string","description":"Id (a UUID) of the mapping that already maps the record — mappings[].id of getValueCenter (GET value-accounting/value-centers/:id)."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center being moved or extended."},"parentId":{"type":"string","description":"Id (a UUID) of the parent it would outlive."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but ends before the value center would. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["id","parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"HAS_ACTIVE_CHILDREN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center being ended."},"childIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the direct children that would outlive it."}},"additionalProperties":false,"required":["id","childIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value center to change; bound from the :id path segment. An id that matches no value center is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase.","example":"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateValueCenterInput"}}}},"summary":"Partially update one value center — its fields, its place in the tree and its master-data mappings — in one transaction. WRITES; returns an empty body unless it deleted or healed mappings (removedMappingIds, healedMappingIds). Only what is sent is written. Fields: name, description (null clears), centerCode (null clears), startDate, endDate (a date ends it together with every mapping still open after that day, which ends on the same day; a later date on a value center that already ended moves the mappings ending on its previous day with it; null CLEARS an end of today or later (a schedule that never took effect; the mappings ending with it follow) and is REFUSED with REACTIVATE_VIA_FLOW on an end before today — re-open with reactivateValueCenters (POST value-accounting/value-centers/reactivate)), categoryId (null clears), parentId (moves it; null makes it a root; never under itself or a descendant — CYCLE). Mappings: createMappings adds records (the same record on two entries with different dates is DUPLICATE_MAPPING_ROW, judged first; one this value center maps with an OPEN mapping is MAPPING_EXISTS unless the same request deletes that mapping — an ended mapping is history and does not count, judged on the end dates as the request leaves them: a mapping ended in the same request no longer counts, one re-opened in it does; a new mapping starts today, or on the value center's own startDate when that is later, unless startDate is sent, and without an endDate it ends with the value center — it inherits the value center's endDate as the request leaves it, open-ended only when there is none; a mapping never outlives its value center, so an endDate later than the value center's on a createMappings or updateMappings row is MAPPING_OUTLIVES_END), updateMappings re-dates existing mappings by their id (endDate: null refused the same way; an id sent twice counts once, its first row; on a value center that has ended — its endDate as the request leaves it, before today — an endDate today or later on a createMappings or updateMappings row is refused with REACTIVATE_VIA_FLOW too), deleteMappings removes mappings by their id; mapping ids are mappings[].id of getValueCenter (GET value-accounting/value-centers/:id) and must belong to this value center (MAPPING_NOT_FOUND, MAPPING_MISMATCH). inCluster follows the OPEN mapping set: true on every mapping while more than one record is mapped by mappings open today; a mapping that ended in the past does not count, so a link moved by ending one mapping and creating another stays 1:1. It is settled by a request that adds or removes mappings, or ends or re-opens one as of today. A value center may be left with no mapping. A value center the system maintains for a department or team (isSystemManaged) refuses changes to name, centerCode, startDate, categoryId and mappings with SYSTEM_MANAGED (its parentId stays editable: no Department/Team hook places it in the tree), and a null description with DESCRIPTION_NOT_CLEARABLE; its mappings end with it (send endDate on the value center, never on a mapping); re-sending a stored value is not a change. Dates are judged on the end state the request leaves: END_BEFORE_START (the value center), INVALID_DATE_RANGE (a mapping starting after its own end, an end it follows included), MAPPING_STARTS_BEFORE_OWNER (a sent mapping start before the value center's), START_AFTER_MAPPING_HISTORY (a later start past a mapping that already ended; the running mappings move with it). Ending it earlier DELETES a mapping that would only start after the new end (removedMappingIds), and ends other value centers' mappings naming it on that day (deleting, and listing, those that would only start after it); an updateMappings row healed to the value center's end is listed in healedMappingIds; deleteMappings, and updateMappings rows under an earlier end, are applied before the value center is written. Other refusals: NOT_FOUND, NAME_REQUIRED, CENTER_CODE_TAKEN, PARENT_NOT_FOUND, CATEGORY_NOT_FOUND, and for createMappings UNSUPPORTED_DIMENSION_CODE / RECORD_NOT_FOUND / MAPPING_EXISTS (MAPPING_EXISTS also for an updateMappings row re-opening an ended mapping onto a record another open mapping names). A request leaving this value center standing alone for a record another value center already represents one-to-one (open, non-cluster) — a first mapping, or a cluster cut back to one record — is ONE_TO_ONE_EXISTS: a record has at most one open one-to-one value center, whoever made it. Every check runs first, so a rejected call writes nothing. A PATCH that changes nothing — an empty body, or every field sent with its stored value — is not written, so lastModifiedDate does not move; the same holds for each updateMappings row. An endDate moved into the future on a value center that already ended re-opens the mappings that move with it and is refused with ONE_TO_ONE_EXISTS when that leaves it standing alone for a record another value center represents one-to-one with an open mapping.","description":"Partially updates one value center — its own fields, its place in the tree and its master-data mappings — in one transaction, and returns an empty body — or, only when it deleted or healed mappings, their ids (`removedMappingIds`, `healedMappingIds`).\n\nOnly what you send is written: omit a field to leave it unchanged. `description: null`, `centerCode: null` and `categoryId: null` clear. `parentId` moves the value center under another value center; `parentId: null` makes it a root — it stays in the tree. A move can never hang a value center under itself or one of its own descendants (`CYCLE`): such a loop would silently remove every value center in it from the tree.\n\nThe mappings are edited through three verb arrays beside the fields: `createMappings` adds mappings to new records, `updateMappings` changes the dates of existing mappings (by mapping id), `deleteMappings` removes mappings (by mapping id). Mapping ids are the `mappings[].id` of getValueCenter (GET value-accounting/value-centers/:id), and only this value center's own mappings can be named (`MAPPING_MISMATCH` otherwise). A value center may be left with no mapping at all. A record is linked once at a time: `createMappings` naming a record this value center maps with an OPEN mapping fails with `MAPPING_EXISTS` — unless the same request deletes that mapping; a mapping that already ended is history, so naming its record again (moving a link back) adds a new mapping. Openness is judged on the end dates as the request leaves them: a mapping ended by `updateMappings` in the same request no longer counts (end it yesterday and link its record afresh in one call), and one re-opened there with a future `endDate` does — re-opening an ended mapping onto a record another open mapping names fails with `MAPPING_EXISTS` too. A new mapping starts today unless you send its `startDate`, or on the value center's own start date when that is later. Whenever more than one record is mapped by mappings open today (no `endDate`, or one not yet passed), every one of the value center's mappings reads `inCluster: true`, and none of those records resolves to it as its own value center. A mapping that ended in the past does not count: ending the old mapping with `updateMappings` and adding the new record with `createMappings` in one request MOVES the link, and the value center stays 1:1, resolving under its new record. The flag is settled by a request that adds or removes mappings, or whose `updateMappings` end or re-open a mapping as of today; a date change that leaves every mapping open or closed today as it was leaves it as it stands.\n\nEnding is a plain write, re-opening is not: an `endDate` DATE on the value center or on a mapping ends it, but `endDate: null` on the value center clears an end of today or later (a schedule that never took effect; the mappings ending with it follow), and fails with `REACTIVATE_VIA_FLOW` on an end before today and on any mapping — a value center and its mappings are re-opened together, and never under an ended parent, by reactivateValueCenters (POST value-accounting/value-centers/reactivate). On a value center that has ended — its `endDate`, as the request leaves it, before today — the same code refuses any mapping the request would leave open after that day: an `endDate` today or later on a `createMappings` or `updateMappings` row. A link cannot outlive its value center: a `createMappings` row sent without an `endDate` ends with the value center — it inherits the value center's `endDate` as the request leaves it (open-ended only when it has none) — and any row sending an `endDate` later than that fails with `MAPPING_OUTLIVES_END`. An `updateMappings` id sent twice counts once, its first row; a `createMappings` entry repeated with the same dates counts once, while the same record on two `createMappings` entries with different dates is refused with `DUPLICATE_MAPPING_ROW` (one entry per record per request; a second link period is a second request). Ending the value center — an `endDate` on an open one, or an earlier one than stored — ends every mapping still open after that day on the same day, as a delete would close them (a mapping that ended earlier keeps its day); a mapping that would only start after that day is never in effect inside the value center's life and is DELETED — `removedMappingIds` in the response lists it. The mappings of OTHER value centers that name this value center as their record follow the same closing: they end on that day, or are deleted and listed in `removedMappingIds` too. Moving the `endDate` of a value center that already ended to a LATER day moves its mappings ending on the previous day — the ones its retirement closed — with it. Either way reactivating re-opens exactly those mappings together; a mapping ended on another day stays.\n\nDates are judged on the END STATE the request leaves: the value center must not end before it starts (`END_BEFORE_START`); a mapping must not start after its own end (`INVALID_DATE_RANGE`, on the dates it is left with — an end it follows included) nor before the value center (`MAPPING_STARTS_BEFORE_OWNER`, on a start the request sends); a `startDate` moved LATER takes the mappings still running on the new day along, and a mapping that ended before it refuses the move (`START_AFTER_MAPPING_HISTORY`). On a value center with an end date, an `updateMappings` row sending a `startDate` but no `endDate` for a mapping left open (or ending after the value center) is written with the value center's end and listed in `healedMappingIds`. `deleteMappings`, and `updateMappings` rows under an earlier end, are applied before the value center itself is written, so a mapping the request deletes or re-dates never blocks it.\n\nA value center the system maintains for a department or team (`isSystemManaged` on the reads) refuses changes to its name, centerCode, startDate, categoryId and mappings with `SYSTEM_MANAGED`, because the record's next change would overwrite them; its endDate, its description and its place in the tree (`parentId` — no Department/Team hook ever moves it, so you place it; `CYCLE`, `PARENT_NOT_FOUND` and `PARENT_INACTIVE` still apply) stay editable, and its description can be replaced but not cleared (`DESCRIPTION_NOT_CLEARABLE`). A mapping of such a value center ends with the value center: send `endDate` on the value center (or DELETE it), never on one of its mappings. Re-sending a stored value is never a change.\n\nA record has at most one OPEN one-to-one value center, whoever made it — the automation, an import or a user; the first link stands and a second is refused. A request that leaves this value center standing alone for a record ANOTHER value center already represents one-to-one — its first mapping, or a cluster cut back to one record by `deleteMappings` or an `updateMappings` end date — fails with `ONE_TO_ONE_EXISTS`, naming the other value center and its mapping; end that link first or delete that value center (for a cut-back cluster: end or delete this whole value center). A value center that already stands alone for its record stays editable.\n\nEvery check runs before anything is written. A PATCH that changes nothing is not written at all and leaves lastModifiedDate untouched — this holds per mapping too: an `updateMappings` row that sends the stored dates is not written. Moving the end date of a value center that already ended into the future re-opens the mappings that move with it, and is refused with ONE_TO_ONE_EXISTS when another value center already holds an open one-to-one link to the record they name: end that link first.","tags":["valueAccountingValueCenters"]},"get":{"operationId":"getValueCenter","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getValueCenterOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value center to fetch; bound from the :id path segment. Obtain it from the valueCenters data-set (GET value-accounting/value-centers), from the search or from the create response. An id that matches no value center is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Fetch one value center — the responsibility unit journal lines are tagged to and figures roll up through — by its id, with every master-data mapping it carries (each record as {dimensionCode, id}), its parent and its DIRECT children. Read-only. Prefer searchValueCenters (POST value-accounting/value-centers/search) to find a value center by name, code, parent or the record it stands for; use this when you already hold an id, or to confirm it still resolves before writing against it. The whole subtree or chain of parents is getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy). An id that matches nothing is rejected with NOT_FOUND rather than returning an empty body.","description":"Fetches one value center by the id in the path, with every master-data mapping it carries, its parent and its direct children.\n\nEach mapping names its record as the pair {dimensionCode, id} — the same identity ensureRelationship (POST value-accounting/associations) and resolveReportingTags (POST base/reporting-tags/resolve) use — so a caller can go straight from a value center to the department or team it stands for. A value center with no mapping is valid and returns an empty `mappings` array. A mapping whose record no longer resolves keeps its row with `record` absent, so it can still be seen and removed by its id.\n\n`parentId` is the parent value center's id (absent for a root) and `children` lists the value centers hanging DIRECTLY under this one, by id and name. The whole subtree, or the whole chain of parents, is getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy).\n\nPrefer searchValueCenters (POST value-accounting/value-centers/search) when looking a value center up by name, code, parent or record, and the valueCenters data-set (GET value-accounting/value-centers) when browsing. An id that matches nothing fails with `NOT_FOUND` rather than returning an empty body.","tags":["valueAccountingValueCenters"]},"delete":{"operationId":"deleteValueCenter","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteValueCenterOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value center to delete; bound from the :id path segment. An id that matches no value center is rejected with NOT_FOUND rather than treated as an already-completed delete. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Delete one value center with its mappings, SKIP it when it has live children, or DEACTIVATE it when it is still in use — and report which happened. WRITES. A value center with a direct child reading 'active' or 'planned' is left untouched (outcome 'skipped'): move, end or delete the children first. One in use — allocation lines are tagged to it, business drivers reference it, it is related to other master data, or another value center's mapping names it as its record — is kept and end-dated to today (or to its own startDate, when that is later) with every mapping still open (a mapping that would only start after that day is deleted) ('deactivated'), and the other value centers' mappings naming it that are still open end on the same day; one that already ended keeps its own end date and is reported 'deactivated' again, and its mappings still open end on that same day, so reactivating re-opens them with it. Any other is hard-deleted with its mappings and its place in the tree — DESTRUCTIVE, no undo — and its remaining children move up to its parent ('deleted'). All three are a success with HTTP 200: read outcome and reason. Re-open a deactivated value center with reactivateValueCenters (POST value-accounting/value-centers/reactivate). It cannot be re-opened while another value center holds an open one-to-one link to the record it stood for (ONE_TO_ONE_EXISTS): end that link first. An unknown id is rejected with NOT_FOUND and nothing is written. For several value centers in one call use bulkDeleteValueCenters (POST value-accounting/value-centers/bulk-delete).","description":"Deletes one value center with its mappings — or leaves it in place when it has live children, or DEACTIVATES it when it is still in use — and reports which of the three happened.\n\nA value center with a direct child that reads 'active' or 'planned' is SKIPPED: nothing is written, because deleting or retiring it would strand a live part of the tree. Deal with the children first — move them with updateValueCenter (PATCH value-accounting/value-centers/:id) (parentId), end them, or delete them — then delete again. A child ended today still reads 'active' and still blocks.\n\nOtherwise a value center that IS in use is kept: it and every one of its mappings still open are end-dated to today (or to its own startDate, when that is later), which retires it once that day has passed — a mapping that would only start after that day is deleted instead and listed in deletedMappingIds — while every posting made against it keeps resolving; it stays in the tree. A value center that already ended keeps its own end date and is reported deactivated again; its mappings still open end on that same day, so reactivating re-opens them with it. In use means any of: allocation lines are tagged to it, it is referenced by business drivers, or it is related to other master data through the associations resource.\n\nOtherwise it is hard-deleted with its mappings and its place in the tree; there is no undo. Its children — only ended ones can be left by then — move up to its own parent (to the root when it had none); they are never deleted with it.\n\nAll three outcomes are a success (HTTP 200); read `outcome`, and `reason` for why a value center was kept. A deactivated value center can be re-opened with reactivateValueCenters (POST value-accounting/value-centers/reactivate). It cannot be re-opened while another value center holds an open one-to-one link to the record it stood for (ONE_TO_ONE_EXISTS): end that link first. An unknown id fails with `NOT_FOUND` and nothing is written.","tags":["valueAccountingValueCenters"]}},"/value-accounting/value-centers":{"post":{"operationId":"createValueCenter","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createValueCenterOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_REQUIRED, CENTER_CODE_TAKEN, PARENT_NOT_FOUND, CATEGORY_NOT_FOUND, UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND, DUPLICATE_MAPPING_ROW, END_BEFORE_START, INVALID_DATE_RANGE, REFERENCE_NOT_FOUND, PARENT_INACTIVE, MAPPING_OUTLIVES_END, MAPPING_STARTS_BEFORE_OWNER, MAPPING_EXISTS, ONE_TO_ONE_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CENTER_CODE_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"centerCode":{"type":"string","description":"The center code that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value center that holds it."}},"additionalProperties":false,"required":["centerCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string","description":"The parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate sent. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate sent, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, or the default a new mapping gets. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored, which falls before startDate. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent are refused."}},"additionalProperties":false,"required":["startDate","endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center — present only in case (2); a new value center has no id yet."},"parentId":{"type":"string","description":"Id (a UUID) of its ended parent."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but ends before the value center would. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endDate":{"type":"string","format":"date","description":"The value center's endDate, as sent (YYYY-MM-DD)."},"createRows":{"type":"number","description":"How many of the mappings sent have an endDate after that day."}},"additionalProperties":false,"required":["endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The new value center's startDate, as sent. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent start before it."}},"additionalProperties":false,"required":["startDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center."},"mappingId":{"type":"string","description":"Id (a UUID) of that value center's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CENTER_CODE_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"centerCode":{"type":"string","description":"The center code that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value center that holds it."}},"additionalProperties":false,"required":["centerCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string","description":"The parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate sent. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate sent, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, or the default a new mapping gets. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored, which falls before startDate. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent are refused."}},"additionalProperties":false,"required":["startDate","endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center — present only in case (2); a new value center has no id yet."},"parentId":{"type":"string","description":"Id (a UUID) of its ended parent."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but ends before the value center would. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endDate":{"type":"string","format":"date","description":"The value center's endDate, as sent (YYYY-MM-DD)."},"createRows":{"type":"number","description":"How many of the mappings sent have an endDate after that day."}},"additionalProperties":false,"required":["endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The new value center's startDate, as sent. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent start before it."}},"additionalProperties":false,"required":["startDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center."},"mappingId":{"type":"string","description":"Id (a UUID) of that value center's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CENTER_CODE_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"centerCode":{"type":"string","description":"The center code that is already taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value center that holds it."}},"additionalProperties":false,"required":["centerCode","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"parentId":{"type":"string","description":"The parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CATEGORY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"categoryId":{"type":"string","description":"The category id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["categoryId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DUPLICATE_MAPPING_ROW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record named twice with different dates."}},"additionalProperties":false,"required":["record"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate sent. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The endDate sent, which falls before startDate. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DATE_RANGE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The first refused mapping's start date as it would be stored — the one sent, or the default a new mapping gets. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The first refused mapping's end date as it would be stored, which falls before startDate. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent are refused."}},"additionalProperties":false,"required":["startDate","endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center — present only in case (2); a new value center has no id yet."},"parentId":{"type":"string","description":"Id (a UUID) of its ended parent."},"parentEndDate":{"type":"string","format":"date","description":"The parent's last day in effect (YYYY-MM-DD) — present only when that end date is the cause: the parent is still in effect, or planned, but ends before the value center would. Absent when the parent reads 'inactive' or 'canceled'."}},"additionalProperties":false,"required":["parentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_OUTLIVES_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"endDate":{"type":"string","format":"date","description":"The value center's endDate, as sent (YYYY-MM-DD)."},"createRows":{"type":"number","description":"How many of the mappings sent have an endDate after that day."}},"additionalProperties":false,"required":["endDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_STARTS_BEFORE_OWNER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The new value center's startDate, as sent. Format YYYY-MM-DD."},"createRows":{"type":"number","description":"How many of the mappings sent start before it."}},"additionalProperties":false,"required":["startDate","createRows"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center."},"mappingId":{"type":"string","description":"Id (a UUID) of that value center's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the record's retired value center whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueCenterId":{"type":"string","description":"Id (a UUID) of the value center that already represents the record one-to-one — the id of getValueCenter (GET value-accounting/value-centers/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value center's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueCenterId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createValueCenterInput"}}}},"summary":"Create a value center — a root, or under an existing parent — optionally with master-data mappings, in ONE transaction. WRITES. The new value center is part of the tree at once (a root when no parentId is sent). mappings is optional and may be empty — a value center need not stand for any record; each entry names its record as {dimensionCode, id}, the same record twice with the same dates counts once (with different dates it is DUPLICATE_MAPPING_ROW), and several records make it a cluster. ONE record that already has its own value center: that id is RETURNED — re-opened first if it is retired (end date before today; a later end date is a scheduled end and is kept) — up to the record's end date when that is today or later, not at all when the record has ended — kept active (its end date cleared; screened PARENT_INACTIVE / MAPPING_EXISTS / ONE_TO_ONE_EXISTS) when it ends TODAY — and name, description, centerCode, categoryId, parentId and all dates are not WRITTEN, so the call is safe to repeat for one record and never duplicates or renames — yet the request is still judged as sent: NAME_REQUIRED, DUPLICATE_MAPPING_ROW and INVALID_DATE_RANGE (an end inherited from the request's endDate included) refuse a malformed request even when it would resolve, while CENTER_CODE_TAKEN, PARENT_INACTIVE for a new value center and MAPPING_OUTLIVES_END are skipped there; a value center the record's link moved away from, now standing for another record, is not its own and is left untouched. No mapping, or several records: a new value center is always created, so calling twice creates two, and names are not unique. The value centers the system maintains for departments and teams are created by that automation, never here — one created here is hand-made and fully editable. Returns only the id; read the stored form with getValueCenter (GET value-accounting/value-centers/:id). Refusals, all before the first write: NAME_REQUIRED (blank name, judged on the resolve path too), CENTER_CODE_TAKEN (only for a new value center), PARENT_NOT_FOUND, CATEGORY_NOT_FOUND, UNSUPPORTED_DIMENSION_CODE / RECORD_NOT_FOUND (a mapping whose record does not resolve), PARENT_INACTIVE (a new live value center that would outlive its parent — an ended one, or one whose end date is earlier than the new value center's), MAPPING_OUTLIVES_END (a new value center with an endDate and a mapping sent with it that has a later endDate — a mapping ending on the value center's last day passes, and one sent without an endDate ends with the value center), and — only when the call re-opens the record's retired value center — REFERENCE_NOT_FOUND / PARENT_INACTIVE, the reactivate route's own refusals.","description":"Creates a value center — a root, or under an existing parent — with the master-data mappings sent, or resolves the one that already exists, and returns only its `id`.\n\nThe new value center is part of the tree at once: under `parentId` when one is sent, a root otherwise. `mappings` is OPTIONAL and may be empty: a value center need not stand for any master-data record. Each mapping names its record as the pair {dimensionCode, id} the associations resource speaks; the same record sent twice with the same dates counts once — sent twice with different dates it is refused with `DUPLICATE_MAPPING_ROW` (one entry per record; a second link period is a later PATCH) — and several records make the value center a cluster on every day more than one of them is open (judged from the mappings; the stored `inCluster` flag is settled from the mappings open today and is informational only).\n\nRESOLVE-OR-CREATE for ONE record — one record, one value center of its own. When the record already has its own (non-cluster) value center, that value center's id is RETURNED and nothing is created — re-opened first when it is retired (an end date before today) or its mapping has ended — up to the record's own end date when the record ends today or later (it never outlives the record), with no end date when the record has none; when the record itself has ENDED (its end date is before today) it is NOT re-opened: its id is returned with the value center as it stands, nothing written. A value center whose end date is still AHEAD is in effect: its scheduled end is kept. One whose end date is TODAY (still active) is KEPT ACTIVE: its end date is cleared — or moved to the record's own end date when the record ends later, and left as it is when the record ends today too — the mappings ending with it following — screened as the clear on PATCH value-accounting/value-centers/:id is: `PARENT_INACTIVE` under a parent ended for an open-ended child, `MAPPING_EXISTS` / `ONE_TO_ONE_EXISTS` when a mapping the clear carries would duplicate a link, nothing written. Re-opening a retired one is screened exactly like reactivateValueCenters (POST value-accounting/value-centers/reactivate): it is refused with PARENT_INACTIVE under a parent that is ended for it (inactive, canceled, or ending before the end the re-open gives — none, or the record's end date), and with REFERENCE_NOT_FOUND when a mapping it would re-open names master data that no longer exists, so a create is never a way around a refused reactivate. The `name`, `description`, `centerCode`, `categoryId`, `parentId`, dates and mapping dates of the request are then not WRITTEN: this call never renames, moves or re-files an existing value center (updateValueCenter (PATCH value-accounting/value-centers/:id) does), and a new link row it adds for the record ends with that value center. The request is still JUDGED AS SENT, before the resolution: NAME_REQUIRED, DUPLICATE_MAPPING_ROW and INVALID_DATE_RANGE (a mapping that would start after its own end — the end sent, or the request's `endDate` a mapping sent without one inherits) refuse a malformed request even when it would resolve, so the same request gets the same answer whether it creates or resolves; only the checks of what a NEW value center would write — CENTER_CODE_TAKEN, PARENT_INACTIVE for a new value center, MAPPING_OUTLIVES_END — are skipped on a resolve. This is what makes the call safe to repeat for one record. A value center the record's link moved away from, which now stands for another record, is not its own: a new value center is created and that one is left untouched. With NO mapping, or with SEVERAL records, a new value center is always created, so calling twice creates two, and names are not unique.\n\nThe value centers the system maintains for departments and teams — which departments or teams get one is the tenant's VALUE_CENTER_MAPPING_REFERENCE setting — are created by that automation, not here; a value center created here is hand-made and stays fully editable. `centerNumber` is assigned automatically.\n\nA mapping never outlives its value center: a mapping sent without an `endDate` ends with the value center — it inherits the value center's `endDate`, and is open-ended only when the value center has none — and a value center created WITH an `endDate` is refused with MAPPING_OUTLIVES_END when a mapping sent with it has a later `endDate`; a mapping ending on the value center's last day passes, and a value center with an `endDate` and no mappings (history, e.g. a migration) is fine. A mapping that would start after the end it inherits — no dates on a value center whose `endDate` is already past starts today — is refused with INVALID_DATE_RANGE: send its real `startDate` to record history.\n\nEvery check runs before the first write; the value center, its place in the tree and its mappings are written in one transaction.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingValueCenters"]},"get":{"operationId":"valueCenters","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[startDate]","in":"query","required":false,"description":"Filter startDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][ne]","in":"query","required":false,"description":"Filter startDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gt]","in":"query","required":false,"description":"Filter startDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][gte]","in":"query","required":false,"description":"Filter startDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lt]","in":"query","required":false,"description":"Filter startDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][lte]","in":"query","required":false,"description":"Filter startDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[startDate][in]","in":"query","required":false,"description":"Filter startDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][notIn]","in":"query","required":false,"description":"Filter startDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[startDate][between]","in":"query","required":false,"description":"Filter startDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[endDate]","in":"query","required":false,"description":"Filter endDate (equality)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][ne]","in":"query","required":false,"description":"Filter endDate (ne)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gt]","in":"query","required":false,"description":"Filter endDate (gt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][gte]","in":"query","required":false,"description":"Filter endDate (gte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lt]","in":"query","required":false,"description":"Filter endDate (lt)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][lte]","in":"query","required":false,"description":"Filter endDate (lte)","schema":{"type":"string","format":"date"}},{"name":"filter[endDate][in]","in":"query","required":false,"description":"Filter endDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][notIn]","in":"query","required":false,"description":"Filter endDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[endDate][between]","in":"query","required":false,"description":"Filter endDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status]","in":"query","required":false,"description":"Filter status (equality)","schema":{"type":"string"}},{"name":"filter[status][ne]","in":"query","required":false,"description":"Filter status (ne)","schema":{"type":"string"}},{"name":"filter[status][gt]","in":"query","required":false,"description":"Filter status (gt)","schema":{"type":"string"}},{"name":"filter[status][gte]","in":"query","required":false,"description":"Filter status (gte)","schema":{"type":"string"}},{"name":"filter[status][lt]","in":"query","required":false,"description":"Filter status (lt)","schema":{"type":"string"}},{"name":"filter[status][lte]","in":"query","required":false,"description":"Filter status (lte)","schema":{"type":"string"}},{"name":"filter[status][in]","in":"query","required":false,"description":"Filter status (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][notIn]","in":"query","required":false,"description":"Filter status (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[status][between]","in":"query","required":false,"description":"Filter status (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[status][like]","in":"query","required":false,"description":"Filter status (like)","schema":{"type":"string"}},{"name":"filter[categoryId]","in":"query","required":false,"description":"Filter categoryId (equality)","schema":{"type":"string"}},{"name":"filter[categoryId][ne]","in":"query","required":false,"description":"Filter categoryId (ne)","schema":{"type":"string"}},{"name":"filter[categoryId][gt]","in":"query","required":false,"description":"Filter categoryId (gt)","schema":{"type":"string"}},{"name":"filter[categoryId][gte]","in":"query","required":false,"description":"Filter categoryId (gte)","schema":{"type":"string"}},{"name":"filter[categoryId][lt]","in":"query","required":false,"description":"Filter categoryId (lt)","schema":{"type":"string"}},{"name":"filter[categoryId][lte]","in":"query","required":false,"description":"Filter categoryId (lte)","schema":{"type":"string"}},{"name":"filter[categoryId][in]","in":"query","required":false,"description":"Filter categoryId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][notIn]","in":"query","required":false,"description":"Filter categoryId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[categoryId][between]","in":"query","required":false,"description":"Filter categoryId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[categoryId][like]","in":"query","required":false,"description":"Filter categoryId (like)","schema":{"type":"string"}},{"name":"filter[parentId]","in":"query","required":false,"description":"Filter parentId (equality)","schema":{"type":"string"}},{"name":"filter[parentId][ne]","in":"query","required":false,"description":"Filter parentId (ne)","schema":{"type":"string"}},{"name":"filter[parentId][gt]","in":"query","required":false,"description":"Filter parentId (gt)","schema":{"type":"string"}},{"name":"filter[parentId][gte]","in":"query","required":false,"description":"Filter parentId (gte)","schema":{"type":"string"}},{"name":"filter[parentId][lt]","in":"query","required":false,"description":"Filter parentId (lt)","schema":{"type":"string"}},{"name":"filter[parentId][lte]","in":"query","required":false,"description":"Filter parentId (lte)","schema":{"type":"string"}},{"name":"filter[parentId][in]","in":"query","required":false,"description":"Filter parentId (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][notIn]","in":"query","required":false,"description":"Filter parentId (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[parentId][between]","in":"query","required":false,"description":"Filter parentId (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[parentId][like]","in":"query","required":false,"description":"Filter parentId (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","parentId","-parentId","status","-status","categoryId","-categoryId","startDate","-startDate","endDate","-endDate","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","centerNumber","centerCode","description","startDate","endDate","status","categoryId","parentId","isSystemManaged","mappingCount","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/valueCentersRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List the value centers this tenant holds — the responsibility units (cost and profit centres) journal lines are tagged to and figures roll up through — one row per value center, with its parent in the tree and structured filters. GET data-set exposing filter[field][op]= (eq/ne/gt/gte/lt/lte/in/notIn/between/like), sort=startDate or sort=-lastModifiedDate, sparse fields=, and page[size]/page[cursor] cursor pagination. filter[status][eq]=active keeps the ones in effect today; filter[parentId][eq]=<id> the direct children of one value center. Names, numbers, codes and descriptions are returned but cannot be filtered or sorted on here, and the mappings are summarised as mappingCount only: to find a value center by name, code, parent or the master-data record it stands for, and to read its mappings, use searchValueCenters (POST value-accounting/value-centers/search) or getValueCenter (GET value-accounting/value-centers/:id); for the whole subtree or the chain of parents use getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy).","tags":["valueAccountingValueCenters"]}},"/value-accounting/driver-values/{id}":{"delete":{"operationId":"deleteDriverValue","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteDriverValueOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SYSTEM_DRIVER, DELETE_CARRIED_BLOCKED, DELETE_FIRST_VALUE_BLOCKED, END_COMBO_EXPLICIT_AFTER, LINE_NOT_FOUND, DRIVER_NOT_FOUND, PERIOD_LOCKED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no value, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_CARRIED_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_FIRST_VALUE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no value, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_CARRIED_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_FIRST_VALUE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no value, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_CARRIED_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DELETE_FIRST_VALUE_BLOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_COMBO_EXPLICIT_AFTER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value to delete; bound from the :id path segment. Take it from searchDriverValues (POST value-accounting/driver-values/search); it must be a recorded row (isCarried false). Matched case-insensitively."}],"summary":"Delete ONE recorded business driver value; returns an empty body. WRITES and is DESTRUCTIVE. For a CUMULATIVE driver the value is removed (Delete entry in the audit history). For an AS-OF driver it usually REVERTS: the period falls back to the value carried from before it, the row keeps its id and becomes a carried row, and the later carried rows follow. Deleting an As-of combination's only recorded value removes it with its carried rows; its FIRST value is refused while a later recorded value exists (DELETE_FIRST_VALUE_BLOCKED) — delete newest first, or use bulkDeleteDriverValues (POST value-accounting/driver-values/bulk-delete), which orders the deletes for you. A carried row cannot be deleted on its own (DELETE_CARRIED_BLOCKED). The period must be open and not in the future (PERIOD_LOCKED). A system driver's values are refused (SYSTEM_DRIVER). The audit history survives. An unknown id is NOT_FOUND. It runs in one transaction, so a refusal writes nothing.","description":"Deletes ONE recorded business driver value and returns an empty body. What 'delete' does depends on the driver's calculation type.\n\nCUMULATIVE driver: the value is removed and a Delete entry is written to the audit history.\n\nAS-OF driver: usually a REVERT, not a removal — the period falls back to the value carried from the last recorded value before it, so the row stays (same id, now `isCarried: true`) and the carried rows after it follow. Deleting a combination's ONLY recorded value removes it together with its carried rows; deleting its FIRST value is refused while a later recorded value exists (`DELETE_FIRST_VALUE_BLOCKED`) — delete from the newest value backwards, or use bulkDeleteDriverValues (POST value-accounting/driver-values/bulk-delete), which orders the deletes for you.\n\nA system-carried row cannot be deleted on its own (`DELETE_CARRIED_BLOCKED`); change the recorded value it derives from. The period must be open and not in the future (`PERIOD_LOCKED`). A system driver's values are refused (`SYSTEM_DRIVER`). The audit history always survives the value. An unknown id fails with `NOT_FOUND`. It runs in one transaction, so a refusal writes nothing.","tags":["valueAccountingDriverValues"]}},"/value-accounting/custom-value-dimensions/bulk-delete":{"post":{"operationId":"bulkDeleteCustomValueDimensions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteCustomValueDimensionsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value dimension, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under any blocked dimension. Never empty when this diagnostic is raised — they are what raised it."}},"additionalProperties":false,"required":["customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value dimension, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under any blocked dimension. Never empty when this diagnostic is raised — they are what raised it."}},"additionalProperties":false,"required":["customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no custom value dimension, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"customValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects filed under any blocked dimension. Never empty when this diagnostic is raised — they are what raised it."}},"additionalProperties":false,"required":["customValueObjectIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteCustomValueDimensionsInput"}}}},"summary":"Delete several tenant custom value dimensions in one call. WRITES and is DESTRUCTIVE — rows are hard-deleted, not deactivated, and there is no undo. Returns an empty body on success. ALL-OR-NOTHING TWICE OVER: every id is checked to exist before anything is removed, and if any does not the whole call is rejected with NOT_FOUND listing exactly the ids that matched nothing; every named dimension is then checked for its own custom value objects, and if ANY still holds one the whole call is rejected with IN_USE — including the dimensions in the batch that were free. Nothing is deleted in either case, so re-send the request without the offending ids. A successful delete removes each dimension's tag-rule availability and requirement configuration with it; tag rules are never a reason to refuse. ⚠️ A business driver's dimension DECLARATION is not checked: a driver that has recorded values necessarily holds custom value objects of the dimension and IS caught, so the exposed case is a driver declaring a dimension that holds no values yet. POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.","description":"Deletes several tenant custom value dimensions in one all-or-nothing transaction and returns an empty body. DESTRUCTIVE: rows are hard-deleted, not deactivated, and there is no undo.\n\nAll-or-nothing twice over. Every id is checked to exist first, and if any does not the whole call is rejected with `NOT_FOUND` listing exactly the ids that matched nothing. Every named dimension is then checked for its own custom value objects, and if ANY of them still holds one the whole call is rejected with `IN_USE` — including the dimensions in the batch that were free. Nothing is deleted in either case; re-send without the offending ids.\n\nOne reference is NOT checked: a business driver in the drivers package may DECLARE a dimension among its axes. A driver that has recorded values necessarily holds custom value objects of the dimension, which the guard does catch, so the exposed case is a driver declaring a dimension that holds no values yet.\n\nA successful delete takes each dimension's tag-rule configuration with it. Tag rules are never a reason to refuse.\n\nPOST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingCustomValueDimensions"]}},"/value-accounting/value-allocations/bulk-delete":{"post":{"operationId":"bulkDeleteValueAllocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteValueAllocationsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE, ROW_ACCESS_RESTRICTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value allocation, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the allocations that cannot be deleted, in the order they were first sent."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines under other allocations that were split from lines of the blocked allocations. Present for cause (2) only."},"referencedBy":{"type":"array","items":{"type":"object","properties":{"valueAllocationId":{"type":"string","description":"Id (a UUID) of the held allocation — one of inUseIds."},"nodeType":{"type":"string","description":"Name of the node type holding it, e.g. 'JournalEntryLine', 'PurchaseOrderLine', 'TimeRecord'."},"field":{"type":"string","description":"The node's field holding it — 'valueAllocationId', or 'fromValueAllocationId' / 'toValueAllocationId' on an IntercompanyBillLine."}},"additionalProperties":false,"required":["valueAllocationId","nodeType","field"]},"description":"Cause (1) only: one entry per allocation, node type and field holding it, in the order of inUseIds. Absent for cause (2)."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value allocation, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the allocations that cannot be deleted, in the order they were first sent."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines under other allocations that were split from lines of the blocked allocations. Present for cause (2) only."},"referencedBy":{"type":"array","items":{"type":"object","properties":{"valueAllocationId":{"type":"string","description":"Id (a UUID) of the held allocation — one of inUseIds."},"nodeType":{"type":"string","description":"Name of the node type holding it, e.g. 'JournalEntryLine', 'PurchaseOrderLine', 'TimeRecord'."},"field":{"type":"string","description":"The node's field holding it — 'valueAllocationId', or 'fromValueAllocationId' / 'toValueAllocationId' on an IntercompanyBillLine."}},"additionalProperties":false,"required":["valueAllocationId","nodeType","field"]},"description":"Cause (1) only: one entry per allocation, node type and field holding it, in the order of inUseIds. Absent for cause (2)."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value allocation, deduplicated and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the allocations that cannot be deleted, in the order they were first sent."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines under other allocations that were split from lines of the blocked allocations. Present for cause (2) only."},"referencedBy":{"type":"array","items":{"type":"object","properties":{"valueAllocationId":{"type":"string","description":"Id (a UUID) of the held allocation — one of inUseIds."},"nodeType":{"type":"string","description":"Name of the node type holding it, e.g. 'JournalEntryLine', 'PurchaseOrderLine', 'TimeRecord'."},"field":{"type":"string","description":"The node's field holding it — 'valueAllocationId', or 'fromValueAllocationId' / 'toValueAllocationId' on an IntercompanyBillLine."}},"additionalProperties":false,"required":["valueAllocationId","nodeType","field"]},"description":"Cause (1) only: one entry per allocation, node type and field holding it, in the order of inUseIds. Absent for cause (2)."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteValueAllocationsInput"}}}},"summary":"Delete several value allocations, each with all of its lines, in one call. WRITES and is DESTRUCTIVE — rows are hard-deleted, there is no undo and nothing is ever deactivated instead. Returns an empty body on success. ALL-OR-NOTHING: every id is checked before anything is removed — an unknown id rejects the whole call with NOT_FOUND listing exactly the ids that matched nothing; an allocation a document still holds — a journal entry line or any other document line or record that stores an allocation id, drafts included — rejects it with IN_USE naming the held allocations and, in referencedBy, the holding node types (re-tag the financial document to change its attribution); an allocation owning the split parent of a line under another allocation rejects it with IN_USE naming those allocations and the child lines in splitChildIds. The document check reads under the caller's row-level security: a caller whose access covers only some rows of a node type that can hold an allocation is refused with ROW_ACCESS_RESTRICTED instead, since the check cannot be evaluated for them. NOT_FOUND wins when several apply, then row access, then the document reference, then split parents; any refusal deletes nothing, the free allocations of the batch included. CASCADING: each allocation's own lines are deleted with it. POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.","description":"Deletes several value allocations, each together with all of its lines, in one all-or-nothing transaction and returns an empty body. DESTRUCTIVE: rows are hard-deleted and there is no undo.\n\nAll-or-nothing: every id is checked before anything is removed. If any id matches no allocation the whole call fails with `NOT_FOUND` listing exactly those ids. If a document still holds any allocation — a journal entry line, or a document line that has not posted or never posts (purchase order or request line, sales order product, time record, fixed asset, inventory line, a draft vendor bill's line, …; 25 node types store an allocation id); it is that document's live link into value accounting — the whole call fails with `IN_USE` naming the held allocations and, in `referencedBy`, the node types holding them; and if any owns the line another allocation's line was split from, with `IN_USE` naming those allocations and the child lines in `splitChildIds`. The document check reads under the caller's row-level security, so a caller whose access covers only some rows of a node type that can hold an allocation is refused with `ROW_ACCESS_RESTRICTED` naming those node types: the check cannot be evaluated for them. Either way nothing is deleted, the free allocations of the batch included. Unlike the deletes of value objects and value centers there is no partial outcome: an allocation is never deactivated instead, it is deleted or refused.\n\nCASCADING: each allocation's own lines are deleted with it.\n\nPOST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingValueAllocations"]}},"/value-accounting/associations/remove":{"post":{"operationId":"removeRelationship","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/removeRelationshipOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND, NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the reference that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the first record named."},"id":{"type":"string","description":"Id (a UUID) of the first record named."},"relatedDimensionCode":{"type":"string","description":"Dimension of the record it was expected to be related to."},"relatedId":{"type":"string","description":"Id (a UUID) of the record it was expected to be related to."}},"additionalProperties":false,"required":["dimensionCode","id","relatedDimensionCode","relatedId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the reference that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the first record named."},"id":{"type":"string","description":"Id (a UUID) of the first record named."},"relatedDimensionCode":{"type":"string","description":"Dimension of the record it was expected to be related to."},"relatedId":{"type":"string","description":"Id (a UUID) of the record it was expected to be related to."}},"additionalProperties":false,"required":["dimensionCode","id","relatedDimensionCode","relatedId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the reference that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the first record named."},"id":{"type":"string","description":"Id (a UUID) of the first record named."},"relatedDimensionCode":{"type":"string","description":"Dimension of the record it was expected to be related to."},"relatedId":{"type":"string","description":"Id (a UUID) of the record it was expected to be related to."}},"additionalProperties":false,"required":["dimensionCode","id","relatedDimensionCode","relatedId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/removeRelationshipInput"}}}},"summary":"Remove the relationship between two master-data records. WRITES and is DESTRUCTIVE — BOTH directed edges are deleted, whichever record created the relationship, and an association anchor left with no edges is cleaned up too. Symmetric: the argument order does not matter, and removing from one side also removes the other record's view of the relationship. Returns an empty body on success. Two records that are not related are rejected with NOT_FOUND rather than reported as a completed removal, so a caller can tell the two apart. It runs in one transaction: both edges are removed or neither is, and a rejected call writes nothing. Irreversible — re-create with ensureRelationship (POST value-accounting/associations), though which side was explicit is not remembered. A value object the tagging created for a record that had none is NOT removed with the relationship; to undo it too, delete it afterwards with deleteValueObject (DELETE value-accounting/value-objects/:id) — once nothing else uses it, it is hard-deleted, and `isSystemManaged: true` does not block the delete. This is also how a blocked master-data delete is unblocked: deleting a department, team, location or employee is refused while it still has a relationship a user made or took over, and a value object, value center or custom value object that still has any relationship is deactivated rather than deleted. POST rather than DELETE because a relationship has no id of its own — the pair of references identifying it travels in a request body, which a DELETE does not dependably deliver.","description":"Removes the relationship between two master-data records ENTIRELY. Both directed edges are deleted — whichever record created the relationship — and an association anchor left holding no edges is cleaned up with them.\n\nSymmetric: the argument order does not matter, and removing from one record's side also removes the other record's view of the relationship. That is the point of the two-edge model, not a side effect, but it does mean this call changes what a record the caller did not name reports.\n\nTwo records that are not related raise `NOT_FOUND`. It runs in one transaction: both edges are removed or neither is, and a rejected call writes nothing. Irreversible: re-create with ensureRelationship (POST value-accounting/associations), though which side was explicit is not remembered.\n\nThis is also how a delete is unblocked: deleting a department, team, location or employee is refused while a relationship a user made or took over remains, and this package's deletes DEACTIVATE a value object, value center or custom value object that still has any relationship instead of deleting it.\n\nA value object the tagging created for a record that had none is NOT removed with the relationship. To undo it too, delete it afterwards with deleteValueObject (DELETE value-accounting/value-objects/:id): once nothing else uses it, it is hard-deleted — `isSystemManaged: true` locks its name and mappings against edits, not against the delete.\n\nPOST rather than DELETE: a relationship has no id of its own, so the pair of references that identifies it has to travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingAssociations"]}},"/value-accounting/value-centers/{id}/hierarchy":{"get":{"operationId":"getValueCenterHierarchy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getValueCenterHierarchyOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_DIRECTION, NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DIRECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"direction":{"type":"string","description":"The direction that was refused, exactly as sent."},"supportedDirections":{"type":"array","items":{"type":"string"},"description":"The two directions this route accepts."}},"additionalProperties":false,"required":["direction","supportedDirections"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_DIRECTION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"direction":{"type":"string","description":"The direction that was refused, exactly as sent."},"supportedDirections":{"type":"array","items":{"type":"string"},"description":"The two directions this route accepts."}},"additionalProperties":false,"required":["direction","supportedDirections"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value center."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value center to walk from; bound from the :id path segment. An id that matches no value center is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase.","example":"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"},{"name":"direction","in":"query","required":true,"schema":{"type":"string"},"description":"Which way to walk, as the direction query parameter: 'descendants' for everything below the value center (its subtree), 'ancestors' for everything above it (its chain of parents up to the root). Required, matched exactly (lowercase); any other value is rejected with INVALID_DIRECTION.","example":"descendants"}],"summary":"Walk the value center tree from one value center: direction=descendants returns every value center BELOW it down to the leaves, direction=ancestors every value center ABOVE it up to the root. Read-only. Each row is {id, name, parentId, depth}, depth 1 being a direct child or the direct parent; the value center in the path is not part of the answer, so a leaf's descendants and a root's ancestors are an empty items array. Every id is a value center id. Unfiltered and unpaged — a filter would narrow the tree walk itself rather than its rows, and silently drop rows that are there. For one level only, getValueCenter (GET value-accounting/value-centers/:id) carries the direct children and the parent. An id that matches nothing is rejected with NOT_FOUND, a direction that is neither of the two with INVALID_DIRECTION.","description":"Walks the value center tree from the value center in the path, in the direction the `direction` query parameter names, and returns every value center on the way.\n\n`direction=descendants` returns everything BELOW the value center — its children, their children, and so on to the leaves. `direction=ancestors` returns everything ABOVE it — its parent, the parent's parent, and so on up to the root. The value center named in the path is never part of the answer: the caller already has it, and a leaf (descendants) or a root (ancestors) answers with an empty `items` array.\n\nEach row names a value center by its id and name, its own parent's id and its `depth` — the number of levels between it and the value center in the path, 1 being a direct child (or the direct parent). Every id is a value center id, the one getValueCenter (GET value-accounting/value-centers/:id) is keyed by.\n\nThe walk takes no filter. It is a walk over the tree's own edges, and a filter applied to a subtree walk narrows the traversal rather than the rows it returns — a row demonstrably in the subtree would come back missing — so none is offered; filter the rows you receive, or narrow with searchValueCenters (POST value-accounting/value-centers/search). The whole tree is returned in one response, unpaged.","tags":["valueAccountingValueCenters"]}},"/value-accounting/associations":{"post":{"operationId":"ensureRelationship","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ensureRelationshipOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND, SELF_RELATIONSHIP, OBJECT_NUMBER_TAKEN, END_BEFORE_START","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the reference that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SELF_RELATIONSHIP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that was tagged to itself."},"id":{"type":"string","description":"Id (a UUID) of the record that was tagged to itself."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that was taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value object that holds it; empty when it cannot be read."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate the edge would have (YYYY-MM-DD)."},"endDate":{"type":"string","format":"date","description":"The endDate the edge would have, before startDate (YYYY-MM-DD)."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the reference that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SELF_RELATIONSHIP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that was tagged to itself."},"id":{"type":"string","description":"Id (a UUID) of the record that was tagged to itself."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that was taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value object that holds it; empty when it cannot be read."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate the edge would have (YYYY-MM-DD)."},"endDate":{"type":"string","format":"date","description":"The endDate the edge would have, before startDate (YYYY-MM-DD)."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the reference that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SELF_RELATIONSHIP"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that was tagged to itself."},"id":{"type":"string","description":"Id (a UUID) of the record that was tagged to itself."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"OBJECT_NUMBER_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"objectNumber":{"type":"string","description":"The object number that was taken."},"existingId":{"type":"string","description":"Id (a UUID) of the value object that holds it; empty when it cannot be read."}},"additionalProperties":false,"required":["objectNumber","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"END_BEFORE_START"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"startDate":{"type":"string","format":"date","description":"The startDate the edge would have (YYYY-MM-DD)."},"endDate":{"type":"string","format":"date","description":"The endDate the edge would have, before startDate (YYYY-MM-DD)."}},"additionalProperties":false,"required":["startDate","endDate"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ensureRelationshipInput"}}}},"summary":"Tag two master-data records to each other — the entry point for master-data tagging. WRITES. A relationship is stored as two directed edges, one on each record: this call writes the EXPLICIT edge from `record` to `relatedRecord` and the IMPLICIT reverse edge back, so both records can read the relationship from their own side and either can remove it. If the other record later tags this one, its edge becomes explicit too; an explicit edge is never downgraded. Idempotent — calling it again for the same pair merges the dates instead of duplicating anything (omit = as stored, null = clear, value = set), so retrying after a failure is safe. Returns an empty body; read the result with getRelationshipsForMasterData (POST value-accounting/associations/search). Both records must exist and must not be the same record, and the relationship must not end before it starts (END_BEFORE_START, judged on the dates it is left with: a date sent, else the stored one, and on a new pair an omitted start is today). An end that is not a value center is anchored on its own value object: the one standing for it today, or its retired one (also one that has ended while its link to the record still runs) as it stands — re-opened only when the call creates a NEW relationship, sends no endDate or one of today or later (an endDate before today records a past relationship and never re-opens), every record that value object would stand for again is ACTIVE and the screens of reactivateValueObjects (POST value-accounting/value-objects/reactivate) pass (never a custom value object's shadow); it creates one only when none ever existed (or the one it had now stands for another record), named from the master-data record and numbered with its business number, or a generated VO-n when another value object already holds that number (business numbers are unique only within their dimension), so its number can differ from the record's (also when the record already has a value center); removing the relationship does not delete it. To undo it, remove the relationship first and then delete that value object with deleteValueObject (DELETE value-accounting/value-objects/:id) (find it with searchValueObjects (POST value-accounting/value-objects/search) by `record`): once nothing else uses it, it is hard-deleted — `isSystemManaged: true` locks its name and mappings against edits, not against the delete. That delete needs the value-object delete grant (API: Delete Value Objects), which the tagging grant (API: Manage Master Data Associations) does not contain. ⚠️ A relationship keeps a record from being hard-deleted until it is removed: this package's deletes DEACTIVATE a value object, value center or custom value object that still has any relationship instead of deleting it, and deleting a department, team, location or employee is refused only while a relationship a user made or took over remains.","description":"Tags two master-data records to each other. This is the entry point for master-data tagging; the per-edge repair apis are not.\n\nA relationship is stored as TWO directed edges, one anchored on each record. This call writes the EXPLICIT edge record → relatedRecord and the IMPLICIT reverse edge relatedRecord → record. `isImplicit` records, per side, whether that record asserted the relationship: the initiator's edge is explicit, the target's is implicit. An existing implicit edge on the initiator's side is promoted to explicit; an existing explicit edge on the target's side is never downgraded, so if both records tag each other, both sides end up explicit.\n\nIdempotent: calling it again for the same pair merges the dates rather than duplicating anything, so a retry after a network failure is safe. Dates follow the package convention on a re-run: a date you omit stays as stored, `endDate: null` clears a previously set end date, a date you send is written — always onto BOTH edges.\n\nA record can never be tagged to itself (`SELF_RELATIONSHIP`): a self-loop would make the record report itself as in use and permanently block its own deletion.\n\nSide effect worth knowing: an end that is not a value center is anchored on its own value object — the one standing for it today, or its retired one as it stands; this call re-opens a retired one only when it creates a NEW relationship, sends no `endDate` or one of today or later (the end date is the relationship's last active day, so a relationship ending today still runs today), every record that value object would stand for again is ACTIVE, and the screens of reactivateValueObjects (POST value-accounting/value-objects/reactivate) pass — a repeat call, a date change or a call sending an `endDate` before today (a past relationship) never re-opens anything, and a custom value object's shadow is never re-opened here. It creates one only when none ever existed (or the one it had now stands for another record), named from the master-data record itself and numbered with its business number — or a generated VO-n when another value object already holds that number (business numbers are unique only within their dimension), so its number can differ from the record's — also when the record already has a value center. Removing the relationship does not delete it. To undo it, remove the relationship first and then delete that value object with deleteValueObject (DELETE value-accounting/value-objects/:id) (find it with searchValueObjects (POST value-accounting/value-objects/search) by `record`): once nothing else uses it, it is hard-deleted — `isSystemManaged: true` locks its name and mappings against edits, not against the delete. That delete needs the value-object delete grant (API: Delete Value Objects), which the tagging grant (API: Manage Master Data Associations) does not contain: a caller that can only tag cannot remove a value object it caused, and should ask a holder of that grant.\n\n⚠️ A relationship keeps a record from being hard-deleted until it is removed: this package's deletes DEACTIVATE a value object, value center or custom value object that still has any relationship instead of deleting it, and deleting a department, team, location or employee is refused only while a relationship a user made or took over remains.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingAssociations"]}},"/value-accounting/categories":{"post":{"operationId":"createCategory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createCategoryOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_TAKEN, NAME_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the category that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the category that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the category that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createCategoryInput"}}}},"summary":"Create one value accounting category — the grouping label value objects, custom value objects and value centers are filed under. WRITES. Returns only the id of the new category; read it back with getCategory (GET value-accounting/categories/:id) if you need the stored form. The name is this resource's unique semantic key, so a name already in use is rejected with NAME_TAKEN (which carries the id of the category holding it) and NOTHING is written — reuse that id instead of retrying with a variant spelling. An empty or whitespace-only name is rejected with NAME_REQUIRED, also before anything is written. Creating a category has no effect on any financial data; it only makes a new label available to file master data under.","description":"Creates one value accounting category and returns only the `id` the platform assigns — the reference getCategory, updateCategory and deleteCategory (GET/PATCH/deleteCategory) are keyed by. Read the stored record back with getCategory if the defaults matter.\n\n`name` is the resource's semantic key and is declared unique on the node, so creating a category whose name already exists fails with `NAME_TAKEN`, naming the id of the category that already holds it — reuse that id rather than retrying with a variant spelling. An empty or whitespace-only `name` fails with `NAME_REQUIRED`. The name is checked before anything is written, so a rejected call writes nothing; a name with real text is stored exactly as sent, untrimmed.\n\nThe call runs in a transaction: a failure writes nothing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingCategories"]},"get":{"operationId":"categories","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/categoriesRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List value accounting categories with structured filters. GET data-set exposing filter[field][op]= (eq/ne/gt/gte/lt/lte/in/notIn/between/like), sort=name or sort=-lastModifiedDate, sparse fields=, and page[size]/page[cursor] cursor pagination. A category is the grouping label value objects, custom value objects and value centers are filed under; it carries no amounts and no hierarchy of its own.","tags":["valueAccountingCategories"]}},"/value-accounting/value-allocations/{id}":{"delete":{"operationId":"deleteValueAllocation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteValueAllocationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE, ROW_ACCESS_RESTRICTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value allocation, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Id (a UUID) of the allocation that cannot be deleted."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines under other allocations that were split from one of its lines. Present for cause (2) only."},"referencedBy":{"type":"array","items":{"type":"object","properties":{"valueAllocationId":{"type":"string","description":"Id (a UUID) of the held allocation — one of inUseIds."},"nodeType":{"type":"string","description":"Name of the node type holding it, e.g. 'JournalEntryLine', 'PurchaseOrderLine', 'TimeRecord'."},"field":{"type":"string","description":"The node's field holding it — 'valueAllocationId', or 'fromValueAllocationId' / 'toValueAllocationId' on an IntercompanyBillLine."}},"additionalProperties":false,"required":["valueAllocationId","nodeType","field"]},"description":"Cause (1) only: one entry per allocation, node type and field holding it, in the order of inUseIds. Absent for cause (2)."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value allocation, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Id (a UUID) of the allocation that cannot be deleted."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines under other allocations that were split from one of its lines. Present for cause (2) only."},"referencedBy":{"type":"array","items":{"type":"object","properties":{"valueAllocationId":{"type":"string","description":"Id (a UUID) of the held allocation — one of inUseIds."},"nodeType":{"type":"string","description":"Name of the node type holding it, e.g. 'JournalEntryLine', 'PurchaseOrderLine', 'TimeRecord'."},"field":{"type":"string","description":"The node's field holding it — 'valueAllocationId', or 'fromValueAllocationId' / 'toValueAllocationId' on an IntercompanyBillLine."}},"additionalProperties":false,"required":["valueAllocationId","nodeType","field"]},"description":"Cause (1) only: one entry per allocation, node type and field holding it, in the order of inUseIds. Absent for cause (2)."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value allocation, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Id (a UUID) of the allocation that cannot be deleted."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines under other allocations that were split from one of its lines. Present for cause (2) only."},"referencedBy":{"type":"array","items":{"type":"object","properties":{"valueAllocationId":{"type":"string","description":"Id (a UUID) of the held allocation — one of inUseIds."},"nodeType":{"type":"string","description":"Name of the node type holding it, e.g. 'JournalEntryLine', 'PurchaseOrderLine', 'TimeRecord'."},"field":{"type":"string","description":"The node's field holding it — 'valueAllocationId', or 'fromValueAllocationId' / 'toValueAllocationId' on an IntercompanyBillLine."}},"additionalProperties":false,"required":["valueAllocationId","nodeType","field"]},"description":"Cause (1) only: one entry per allocation, node type and field holding it, in the order of inUseIds. Absent for cause (2)."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value allocation to delete; bound from the :id path segment. Obtain it from the valueAllocations data-set (GET value-accounting/value-allocations) or the search. An id that matches no allocation is rejected with NOT_FOUND rather than treated as an already-completed delete. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Delete one value allocation with all of its lines. WRITES and is DESTRUCTIVE — rows are hard-deleted, there is no undo and nothing is ever deactivated instead. Returns an empty body on success. GUARDED: an allocation a document still holds — a journal entry line or any other document line or record that stores an allocation id, drafts included — is refused with IN_USE naming the holding node types in referencedBy, and nothing is deleted (re-tag the financial document to change its attribution); so is one owning the split parent of a line under another allocation (IN_USE with splitChildIds). The document check reads under the caller's row-level security: a caller whose access covers only some rows of a node type that can hold an allocation is refused with ROW_ACCESS_RESTRICTED instead, since the check cannot be evaluated for them. CASCADING: the allocation's own lines are deleted with it. An unknown id is rejected with NOT_FOUND and nothing is written. For several allocations in one transaction use bulkDeleteValueAllocations (POST value-accounting/value-allocations/bulk-delete).","description":"Deletes one value allocation together with all of its lines and returns an empty body. DESTRUCTIVE: rows are hard-deleted and there is no undo.\n\nGUARDED: an allocation that a document still holds — a journal entry line, or a document line that has not posted or never posts (purchase order or request line, sales order product, time record, fixed asset, inventory line, a draft vendor bill's line, …; 25 node types store an allocation id) — is refused with `IN_USE` naming the holding node types in `referencedBy`, and nothing is deleted. It is that document's live link into value accounting: deleting it would drop a posted line's attribution from every value-accounting report while the ledger keeps the amount, or leave an unposted document to post without it. To change a document's attribution, re-tag the financial document instead. An allocation owning the line another allocation's line was split from is refused the same way, naming the child lines in `splitChildIds`: the cascade would leave them pointing at nothing. The document check reads under the caller's row-level security, so a caller whose access covers only some rows of a node type that can hold an allocation is refused with `ROW_ACCESS_RESTRICTED` naming those node types, and nothing is deleted: the check cannot be evaluated for them.\n\nCASCADING: a successful delete removes the allocation's own lines with it, a line split from another line of the same allocation included, so no orphan line is left behind.\n\nUnlike the deletes of value objects and value centers, nothing is ever deactivated instead: an allocation has no lifecycle to retire into, so the answer is deleted or refused, and a refusal is a typed diagnostic rather than an outcome in the body. An unknown id fails with `NOT_FOUND`. To delete several allocations in one transaction, use bulkDeleteValueAllocations (POST value-accounting/value-allocations/bulk-delete).","tags":["valueAccountingValueAllocations"]},"patch":{"operationId":"updateValueAllocation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateValueAllocationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, LINE_NOT_FOUND, LINE_MISMATCH, INVALID_SPLIT_PARENT, PARENT_LINE_NOT_FOUND, VALUE_OBJECT_NOT_FOUND, VALUE_CENTER_NOT_FOUND, ALLOCATION_RULE_NOT_FOUND, RULE_LOCKED, IN_USE, ROW_ACCESS_RESTRICTED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value allocation."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The line ids that matched nothing, deduplicated, in the order first sent — canonical lowercase when uuid-shaped."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The line ids (UUIDs) that belong to another allocation."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SPLIT_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"splitParentId":{"type":"string","description":"The split parent that was refused — the line itself or a line being removed."}},"additionalProperties":false,"required":["lineId","splitParentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"splitParentId":{"type":"string","description":"The split parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","splitParentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_OBJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"valueObjectId":{"type":"string","description":"The value object id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","valueObjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"valueCenterId":{"type":"string","description":"The value center id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","valueCenterId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALLOCATION_RULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"path":{"type":"string","description":"The path that was sent."},"id":{"type":"string","description":"The rule id that was sent, in canonical lowercase when it is a UUID, otherwise exactly as sent."},"supportedPaths":{"type":"array","items":{"type":"string"},"description":"Every path an allocation rule may name."}},"additionalProperties":false,"required":["lineId","path","id","supportedPaths"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines that cannot be removed."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines split from them that would be left pointing at nothing. Present for cause (2) only."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value allocation."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The line ids that matched nothing, deduplicated, in the order first sent — canonical lowercase when uuid-shaped."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The line ids (UUIDs) that belong to another allocation."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SPLIT_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"splitParentId":{"type":"string","description":"The split parent that was refused — the line itself or a line being removed."}},"additionalProperties":false,"required":["lineId","splitParentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"splitParentId":{"type":"string","description":"The split parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","splitParentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_OBJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"valueObjectId":{"type":"string","description":"The value object id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","valueObjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"valueCenterId":{"type":"string","description":"The value center id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","valueCenterId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALLOCATION_RULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"path":{"type":"string","description":"The path that was sent."},"id":{"type":"string","description":"The rule id that was sent, in canonical lowercase when it is a UUID, otherwise exactly as sent."},"supportedPaths":{"type":"array","items":{"type":"string"},"description":"Every path an allocation rule may name."}},"additionalProperties":false,"required":["lineId","path","id","supportedPaths"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines that cannot be removed."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines split from them that would be left pointing at nothing. Present for cause (2) only."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value allocation."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The line ids that matched nothing, deduplicated, in the order first sent — canonical lowercase when uuid-shaped."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"foreignIds":{"type":"array","items":{"type":"string"},"description":"The line ids (UUIDs) that belong to another allocation."}},"additionalProperties":false,"required":["foreignIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_SPLIT_PARENT"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"splitParentId":{"type":"string","description":"The split parent that was refused — the line itself or a line being removed."}},"additionalProperties":false,"required":["lineId","splitParentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PARENT_LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"splitParentId":{"type":"string","description":"The split parent id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","splitParentId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_OBJECT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"valueObjectId":{"type":"string","description":"The value object id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","valueObjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"valueCenterId":{"type":"string","description":"The value center id that matched nothing, in canonical lowercase when it is a UUID, otherwise exactly as sent."}},"additionalProperties":false,"required":["lineId","valueCenterId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ALLOCATION_RULE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."},"path":{"type":"string","description":"The path that was sent."},"id":{"type":"string","description":"The rule id that was sent, in canonical lowercase when it is a UUID, otherwise exactly as sent."},"supportedPaths":{"type":"array","items":{"type":"string"},"description":"Every path an allocation rule may name."}},"additionalProperties":false,"required":["lineId","path","id","supportedPaths"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RULE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"lineId":{"type":"string","description":"Id (a UUID) of the line whose row was refused."}},"additionalProperties":false,"required":["lineId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines that cannot be removed."},"splitChildIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the lines split from them that would be left pointing at nothing. Present for cause (2) only."}},"additionalProperties":false,"required":["inUseIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ROW_ACCESS_RESTRICTED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"nodeTypes":{"type":"array","items":{"type":"string"},"description":"Names of the node types whose rows the caller's row-level security narrows or hides."}},"additionalProperties":false,"required":["nodeTypes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value allocation to change; bound from the :id path segment. An id that matches no allocation is rejected with NOT_FOUND. Ids are matched case-insensitively.","example":"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateValueAllocationInput"}}}},"summary":"Partially update one value allocation — its own fields and its existing lines — in one transaction. WRITES; returns an empty body. Corrects existing attribution only: allocations and lines are created by tagging a financial document, so there is no createLines. Only what is sent is written. Fields: documentType, allocationDate, isOffset (true removes every journal line of the allocation from all value-accounting reporting, false re-includes them); none can be cleared, and draftAllocation is not writable. updateLines patches existing lines by their id — valueCenterId / valueObjectId re-attribute the amount, allocationLineType moves it between revenue ('profit'), cost ('cost') and neither ('value', 'metric'), splitParentId re-points the split parent (never the line itself or a line this request deletes — INVALID_SPLIT_PARENT), allocationRule sets {path, id} or clears with null and is refused with RULE_LOCKED while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references the allocation; valueStatus, allocationType and allocationDate are documentation. deleteLines removes lines by their id, refused with IN_USE while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references the allocation or while a line split from one of them exists as STORED — the children are judged on the stored rows, so a child re-pointed to another parent in the same request still blocks its old parent's delete; re-point the child in one request and delete the parent in the next. Both document checks read under the caller's row-level security: a caller whose access covers only some rows of a node type that can reference an allocation is refused with ROW_ACCESS_RESTRICTED instead, since the check cannot be evaluated for them. Line ids are lines[].id of getValueAllocation (GET value-accounting/value-allocations/:id) and must belong to this allocation (LINE_NOT_FOUND, LINE_MISMATCH). Other refusals: NOT_FOUND, PARENT_LINE_NOT_FOUND, VALUE_OBJECT_NOT_FOUND, VALUE_CENTER_NOT_FOUND, ALLOCATION_RULE_NOT_FOUND. Every check runs first, so a rejected call writes nothing. A PATCH that changes nothing — an empty body, or every field sent with its stored value — is not written, so lastModifiedDate does not move; the same holds for each updateLines row, and a line edit never moves the allocation's lastModifiedDate.","description":"Partially updates one value allocation — its own fields and its existing lines — in one transaction, and returns an empty body. It CORRECTS attribution that already exists; it never creates any. Allocations and their lines are created by tagging a financial document, so there is no createLines here.\n\nOnly what you send is written: omit a field to leave it unchanged. The allocation's own fields are `documentType`, `allocationDate` and `isOffset`; none can be cleared. ⚠️ `isOffset: true` removes every journal line of this allocation from all value-accounting reporting while the general ledger keeps the amount; `false` re-includes them. `draftAllocation` belongs to the source document and is not writable.\n\nThe lines are edited through two verb arrays keyed by the line's own id (`lines[].id` of getValueAllocation (GET value-accounting/value-allocations/:id)); only this allocation's own lines can be named (`LINE_MISMATCH` otherwise). `updateLines` patches a line: `valueCenterId` / `valueObjectId` re-attribute its amount; ⚠️ `allocationLineType` MOVES the amount between revenue ('profit'), cost ('cost') and neither ('value', 'metric') in every report; `valueStatus`, `allocationType` and `allocationDate` are documentation; `splitParentId` names the line it was split from — never itself or a line this request deletes (`INVALID_SPLIT_PARENT`); `allocationRule` sets the rule as {path, id} or clears it with null — both parts always travel together — and is refused with `RULE_LOCKED` while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references this allocation, because the rule that produced posted allocations must stay readable. `deleteLines` removes lines, refused with `IN_USE` while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references this allocation (that would destroy the document's attribution) or while another line was split from one of them and is not removed in the same request. Both document checks read under the caller's row-level security, so a caller whose access covers only some rows of a node type that can reference an allocation is refused with `ROW_ACCESS_RESTRICTED` naming those node types: the check cannot be evaluated for them.\n\nEvery check runs before anything is written. A PATCH that changes nothing — an empty body, or every field sent with its stored value — is not written, so lastModifiedDate does not move; the same holds for each updateLines row. An edit of the lines never moves the allocation's own lastModifiedDate.","tags":["valueAccountingValueAllocations"]},"get":{"operationId":"getValueAllocation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getValueAllocationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value allocation."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id (a UUID) that matched no value allocation."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the value allocation to fetch; bound from the :id path segment. Obtain it from the valueAllocations data-set (GET value-accounting/value-allocations) or the search. An id that matches no allocation is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Fetch one value allocation — the link record a posted journal entry line points at — by its id, with every line: which value object or value center each line attributes the journal line's amount to, the master-data record it was tagged for (record as {dimensionCode, id}), its role (cost, profit, value or metric), its allocation rule and its split parent. Read-only. The allocation does not know its document — the journal entry line holds the reference — so find a document's allocation from the document's side. Use searchValueAllocations (POST value-accounting/value-allocations/search) to find the allocations attributed to a master-data record, a value object or a value center. An id that matches nothing is rejected with NOT_FOUND rather than returning an empty body.","description":"Fetches one value allocation by the id in the path, with every one of its lines.\n\nA value allocation is the link record a posted journal entry line points at. It holds no amount: each line says which value object or value center the journal line's amount is attributed to and in which role — `allocationLineType` 'profit' counts it as revenue, 'cost' as cost, 'value' and 'metric' as neither. `isOffset` and `draftAllocation` are two independent exclusions: when either is true, no value-accounting report counts the allocation's journal lines, while the general ledger keeps them.\n\nEach line names what it attributes to. `valueObjectId` / `valueCenterId` are the value object or value center. `record` is the master-data record the line was tagged for, as the pair {dimensionCode, id} the associations resource speaks — set by every tagging flow, and the line's only statement of attribution when the record had no value object yet, so read it whenever valueObjectId is absent. It is absent on a line tagged with a cluster value object (which stands for several records) and on a line written by hand. `allocationRule` is the rule that produced the line as {path, id}; automatic allocation rules are not implemented yet, so it is normally absent. `splitParentId` is the line this one was split from.\n\nThe allocation does not know its document: the journal entry line holds the reference to the allocation, not the other way round, so a document's allocation is found from the document's side. An id that matches nothing fails with `NOT_FOUND` rather than returning an empty body.","tags":["valueAccountingValueAllocations"]}},"/value-accounting/value-centers/search":{"post":{"operationId":"searchValueCenters","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchValueCentersOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR, UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchValueCentersInput"}}}},"summary":"Search value centers by name fragment (case-insensitive), exact center code, status, category, parent, and the master-data record they are mapped to — 'which value center stands for department X' is filters.record: {dimensionCode: 'department', id: <the department's id>}. Read-only, cursor-paginated, and every row carries its mappings and its parent. This is where a value center is looked up by name, code or record: the valueCenters data-set (GET value-accounting/value-centers) returns names and codes but cannot filter on them. Omitting filters entirely returns every value center, paged. A filter matching nothing returns an empty items array with HTTP 200 — except filters.record, which is the subject of the question: an unknown record is RECORD_NOT_FOUND, an unknown dimension code UNSUPPORTED_DIMENSION_CODE. Rows carry the same fields as getValueCenter (GET value-accounting/value-centers/:id), without the children. POST rather than GET because a name fragment and a record pair do not belong in a URL.","description":"Finds value centers by name fragment (case-insensitive), by exact center code, by status, by category, by parent, and by the master-data record they are mapped to — the question 'which value center stands for department X'.\n\nThis is the lookup the routed list cannot do: the valueCenters data-set (GET value-accounting/value-centers) returns names and codes but does not filter on them, and carries no mappings. `filters.record` takes the same {dimensionCode, id} pair the associations resource speaks and matches every value center with a mapping to that record, ended history rows included — its 1:1 value center, any cluster it is part of, and a value center its link moved away from; each row's `mappings[]` dates and the other records they name tell them apart (the stored `inCluster` flag describes only the day of the last write). `filters.parentId` keeps the value centers hanging DIRECTLY under one value center; the whole subtree is getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy).\n\nAn empty `filters` is a valid request for every value center, paged. A filter that matches nothing — including a category or parent id that names nothing — returns an empty `items` array with HTTP 200. A `filters.record` is the subject of the question, so a record that does not exist is `RECORD_NOT_FOUND` and an unknown dimension code `UNSUPPORTED_DIMENSION_CODE`, never an empty page that would read as 'no value center yet'.\n\nRows carry the same fields as getValueCenter (GET value-accounting/value-centers/:id), mappings included, children excepted.","tags":["valueAccountingValueCenters"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/value-accounting/business-drivers/{id}":{"delete":{"operationId":"deleteBusinessDriver","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteBusinessDriverOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no driver, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The driver's id, in canonical lowercase."},"allocationRuleNames":{"type":"array","items":{"type":"string"},"description":"Names of the allocation rules that allocate by the driver, as the allocation rules page shows them."}},"additionalProperties":false,"required":["id","allocationRuleNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no driver, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The driver's id, in canonical lowercase."},"allocationRuleNames":{"type":"array","items":{"type":"string"},"description":"Names of the allocation rules that allocate by the driver, as the allocation rules page shows them."}},"additionalProperties":false,"required":["id","allocationRuleNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no driver, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The driver's id, in canonical lowercase."},"allocationRuleNames":{"type":"array","items":{"type":"string"},"description":"Names of the allocation rules that allocate by the driver, as the allocation rules page shows them."}},"additionalProperties":false,"required":["id","allocationRuleNames"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the driver to delete; bound from the :id path segment. Obtain it from the businessDrivers data-set (GET value-accounting/business-drivers). An id that matches no driver is rejected with NOT_FOUND rather than treated as an already-completed delete. Ids are matched case-insensitively."}],"summary":"Delete one business driver definition, DEACTIVATE it instead when it holds recorded values, or leave it untouched when it is a system driver — and report which happened. WRITES. outcome 'deleted': the driver held no recorded value and is hard-deleted with its dormant combination lines, their history and its recording contexts — DESTRUCTIVE, no undo. outcome 'deactivated': it holds recorded values, so it was kept and deactivated; its values, history and name stay, and setBusinessDriversActive (POST value-accounting/business-drivers/set-active) re-opens it. outcome 'blocked': it is a SYSTEM driver (isSystem) and nothing was done to it — a system driver is never deleted or deactivated by a delete; switch its feed off with set-active instead. All three answer HTTP 200. To remove a driver that holds values, delete its values first and send the DELETE again. An unknown id is rejected with NOT_FOUND and nothing is written. A driver that would be hard-deleted (no recorded value, not a system driver) and that an allocation rule allocates by is rejected with IN_USE and nothing is written — deleting it would leave the rule without weights. A rule-used driver that holds values is deactivated as usual; an inactive driver still answers its weights, so the rule keeps allocating. For several drivers use bulkDeleteBusinessDrivers (POST value-accounting/business-drivers/bulk-delete).","description":"Deletes one business driver definition — or keeps it — and reports which happened in `outcome`.\n\nGUARDED, and the guard changes the OUTCOME rather than refusing the call. `deleted`: the driver held no recorded value and is gone for good, together with its dormant combination lines, their members and history, and its recording contexts — DESTRUCTIVE, no undo. `deactivated`: the driver holds recorded values, so it was kept and deactivated instead (deleting it would erase per-period facts); its values, history and name stay. `blocked`: it is a SYSTEM driver and was left completely untouched — neither deleted nor deactivated; switch its feed off with setBusinessDriversActive (POST value-accounting/business-drivers/set-active) instead. All three are a success with HTTP 200.\n\nTo truly remove a driver that holds values, delete its values first, then send this DELETE again. Re-open a deactivated driver with setBusinessDriversActive.\n\nAn unknown id fails with `NOT_FOUND` and nothing is written. A driver that holds no recorded value and that an allocation rule allocates by is not deleted: the call fails with `IN_USE`, naming the rules, and nothing is written — point those rules at another driver first. A rule-used driver that holds values is deactivated as usual (`deactivated`); the rule keeps allocating by it, because an inactive driver still answers its weights. For several drivers in one call use bulkDeleteBusinessDrivers (POST value-accounting/business-drivers/bulk-delete).","tags":["valueAccountingBusinessDrivers"]},"patch":{"operationId":"updateBusinessDriver","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateBusinessDriverOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, SYSTEM_DRIVER, DIMENSION_NOT_FED, NAME_REQUIRED, NAME_TAKEN, NAME_TAKEN_DEACTIVATED, INVALID_CALCULATION_TYPE, INVALID_DIMENSION, CUSTOM_VALUE_DIMENSION_NOT_FOUND, UNIT_NOT_CLEARABLE, UNIT_NOT_FOUND, VALUE_CENTER_DISABLED, CALC_TYPE_LOCKED, DIMENSIONS_LOCKED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no driver, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"lockedField":{"type":"string","description":"The field that cannot change: 'name', 'calculationType' or 'unitId'."}},"additionalProperties":false,"required":["id","lockedField"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_NOT_FED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"reason":{"type":"string","description":"Why: 'NO_DIMENSIONS' or 'NOT_ON_SOURCE_DOCUMENT'."},"index":{"type":"number","description":"Zero-based position of the first entry the feed cannot supply. Absent for NO_DIMENSIONS."},"dimensionUrn":{"type":"string","description":"Model URN of that entry. Absent for NO_DIMENSIONS."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of that entry's custom value dimension, for a custom dimension only."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN_DEACTIVATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the deactivated driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CALCULATION_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"calculationType":{"type":"string","description":"The calculation type that was refused, exactly as it was sent."},"acceptedValues":{"type":"array","items":{"type":"string"},"description":"The accepted calculation types."}},"additionalProperties":false,"required":["calculationType","acceptedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the offending entry in the submitted dimensions."},"dimensionUrn":{"type":"string","description":"The URN of the offending entry, as it was sent."},"reason":{"type":"string","description":"Why the entry was refused: UNKNOWN_DIMENSION_URN, DUPLICATE_DIMENSION, MISSING_DIMENSION_ID or UNEXPECTED_DIMENSION_ID."}},"additionalProperties":false,"required":["index","dimensionUrn","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the entry in the submitted dimensions."},"customValueDimensionId":{"type":"string","description":"The id that matched no custom value dimension, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["index","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CLEARABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver whose unit was to be cleared."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitId":{"type":"string","description":"The id that matched no driver unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CALC_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver."},"currentCalculationType":{"type":"string","description":"The calculation type the driver keeps: 'asOf' or 'cumulative'."}},"additionalProperties":false,"required":["id","currentCalculationType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSIONS_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no driver, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"lockedField":{"type":"string","description":"The field that cannot change: 'name', 'calculationType' or 'unitId'."}},"additionalProperties":false,"required":["id","lockedField"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_NOT_FED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"reason":{"type":"string","description":"Why: 'NO_DIMENSIONS' or 'NOT_ON_SOURCE_DOCUMENT'."},"index":{"type":"number","description":"Zero-based position of the first entry the feed cannot supply. Absent for NO_DIMENSIONS."},"dimensionUrn":{"type":"string","description":"Model URN of that entry. Absent for NO_DIMENSIONS."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of that entry's custom value dimension, for a custom dimension only."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN_DEACTIVATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the deactivated driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CALCULATION_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"calculationType":{"type":"string","description":"The calculation type that was refused, exactly as it was sent."},"acceptedValues":{"type":"array","items":{"type":"string"},"description":"The accepted calculation types."}},"additionalProperties":false,"required":["calculationType","acceptedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the offending entry in the submitted dimensions."},"dimensionUrn":{"type":"string","description":"The URN of the offending entry, as it was sent."},"reason":{"type":"string","description":"Why the entry was refused: UNKNOWN_DIMENSION_URN, DUPLICATE_DIMENSION, MISSING_DIMENSION_ID or UNEXPECTED_DIMENSION_ID."}},"additionalProperties":false,"required":["index","dimensionUrn","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the entry in the submitted dimensions."},"customValueDimensionId":{"type":"string","description":"The id that matched no custom value dimension, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["index","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CLEARABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver whose unit was to be cleared."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitId":{"type":"string","description":"The id that matched no driver unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CALC_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver."},"currentCalculationType":{"type":"string","description":"The calculation type the driver keeps: 'asOf' or 'cumulative'."}},"additionalProperties":false,"required":["id","currentCalculationType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSIONS_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no driver, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"lockedField":{"type":"string","description":"The field that cannot change: 'name', 'calculationType' or 'unitId'."}},"additionalProperties":false,"required":["id","lockedField"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_NOT_FED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"reason":{"type":"string","description":"Why: 'NO_DIMENSIONS' or 'NOT_ON_SOURCE_DOCUMENT'."},"index":{"type":"number","description":"Zero-based position of the first entry the feed cannot supply. Absent for NO_DIMENSIONS."},"dimensionUrn":{"type":"string","description":"Model URN of that entry. Absent for NO_DIMENSIONS."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of that entry's custom value dimension, for a custom dimension only."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN_DEACTIVATED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the deactivated driver that holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CALCULATION_TYPE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"calculationType":{"type":"string","description":"The calculation type that was refused, exactly as it was sent."},"acceptedValues":{"type":"array","items":{"type":"string"},"description":"The accepted calculation types."}},"additionalProperties":false,"required":["calculationType","acceptedValues"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the offending entry in the submitted dimensions."},"dimensionUrn":{"type":"string","description":"The URN of the offending entry, as it was sent."},"reason":{"type":"string","description":"Why the entry was refused: UNKNOWN_DIMENSION_URN, DUPLICATE_DIMENSION, MISSING_DIMENSION_ID or UNEXPECTED_DIMENSION_ID."}},"additionalProperties":false,"required":["index","dimensionUrn","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CUSTOM_VALUE_DIMENSION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"index":{"type":"number","description":"Zero-based position of the entry in the submitted dimensions."},"customValueDimensionId":{"type":"string","description":"The id that matched no custom value dimension, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["index","customValueDimensionId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_CLEARABLE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver whose unit was to be cleared."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"unitId":{"type":"string","description":"The id that matched no driver unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["unitId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"CALC_TYPE_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver."},"currentCalculationType":{"type":"string","description":"The calculation type the driver keeps: 'asOf' or 'cumulative'."}},"additionalProperties":false,"required":["id","currentCalculationType"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSIONS_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the driver to update; bound from the :id path segment. Obtain it from the businessDrivers data-set (GET value-accounting/business-drivers). An id that matches no driver is rejected with NOT_FOUND. Ids are matched case-insensitively.","example":"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateBusinessDriverInput"}}}},"summary":"Partially update one business driver definition. WRITES — this changes an existing row. Only the fields you send are written; every omitted field keeps its current value. Returns an empty body on success — read the stored form back with getBusinessDriver (GET value-accounting/business-drivers/:id). Renaming re-labels the driver everywhere (values reference the id, not the text), but the new name must not be held by another driver, active or deactivated (NAME_TAKEN, NAME_TAKEN_DEACTIVATED; trimmed, case-insensitive). description is cleared with an explicit null. unitId can be replaced but not cleared (UNIT_NOT_CLEARABLE); re-pointing it relabels the recorded values without converting them. dimensions, when sent, REPLACES the whole set. While the driver holds any recorded value its calculationType (CALC_TYPE_LOCKED) and its dimension set (DIMENSIONS_LOCKED — no add, no remove) are frozen; re-sending the stored value is always accepted, and deleting every value unlocks both. A SYSTEM driver's name, calculationType and unit never change (SYSTEM_DRIVER), and it may declare only the dimensions its metric feed supplies, at least one (DIMENSION_NOT_FED — for Time Tracking: Employee plus the tag dimensions available on time records). Other refusals: NOT_FOUND, NAME_REQUIRED, INVALID_CALCULATION_TYPE, INVALID_DIMENSION, CUSTOM_VALUE_DIMENSION_NOT_FOUND, UNIT_NOT_FOUND, VALUE_CENTER_DISABLED (adding Value Center while the tenant setting is off). To activate or deactivate use setBusinessDriversActive (POST value-accounting/business-drivers/set-active). A PATCH that changes nothing is not written, so lastModifiedDate does not move; it still answers 200, and every check still runs first. In every refusal NOTHING is written.","description":"Partially updates one business driver definition and returns an empty body. Only the fields present in the request are written; an omitted field keeps its current value, so this is a patch and never a replace.\n\n`description` follows the value-accounting convention: omit = unchanged, explicit `null` = clear. `unitId` can be replaced but not cleared: `null` fails with `UNIT_NOT_CLEARABLE`, because the recorded values are read in the unit. Re-pointing the unit relabels how the existing values are read WITHOUT converting any number, so only switch between units that mean the same quantity; a system driver's unit cannot be re-pointed.\n\n`dimensions` REPLACES the whole set when sent — include every dimension you want to keep. Two aspects freeze while the driver holds ANY recorded value: the calculation type (`CALC_TYPE_LOCKED`) and the dimension set, which can be neither added to nor reduced (`DIMENSIONS_LOCKED`); sending the stored value is always accepted. Deleting every value of the driver unlocks both again. On a driver without values the set may change freely: combination lines left over from values deleted earlier stay as inert history and are not reshaped. ADDING the Value Center dimension needs the tenant's Value Center dimension setting (`VALUE_CENTER_DISABLED`); a driver that already declares it keeps it.\n\nA SYSTEM driver (`isSystem`) keeps its name, calculation type and unit for good (`SYSTEM_DRIVER`, naming the field; re-sending the stored value passes). Its dimensions are its metric feed's members, so it may declare only what that feed supplies, and at least one (`DIMENSION_NOT_FED`): for Time Tracking that is Employee (the time record's owner) plus the tag dimensions available on time records (a document without any availability row offers every tag dimension). Its description stays editable.\n\nThe active state is not a field here: use setBusinessDriversActive (POST value-accounting/business-drivers/set-active), which also prepares a system driver's recording contexts when it is switched on.\n\nA PATCH that changes nothing — an empty body, or only values the driver already holds — is not written, so `lastModifiedDate` does not move. Every check runs before anything is written.","tags":["valueAccountingBusinessDrivers"]},"get":{"operationId":"getBusinessDriver","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getBusinessDriverOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no driver, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no driver, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the driver to fetch; bound from the :id path segment. Obtain it from the businessDrivers data-set (GET value-accounting/business-drivers), from searchBusinessDrivers (POST value-accounting/business-drivers/search), or from the response of createBusinessDriver (POST value-accounting/business-drivers). An id that matches no driver is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Fetch one business driver definition — a named measure such as headcount that value accounting allocates by — by its id, including the dimensions its values are broken down by. Read-only. Prefer the businessDrivers data-set (GET value-accounting/business-drivers) when browsing or resolving a name, and searchBusinessDrivers (POST value-accounting/business-drivers/search) for a name fragment or the drivers declaring a dimension; use this when you already hold an id and need its dimension set. An id that matches nothing is rejected with NOT_FOUND rather than returning an empty body. Recorded values and allocation weights are not part of this read.","description":"Fetches one business driver definition by the id in the path, including the dimensions it declares.\n\nPrefer the businessDrivers data-set (GET value-accounting/business-drivers) when browsing or resolving a name to an id, and searchBusinessDrivers (POST value-accounting/business-drivers/search) for a name fragment or the drivers declaring a dimension. Use this when you already hold an id and need the dimension set too — the list cannot carry it.\n\nA custom dimension is read as the shared CustomValueObject URN plus the `customValueDimensionId` saying which one; send the entries back unchanged to keep the set on PATCH.\n\nAn id that matches nothing fails with `NOT_FOUND` rather than returning an empty body, so a caller can tell a missing row from an empty one. The allocation weights a driver yields are not part of this read.","tags":["valueAccountingBusinessDrivers"]}},"/value-accounting/value-objects/search":{"post":{"operationId":"searchValueObjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchValueObjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR, UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchValueObjectsInput"}}}},"summary":"Search value objects by name fragment (case-insensitive), exact object number, status, category, and the master-data record they are mapped to — 'which value object stands for department X' is filters.record: {dimensionCode: 'department', id: <the department's id>}. Read-only, cursor-paginated, and every row carries its mappings. This is where a value object is looked up by name, number or record: the valueObjects data-set (GET value-accounting/value-objects) returns names and numbers but cannot filter on them. Omitting filters entirely returns every value object, paged. A filter matching nothing returns an empty items array with HTTP 200 — except filters.record, which is the subject of the question: an unknown record is RECORD_NOT_FOUND, an unknown dimension code UNSUPPORTED_DIMENSION_CODE. Rows carry the same fields as getValueObject (GET value-accounting/value-objects/:id). POST rather than GET because a name fragment and a record pair do not belong in a URL.","description":"Finds value objects by name fragment (case-insensitive), by exact object number, by status, by category, and by the master-data record they are mapped to — the question 'which value object stands for department X'.\n\nThis is the lookup the routed list cannot do: the valueObjects data-set (GET value-accounting/value-objects) returns names and numbers but does not filter on them, and carries no mappings. `filters.record` takes the same {dimensionCode, id} pair the associations resource speaks and matches every value object with a mapping to that record, ended history rows included — its 1:1 value object, any cluster it is part of, and a value object its link moved away from; each row's `mappings[]` dates and the other records they name tell them apart (the stored `inCluster` flag describes only the day of the last write).\n\nAn empty `filters` is a valid request for every value object, paged. A filter that matches nothing — including a category id that names no category — returns an empty `items` array with HTTP 200. A `filters.record` is the subject of the question, so a record that does not exist is `RECORD_NOT_FOUND` and an unknown dimension code `UNSUPPORTED_DIMENSION_CODE`, never an empty page that would read as 'no value object yet'.\n\nRows carry the same fields as getValueObject (GET value-accounting/value-objects/:id), mappings included.","tags":["valueAccountingValueObjects"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/value-accounting/value-objects/reactivate":{"post":{"operationId":"reactivateValueObjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reactivateValueObjectsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, REACTIVATE_VIA_FLOW, NOT_ENDED, REFERENCE_NOT_FOUND, MAPPING_EXISTS, ONE_TO_ONE_EXISTS","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value object."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the shadow value object."},"customValueObjectId":{"type":"string","description":"Id (a UUID) of the custom value object that owns it — the id to send to reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate)."}},"additionalProperties":false,"required":["id","customValueObjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value object of the batch whose re-open was refused."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value object of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value object."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the shadow value object."},"customValueObjectId":{"type":"string","description":"Id (a UUID) of the custom value object that owns it — the id to send to reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate)."}},"additionalProperties":false,"required":["id","customValueObjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value object of the batch whose re-open was refused."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value object of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids (UUIDs) that matched no value object."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_VIA_FLOW"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the shadow value object."},"customValueObjectId":{"type":"string","description":"Id (a UUID) of the custom value object that owns it — the id to send to reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate)."}},"additionalProperties":false,"required":["id","customValueObjectId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects that are already open."}},"additionalProperties":false,"required":["ids"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REFERENCE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"mappingIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the mappings whose record no longer resolves."}},"additionalProperties":false,"required":["mappingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MAPPING_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value object of the batch whose re-open was refused."},"mappingId":{"type":"string","description":"Id (a UUID) of that value object's mapping that is already open for the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","mappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ONE_TO_ONE_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the first value object of the batch whose re-open was refused."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to."},"id":{"type":"string","description":"Id (a UUID) of the master-data record."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The record, as {dimensionCode, id} — absent when the catalog no longer resolves it."},"existingValueObjectId":{"type":"string","description":"Id (a UUID) of the value object that already represents the record one-to-one — the id of getValueObject (GET value-accounting/value-objects/:id)."},"existingMappingId":{"type":"string","description":"Id (a UUID) of that value object's open mapping to the record — its mappings[].id."},"from":{"type":"string","format":"date","description":"First day both links would be open (today or later), as YYYY-MM-DD: the start of the conflicting overlap."},"to":{"type":"string","format":"date","description":"Last day both links would be open; absent when both stay open-ended."}},"additionalProperties":false,"required":["id","existingValueObjectId","existingMappingId","from"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reactivateValueObjectsInput"}}}},"summary":"Re-open value objects that were retired — each together with the mappings its retirement ended — in one all-or-nothing call. WRITES; returns an empty body. The reverse of the deactivate outcome of deleteValueObject (DELETE value-accounting/value-objects/:id) and the way to re-open a value object with everything its retirement closed (PATCH refuses endDate: null on an end before today for that reason — an end of today or later is cleared there directly; a later endDate on PATCH re-opens up to that day under the same screens). An end of today or later is accepted here too and cleared, the same end state as PATCH with endDate: null (the mappings ending with it follow) — never NOT_ENDED. Exactly the mappings ending on the value object's own end date are re-opened; a mapping ended on any other day is history (its link moved, or ended by itself) and stays closed, so retiring and re-opening is a round trip. A value object with no end date of its own is not retired, whatever history its mappings hold — except a half-retired one (open, but none of its mappings open), whose mappings sharing the latest end date are re-opened. Every id is screened before the first write: an unknown id is rejected with NOT_FOUND, a custom value object's shadow with REACTIVATE_VIA_FLOW (re-open it with its value through reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate)), a value object with nothing to re-open with NOT_ENDED, and one with a mapping to re-open whose record no longer exists with REFERENCE_NOT_FOUND — in that order — and in every case nothing is re-opened. ⛔ A value object is not re-opened when a mapping it would re-open names a record another of its own mappings maps open on a shared day from today on — two open links to one record: refused with MAPPING_EXISTS (checked before ONE_TO_ONE_EXISTS); end that mapping first through updateMappings of updateValueObject (PATCH value-accounting/value-objects/:id). ⛔ A value object is not re-opened while ANOTHER value object holds an open one-to-one link to the record its re-opened mappings would stand for alone: refused with ONE_TO_ONE_EXISTS (checked last), as are two value objects of one batch re-opening one-to-one links to the same record. Nothing is displaced: end the other link first.","description":"Re-opens value objects that were retired, each together with the mappings its retirement ended, and returns an empty body.\n\nThis is the reverse of the DEACTIVATE outcome of deleteValueObject (DELETE value-accounting/value-objects/:id), and the way to re-open a value object together with everything its retirement closed (the only other re-open door is PATCH value-accounting/value-objects/:id moving a retired value object's `endDate` to a later day, under the same screens; a create or an association re-opens one only as a side effect, while its record is active): that delete end-dates the value object and every mapping still open with the same day, so clearing the value object's endDate alone would leave it reading active while the mappings that say what it stands for stay ended — which is why PATCH refuses `endDate: null` on an end that has passed (before today) and points here; an end of today or later never took effect and PATCH clears it directly. This call accepts such an end too and clears it — the same end state as PATCH with `endDate: null`, the mappings ending with it following; it is not refused as `NOT_ENDED`. It is a ROUND TRIP: exactly the mappings ending on the value object's own end date are re-opened; a mapping ended on any other day is history (its link moved to another record, or ended by itself) and stays closed. A value object with no end date of its own is not retired, whatever history its mappings hold — except a half-retired one (open, but none of its mappings open), whose mappings sharing the latest end date are re-opened.\n\nALL-OR-NOTHING: every id is screened before the first write. `NOT_FOUND` names ids that match no value object; `REACTIVATE_VIA_FLOW` a custom value object's shadow, which is re-opened with its value through reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate); `NOT_ENDED` value objects with nothing to re-open; `REFERENCE_NOT_FOUND` mappings it would re-open whose record no longer exists, which a value object cannot be re-opened to stand for. In that order; in every case nothing is re-opened. A value object is not re-opened when a mapping it would re-open names a record another of its own mappings maps open on a shared day from today on (MAPPING_EXISTS): end that mapping first. A value object is not re-opened while another value object holds an open one-to-one link to the record it would stand for (ONE_TO_ONE_EXISTS): end that link first.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingValueObjects"]}},"/value-accounting/associations/search":{"post":{"operationId":"getRelationshipsForMasterData","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getRelationshipsForMasterDataOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: UNSUPPORTED_DIMENSION_CODE, RECORD_NOT_FOUND, INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the subject that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"UNSUPPORTED_DIMENSION_CODE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension code that was refused."},"supportedDimensionCodes":{"type":"array","items":{"type":"string"},"description":"Every dimension code this contract accepts."}},"additionalProperties":false,"required":["dimensionCode","supportedDimensionCodes"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"RECORD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the subject that resolved to nothing."},"id":{"type":"string","description":"Id (a UUID) that matched no record of that dimension."}},"additionalProperties":false,"required":["dimensionCode","id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/getRelationshipsForMasterDataInput"}}}},"summary":"List every relationship touching one master-data record — which other records it is tagged to, since when, and whether this record asserted the relationship itself. Read-only; the companion of ensureRelationship (POST value-accounting/associations) and removeRelationship (POST value-accounting/associations/remove). Each relationship appears exactly ONCE (no double counting): a relationship is stored as two directed edges and this reads only the subject's own, so isImplicit always describes the SUBJECT — false when this record asserted the relationship, true when the edge exists because the other record tagged this one. When both records tagged each other, both sides read false. An empty page means the record has no relationships at all, which is also the condition the master-data delete guard requires before it will let the record be deleted. POST rather than GET because the subject is a (dimensionCode, id) pair and both halves are required — a UUID is unique within its dimension but not across dimensions. Cursor-paginated.","description":"Lists every relationship touching ONE master-data record, with the far side resolved to its dimension, id and display name.\n\nEach relationship appears exactly ONCE — no double counting. A relationship is stored as two directed edges and this reads only the subject's own, so `isImplicit` is always about the SUBJECT: false when this record asserted the relationship, true when the edge was created because the other record tagged this one. When both records tagged each other, both sides read false.\n\nAn empty page means the record has no relationships, which is also the condition the master-data delete guard requires before it will let the record be deleted.\n\nPOST rather than GET: the subject is a (dimensionCode, id) pair, and a paired predicate must not become two loose query params that admit a half-filled request.\n\nRead-only, and the companion of ensureRelationship (POST value-accounting/associations) and removeRelationship (POST value-accounting/associations/remove).","tags":["valueAccountingAssociations"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/psa/fixed-fees/{id}":{"get":{"operationId":"getFixedFee","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getFixedFeeOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identifier of the fixed fee you want to retrieve.","example":"7c2e1b90-4a53-4f16-8de2-9b1035c7ef42"}],"summary":"Retrieve a fixed fee","description":"Retrieves a fixed fee. Each fixed fee has both amount and currency, or neither, because together they make one money value.","tags":["psa-fixed-fees"]}},"/value-accounting/driver-units":{"post":{"operationId":"createDriverUnit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/createDriverUnitOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NAME_TAKEN, NAME_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the unit that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the unit that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the unit that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDriverUnitInput"}}}},"summary":"Create one unit of measure for business drivers — the 'per what' a driver's values are read in, e.g. machine hours. WRITES. Returns only the id of the new unit; read it back with getDriverUnit (GET value-accounting/driver-units/:id) if you need the stored form. Unit names are unique tenant-wide, compared trimmed and case-insensitively, so a name already in use in any spelling is rejected with NAME_TAKEN (which carries the id of the unit holding it) and NOTHING is written — reuse that id instead of retrying with a variant spelling. An empty or whitespace-only name is rejected with NAME_REQUIRED, also before anything is written. The name is stored trimmed. Creating a unit touches no business driver and no recorded value.","description":"Creates one unit of measure for business drivers and returns only the `id` the platform assigns — the reference getDriverUnit, updateDriverUnit and deleteDriverUnit (GET/PATCH/deleteDriverUnit) are keyed by.\n\nUnit names are unique tenant-wide, compared TRIMMED and CASE-INSENSITIVELY: 'Machine Hours' clashes with 'machine hours  ' and fails with `NAME_TAKEN`, naming the id of the unit that already holds the name — reuse that id rather than retrying with a variant spelling. An empty or whitespace-only `name` fails with `NAME_REQUIRED`. The name is stored trimmed.\n\nCreating a unit touches no driver and no value: a driver starts using it only once its unit points at the new one. The call runs in a transaction: a failure writes nothing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingDriverUnits"]},"get":{"operationId":"driverUnits","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"filter[id]","in":"query","required":false,"description":"Filter id (equality)","schema":{"type":"string"}},{"name":"filter[id][ne]","in":"query","required":false,"description":"Filter id (ne)","schema":{"type":"string"}},{"name":"filter[id][gt]","in":"query","required":false,"description":"Filter id (gt)","schema":{"type":"string"}},{"name":"filter[id][gte]","in":"query","required":false,"description":"Filter id (gte)","schema":{"type":"string"}},{"name":"filter[id][lt]","in":"query","required":false,"description":"Filter id (lt)","schema":{"type":"string"}},{"name":"filter[id][lte]","in":"query","required":false,"description":"Filter id (lte)","schema":{"type":"string"}},{"name":"filter[id][in]","in":"query","required":false,"description":"Filter id (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][notIn]","in":"query","required":false,"description":"Filter id (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[id][between]","in":"query","required":false,"description":"Filter id (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[id][like]","in":"query","required":false,"description":"Filter id (like)","schema":{"type":"string"}},{"name":"filter[name]","in":"query","required":false,"description":"Filter name (equality)","schema":{"type":"string"}},{"name":"filter[name][ne]","in":"query","required":false,"description":"Filter name (ne)","schema":{"type":"string"}},{"name":"filter[name][gt]","in":"query","required":false,"description":"Filter name (gt)","schema":{"type":"string"}},{"name":"filter[name][gte]","in":"query","required":false,"description":"Filter name (gte)","schema":{"type":"string"}},{"name":"filter[name][lt]","in":"query","required":false,"description":"Filter name (lt)","schema":{"type":"string"}},{"name":"filter[name][lte]","in":"query","required":false,"description":"Filter name (lte)","schema":{"type":"string"}},{"name":"filter[name][in]","in":"query","required":false,"description":"Filter name (in, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][notIn]","in":"query","required":false,"description":"Filter name (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[name][between]","in":"query","required":false,"description":"Filter name (between, comma-separated)","schema":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"filter[name][like]","in":"query","required":false,"description":"Filter name (like)","schema":{"type":"string"}},{"name":"filter[lastModifiedDate]","in":"query","required":false,"description":"Filter lastModifiedDate (equality)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][ne]","in":"query","required":false,"description":"Filter lastModifiedDate (ne)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gt]","in":"query","required":false,"description":"Filter lastModifiedDate (gt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][gte]","in":"query","required":false,"description":"Filter lastModifiedDate (gte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lt]","in":"query","required":false,"description":"Filter lastModifiedDate (lt)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][lte]","in":"query","required":false,"description":"Filter lastModifiedDate (lte)","schema":{"type":"string","format":"date-time"}},{"name":"filter[lastModifiedDate][in]","in":"query","required":false,"description":"Filter lastModifiedDate (in, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][notIn]","in":"query","required":false,"description":"Filter lastModifiedDate (notIn, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":1,"maxItems":100},"style":"form","explode":false},{"name":"filter[lastModifiedDate][between]","in":"query","required":false,"description":"Filter lastModifiedDate (between, comma-separated)","schema":{"type":"array","items":{"type":"string","format":"date-time"},"minItems":2,"maxItems":2},"style":"form","explode":false},{"name":"sort","in":"query","required":false,"description":"Fields to order by; '-' prefix for descending","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","-id","name","-name","lastModifiedDate","-lastModifiedDate"]},"minItems":1}},{"name":"page[size]","in":"query","required":false,"description":"Page size","schema":{"type":"integer"}},{"name":"page[cursor]","in":"query","required":false,"description":"Opaque continuation cursor","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Sparse field selection. Rows then carry exactly the named fields; every other field is omitted rather than null. Absent, a row carries all of them.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["id","name","description","lastModifiedDate"]},"minItems":1}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/driverUnitsRow"}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether a further page is available."},"nextCursor":{"type":"string","description":"Opaque cursor for the next page, present when `hasMore` is true. Pass it back as `page[cursor]`."}},"required":["hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"summary":"List the units of measure business drivers are expressed in — headcount, machine hours, square metres — one row per unit, with structured filters. GET data-set exposing filter[field][op]= (eq/ne/gt/gte/lt/lte/in/notIn/between/like), sort=name or sort=-lastModifiedDate, sparse fields=, and page[size]/page[cursor] cursor pagination. A unit carries only a name and a description: no values, no periods and no lifecycle, so nothing is filtered out by default. Every business driver references one unit, and its values are read in it. Unit names are unique, so filter[name][eq]= resolves a name to its id — it compares the stored text exactly, case included; for a case-insensitive fragment use searchDriverUnits (POST value-accounting/driver-units/search). These are the units of business drivers, not the units of measure of items.","tags":["valueAccountingDriverUnits"]}},"/value-accounting/business-drivers/bulk-delete":{"post":{"operationId":"bulkDeleteBusinessDrivers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteBusinessDriversOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no driver, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the requested drivers that would be hard-deleted and that an allocation rule allocates by, deduplicated, in canonical lowercase, in the order they were first sent."},"allocationRules":{"type":"array","items":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the driver the rule allocates by — one of inUseIds."},"name":{"type":"string","description":"Name of the allocation rule, as the allocation rules page shows it."}},"additionalProperties":false,"required":["driverId","name"]},"description":"One entry per allocation rule and driver: the rule allocating by a driver of inUseIds."}},"additionalProperties":false,"required":["inUseIds","allocationRules"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no driver, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the requested drivers that would be hard-deleted and that an allocation rule allocates by, deduplicated, in canonical lowercase, in the order they were first sent."},"allocationRules":{"type":"array","items":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the driver the rule allocates by — one of inUseIds."},"name":{"type":"string","description":"Name of the allocation rule, as the allocation rules page shows it."}},"additionalProperties":false,"required":["driverId","name"]},"description":"One entry per allocation rule and driver: the rule allocating by a driver of inUseIds."}},"additionalProperties":false,"required":["inUseIds","allocationRules"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no driver, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the requested drivers that would be hard-deleted and that an allocation rule allocates by, deduplicated, in canonical lowercase, in the order they were first sent."},"allocationRules":{"type":"array","items":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the driver the rule allocates by — one of inUseIds."},"name":{"type":"string","description":"Name of the allocation rule, as the allocation rules page shows it."}},"additionalProperties":false,"required":["driverId","name"]},"description":"One entry per allocation rule and driver: the rule allocating by a driver of inUseIds."}},"additionalProperties":false,"required":["inUseIds","allocationRules"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteBusinessDriversInput"}}}},"summary":"Delete several business driver definitions in one call, DEACTIVATING each one that holds recorded values and leaving each system driver untouched, and report every outcome. WRITES. Every id must exist: if any does not, the whole call is rejected with NOT_FOUND listing exactly those ids and NOTHING is written. No driver the call would hard-delete (one without recorded values; system drivers aside) may be one an allocation rule allocates by: if any is, the whole call is rejected with IN_USE naming the drivers and rules and NOTHING is written. A rule-used driver that holds values is not refused — it is deactivated, and an inactive driver still answers its weights. Then each driver is handled on its own: without recorded values it is hard-deleted with its dormant combination lines, their history and its recording contexts — DESTRUCTIVE, no undo — and listed in deletedIds; with recorded values it is kept and deactivated, listed in deactivatedIds (setBusinessDriversActive (POST value-accounting/business-drivers/set-active) re-opens it); a SYSTEM driver is neither deleted nor deactivated, listed in blockedIds. A kept driver is a success, not a failure of the batch: the three lists together name every distinct id sent. POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.","description":"Deletes several business driver definitions in one call, keeping the ones that must stay, and reports each outcome.\n\nEvery id must exist: if any does not, the whole call is rejected with `NOT_FOUND` listing exactly those ids, and NOTHING is written. Likewise, if an allocation rule allocates by any driver the call would hard-delete (one without recorded values; system drivers aside), the whole call is rejected with `IN_USE` naming the drivers and rules, and NOTHING is written. A rule-used driver that holds values does not refuse the call: it is deactivated, and the rule keeps allocating by it. Then each driver is handled on its own: one without recorded values is hard-deleted (DESTRUCTIVE, no undo) and listed in `deletedIds`; one that holds values is kept and deactivated, listed in `deactivatedIds`; a system driver is left completely untouched, listed in `blockedIds`. A kept driver is a success, not a failure of the batch: the three lists together name every distinct id sent.\n\nPOST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingBusinessDrivers"]}},"/value-accounting/driver-values/reactivate":{"post":{"operationId":"reactivateDriverCombination","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/reactivateDriverCombinationOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: COMBINATION_NOT_FOUND, PERIOD_NOT_FOUND, PERIOD_CALENDAR_MISMATCH, SYSTEM_DRIVER, INVALID_VALUE, LINE_NOT_FOUND, LINE_NOT_ENDED, DRIVER_NOT_FOUND, DRIVER_INACTIVE, PERIOD_LOCKED, REACTIVATE_BEFORE_END, COMBO_EXISTS, MEMBERS_INCOMPLETE, MEMBER_DIMENSION_MISMATCH, MEMBER_NOT_FOUND, MEMBER_DUPLICATE_DIMENSION, VALUE_CENTER_DISABLED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"COMBINATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"combinationId":{"type":"string","description":"The combination id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["combinationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_BEFORE_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"COMBINATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"combinationId":{"type":"string","description":"The combination id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["combinationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_BEFORE_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"COMBINATION_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"combinationId":{"type":"string","description":"The combination id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["combinationId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"SYSTEM_DRIVER"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the system driver."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"INVALID_VALUE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"LINE_NOT_ENDED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DRIVER_INACTIVE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"REACTIVATE_BEFORE_END"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"COMBO_EXISTS"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBERS_INCOMPLETE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DIMENSION_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"MEMBER_DUPLICATE_DIMENSION"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"VALUE_CENTER_DISABLED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/reactivateDriverCombinationInput"}}}},"summary":"Re-enable an ENDED combination from an accounting period on, with a resume value; returns the id of the value that resumes it. WRITES. The counterpart of endDriverCombination (POST value-accounting/driver-values/end). The resume period must be at or after the end boundary (REACTIVATE_BEFORE_END); the periods between end and resume stay empty on purpose. Resuming AT the boundary with exactly the value the end recorded undoes the end (the row comes back carried). onlyThisPeriod true re-opens it for that one period and ends it again from the next. The resume period must be open and not in the future (PERIOD_LOCKED). Refused for a combination that is not ended (LINE_NOT_ENDED), a value already in that period (COMBO_EXISTS), an inactive driver (DRIVER_INACTIVE), a value that is not a number (INVALID_VALUE), a system driver (SYSTEM_DRIVER), and a combination whose members no longer fit the driver's CURRENT dimensions — they may have changed since its last value was deleted (MEMBER_DIMENSION_MISMATCH, MEMBERS_INCOMPLETE, MEMBER_DUPLICATE_DIMENSION, MEMBER_NOT_FOUND, VALUE_CENTER_DISABLED). It runs in one transaction, so a refusal writes nothing.","description":"Re-enables an ENDED combination from an accounting period on, with a resume value, and returns the `id` of the value that resumes it. The counterpart of endDriverCombination (POST value-accounting/driver-values/end).\n\nThe resume period must be at or after the period the combination was ended from (`REACTIVATE_BEFORE_END`): a combination is never revived into the past, and the periods between its end and its resume stay EMPTY on purpose — that is how a genuine gap is recorded.\n\nTwo refinements: resuming exactly AT the end boundary with exactly the value the end recorded is an UNDO — the row comes back as a system-carried row, so the combination can be ended again at once; and `onlyThisPeriod: true` re-opens it for that one period and ends it again from the next, for a one-off occurrence.\n\nThe resume period must be open and not in the future (`PERIOD_LOCKED`). Refused for a combination that is not ended (`LINE_NOT_ENDED`), an inactive driver, a system driver, and a combination whose members no longer fit the driver's current dimensions (the `MEMBER_*` codes of recordDriverValue, `VALUE_CENTER_DISABLED`). It runs in one transaction, so a refusal writes nothing.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingDriverValues"]}},"/value-accounting/driver-units/{id}":{"get":{"operationId":"getDriverUnit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/getDriverUnitOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the unit to fetch; bound from the :id path segment. Obtain it from the driverUnits data-set (GET value-accounting/driver-units), from searchDriverUnits (POST value-accounting/driver-units/search), or from the response of createDriverUnit (POST value-accounting/driver-units). An id that matches no unit is rejected with NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}],"summary":"Fetch one unit of measure of business drivers — the 'per what' a driver's values are read in, e.g. machine hours — by its id. Read-only. Prefer the driverUnits data-set (GET value-accounting/driver-units) when browsing or resolving a name, and searchDriverUnits (POST value-accounting/driver-units/search) for a name fragment; use this when you already hold an id and want just that row. An id that matches nothing is rejected with NOT_FOUND rather than returning an empty body.","description":"Fetches one unit of measure of business drivers by the id in the path.\n\nPrefer the driverUnits data-set (GET value-accounting/driver-units) when browsing or resolving a name to an id, and searchDriverUnits (POST value-accounting/driver-units/search) for a name fragment. Use this when you already hold an id and want just that row, or to confirm it still resolves.\n\nAn id that matches nothing fails with `NOT_FOUND` rather than returning an empty body, so a caller can tell a missing row from an empty one.","tags":["valueAccountingDriverUnits"]},"delete":{"operationId":"deleteDriverUnit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/deleteDriverUnitOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessDriverIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the business drivers that use the unit. Never empty when this code is raised."}},"additionalProperties":false,"required":["businessDriverIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessDriverIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the business drivers that use the unit. Never empty when this code is raised."}},"additionalProperties":false,"required":["businessDriverIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"businessDriverIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the business drivers that use the unit. Never empty when this code is raised."}},"additionalProperties":false,"required":["businessDriverIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the unit to delete; bound from the :id path segment. Obtain it from the driverUnits data-set (GET value-accounting/driver-units). An id that matches no unit is rejected with NOT_FOUND rather than treated as an already-completed delete, and a unit still used by a business driver is rejected with IN_USE. Ids are matched case-insensitively."}],"summary":"Delete one unit of measure of business drivers. WRITES and is DESTRUCTIVE — the row is hard-deleted, not deactivated, and there is no undo. Returns an empty body on success. GUARDED, and it REFUSES rather than cascading: a unit any business driver still uses as its unit of measure is rejected with IN_USE and NOTHING is deleted, because a driver without a resolvable unit has no readable values; the drivers using it are listed in the diagnostic's details — point them at another unit first. A unit is never deactivated instead: it has no lifecycle dates. An unknown id is rejected with NOT_FOUND and nothing is written. To delete several units in one all-or-nothing transaction, use bulkDeleteDriverUnits (POST value-accounting/driver-units/bulk-delete).","description":"Deletes one unit of measure of business drivers and returns an empty body. DESTRUCTIVE: the row is hard-deleted, not deactivated, and there is no undo.\n\nGUARDED, and it REFUSES rather than cascading: a unit that any business driver still uses as its unit of measure fails with `IN_USE` and nothing is deleted — a driver without a resolvable unit has no readable values. Point those drivers at another unit first; they are listed in the diagnostic's details. A unit is never deactivated instead: it has no lifecycle dates to retire into.\n\nAn unknown id fails with `NOT_FOUND` and nothing is written. To remove several units in one transaction, use bulkDeleteDriverUnits (POST value-accounting/driver-units/bulk-delete).","tags":["valueAccountingDriverUnits"]},"patch":{"operationId":"updateDriverUnit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/updateDriverUnitOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, NAME_TAKEN, UNIT_LOCKED, NAME_REQUIRED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER unit that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the unit that cannot be renamed, in canonical lowercase."},"drivers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"name":{"type":"string","description":"Name of the system driver, as the business drivers page shows it."}},"additionalProperties":false,"required":["id","name"]},"description":"The system business drivers reporting their values in this unit, ordered by name."}},"additionalProperties":false,"required":["id","drivers"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER unit that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the unit that cannot be renamed, in canonical lowercase."},"drivers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"name":{"type":"string","description":"Name of the system driver, as the business drivers page shows it."}},"additionalProperties":false,"required":["id","name"]},"description":"The system business drivers reporting their values in this unit, ordered by name."}},"additionalProperties":false,"required":["id","drivers"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"The id that matched no unit, in canonical lowercase when it is uuid-shaped."}},"additionalProperties":false,"required":["id"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_TAKEN"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"name":{"type":"string","description":"The name that was refused, exactly as it was sent."},"existingId":{"type":"string","description":"Id (a UUID) of the OTHER unit that already holds the name."}},"additionalProperties":false,"required":["name","existingId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"UNIT_LOCKED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the unit that cannot be renamed, in canonical lowercase."},"drivers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver."},"name":{"type":"string","description":"Name of the system driver, as the business drivers page shows it."}},"additionalProperties":false,"required":["id","name"]},"description":"The system business drivers reporting their values in this unit, ordered by name."}},"additionalProperties":false,"required":["id","drivers"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"NAME_REQUIRED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Id (a UUID) of the unit to update; bound from the :id path segment. Obtain it from the driverUnits data-set (GET value-accounting/driver-units). An id that matches no unit is rejected with NOT_FOUND. Ids are matched case-insensitively.","example":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateDriverUnitInput"}}}},"summary":"Partially update one unit of measure of business drivers. WRITES — this changes an existing row. Only the fields you send are written; every omitted field keeps its current value, so this is a patch, never a replace. Returns an empty body on success — read the stored form back with getDriverUnit (GET value-accounting/driver-units/:id). Renaming re-labels the unit for every business driver that uses it: drivers reference the id, not the text, so no driver breaks and no recorded value changes; but the new name must not belong to another unit (trimmed, case-insensitive). Renaming a unit to the name it already has is a valid no-op, not a collision. description is cleared with an explicit null. A PATCH that changes nothing — an empty body, or only values the unit already holds — is not written, so lastModifiedDate does not move and an incremental sync does not see the row again; it still answers 200, and the checks below still run first. An unknown id is rejected with NOT_FOUND, an empty or whitespace-only name with NAME_REQUIRED and a colliding name with NAME_TAKEN; in every case NOTHING is written. A unit that a SYSTEM business driver reports its values in cannot be renamed at all (UNIT_LOCKED) — the metric feed recorded every number in that unit and nothing is converted — so create a new unit instead.","description":"Partially updates one unit of measure of business drivers and returns an empty body. Only the fields present in the request are written; an omitted field keeps its current value, so this is a patch and never a replace.\n\nRenaming re-labels the unit for every business driver that uses it. Drivers point at the id, not the text, so no driver breaks and no recorded value changes. The new name must not belong to another unit (trimmed, case-insensitive); renaming a unit to the name it already holds is a valid no-op. The name is stored trimmed and can be replaced but never cleared.\n\n`description` follows the value-accounting convention: omit = unchanged, explicit `null` = clear.\n\nA PATCH that changes nothing — an empty body, or only values the unit already holds — is not written, so `lastModifiedDate` does not move. An unknown id fails with `NOT_FOUND`, a blank name with `NAME_REQUIRED`, a colliding name with `NAME_TAKEN`; all are checked before anything is written.\n\nA unit that a SYSTEM business driver reports its values in cannot be renamed at all (`UNIT_LOCKED`): the metric feed recorded every number in that unit and nothing is converted, so create a new unit instead.","tags":["valueAccountingDriverUnits"]}},"/value-accounting/driver-units/search":{"post":{"operationId":"searchDriverUnits","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/searchDriverUnitsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request or business failure. Codes: INVALID_CURSOR","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"INVALID_CURSOR"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor token that was refused."}},"additionalProperties":false,"required":["cursor"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/searchDriverUnitsInput"}}}},"summary":"Search the units of measure business drivers are expressed in by a fragment of their name, matched case-insensitively. Read-only, cursor-paginated. Use filters.nameContains for a type-ahead; its sibling, the driverUnits data-set (GET value-accounting/driver-units) can only filter on the EXACT stored name. Omitting filters returns every unit, paged. A filter matching nothing returns an empty items array with HTTP 200, never a 404. Rows carry the same fields as getDriverUnit (GET value-accounting/driver-units/:id). POST rather than GET because a free-text fragment does not belong in a URL.","description":"Finds units of measure of business drivers whose name contains a fragment, matched case-insensitively.\n\nUse `filters.nameContains` for a type-ahead or a fuzzy lookup; the routed list's `filter[name][eq]` compares the exact stored text, which is the reason this target exists beside it.\n\nAn empty `filters` is a valid request for every unit, paged. A filter that matches nothing returns an empty `items` array with HTTP 200 — not a 404.\n\nRows carry the same fields as getDriverUnit (GET value-accounting/driver-units/:id).","tags":["valueAccountingDriverUnits"],"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/value-accounting/driver-units/bulk-delete":{"post":{"operationId":"bulkDeleteDriverUnits","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/bulkDeleteDriverUnitsOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, IN_USE","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no unit, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the requested units that are in use, in the order they were first sent. Never empty when this code is raised."},"businessDriverIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the business drivers that use any of those units."}},"additionalProperties":false,"required":["inUseIds","businessDriverIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no unit, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the requested units that are in use, in the order they were first sent. Never empty when this code is raised."},"businessDriverIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the business drivers that use any of those units."}},"additionalProperties":false,"required":["inUseIds","businessDriverIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no unit, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"IN_USE"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"inUseIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the requested units that are in use, in the order they were first sent. Never empty when this code is raised."},"businessDriverIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs, canonical lowercase) of the business drivers that use any of those units."}},"additionalProperties":false,"required":["inUseIds","businessDriverIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/bulkDeleteDriverUnitsInput"}}}},"summary":"Delete several units of measure of business drivers in one call. WRITES and is DESTRUCTIVE — rows are hard-deleted, not deactivated, and there is no undo. Returns an empty body on success. ALL-OR-NOTHING TWICE OVER: every id is checked to exist before anything is removed, and if any does not the whole call is rejected with NOT_FOUND listing exactly the ids that matched nothing — the units that do exist are left untouched, so re-send without the missing ids; then every unit is checked to be unused, and if any is still the unit of measure of a business driver the whole call is rejected with IN_USE and nothing is deleted, the free ones included. NOT_FOUND wins when both apply. Point the drivers listed in IN_USE at another unit, then retry. A unit is never deactivated instead: it has no lifecycle dates. POST rather than DELETE because the ids travel in a request body, which a DELETE does not dependably deliver.","description":"Deletes several units of measure of business drivers in one all-or-nothing transaction and returns an empty body. DESTRUCTIVE: rows are hard-deleted, not deactivated, and there is no undo.\n\nAll-or-nothing: every id is checked to exist first, and if any does not the whole call is rejected with `NOT_FOUND` listing exactly the ids that matched nothing — nothing is deleted. Then every unit is checked to be unused: if ANY is still the unit of measure of a business driver the whole call fails with `IN_USE` and nothing is deleted, the free units included. `NOT_FOUND` wins when both apply.\n\nPOST rather than DELETE because the ids travel in a body, and a DELETE body is not dependably delivered.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingDriverUnits"]}},"/value-accounting/driver-values/materialize":{"post":{"operationId":"materializeDriverValues","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/materializeDriverValuesOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: DRIVER_NOT_FOUND, ENTITY_NOT_FOUND, BOOK_NOT_FOUND, PERIOD_NOT_FOUND, PERIOD_CALENDAR_MISMATCH","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"DRIVER_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"driverId":{"type":"string","description":"The driver id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["driverId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"ENTITY_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["entityId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"BOOK_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"bookId":{"type":"string","description":"The book id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["bookId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"The period id that matched nothing, canonical lowercase where uuid-shaped."}},"additionalProperties":false,"required":["accountingPeriodId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"PERIOD_CALENDAR_MISMATCH"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the rejected period."},"expectedFiscalCalendarId":{"type":"string","description":"Id (a UUID) of the fiscal calendar the period must come from."}},"additionalProperties":false,"required":["accountingPeriodId","expectedFiscalCalendarId"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/materializeDriverValuesInput"}}}},"summary":"Fill in an As-of driver's system-carried rows for a span of accounting periods, so each holds the value in force; returns how many rows were created. WRITES derived rows only — no recorded value, no audit history. Every write already carries an As-of value forward to today, so call this only before reading periods no write has reached yet with searchDriverValues (POST value-accounting/driver-values/search). It fills gaps only: it never overwrites a row, never invents a period before a combination's first value, and never fills the periods of an ended stretch. IDEMPOTENT: a second identical call creates 0. Concurrent writers are tolerated — a period another call or write stored first is kept and not counted, so overlapping calls may each report fewer rows than the span needed, and the call re-reads the stored rows once to carry the value now in force into the later periods; only a second collision within one call leaves that combination's later periods for a repeat call. A cumulative driver, or one with no values in this entity and book, gets 0 — not an error.","description":"Fills in an As-of driver's system-carried rows for a span of accounting periods, so each period holds the value in force there, and returns how many rows it created.\n\nWHEN: every write already carries an As-of value forward to today, so a read of past and current periods normally needs nothing (only a write that collided twice with concurrent writers can leave a combination's later periods empty; this call fills them). Call this before reading periods no write has reached yet — a later period once time has moved on — with searchDriverValues (POST value-accounting/driver-values/search).\n\nIt writes DERIVED rows only — no recorded value, no audit history — and only fills GAPS: it never overwrites a row, never invents a period before a combination's first value, and never fills the periods of an ended stretch. It is IDEMPOTENT: a second identical call creates 0. Concurrent writers are tolerated: a period another call or write stored first is kept and not counted — so overlapping calls may each report fewer rows than the span needed — and the call then re-reads the stored rows once and carries the value now in force into the later periods. Only a second such collision within one call leaves that combination's later periods empty; a repeat call fills them. A cumulative driver's values do not carry, so it gets 0, and so does a driver with no values in this entity and book. A system driver is not refused: the rows are derived, not statements.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingDriverValues"]}},"/value-accounting/business-drivers/set-active":{"post":{"operationId":"setBusinessDriversActive","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/setBusinessDriversActiveOutput"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]}}},"required":["data"],"additionalProperties":false}}},"headers":{"Idempotency-Replayed":{"required":false,"description":"Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.","schema":{"type":"boolean","const":true}}}},"400":{"description":"Invalid request or business failure. Codes: NOT_FOUND, DIMENSION_NOT_FED","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no driver, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_NOT_FED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver that cannot be switched on."},"reason":{"type":"string","description":"Why: 'NO_DIMENSIONS' or 'NOT_ON_SOURCE_DOCUMENT'."},"index":{"type":"number","description":"Zero-based position of the first declared entry the feed cannot supply. Absent for NO_DIMENSIONS."},"dimensionUrn":{"type":"string","description":"Model URN of that entry. Absent for NO_DIMENSIONS."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of that entry's custom value dimension, for a custom dimension only."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"The request carries no valid access token.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Why the credentials were refused, as text, for example `401 Unauthorized - access_denied - …`. A string rather than the error object other failures carry, so there is no `code` to branch on."}},"required":["error"]}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no driver, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_NOT_FED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver that cannot be switched on."},"reason":{"type":"string","description":"Why: 'NO_DIMENSIONS' or 'NOT_ON_SOURCE_DOCUMENT'."},"index":{"type":"number","description":"Zero-based position of the first declared entry the feed cannot supply. Absent for NO_DIMENSIONS."},"dimensionUrn":{"type":"string","description":"Model URN of that entry. Absent for NO_DIMENSIONS."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of that entry's custom value dimension, for a custom dimension only."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"The Idempotency-Key is still being processed by another request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"`IDEMPOTENCY_KEY_CONFLICT` when the conflict is an in-flight idempotency claim, in which case `originalCreatedAt` identifies when the attempt already holding the key started. Otherwise the first error-severity diagnostic code."},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"const":"NOT_FOUND"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"missingIds":{"type":"array","items":{"type":"string"},"description":"The ids that matched no driver, deduplicated, in canonical lowercase where uuid-shaped, and in the order they were first sent."}},"additionalProperties":false,"required":["missingIds"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"const":"DIMENSION_NOT_FED"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the system driver that cannot be switched on."},"reason":{"type":"string","description":"Why: 'NO_DIMENSIONS' or 'NOT_ON_SOURCE_DOCUMENT'."},"index":{"type":"number","description":"Zero-based position of the first declared entry the feed cannot supply. Absent for NO_DIMENSIONS."},"dimensionUrn":{"type":"string","description":"Model URN of that entry. Absent for NO_DIMENSIONS."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of that entry's custom value dimension, for a custom dimension only."}},"additionalProperties":false,"required":["id","reason"]}},"required":["code","message","severity"]},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}},"originalCreatedAt":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"The Idempotency-Key was already used with a different request payload.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"IDEMPOTENCY_PAYLOAD_MISMATCH"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Too many requests from this client address. The response has no body and no `Retry-After` header."},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"diagnostics":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning","information"]},"path":{"type":"array","items":{"type":["string","number"]}},"details":{}},"required":["code","message","severity"]},{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}}},"required":["message"]}]}}},"required":["message"]}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/setBusinessDriversActiveInput"}}}},"summary":"Activate or deactivate business drivers in one all-or-nothing call. WRITES; returns an empty body. The non-destructive lifecycle switch: nothing is deleted, no recorded value changes, and it is undone by calling again with the opposite flag. Use it to retire a driver whose history must stay, to bring back a driver that deleteBusinessDriver (DELETE value-accounting/business-drivers/:id) deactivated, or to free the way after NAME_TAKEN_DEACTIVATED. It also switches SYSTEM drivers: activating one starts its metric feed and prepares its recording contexts (one per entity and book with a fiscal calendar); deactivating pauses the feed and discards nothing. A driver already in the requested state stays in it: recording contexts are prepared only on the switch into active. Every id is checked first: an unknown one rejects the whole call with NOT_FOUND and nothing changes; a system driver switched on with dimensions its metric feed cannot supply rejects it with DIMENSION_NOT_FED.","description":"Activates or deactivates business drivers in one all-or-nothing call and returns an empty body. The NON-DESTRUCTIVE lifecycle switch: nothing is deleted, no recorded value changes, and calling it again with the opposite flag undoes it.\n\nIt is the way to retire a driver whose history must stay, the way to bring back a driver a delete deactivated, and the fix for a `NAME_TAKEN_DEACTIVATED` refusal. A deactivated driver keeps its name reserved.\n\nIt also switches SYSTEM drivers, and for them it is the whole configuration step: activating one starts its metric feed and prepares its recording contexts — one per entity and book with a fiscal calendar; deactivating pauses the feed and keeps everything it recorded. A driver already in the requested state stays in it: recording contexts are prepared only on the switch into active. A system driver is switched on only when its feed can supply every dimension it declares (`DIMENSION_NOT_FED` otherwise — for Time Tracking: Employee plus the tag dimensions available on time records).\n\nEvery id must exist: an unknown one fails the whole call with `NOT_FOUND`, and nothing changes.","parameters":[{"$ref":"#/components/parameters/ApiVersion"},{"name":"Idempotency-Key","in":"header","required":false,"description":"An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored.","schema":{"type":"string","minLength":1,"maxLength":255}}],"tags":["valueAccountingBusinessDrivers"]}}},"servers":[{"url":"https://{tenant}/public/api/lensing","variables":{"tenant":{"default":"your-tenant-host","description":"The host of your own tenant — every request goes there."}}}],"webhooks":{"accounting/journalEntries/updated":{"post":{"operationId":"accounting_journalEntries_updated","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/journalEntries/updated","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_journalEntries_updatedPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/journalEntries/updated","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"b41d7e02-9c58-4a63-8f17-3ea5c02d9b41"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A journal entry changed.","description":"Delivered whenever an existing entry changes. That covers rather a lot: approval and posting, rejection, voiding, being stamped as reversed when its reversal posts, and an edit to its header or its lines.\n\nLine edits reach you for a slightly indirect reason worth knowing: an entry's lines are always rewritten together with the entry itself, so a change to a line is reported through the entry's own record rather than through the line. The effect is the same — you get a delivery — but it means the volume stays one event per edit rather than one per line, which matters for month-end entries carrying hundreds of them.\n\nTwo things are NOT reported. An attachment added or removed publishes nothing, and it would not be observable anyway — attachments are not part of this resource. And the `reportingTags` on a line are resolved from value-accounting records held elsewhere, so editing an allocation can change what a line returns without a delivery; read the entry on a schedule if you depend on its tags.\n\nThis is a change notification rather than a description of the change. Re-read the entry and take its current status, approval status and reversal status from there; the payload names the entry but not what moved, and there is no before-and-after.\n\nTwo things are worth knowing when you re-read. An entry's lines are reconciled by deleting and recreating them, so line identifiers are not stable across an update and should not be used as durable keys. And voiding does not remove an entry: its status becomes voided and the row stays, which is what cancelling a posting means here.\n\nSeveral changes in quick succession are several deliveries, and a re-read after the first may already show the last. Deduplicate on `event.uuid` and treat the read as the source of truth.","tags":["accountingJournalEntries"]}},"accounting/journalEntries/deleted":{"post":{"operationId":"accounting_journalEntries_deleted","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/journalEntries/deleted","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_journalEntries_deletedPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/journalEntries/deleted","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"b41d7e02-9c58-4a63-8f17-3ea5c02d9b41"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A journal entry was deleted.","description":"Delivered once the entry has been removed. The identifier is resolved before the row disappears and published after it is gone, so nothing is announced that the delete then failed to do — but by the time this arrives the entry can no longer be read. Use it to drop the entry from a cache, an index or a downstream mirror.\n\nThis is the rare one. Posted entries are normally cancelled by voiding or reversing, not deleting, and deletion is refused for an approved entry, for a closed posting period, and where amortization schedules have already started. In practice it happens for unapproved manual entries and as a cascade when the source document is deleted.\n\nEntries discarded while still drafts publish nothing, the same as they published nothing when created.\n\nIf you need to know what was deleted rather than only that it was, keep the last-known copy from the created and updated events, this delivery carries the identifier alone.","tags":["accountingJournalEntries"]}},"accounting/journalEntries/created":{"post":{"operationId":"accounting_journalEntries_created","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/journalEntries/created","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_journalEntries_createdPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/journalEntries/created","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"b41d7e02-9c58-4a63-8f17-3ea5c02d9b41"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A journal entry was created.","description":"Delivered when the entry is created. The entry is published as soon as its header exists, which is BEFORE its lines are written, so a read immediately on delivery may show an entry whose lines are still landing. Read it again if the lines matter to you, and take the entry's current state from the read rather than from the moment of delivery.\n\n**Expect volume.** A journal entry is created for every posting in the system, and one is created per accounting book the entity keeps. A billing run of ten thousand invoices across two books publishes twenty thousand of these. Month-end close is the opposite shape: fewer entries, each carrying hundreds of lines. Size your subscriber for both, and remember that delivery is at-least-once and unordered.\n\nSources include every document that posts to the ledger: invoices and their late fees, payments and their applications, credit and debit memos, refunds and chargebacks, vendor bills and credits, expense reports, bank and credit card entries, fund transfers, payroll, inventory movements, amortization, depreciation, revenue recognition and the other close steps, currency revaluation, allocations, and manual entries created in the app or through the API.\n\nA reversal is itself a new journal entry, so reversing an entry publishes this event for the reversal and `accounting/journalEntries/updated` for the original.\n\nEntries still being drafted publish nothing, and neither do the drafts that are later discarded.\n\nThe payload carries the identifier only. Read the entry for its book, posting date, status, lines and source document; a delivery may be retried, so deduplicate on `event.uuid`, the id of the emission itself, not on `event.data.id`, which is the entry.","tags":["accountingJournalEntries"]}},"accounting/invoices/created":{"post":{"operationId":"accounting_invoices_created","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/invoices/created","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_invoices_createdPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/invoices/created","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"An invoice was issued.","description":"Delivered once the invoice, its lines, its journal entry, and any customer credit applied automatically have all settled, so the invoice is complete and readable when this arrives.\n\nIt fires however the invoice came about: a scheduled, manual, or ad-hoc billing run, an import with POST accounting/invoices/import, milestone invoicing, a credit-and-rebill, a subscription cancellation, or a load from an external system. A billing run issues many invoices and sends one event for each, so expect bursts.\n\nInvoices brought in by a one-time historical migration do **not** publish this event. They record invoices that were issued, sent, and usually settled long ago in another system, so treating them as newly issued would trigger work that has already happened. Load that history from the invoicing read API instead.\n\nIf your own integration wrote the invoice, you will receive an event for it. Filter those out using the invoice's data source or its external identifier.\n\nA delivery may be retried, so deduplicate on `event.uuid`, the id of the emission itself. Do not confuse it with `event.data.id`, which is the invoice: one invoice produces many emissions over its life.","tags":["accountingInvoices"]}},"accounting/invoices/updated":{"post":{"operationId":"accounting_invoices_updated","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"accounting/invoices/updated","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/accounting_invoices_updatedPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"accounting/invoices/updated","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"An invoice changed after it was issued.","description":"Delivered whenever something about the invoice changes after it is issued: an edit to its header or lines, a payment applied to it, a credit memo applied to it, the invoice being emailed, delivered, failed or opened, and a chargeback dispute opening or resolving.\n\nThis is a change notification rather than a description of the change. The payload names the invoice but not what changed about it, and there is no before-and-after, so re-read the invoice and take its current amounts and status from there. A subscriber that needs a diff keeps its own last-known copy, because the delivery cannot supply one.\n\nThere are deliberately no separate events for payment, credit, delivery or dispute. To tell those apart, compare what you read against your last-known copy: the invoice's status, amount due, delivery status and dispute state are all readable. More specific events can be added later without breaking this one.\n\nSeveral changes in quick succession are several deliveries, and a re-read after the first may already show the last. Deduplicate on `event.uuid`, the id of the emission itself, and do that before anything with a financial side effect. Take balances from a read rather than from adding up events.\n\nInvoices touched by a one-time historical migration do not publish this event, the same as `accounting/invoices/created`.","tags":["accountingInvoices"]}},"hr/people/created":{"post":{"operationId":"hr_people_created","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"hr/people/created","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/hr_people_createdPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"hr/people/created","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"3f1c9b74-2a55-4de1-9c0e-5b7d81af6e23"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A person was added.","description":"Delivered when a person record is created, whether through POST people/person, the create-employee flow in the app, or an integration syncing people from a payroll or HR system.\n\nA person is created together with their first job, so this event is normally followed by one or more `hr/people/updated` for the same business action. Both describe the same new person; read the person back and take the current state from there.\n\nIt fires for people whose employment has not started yet as well as for those already working: read `status` and `startDate` rather than assuming a new person is employed today.\n\nThe payload carries the identifier only. Read the person for names, employment dates, job, compensation and external identifiers.\n\nThere is no deleted event, and none is missing: people are never removed. Employment ends by setting `endDate` and `status`, which arrives as an update with the person still readable.\n\nA delivery may be retried, so deduplicate on `event.uuid`, the id of the emission itself. Do not confuse it with `event.data.id`, which is the person.","tags":["hrPeople"]}},"hr/people/updated":{"post":{"operationId":"hr_people_updated","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"type":"object","description":"The subscription this delivery was made for.","properties":{"uuid":{"type":"string","description":"Stable identifier of the subscription."},"type":{"type":"string","description":"Transport the subscription delivers through; `webhook` for deliveries carried by this request."},"name":{"type":"string","description":"Authored name of the subscription."}},"required":["uuid","type","name"],"additionalProperties":false},"event":{"type":"object","description":"The emitted event being delivered.","properties":{"uuid":{"type":"string","description":"Stable identifier of this emission — the idempotency key for a receiver, since a delivery may be retried."},"identifier":{"type":"string","const":"hr/people/updated","description":"Public identifier of the event type."},"emittedAt":{"type":"string","format":"date-time","description":"When the event was emitted (ISO 8601)."},"data":{"$ref":"#/components/schemas/hr_people_updatedPayload"}},"required":["uuid","identifier","emittedAt","data"],"additionalProperties":false}},"required":["subscription","event"],"additionalProperties":false},"examples":{"example":{"value":{"subscription":{"uuid":"3f8b1c92-5d47-4e0a-9b6f-2c1d8e7a4b30","type":"webhook","name":"my-subscription"},"event":{"uuid":"7a2e4d61-9c03-4f8b-a5d2-6e0b3c9f1a84","identifier":"hr/people/updated","emittedAt":"2026-01-15T09:30:00.000Z","data":{"id":"3f1c9b74-2a55-4de1-9c0e-5b7d81af6e23"}}}}}}}},"responses":{"200":{"description":"Acknowledged. Return any 2xx status to confirm receipt; a non-2xx response triggers redelivery."}},"security":[{"webhookSignature":[]}],"summary":"A person changed.","description":"Delivered when the person's own employment record changes — status, start, end and probation dates, employment category, entity, location and custom fields; when their primary job changes, which is what moves `jobId`, `departmentName`, `positionName` and `managerName`; when their compensation changes; and when an external identifier is added, changed or removed.\n\n`firstName`, `lastName`, `middleName`, the preferred names, `name` and `email` are held on a separate person record and projected onto the employment record rather than stored on it. A write to either record publishes this event, so a rename arrives however it was made.\n\nThis is a change notification rather than a description of the change. The payload names the person but not what moved, and there is no before-and-after, so re-read and take the current state from there.\n\nChanges to what the person merely references are not reported: the department, position and manager behind `departmentName`, `positionName` and `managerName` are their own records, as are the entity, the location, the employment category and the compensation type. Renaming any of them changes what this API returns but publishes nothing, because the person did not change.\n\nExpect more than one delivery for a single business action — assigning a job and setting a salary are separate writes to the same person — and a re-read after the first may already show the last. Deduplicate on `event.uuid` and treat the read as the source of truth.","tags":["hrPeople"]}}},"components":{"schemas":{"updateApprovalPolicyOutput":{"type":"object","properties":{},"additionalProperties":false},"updateApprovalPolicyInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the policy applies to. Omit to leave unchanged. Ignored when isAllEntities is true. See id on GET base/entities."},"isAllEntities":{"type":"boolean","description":"Whether the policy applies to every legal entity. Set true to widen it to all, false to narrow it back to the entity in entityId. Omit to leave unchanged."},"status":{"enum":["active","inActive"],"description":"The lifecycle status of the policy. Omit to leave unchanged. Setting 'inActive' stops the policy matching new documents, while documents already in the workflow keep approving against it, which makes it the safe alternative to deleting.","examples":["inActive"]},"startDate":{"type":"string","description":"The first date the policy is eligible for matching. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","description":"The last date the policy is eligible for matching. Use format YYYY-MM-DD. Omit to leave unchanged."},"submitterCannotApprove":{"type":"boolean","description":"Whether the document submitter is stopped from approving their own document. Omit to leave unchanged."},"useSubstitute":{"type":"boolean","description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve. Omit to leave unchanged."},"approverCommentEnabled":{"type":"boolean","description":"Whether approvers are prompted for an optional comment at approve time. Omit to leave unchanged."},"notification":{"type":"object","properties":{"emailNotification":{"type":"boolean"},"nativeNotification":{"type":"boolean"},"slackNotification":{"type":"boolean"}},"additionalProperties":false,"description":"The notification channels for this policy. This object replaces the stored settings, so a channel left out is turned off. Omit the object to leave the settings unchanged."},"createLines":{"type":"array","items":{"type":"object","properties":{"criteria":{"type":"string","description":"The document field the rule tests, for example 'Vendor', 'Total Amount' or 'Upon Creation'. Pass the literal __COMPOSITE__ to combine several conditions in one line."},"operator":{"type":"string","description":"The comparison to apply to the criteria, for example 'Equal', 'Not Equal', 'Greater Than', 'Less Than', 'In', 'Not In', 'Intersect' or the Any and All variants for array fields. Use '-' for a criteria that takes no value."},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string. Omit only when valueType is 'noValue'."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"],"description":"How to interpret value. 'number' is a single numeric comparison, 'multivalue' one or more discrete values, 'value' a single discrete value, 'noValue' a criteria that takes none such as 'Upon Creation', 'arrayField' the Any, All and Intersect operators over a line-level array, and 'composite' a __COMPOSITE__ expression."},"step":{"type":"number","description":"The approval order, starting at 1. Lines that share a step are approved together, and a higher step is reached only once the lower steps are satisfied."},"requireAction":{"enum":["All","Any"],"description":"Whether all of the line's approvers must approve, or any one of them is enough. Defaults to 'All'."},"approvers":{"type":"array","items":{"type":"object","properties":{"approverId":{"type":"number","description":"The approver. For approverType 'employee' or 'supremeApprover' it is the employee, and for 'manager' it is the manager-hierarchy record. It is an integer, not a UUID. There is no endpoint for it."},"approverType":{"enum":["employee","manager","supremeApprover"]}},"additionalProperties":false,"required":["approverId","approverType"]},"description":"The approvers for this line. It must not be empty."}},"additionalProperties":false,"required":["criteria","operator","valueType","step","approvers"]},"description":"The rule lines to add. Each is a whole new line with no id, carrying its approvers as a plain array."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing rule line, from the line's id on GET base/approval-policies/:id. An id that does not belong to this policy fails with UNKNOWN_LINE."},"criteria":{"type":"string","description":"The document field the rule tests. Omit to leave it unchanged."},"operator":{"type":"string","description":"The comparison to apply to the criteria. Omit to leave it unchanged."},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string. This replaces the whole list rather than merging into it. Omit to leave it unchanged."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"],"description":"How to interpret value. Omit to leave it unchanged."},"step":{"type":"number","description":"The approval order, starting at 1. Omit to leave it unchanged."},"requireAction":{"enum":["All","Any"],"description":"Whether all of the line's approvers must approve, or any one of them is enough. Omit to leave it unchanged."},"createApprovers":{"type":"array","items":{"type":"object","properties":{"approverId":{"type":"number"},"approverType":{"enum":["employee","manager","supremeApprover"]}},"additionalProperties":false,"required":["approverId","approverType"]},"description":"The approvers to add to this line."},"updateApprovers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing approver assignment, from the approver's id on GET base/approval-policies/:id."},"approverId":{"type":"number","description":"The approver. Omit to leave it unchanged."},"approverType":{"enum":["employee","manager","supremeApprover"],"description":"The kind of approver. Omit to leave it unchanged."}},"additionalProperties":false,"required":["id"]},"description":"The approvers to change, matched by id. An id that does not belong to this line fails with UNKNOWN_APPROVER."},"deleteApprovers":{"type":"array","items":{"type":"string"},"description":"The ids of approver assignments to remove from this line. Removing the last approver of a surviving line fails with LINE_WITHOUT_APPROVERS."}},"additionalProperties":false,"required":["id"]},"description":"The rule lines to change, matched by id. Every field except id is optional, and omitting one leaves it unchanged. Each line edits its own approvers through the nested createApprovers, updateApprovers and deleteApprovers arrays.","examples":[[{"id":"4e2b7a90-5c31-4d68-9f02-8a1c6b45e7d3","value":["25000"],"createApprovers":[{"approverId":77,"approverType":"employee"}],"deleteApprovers":["b8c5d2e1-3f47-4a90-8e16-5d2b9c703f8a"]}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of rule lines to remove. Deleting a line also removes its approvers, so do not list them separately."},"createExclusionLines":{"type":"array","items":{"type":"object","properties":{"criteria":{"type":"string"},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string. Omit only when valueType is 'noValue'."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"]}},"additionalProperties":false,"required":["criteria","operator","valueType"]},"description":"The exclusion lines to add."},"updateExclusionLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the existing exclusion line. An id that does not belong to this policy fails with UNKNOWN_EXCLUSION_LINE."},"criteria":{"type":"string"},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"}},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"]}},"additionalProperties":false,"required":["id"]},"description":"The exclusion lines to change, matched by id. Omitting a field leaves it unchanged."},"deleteExclusionLines":{"type":"array","items":{"type":"string"},"description":"The ids of exclusion lines to remove.","examples":[["1a3c5e70-9b24-4f18-a06d-7c8e2b41d95f"]]}},"additionalProperties":false},"searchPermissionItemsOutput":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the permission."},"description":{"type":"string","description":"The description of the permission."},"uuid":{"type":"string","description":"The unique identifier for the permission."},"package":{"type":"string","description":"The package that owns the permission."}},"additionalProperties":false,"required":["name","uuid","package"]},"description":"The matching permissions, best match first."},"permissionType":{"enum":["tasks","roles"],"description":"The kind of permission that was searched."}},"additionalProperties":false,"required":["permissions","permissionType"]},"searchPermissionItemsInput":{"type":"object","properties":{"queryString":{"type":"string","description":"The text to match against the name and description of each permission. Must have 3 or more characters."},"permissionType":{"enum":["tasks","roles"],"description":"The kind of permission to search: 'roles' or 'tasks'."},"limit":{"type":"number","description":"The maximum number of results. Must be greater than 0. Defaults to 5."}},"additionalProperties":false,"required":["queryString","permissionType"]},"createApprovalPolicyOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created approval policy. Every other approval-policy endpoint is keyed by it.","examples":["9c1f4b62-7d38-4a05-b1e7-2f6a8c093d54"]}},"additionalProperties":false,"required":["id"]},"createApprovalPolicyInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the policy applies to. Required unless isAllEntities is true. Leave it out when using isAllEntities. See id on GET base/entities."},"isAllEntities":{"type":"boolean","description":"Whether the policy applies to every legal entity instead of a single one. When true, leave entityId out.","examples":[true]},"businessObject":{"type":"string","description":"The code of the business object the policy governs. It must be a registered approval business object, for example 'VendorBill', 'ExpenseReport', 'PurchaseOrder', 'PurchaseRequest' or 'JournalEntry'. An unregistered code fails with UNKNOWN_BUSINESS_OBJECT, which lists the registered codes. It cannot be changed after creation.","examples":["VendorBill"]},"status":{"enum":["active","inActive"],"description":"The lifecycle status of the policy. Defaults to 'active', which makes it eligible for matching immediately. Create it 'inActive' to stage a policy that would otherwise collide with a live one.","examples":["active"]},"startDate":{"type":"string","description":"The first date the policy is eligible for matching. Use format YYYY-MM-DD. Omit for no lower bound."},"endDate":{"type":"string","description":"The last date the policy is eligible for matching. Use format YYYY-MM-DD. Omit for no upper bound."},"submitterCannotApprove":{"type":"boolean","description":"Whether the document submitter is stopped from approving their own document. When true, their approval does not count toward fulfillment and they are not notified as an approver. Defaults to false."},"useSubstitute":{"type":"boolean","description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve. Defaults to false."},"approverCommentEnabled":{"type":"boolean","description":"Whether approvers are prompted for an optional comment at approve time. The comment is stored on the approval trail. Defaults to false.","examples":[true]},"notification":{"type":"object","properties":{"emailNotification":{"type":"boolean","description":"Whether to email approvers."},"nativeNotification":{"type":"boolean","description":"Whether to raise an in-product notification for approvers."},"slackNotification":{"type":"boolean","description":"Whether to notify approvers on Slack."}},"additionalProperties":false,"description":"The notification channels used when this policy's approvers and submitters are told about a document. Omit to leave the tenant's defaults in place.","examples":[{"emailNotification":true}]},"lines":{"type":"array","items":{"type":"object","properties":{"criteria":{"type":"string","description":"The document field the rule tests. Use the criteria names the document type publishes, for example 'Vendor', 'Total Amount', 'Department', 'Line Amounts' or 'Upon Creation'. Pass the literal __COMPOSITE__ to combine several conditions in one line."},"operator":{"type":"string","description":"The comparison to apply to the criteria, for example 'Equal', 'Not Equal', 'Greater Than', 'Less Than', 'In', 'Not In', 'Intersect' or the Any and All variants for array fields. Use '-' for a criteria that takes no value."},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string, for example [\"10000\"], not [10000]. Omit only when valueType is 'noValue'. A 'number' valueType takes exactly one numeric element. A 'composite' valueType takes exactly one element holding the JSON expression, for example {\"operator\":\"AND\",\"children\":[{\"criteriaName\":\"Vendor\",\"operator\":\"Equal\",\"value\":[\"Acme\"],\"valueType\":\"multivalue\"},{\"criteriaName\":\"Total Amount\",\"operator\":\"Less Than\",\"value\":[\"10000\"],\"valueType\":\"number\"}]}."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"],"description":"How to interpret value. 'number' is a single numeric comparison, 'multivalue' one or more discrete values, 'value' a single discrete value, 'noValue' a criteria that takes none such as 'Upon Creation', 'arrayField' the Any, All and Intersect operators over a line-level array, and 'composite' a __COMPOSITE__ expression."},"step":{"type":"number","description":"The approval order, starting at 1. Lines that share a step are approved together, and a higher step is reached only once the lower steps are satisfied."},"requireAction":{"enum":["All","Any"],"description":"Whether all of the line's approvers must approve, or any one of them is enough. Defaults to 'All'."},"approvers":{"type":"array","items":{"type":"object","properties":{"approverId":{"type":"number","description":"The approver. For approverType 'employee' or 'supremeApprover' it is the employee, and for 'manager' it is the manager-hierarchy record. It is an integer, not a UUID. There is no endpoint for it."},"approverType":{"enum":["employee","manager","supremeApprover"],"description":"The kind of approver. 'employee' names a specific person, 'manager' resolves the submitter's manager through a hierarchy at approval time, and 'supremeApprover' is a person who may approve at any step."}},"additionalProperties":false,"required":["approverId","approverType"]},"description":"The approvers for this line. It must not be empty, because a line with no approver can never be satisfied."}},"additionalProperties":false,"required":["criteria","operator","valueType","step","approvers"]},"description":"The policy's rule lines. It must not be empty. Rule lines are evaluated independently: a document picks up the approvers of every line it matches. To require several conditions together, use one __COMPOSITE__ line rather than several plain lines.","examples":[[{"criteria":"Total Amount","operator":"Greater Than","value":["10000"],"valueType":"number","step":1,"requireAction":"All","approvers":[{"approverId":42,"approverType":"employee"}]}]]},"exclusionLines":{"type":"array","items":{"type":"object","properties":{"criteria":{"type":"string"},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"},"description":"The values to compare against, each as a string. Omit only when valueType is 'noValue'."},"valueType":{"enum":["number","multivalue","value","noValue","arrayField","composite"]}},"additionalProperties":false,"required":["criteria","operator","valueType"]},"description":"The exclusion lines. A document matching any of them is exempted from the policy entirely, whatever the rule lines say. Omit for no exclusions."}},"additionalProperties":false,"required":["businessObject","lines"]},"entitiesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entity. Other resources reference it as entityId."},"entityName":{"type":"string","description":"The name of the entity, for example 'Acme Inc.'. Unique within the tenant."},"entityNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The entity's business number, separate from its name. Absent until one is assigned."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The entity's default currency. Format ISO 4217, for example 'USD'. The ledger's functional currency is kept per book (currency on book entity assignments) and can differ from it. Absent when none has been set."},"timeZone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The time zone the entity operates in. Format IANA time-zone name, for example 'Europe/Berlin'. New entities default to 'Etc/UTC'. Absent when none has been set."},"status":{"anyOf":[{"enum":["active","inactive","created"]},{"type":"null"}],"description":"The lifecycle status of the entity. Possible values: 'active', 'inactive', 'created'. 'created' is the default for a new entity."},"entityType":{"anyOf":[{"enum":["LegalEntity","NonLegalReportingEntity","Establishment"]},{"type":"null"}],"description":"Whether the entity is a legal entity, a non-legal reporting entity, or an establishment (a branch of a legal entity that keeps its own books). Possible values: 'LegalEntity', 'NonLegalReportingEntity', 'Establishment'. Defaults to 'LegalEntity'."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The country the entity is registered in. Format ISO 3166-1 alpha-2, for example 'US'. Absent when none has been set."},"entityCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A short code for the entity, separate from its entityNumber. Absent until one is assigned."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The parent entity in the entity hierarchy, which is what a consolidation rolls this entity up to. A consolidation of a parent covers the entities below it through parentId that are 'active' and have a book entity assignment for the consolidated book; the chain stops at an entity without one. Absent on a top-level entity."},"parentEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The parent entity in the entity hierarchy, under the name GET base/entities/:id, POST base/entities/search, POST base/entities and PATCH base/entities/:id use. Use this field; parentId carries the same value and is kept only for compatibility. Absent on a top-level entity."},"localeCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The locale for documents sent from this entity, setting the language and regional format. Format BCP 47, for example 'en-US'. Absent when none has been set."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the entity became effective. Format YYYY-MM-DD. Absent when none has been set."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the entity stops being effective. Format YYYY-MM-DD. Absent when the entity has no scheduled end."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the entity last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteApprovalPolicyOutput":{"type":"object","properties":{},"additionalProperties":false},"approvalPoliciesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the approval policy."},"policyHeaderNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The policy number, assigned when the policy is created and stable across edits."},"businessObject":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the business object the policy governs, for example 'VendorBill', 'ExpenseReport' or 'PurchaseOrder'."},"status":{"anyOf":[{"enum":["active","inActive"]},{"type":"null"}],"description":"The lifecycle status of the policy. Only active policies are matched against new documents. Documents already in flight keep approving against an inActive policy."},"isAllEntities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the policy applies to every legal entity rather than the one named by entityName."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the policy applies to. Absent when isAllEntities is true."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no lower bound."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no upper bound."},"submitterCannotApprove":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the document submitter is stopped from approving their own document. When true, their approval does not count toward fulfillment and they are not notified as an approver."},"useSubstitute":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve."},"approverCommentEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether approvers are prompted for an optional comment at approve time. The comment is stored on the approval trail."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the approval policy last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteSlackWorkspaceOutput":{"type":"object","properties":{},"additionalProperties":false},"createSlackWorkspaceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the new connection."}},"additionalProperties":false,"required":["id"]},"createSlackWorkspaceInput":{"type":"object","properties":{"teamId":{"type":"string","description":"The Slack team id of the workspace to connect, for example 'T0C4A9X2BRR'.","examples":["T0C4A9X2BRR"]},"teamName":{"type":"string","description":"The display name of the Slack workspace.","examples":["Lensingbots Customer Test"]}},"additionalProperties":false,"required":["teamId"]},"searchApprovalPoliciesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the approval policy."},"policyHeaderNumber":{"type":"string","description":"The policy number, assigned when the policy is created and stable across edits."},"entityId":{"type":"string","description":"The legal entity the policy applies to. Absent when isAllEntities is true. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the policy applies to. Absent when isAllEntities is true."},"isAllEntities":{"type":"boolean","description":"Whether the policy applies to every legal entity rather than the one named by entityId."},"businessObject":{"type":"string","description":"The code of the business object the policy governs, for example 'VendorBill', 'ExpenseReport' or 'PurchaseOrder'."},"status":{"type":"string","description":"The lifecycle status of the policy. Possible values: 'active', 'inActive'. Only active policies are matched against new documents."},"startDate":{"type":"string","description":"The first date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no lower bound."},"endDate":{"type":"string","description":"The last date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no upper bound."},"submitterCannotApprove":{"type":"boolean","description":"Whether the document submitter is stopped from approving their own document."},"useSubstitute":{"type":"boolean","description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve."},"approverCommentEnabled":{"type":"boolean","description":"Whether approvers are prompted for an optional comment at approve time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the approval policy last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"notification":{"type":"object","properties":{"emailNotification":{"type":"boolean"},"nativeNotification":{"type":"boolean"},"slackNotification":{"type":"boolean"}},"additionalProperties":false,"description":"The notification channels used when approvers and submitters are told about this policy's documents. Absent when they have never been configured for this policy."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"policyLineNumber":{"type":"string"},"criteria":{"type":"string","description":"The document field the rule tests, for example 'Vendor' or 'Total Amount'. The literal __COMPOSITE__ marks a line whose value is a JSON AND or OR expression over several criteria."},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"},"description":"The values the criteria is compared against, each as a string. For a __COMPOSITE__ line this is a single-element array holding the JSON expression."},"valueType":{"type":"string"},"step":{"type":"number","description":"The approval order, starting at 1. Lines that share a step are evaluated and approved together."},"requireAction":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"approverId":{"type":"number","description":"The approver. For approverType 'employee' or 'supremeApprover' it is the employee, and for 'manager' it is the manager-hierarchy record. It is an integer, not a UUID. There is no endpoint for it."},"approverType":{"type":"string"},"approverName":{"type":"string","description":"The resolved display name of the approver. Absent when the referenced employee or manager no longer exists."}},"additionalProperties":false,"required":["id","approverId","approverType"]},"description":"The approvers assigned to this line. A line always has at least one."}},"additionalProperties":false,"required":["id","criteria","operator","value","step","approvers"]},"description":"The policy's rule lines, ordered by step. A document picks up the approvers of every line it matches."},"exclusionLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"criteria":{"type":"string"},"operator":{"type":"string"},"value":{"type":"array","items":{"type":"string"}},"valueType":{"type":"string"}},"additionalProperties":false,"required":["id","criteria","operator","value"]},"description":"The exclusion lines. A document matching any of them is exempted from the policy entirely."}},"additionalProperties":false,"required":["id","businessObject","status","lastModifiedDate","lines","exclusionLines"]},"description":"The approval policies that match, oldest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchApprovalPoliciesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"businessObject":{"type":"string","description":"Limits results to policies governing this business object, for example 'VendorBill'. A code that matches no registered business object returns an empty page."},"status":{"type":"string","description":"Limits results to policies in this lifecycle status. Accepted values: 'active', 'inActive'. Any other value returns an empty page."},"entityId":{"type":"string","description":"Limits results to policies scoped to this legal entity, given as the entity id. Accepted only in the request body. An id that matches no entity returns an empty page, not an error. This does not include the all-entities policies. Combine with isAllEntities to widen. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to policies whose legal entity name contains this text. The match is case-sensitive. Accepted only in the request body. Use entityId when you already have the id."},"isAllEntities":{"type":"boolean","description":"Limits results to policies that cover every legal entity when true, or only single-entity policies when false."},"policyHeaderNumber":{"type":"string","description":"Limits results to the policy with this policy number. The match is exact."},"startDate":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false,"description":"Limits results by the policy's startDate. Both bounds are inclusive. Use format YYYY-MM-DD, and omit either side for an open-ended range."},"endDate":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"additionalProperties":false,"description":"Limits results by the policy's endDate. Both bounds are inclusive. Use format YYYY-MM-DD, and omit either side for an open-ended range."}},"additionalProperties":false,"description":"The filters to apply. A policy must match every filter you send. Omit to return all approval policies.","examples":[{"businessObject":"VendorBill","status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of policies per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Cursor pagination. Omit the whole object for the first page at the default size.","examples":[{"size":25}]}},"additionalProperties":false},"getApprovalPolicyOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the approval policy."},"policyHeaderNumber":{"type":"string","description":"The policy number, assigned when the policy is created and stable across edits."},"entityId":{"type":"string","description":"The legal entity the policy applies to. Absent when isAllEntities is true. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the policy applies to. Absent when isAllEntities is true."},"isAllEntities":{"type":"boolean","description":"Whether the policy applies to every legal entity rather than the one named by entityId."},"businessObject":{"type":"string","description":"The code of the business object the policy governs, for example 'VendorBill', 'ExpenseReport' or 'PurchaseOrder'."},"status":{"type":"string","description":"The lifecycle status of the policy. Possible values: 'active', 'inActive'. Only active policies are matched against new documents."},"startDate":{"type":"string","description":"The first date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no lower bound."},"endDate":{"type":"string","description":"The last date the policy is eligible for matching. Format YYYY-MM-DD. Absent when there is no upper bound."},"submitterCannotApprove":{"type":"boolean","description":"Whether the document submitter is stopped from approving their own document."},"useSubstitute":{"type":"boolean","description":"Whether an approver who is absent today (approved absence, or a weekend/public holiday running into one) is routed to the substitute on their employee record. The original approver can still approve."},"approverCommentEnabled":{"type":"boolean","description":"Whether approvers are prompted for an optional comment at approve time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the approval policy last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"notification":{"type":"object","properties":{"emailNotification":{"type":"boolean","description":"Whether approvers are emailed."},"nativeNotification":{"type":"boolean","description":"Whether approvers get an in-product notification."},"slackNotification":{"type":"boolean","description":"Whether approvers are notified on Slack."}},"additionalProperties":false,"description":"The notification channels used when approvers and submitters are told about this policy's documents. Absent when they have never been configured for this policy."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule line. Pass it in updateLines or deleteLines on PATCH base/approval-policies/:id."},"policyLineNumber":{"type":"string","description":"The rule line number, assigned when the line is created."},"criteria":{"type":"string","description":"The document field the rule tests, for example 'Vendor' or 'Total Amount'. The literal __COMPOSITE__ marks a line whose value is a JSON AND or OR expression over several criteria."},"operator":{"type":"string","description":"The comparison applied to the criteria, for example 'Equal' or 'Less Than'."},"value":{"type":"array","items":{"type":"string"},"description":"The values the criteria is compared against, each as a string. For a __COMPOSITE__ line this is a single-element array holding the JSON expression."},"valueType":{"type":"string","description":"How the value is interpreted. Possible values: 'number', 'multivalue', 'value', 'noValue', 'arrayField', 'composite'."},"step":{"type":"number","description":"The approval order, starting at 1. Lines that share a step are evaluated and approved together."},"requireAction":{"type":"string","description":"Whether all of the line's approvers must approve, or any one of them is enough. Possible values: 'All', 'Any'."},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the approver assignment. Pass it in updateApprovers or deleteApprovers on PATCH base/approval-policies/:id."},"approverId":{"type":"number","description":"The approver. For approverType 'employee' or 'supremeApprover' it is the employee, and for 'manager' it is the manager-hierarchy record. It is an integer, not a UUID. There is no endpoint for it."},"approverType":{"type":"string","description":"The kind of approver. Possible values: 'employee', 'manager', 'supremeApprover', 'position'. 'employee' names a specific person, 'manager' resolves the submitter's manager through a hierarchy at approval time, and 'supremeApprover' is a person who may approve at any step."},"approverName":{"type":"string","description":"The resolved display name of the approver. Absent when the referenced employee or manager no longer exists."}},"additionalProperties":false,"required":["id","approverId","approverType"]},"description":"The approvers assigned to this line. A line always has at least one."}},"additionalProperties":false,"required":["id","criteria","operator","value","step","approvers"]},"description":"The policy's rule lines, ordered by step. A document picks up the approvers of every line it matches."},"exclusionLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the exclusion line. Pass it in updateExclusionLines or deleteExclusionLines on PATCH base/approval-policies/:id."},"criteria":{"type":"string","description":"The document field the exclusion tests."},"operator":{"type":"string","description":"The comparison applied to the criteria."},"value":{"type":"array","items":{"type":"string"},"description":"The values the criteria is compared against, each as a string."},"valueType":{"type":"string","description":"How the value is interpreted. Possible values: 'number', 'multivalue', 'value', 'noValue', 'arrayField', 'composite'."}},"additionalProperties":false,"required":["id","criteria","operator","value"]},"description":"The exclusion lines. A document matching any of them is exempted from the policy entirely."}},"additionalProperties":false,"required":["id","businessObject","status","lastModifiedDate","lines","exclusionLines"]},"updateOpportunityOutput":{"type":"object","properties":{},"additionalProperties":false},"updateOpportunityInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity that owns the opportunity. It must be active, and the stage must belong to it. Omit to leave unchanged. See id on GET base/entities."},"customerId":{"type":"string","description":"The customer or prospect the opportunity is for. A prospect already converted to a customer is replaced by that customer. A new customer must not be an end customer (send its partner instead). Omit to leave unchanged. See id on GET accounting/customers/:id or GET crm/prospects/:id."},"endCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end customer behind a partner customer. Omit to leave unchanged, or to drop it when customerId changes. Send null to clear. See id on GET accounting/customers/:id."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"priceBookId":{"type":"string","description":"The price book quotes on this opportunity are priced from. Omit to leave unchanged. See id on GET accounting/price-books/:id."},"stageId":{"type":"string","description":"The stage the opportunity moves to: an active stage of the opportunity's entity, as GET crm/opportunity-stages returns them. Re-sending the current stage is accepted even if it has since been deactivated. Omit to leave unchanged.","examples":["5b0e7c3a-2f6d-4a8b-9c1e-7d4f3a2b1c09"]},"opportunityName":{"type":"string","description":"The display name of the opportunity. Must not be empty. Omit to leave unchanged."},"closeDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The expected close date of the deal. Format YYYY-MM-DD. Omit to leave unchanged, send null to clear.","examples":["2027-04-30"]},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The expected deal amount, as a decimal in currency. Must not be negative. Omit to leave unchanged, send null to clear."},"crmId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this opportunity in an external system, for example a Salesforce record id. Omit to leave unchanged, send null to clear."}},"additionalProperties":false},"createOpportunityStagesOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the created set of stages, which is the entity's id. The other opportunity stages endpoints are keyed by it.","examples":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"]}},"additionalProperties":false,"required":["id"]},"createOpportunityStagesInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity to create the stages for. It must be active and must not have stages yet. See id on GET base/entities.","examples":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"]},"stages":{"type":"array","items":{"type":"object","properties":{"stageName":{"type":"string","description":"The display name of the stage. Must not be empty."},"stageType":{"enum":["open","closedWon","closedLost"],"description":"What reaching the stage means for an opportunity."},"probability":{"type":"string","format":"decimal","description":"The likelihood that an opportunity in this stage closes as won, as a percentage from 0 to 100. For example, 25 means 25%."},"orderIndex":{"type":"number","description":"Where the stage goes: the stages are ordered by this value, which must be unique among them. The stored positions are 0, 1, 2 … with no gaps. Omit to place the stage after every stage that has one."},"isDeactivated":{"type":"boolean","description":"Whether the stage starts out retired. Defaults to false."}},"additionalProperties":false,"required":["stageName","stageType","probability"]},"description":"The stages to create.","examples":[[{"stageName":"Qualification","stageType":"open","probability":"20"},{"stageName":"Negotiation","stageType":"open","probability":"60"},{"stageName":"Closed Won","stageType":"closedWon","probability":"100"},{"stageName":"Closed Lost","stageType":"closedLost","probability":"0"}]]}},"additionalProperties":false,"required":["entityId","stages"]},"createQuoteOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the created quote. See id on GET crm/quotes/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createQuoteInput":{"type":"object","properties":{"quoteType":{"enum":["new","changeOrder"],"description":"The type of quote. A 'new' quote sells to an opportunity; a 'changeOrder' quote amends the sales arrangement named by salesArrangementId. Defaults to 'new'."},"opportunityId":{"type":"string","description":"The opportunity the quote belongs to. Its currency governs every amount below. See id on GET crm/opportunities/:id. Required on a 'new' quote, not accepted on a 'changeOrder' one.","examples":["a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"]},"salesArrangementId":{"type":"string","description":"The sales arrangement a 'changeOrder' quote amends. See salesArrangementId on GET accounting/sales-orders/:id. Required on a 'changeOrder' quote, not accepted on a 'new' one. Every amount below is then in the arrangement's currency."},"quoteDate":{"type":"string","format":"date","description":"The date the quote is drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date.","examples":["2026-08-01"]},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription may start before it.","examples":["2026-09-01"]},"paymentTerm":{"type":"string","description":"The code of the payment term for invoices created from this quote. See code on GET accounting/payment-terms.","examples":["net30"]},"billToAddressId":{"type":"string","description":"The address to bill. The quote stores its own copy of it. Required on a 'new' quote; a 'changeOrder' quote takes the customer's default bill-to address.","examples":["6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02"]},"soldToAddressId":{"type":"string","description":"The address the products are sold to. The quote stores its own copy of it. Required on a 'new' quote; a 'changeOrder' quote takes the customer's default sold-to address.","examples":["6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02"]},"isPrimary":{"type":"boolean","description":"Whether this becomes the primary quote of its opportunity, replacing the current one. Defaults to false.","examples":[true]},"memo":{"type":"string","description":"A free-text memo for the quote.","examples":["Two-year platform subscription."]},"signDate":{"type":"string","format":"date","description":"The date the quote was signed. Format YYYY-MM-DD."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount on the whole quote, in the opportunity's currency. Requires oneTimeDiscountAllocation."},"oneTimeDiscountAllocation":{"enum":["firstInvoice","alignToInvoiceFrequency","custom"],"description":"How oneTimeDiscountAmount is spread across the quote's invoices."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the opportunity's currency. Only allowed when the quote has a billable-time line."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"termType":{"enum":["termed","evergreen"],"description":"Whether the subscription runs to a fixed end date or renews indefinitely."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Required on a termed subscription."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The renewal term in months."},"quoteProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal."},"rampInterval":{"enum":["annually","specificDates"],"description":"How the ramp steps. Only with isRampDeal."},"rampInvoiceTiming":{"enum":["allAtOnce","perInterval"],"description":"How a ramp deal is invoiced. Only with isRampDeal."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the opportunity's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the opportunity's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the opportunity's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the opportunity's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the opportunity's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the opportunity's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line, from quantity zero up to an open-ended top band."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the opportunity's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the opportunity's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the opportunity's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"The products in this subscription. Each must carry only subscription line types."}},"additionalProperties":false,"required":["termType","serviceStartDate","quoteProducts"]},"description":"The subscriptions on the quote, each with the products under it. Send an empty array for none.","examples":[[{"termType":"termed","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","autoRenew":true,"renewalTerm":12,"quoteProducts":[{"productId":"e5a3b2c9-4d78-4f16-9c03-2b8e1f7d6a49","quoteProductLines":[{"productLineId":"a7c5d4e1-6f90-4b38-9e25-4d0a3b9f8c61","quantity":"100","listPrice":"480.00","unitPrice":"400.00","discountAmount":"80.00","discountPercentage":"16.6667","invoiceFrequency":"annually","priceModel":"perUnit","pricingTerm":"annually","unitOfMeasure":"seat","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31"}]}]}]]},"nonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the opportunity's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the opportunity's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the opportunity's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the opportunity's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the opportunity's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the opportunity's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line, from quantity zero up to an open-ended top band."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the opportunity's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the opportunity's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the opportunity's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one. Each must carry a non-subscription line type."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"The products that belong to no subscription, such as one-time charges and billable time. Send an empty array for none.","examples":[[]]}},"additionalProperties":false,"required":["quoteDate","serviceStartDate","paymentTerm","subscriptions","nonRecurringProducts"]},"bulkUpdateProspectsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkUpdateProspectsInput":{"type":"object","properties":{"prospects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the prospect to change."},"prospectName":{"type":"string","description":"The name of the prospect organization. Must not be empty. Omit to leave unchanged."},"entityId":{"type":"string","description":"The legal entity that owns the prospect. See id on GET base/entities. Omit to leave unchanged."},"billingEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address invoices for this prospect would be sent to. Send null to clear, omit to leave unchanged."},"crmId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this prospect in an external CRM system. Send null to clear, omit to leave unchanged."},"customerType":{"enum":["default","partner"],"description":"The commercial relationship. Omit to leave unchanged."},"defaultCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency quotes for this prospect default to, ISO 4217. Send null to clear, omit to leave unchanged."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. Switching it on copies the bill-to address over the sold-to address. Omit to leave unchanged."},"billToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Must not be empty. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear, omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Must not be empty. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'; otherwise send an empty string to clear. Omit to leave unchanged."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty. Omit to leave unchanged."},"attention":{"type":"string","description":"The person or department that mail to this address is for. Send an empty string to clear, omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the bill-to address. Omit to leave it unchanged."},"soldToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Must not be empty. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear, omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Must not be empty. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'; otherwise send an empty string to clear. Omit to leave unchanged."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty. Omit to leave unchanged."},"attention":{"type":"string","description":"The person or department that mail to this address is for. Send an empty string to clear, omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the sold-to address. Must be omitted while sameAsBillToAddress is true."},"createContacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An existing contact to link. It must not belong to another prospect. When set, send no other contact details."},"displayName":{"type":"string","description":"The contact's display name. Required for a new contact."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at. Required for a new contact. When an existing contact has this address, that contact is linked instead of a new one, as in the app."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Defaults to false."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Defaults to false."}},"additionalProperties":false},"description":"Contacts to add to the prospect. Each is a new contact, or an existing one linked by id."},"updateContacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for a contact of the prospect."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Omit to leave unchanged."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to the role flags of contacts already on the prospect."},"deleteContacts":{"type":"array","items":{"type":"string"},"description":"The ids of contacts to remove from the prospect. The contact records are kept."}},"additionalProperties":false,"required":["id"]},"description":"The changes, at most 100, each for a different prospect. Each takes the input of PATCH crm/prospects/:id. If any entry is invalid, nothing is changed.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","billingEmail":"invoices@northwind.example"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","customerType":"partner"}]]}},"additionalProperties":false,"required":["prospects"]},"searchQuotesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote."},"quoteNumber":{"type":"string","description":"The system-generated quote number, for example 'QT-1042'. Absent while none has been assigned."},"quoteType":{"type":"string","description":"The kind of quote. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'."},"status":{"type":"string","description":"Where the quote stands in its business process. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Absent on a quote that has not entered the process."},"approvalStatus":{"type":"string","description":"Where the quote stands in its approval process. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Absent until the approval process has run."},"isPrimary":{"type":"boolean","description":"Whether this is the primary quote of its opportunity."},"quoteDate":{"type":"string","format":"date","description":"The date the quote was drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date."},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription on the quote starts before it."},"signDate":{"type":"string","format":"date","description":"The date the quote was signed by the customer and the legal entity. Format YYYY-MM-DD. Absent when not recorded."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to invoices created from this quote. See code on GET accounting/payment-terms."},"memo":{"type":"string","description":"A free-text memo recorded on the quote. Absent when none is set."},"needsPSACalculation":{"type":"boolean","description":"Whether the quote takes its product data from a PSA project rather than from the product catalog."},"currency":{"type":"string","description":"The currency of every amount on the quote. A quote takes the currency of its opportunity and has none of its own. Format ISO 4217, for example 'USD'."},"totalPrice":{"type":"string","format":"decimal","description":"The sum of the quote's lines before tax, less any one-time discount, in the quote's currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount applied to the whole quote, in the quote's currency."},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the quote's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'."},"billableTimeEstimate":{"type":"string","format":"decimal","description":"The estimated total of the quote's billable-time lines, in the quote's currency."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the quote's currency."},"opportunityId":{"type":"string","description":"The opportunity this quote belongs to. See id on GET crm/opportunities/:id."},"opportunityName":{"type":"string","description":"The name of the opportunity this quote belongs to. Absent when the opportunity has no name."},"opportunityNumber":{"type":"string","description":"The opportunity number of the opportunity this quote belongs to, for example 'OP-1042'. Absent while none has been assigned."},"billToAddressId":{"type":"string","description":"The bill-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it."},"salesArrangementId":{"type":"string","description":"The sales arrangement this quote is assigned to. Set on change-order quotes. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the quote record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote subscription."},"termType":{"type":"string","description":"Whether the subscription runs to a fixed end date or renews indefinitely. Possible values: 'termed', 'evergreen'."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD. Never earlier than the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Set on a termed subscription and absent on an evergreen one."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The renewal term in months. Meaningful only when autoRenew is true."},"quoteProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product."},"quoteProductNumber":{"type":"string","description":"The system-assigned number of the quote product. Absent while none has been assigned."},"productId":{"type":"string","description":"The catalog product for this quote product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product in the catalog."},"productName":{"type":"string","description":"The name of that product in the catalog."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal, with quantities or prices stepping over time."},"rampInterval":{"type":"string","description":"How the ramp steps. Possible values: 'annually', 'specificDates'. Absent unless isRampDeal is true."},"rampInvoiceTiming":{"type":"string","description":"How a ramp deal is invoiced. Possible values: 'allAtOnce', 'perInterval'. Absent unless isRampDeal is true."},"orderIndex":{"type":"number","description":"The position of this product within the quote, for display ordering."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product line."},"quoteProductLineNumber":{"type":"string","description":"The system-assigned number of the quote product line. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The catalog product line this line was priced from. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of that catalog product line."},"parentQuoteProductLineId":{"type":"string","description":"The parent line this line hangs off, as an allowance or overage line does. Absent on a top-level line."},"lineType":{"type":"string","description":"What this line charges for. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"quantity":{"type":"string","format":"decimal","description":"The quantity on this line, as a count, not an amount. For a ramp deal the per-period quantity is on each ramp instead."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount, as a decimal fraction of listPrice. For example, 0.1 is 10%. It is not an amount."},"extendedListPrice":{"type":"string","format":"decimal","description":"The list price extended across the quantity, in the quote's currency."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Set on billable-time lines."},"totalPrice":{"type":"string","format":"decimal","description":"The total for this line, in the quote's currency."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annualized recurring revenue attributed to this line, in the quote's currency."},"invoiceFrequency":{"type":"string","description":"How often this line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the price is derived from quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. For a tiered or volume model the bands are in lineTiers. For a rateCard model they are in rateCardEntries."},"pricingTerm":{"type":"string","description":"The period the unit price is quoted for. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"overConsumptionBehavior":{"type":"string","description":"What happens when consumption exceeds a prepaid balance. Possible values: 'allowNegative', 'overage'. Set on prepaid lines."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Set on prepaid lines."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Defaults to the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Absent while open-ended."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tier band."},"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Absent on the open-ended top band."},"priceModel":{"type":"string","description":"How this band prices. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["id","fromQuantity","priceModel"]},"description":"The tiered or volume pricing bands for this line, ordered by fromQuantity. An empty array unless priceModel is a banded model."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"identifier":{"type":"string","description":"The identifier of the entry, unique within its line."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. Absent when it names none. There is no endpoint for it."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"type":"string","description":"The unit the price is quoted per. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units on this entry, as a count, not an amount."},"usageType":{"type":"string","description":"What the usage represents. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. For example, 0.1 when 1 gigabyte is 0.1 credits. It is a ratio, not an amount."},"billableUnitOfMeasure":{"type":"string","description":"The unit the entry is billed in, which may differ from unitOfMeasure. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."}},"additionalProperties":false,"required":["id","identifier","unitOfMeasure"]},"description":"The rate-card pricing for this line, one entry per billable component. An empty array unless priceModel is 'rateCard'."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"description":{"type":"string","description":"What the milestone covers, as recorded on the quote."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices as a percentage. For example, 25 is 25%. It is not an amount."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The invoice milestones for this line, when it is invoiced against milestones rather than on a frequency. An empty array otherwise."}},"additionalProperties":false,"required":["id","lineType","lineTiers","rateCardEntries","invoiceMilestones"]},"description":"The priced lines of this quote product. A product has at least one."}},"additionalProperties":false,"required":["id","quoteProductLines"]},"description":"The products in this subscription, each with its priced lines."}},"additionalProperties":false,"required":["id","termType","serviceStartDate","quoteProducts"]},"description":"The subscriptions on the quote, one per subscription, each with the products under it. An empty array when the quote has no recurring products. GET crm/quotes omits it and returns the quote header alone."},"nonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product."},"quoteProductNumber":{"type":"string","description":"The system-assigned number of the quote product. Absent while none has been assigned."},"productId":{"type":"string","description":"The catalog product for this quote product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product in the catalog."},"productName":{"type":"string","description":"The name of that product in the catalog."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal, with quantities or prices stepping over time."},"rampInterval":{"type":"string","description":"How the ramp steps. Possible values: 'annually', 'specificDates'. Absent unless isRampDeal is true."},"rampInvoiceTiming":{"type":"string","description":"How a ramp deal is invoiced. Possible values: 'allAtOnce', 'perInterval'. Absent unless isRampDeal is true."},"orderIndex":{"type":"number","description":"The position of this product within the quote, for display ordering."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product line."},"quoteProductLineNumber":{"type":"string","description":"The system-assigned number of the quote product line. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The catalog product line this line was priced from. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of that catalog product line."},"parentQuoteProductLineId":{"type":"string","description":"The parent line this line hangs off, as an allowance or overage line does. Absent on a top-level line."},"lineType":{"type":"string","description":"What this line charges for. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"quantity":{"type":"string","format":"decimal","description":"The quantity on this line, as a count, not an amount. For a ramp deal the per-period quantity is on each ramp instead."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount, as a decimal fraction of listPrice. For example, 0.1 is 10%. It is not an amount."},"extendedListPrice":{"type":"string","format":"decimal","description":"The list price extended across the quantity, in the quote's currency."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Set on billable-time lines."},"totalPrice":{"type":"string","format":"decimal","description":"The total for this line, in the quote's currency."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annualized recurring revenue attributed to this line, in the quote's currency."},"invoiceFrequency":{"type":"string","description":"How often this line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the price is derived from quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. For a tiered or volume model the bands are in lineTiers. For a rateCard model they are in rateCardEntries."},"pricingTerm":{"type":"string","description":"The period the unit price is quoted for. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"overConsumptionBehavior":{"type":"string","description":"What happens when consumption exceeds a prepaid balance. Possible values: 'allowNegative', 'overage'. Set on prepaid lines."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Set on prepaid lines."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Defaults to the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Absent while open-ended."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tier band."},"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Absent on the open-ended top band."},"priceModel":{"type":"string","description":"How this band prices. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["id","fromQuantity","priceModel"]},"description":"The tiered or volume pricing bands for this line, ordered by fromQuantity. An empty array unless priceModel is a banded model."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"identifier":{"type":"string","description":"The identifier of the entry, unique within its line."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. Absent when it names none. There is no endpoint for it."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"type":"string","description":"The unit the price is quoted per. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units on this entry, as a count, not an amount."},"usageType":{"type":"string","description":"What the usage represents. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. For example, 0.1 when 1 gigabyte is 0.1 credits. It is a ratio, not an amount."},"billableUnitOfMeasure":{"type":"string","description":"The unit the entry is billed in, which may differ from unitOfMeasure. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."}},"additionalProperties":false,"required":["id","identifier","unitOfMeasure"]},"description":"The rate-card pricing for this line, one entry per billable component. An empty array unless priceModel is 'rateCard'."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"description":{"type":"string","description":"What the milestone covers, as recorded on the quote."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices as a percentage. For example, 25 is 25%. It is not an amount."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The invoice milestones for this line, when it is invoiced against milestones rather than on a frequency. An empty array otherwise."}},"additionalProperties":false,"required":["id","lineType","lineTiers","rateCardEntries","invoiceMilestones"]},"description":"The priced lines of this quote product. A product has at least one."}},"additionalProperties":false,"required":["id","quoteProductLines"]},"description":"The products on the quote that belong to no subscription, such as one-time charges, billable time and pass-through expenses. An empty array when every product is under a subscription. GET crm/quotes omits it and returns the quote header alone."}},"additionalProperties":false,"required":["id","quoteType","isPrimary","quoteDate","serviceStartDate","paymentTerm","opportunityId","lastModifiedDate","subscriptions","nonRecurringProducts"]},"description":"The quotes on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quoteNumber":"QT-1042","quoteType":"new","status":"approved","approvalStatus":"approved","isPrimary":true,"quoteDate":"2026-08-01","serviceStartDate":"2026-09-01","signDate":"2026-08-14","paymentTerm":"net30","memo":"Two-year platform subscription, renegotiated after the pilot.","needsPSACalculation":false,"currency":"USD","totalPrice":"48000.00","oneTimeDiscountAmount":"2000.00","oneTimeDiscountAllocation":"firstInvoice","opportunityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","opportunityName":"Northwind — platform expansion","opportunityNumber":"OPP-2291","billToAddressId":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","soldToAddressId":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","lastModifiedDate":"2026-08-14T09:12:44.000Z","subscriptions":[{"id":"c2e1f4a7-8b90-4d33-9a15-6f7e8d2b0c41","termType":"termed","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","autoRenew":true,"renewalTerm":12,"quoteProducts":[{"id":"d4f2a1b8-3c67-4e05-8b92-1a7d0e6c5f38","quoteProductNumber":"QP-3","productId":"e5a3b2c9-4d78-4f16-9c03-2b8e1f7d6a49","productCode":"PLATFORM-ENT","productName":"Platform — Enterprise","isRampDeal":false,"orderIndex":1,"quoteProductLines":[{"id":"f6b4c3d0-5e89-4a27-8d14-3c9f2a8e7b50","quoteProductLineNumber":"QPL-7","productLineId":"a7c5d4e1-6f90-4b38-9e25-4d0a3b9f8c61","productLineName":"Enterprise seats","lineType":"recurring","quantity":"100.00","listPrice":"480.00","unitPrice":"400.00","discountPercentage":"0.166667","totalPrice":"40000.00","invoiceFrequency":"annually","priceModel":"tiered","pricingTerm":"annually","unitOfMeasure":"seat","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","orderIndex":1,"lineTiers":[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","fromQuantity":"1.00","toQuantity":"50.00","priceModel":"tiered","unitPrice":"440.00","listPrice":"480.00"},{"id":"c9e7f6a3-8b12-4d50-9a47-6f2c5d1b0e83","fromQuantity":"51.00","priceModel":"tiered","unitPrice":"400.00","listPrice":"480.00"}],"rateCardEntries":[],"invoiceMilestones":[]}]}]}],"nonRecurringProducts":[{"id":"d0f8a7b4-9c23-4e61-8b58-7a3d6e2c1f94","quoteProductNumber":"QP-4","productId":"e1a9b8c5-0d34-4f72-9c69-8b4e7f3d2a05","productCode":"ONBOARD","productName":"Onboarding","orderIndex":2,"quoteProductLines":[{"id":"f2b0c9d6-1e45-4a83-8d70-9c5f8a4e3b16","productLineId":"a3c1d0e7-2f56-4b94-9e81-0d6a9b5f4c27","productLineName":"Implementation","lineType":"oneTime","quantity":"1.00","listPrice":"10000.00","unitPrice":"10000.00","totalPrice":"10000.00","invoiceFrequency":"milestone","priceModel":"flat","unitOfMeasure":"each","lineTiers":[],"rateCardEntries":[],"invoiceMilestones":[{"id":"b4d2e1f8-3a67-4c05-9f92-1e7b0c6d5a38","description":"Kick-off","totalPrice":"5000.00","percentage":"50.0000","projectedDate":"2026-09-15"}]}]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchQuotesInput":{"type":"object","properties":{"text":{"type":"string","description":"Limits results to quotes whose memo contains this text. The match is case-insensitive. Omit to match every quote.","examples":["renegotiated"]},"quoteNumber":{"type":"string","description":"Limits results to the quote with this number, for example 'QT-1042'. The match is exact."},"quoteType":{"type":"array","items":{"enum":["new","upsell","renewal","changeOrder"]},"description":"Limits results to quotes of any of these kinds. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'. Omit or pass an empty array for every kind.","examples":[["changeOrder"]]},"status":{"type":"array","items":{"enum":["created","underApproval","approved","underSigning","signed","completed"]},"description":"Limits results to quotes in any of these business states. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Omit or pass an empty array for every state."},"approvalStatus":{"type":"array","items":{"enum":["pendingSubmission","pendingApproval","approved","rejected"]},"description":"Limits results to quotes in any of these approval states. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Omit or pass an empty array for every state.","examples":[["pendingApproval","approved"]]},"isPrimary":{"type":"boolean","description":"Limits results to primary quotes when true, or non-primary quotes when false. Omit for both."},"opportunityId":{"type":"string","description":"Limits results to quotes of this opportunity. Omit for every opportunity."},"salesArrangementId":{"type":"string","description":"Limits results to quotes of this sales arrangement. Omit for every arrangement."},"quoteDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest quote date to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","description":"The latest quote date to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the date the quote was drawn up. Both bounds are inclusive, and omitting one leaves that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the quote last changed, in UTC. Both bounds are inclusive, and omitting one leaves that side open."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of quotes per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"submitQuoteForApprovalOutput":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status after the submission, for example 'underApproval', or 'approved' when no approval policy applies.","examples":["underApproval"]},"approvalStatus":{"type":"string","description":"The quote's approval status after the submission: 'pendingApproval' or 'approved'.","examples":["pendingApproval"]}},"additionalProperties":false,"required":["status","approvalStatus"]},"submitQuoteForApprovalInput":{"type":"object","properties":{},"additionalProperties":false},"getQuoteOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"quoteNumber":{"type":"string","description":"The system-generated quote number, for example 'QT-1042'. Absent while none has been assigned.","examples":["QT-1042"]},"quoteType":{"type":"string","description":"The kind of quote. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'.","examples":["new"]},"status":{"type":"string","description":"Where the quote stands in its business process. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Absent on a quote that has not entered the process.","examples":["approved"]},"approvalStatus":{"type":"string","description":"Where the quote stands in its approval process. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Absent until the approval process has run.","examples":["approved"]},"isPrimary":{"type":"boolean","description":"Whether this is the primary quote of its opportunity.","examples":[true]},"quoteDate":{"type":"string","format":"date","description":"The date the quote was drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date.","examples":["2026-08-01"]},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription on the quote starts before it.","examples":["2026-09-01"]},"signDate":{"type":"string","format":"date","description":"The date the quote was signed by the customer and the legal entity. Format YYYY-MM-DD. Absent when not recorded.","examples":["2026-08-14"]},"paymentTerm":{"type":"string","description":"The code of the payment term applied to invoices created from this quote. See code on GET accounting/payment-terms.","examples":["net30"]},"memo":{"type":"string","description":"A free-text memo recorded on the quote. Absent when none is set.","examples":["Two-year platform subscription, renegotiated after the pilot."]},"needsPSACalculation":{"type":"boolean","description":"Whether the quote takes its product data from a PSA project rather than from the product catalog.","examples":[false]},"currency":{"type":"string","description":"The currency of every amount on the quote. A quote takes the currency of its opportunity and has none of its own. Format ISO 4217, for example 'USD'.","examples":["USD"]},"totalPrice":{"type":"string","format":"decimal","description":"The sum of the quote's lines before tax, less any one-time discount, in the quote's currency.","examples":["48000.00"]},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount applied to the whole quote, in the quote's currency.","examples":["2000.00"]},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the quote's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'.","examples":["firstInvoice"]},"billableTimeEstimate":{"type":"string","format":"decimal","description":"The estimated total of the quote's billable-time lines, in the quote's currency."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the quote's currency."},"opportunityId":{"type":"string","description":"The opportunity this quote belongs to. See id on GET crm/opportunities/:id.","examples":["a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"]},"opportunityName":{"type":"string","description":"The name of the opportunity this quote belongs to. Absent when the opportunity has no name.","examples":["Northwind — platform expansion"]},"opportunityNumber":{"type":"string","description":"The opportunity number of the opportunity this quote belongs to, for example 'OP-1042'. Absent while none has been assigned.","examples":["OPP-2291"]},"billToAddressId":{"type":"string","description":"The bill-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it.","examples":["6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02"]},"soldToAddressId":{"type":"string","description":"The sold-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it.","examples":["6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02"]},"salesArrangementId":{"type":"string","description":"The sales arrangement this quote is assigned to. Set on change-order quotes. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the quote record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:44.000Z"]},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote subscription."},"termType":{"type":"string","description":"Whether the subscription runs to a fixed end date or renews indefinitely. Possible values: 'termed', 'evergreen'."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD. Never earlier than the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Set on a termed subscription and absent on an evergreen one."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The renewal term in months. Meaningful only when autoRenew is true."},"quoteProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product."},"quoteProductNumber":{"type":"string","description":"The system-assigned number of the quote product. Absent while none has been assigned."},"productId":{"type":"string","description":"The catalog product for this quote product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product in the catalog."},"productName":{"type":"string","description":"The name of that product in the catalog."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal, with quantities or prices stepping over time."},"rampInterval":{"type":"string","description":"How the ramp steps. Possible values: 'annually', 'specificDates'. Absent unless isRampDeal is true."},"rampInvoiceTiming":{"type":"string","description":"How a ramp deal is invoiced. Possible values: 'allAtOnce', 'perInterval'. Absent unless isRampDeal is true."},"orderIndex":{"type":"number","description":"The position of this product within the quote, for display ordering."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product line."},"quoteProductLineNumber":{"type":"string","description":"The system-assigned number of the quote product line. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The catalog product line this line was priced from. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of that catalog product line."},"parentQuoteProductLineId":{"type":"string","description":"The parent line this line hangs off, as an allowance or overage line does. Absent on a top-level line."},"lineType":{"type":"string","description":"What this line charges for. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"quantity":{"type":"string","format":"decimal","description":"The quantity on this line, as a count, not an amount. For a ramp deal the per-period quantity is on each ramp instead."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount, as a decimal fraction of listPrice. For example, 0.1 is 10%. It is not an amount."},"extendedListPrice":{"type":"string","format":"decimal","description":"The list price extended across the quantity, in the quote's currency."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Set on billable-time lines."},"totalPrice":{"type":"string","format":"decimal","description":"The total for this line, in the quote's currency."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annualized recurring revenue attributed to this line, in the quote's currency."},"invoiceFrequency":{"type":"string","description":"How often this line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the price is derived from quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. For a tiered or volume model the bands are in lineTiers. For a rateCard model they are in rateCardEntries."},"pricingTerm":{"type":"string","description":"The period the unit price is quoted for. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"overConsumptionBehavior":{"type":"string","description":"What happens when consumption exceeds a prepaid balance. Possible values: 'allowNegative', 'overage'. Set on prepaid lines."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Set on prepaid lines."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Defaults to the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Absent while open-ended."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tier band."},"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Absent on the open-ended top band."},"priceModel":{"type":"string","description":"How this band prices. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["id","fromQuantity","priceModel"]},"description":"The tiered or volume pricing bands for this line, ordered by fromQuantity. An empty array unless priceModel is a banded model."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"identifier":{"type":"string","description":"The identifier of the entry, unique within its line."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. Absent when it names none. There is no endpoint for it."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"type":"string","description":"The unit the price is quoted per. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units on this entry, as a count, not an amount."},"usageType":{"type":"string","description":"What the usage represents. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. For example, 0.1 when 1 gigabyte is 0.1 credits. It is a ratio, not an amount."},"billableUnitOfMeasure":{"type":"string","description":"The unit the entry is billed in, which may differ from unitOfMeasure. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."}},"additionalProperties":false,"required":["id","identifier","unitOfMeasure"]},"description":"The rate-card pricing for this line, one entry per billable component. An empty array unless priceModel is 'rateCard'."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"description":{"type":"string","description":"What the milestone covers, as recorded on the quote."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices as a percentage. For example, 25 is 25%. It is not an amount."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The invoice milestones for this line, when it is invoiced against milestones rather than on a frequency. An empty array otherwise."}},"additionalProperties":false,"required":["id","lineType","lineTiers","rateCardEntries","invoiceMilestones"]},"description":"The priced lines of this quote product. A product has at least one."}},"additionalProperties":false,"required":["id","quoteProductLines"]},"description":"The products in this subscription, each with its priced lines."}},"additionalProperties":false,"required":["id","termType","serviceStartDate","quoteProducts"]},"description":"The subscriptions on the quote, one per subscription, each with the products under it. An empty array when the quote has no recurring products. GET crm/quotes omits it and returns the quote header alone.","examples":[[{"id":"c2e1f4a7-8b90-4d33-9a15-6f7e8d2b0c41","termType":"termed","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","autoRenew":true,"renewalTerm":12,"quoteProducts":[{"id":"d4f2a1b8-3c67-4e05-8b92-1a7d0e6c5f38","quoteProductNumber":"QP-3","productId":"e5a3b2c9-4d78-4f16-9c03-2b8e1f7d6a49","productCode":"PLATFORM-ENT","productName":"Platform — Enterprise","isRampDeal":false,"orderIndex":1,"quoteProductLines":[{"id":"f6b4c3d0-5e89-4a27-8d14-3c9f2a8e7b50","quoteProductLineNumber":"QPL-7","productLineId":"a7c5d4e1-6f90-4b38-9e25-4d0a3b9f8c61","productLineName":"Enterprise seats","lineType":"recurring","quantity":"100.00","listPrice":"480.00","unitPrice":"400.00","discountPercentage":"0.166667","totalPrice":"40000.00","invoiceFrequency":"annually","priceModel":"tiered","pricingTerm":"annually","unitOfMeasure":"seat","serviceStartDate":"2026-09-01","serviceEndDate":"2028-08-31","orderIndex":1,"lineTiers":[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","fromQuantity":"1.00","toQuantity":"50.00","priceModel":"tiered","unitPrice":"440.00","listPrice":"480.00"},{"id":"c9e7f6a3-8b12-4d50-9a47-6f2c5d1b0e83","fromQuantity":"51.00","priceModel":"tiered","unitPrice":"400.00","listPrice":"480.00"}],"rateCardEntries":[],"invoiceMilestones":[]}]}]}]]},"nonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product."},"quoteProductNumber":{"type":"string","description":"The system-assigned number of the quote product. Absent while none has been assigned."},"productId":{"type":"string","description":"The catalog product for this quote product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product in the catalog."},"productName":{"type":"string","description":"The name of that product in the catalog."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal, with quantities or prices stepping over time."},"rampInterval":{"type":"string","description":"How the ramp steps. Possible values: 'annually', 'specificDates'. Absent unless isRampDeal is true."},"rampInvoiceTiming":{"type":"string","description":"How a ramp deal is invoiced. Possible values: 'allAtOnce', 'perInterval'. Absent unless isRampDeal is true."},"orderIndex":{"type":"number","description":"The position of this product within the quote, for display ordering."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote product line."},"quoteProductLineNumber":{"type":"string","description":"The system-assigned number of the quote product line. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The catalog product line this line was priced from. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of that catalog product line."},"parentQuoteProductLineId":{"type":"string","description":"The parent line this line hangs off, as an allowance or overage line does. Absent on a top-level line."},"lineType":{"type":"string","description":"What this line charges for. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"quantity":{"type":"string","format":"decimal","description":"The quantity on this line, as a count, not an amount. For a ramp deal the per-period quantity is on each ramp instead."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount, as a decimal fraction of listPrice. For example, 0.1 is 10%. It is not an amount."},"extendedListPrice":{"type":"string","format":"decimal","description":"The list price extended across the quantity, in the quote's currency."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Set on billable-time lines."},"totalPrice":{"type":"string","format":"decimal","description":"The total for this line, in the quote's currency."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annualized recurring revenue attributed to this line, in the quote's currency."},"invoiceFrequency":{"type":"string","description":"How often this line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the price is derived from quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. For a tiered or volume model the bands are in lineTiers. For a rateCard model they are in rateCardEntries."},"pricingTerm":{"type":"string","description":"The period the unit price is quoted for. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"overConsumptionBehavior":{"type":"string","description":"What happens when consumption exceeds a prepaid balance. Possible values: 'allowNegative', 'overage'. Set on prepaid lines."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Set on prepaid lines."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Defaults to the quote's serviceStartDate."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Absent while open-ended."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tier band."},"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Absent on the open-ended top band."},"priceModel":{"type":"string","description":"How this band prices. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["id","fromQuantity","priceModel"]},"description":"The tiered or volume pricing bands for this line, ordered by fromQuantity. An empty array unless priceModel is a banded model."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"identifier":{"type":"string","description":"The identifier of the entry, unique within its line."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. Absent when it names none. There is no endpoint for it."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"type":"string","description":"The unit the price is quoted per. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units on this entry, as a count, not an amount."},"usageType":{"type":"string","description":"What the usage represents. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. For example, 0.1 when 1 gigabyte is 0.1 credits. It is a ratio, not an amount."},"billableUnitOfMeasure":{"type":"string","description":"The unit the entry is billed in, which may differ from unitOfMeasure. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."}},"additionalProperties":false,"required":["id","identifier","unitOfMeasure"]},"description":"The rate-card pricing for this line, one entry per billable component. An empty array unless priceModel is 'rateCard'."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"description":{"type":"string","description":"What the milestone covers, as recorded on the quote."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices as a percentage. For example, 25 is 25%. It is not an amount."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The invoice milestones for this line, when it is invoiced against milestones rather than on a frequency. An empty array otherwise."}},"additionalProperties":false,"required":["id","lineType","lineTiers","rateCardEntries","invoiceMilestones"]},"description":"The priced lines of this quote product. A product has at least one."}},"additionalProperties":false,"required":["id","quoteProductLines"]},"description":"The products on the quote that belong to no subscription, such as one-time charges, billable time and pass-through expenses. An empty array when every product is under a subscription. GET crm/quotes omits it and returns the quote header alone.","examples":[[{"id":"d0f8a7b4-9c23-4e61-8b58-7a3d6e2c1f94","quoteProductNumber":"QP-4","productId":"e1a9b8c5-0d34-4f72-9c69-8b4e7f3d2a05","productCode":"ONBOARD","productName":"Onboarding","orderIndex":2,"quoteProductLines":[{"id":"f2b0c9d6-1e45-4a83-8d70-9c5f8a4e3b16","productLineId":"a3c1d0e7-2f56-4b94-9e81-0d6a9b5f4c27","productLineName":"Implementation","lineType":"oneTime","quantity":"1.00","listPrice":"10000.00","unitPrice":"10000.00","totalPrice":"10000.00","invoiceFrequency":"milestone","priceModel":"flat","unitOfMeasure":"each","lineTiers":[],"rateCardEntries":[],"invoiceMilestones":[{"id":"b4d2e1f8-3a67-4c05-9f92-1e7b0c6d5a38","description":"Kick-off","totalPrice":"5000.00","percentage":"50.0000","projectedDate":"2026-09-15"}]}]}]]}},"additionalProperties":false,"required":["id","quoteType","isPrimary","quoteDate","serviceStartDate","paymentTerm","opportunityId","lastModifiedDate","subscriptions","nonRecurringProducts"]},"listOpportunitiesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the opportunity."},"opportunityNumber":{"type":"string","description":"The system-generated opportunity number, for example 'OP-1042'. Absent while none has been assigned."},"entityId":{"type":"string","description":"The legal entity that owns the opportunity."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'."},"customerId":{"type":"string","description":"The identifier of the customer or prospect this opportunity is for. customerPath says which kind of record it is. Absent when it points at neither. See id on GET accounting/customers/:id for a customer, or GET crm/prospects/:id for a prospect."},"customerPath":{"type":"string","description":"Which kind of record customerId identifies. The value ends in 'Customer.id' when it is a customer and in 'Prospect.id' when it is a prospect. Absent when neither resolves."},"endCustomerId":{"type":"string","description":"The identifier of the end customer behind a partner customer. Absent unless one is on record. See id on GET accounting/customers/:id."},"priceBookId":{"type":"string","description":"The identifier of the price book quotes on this opportunity are priced from. See id on GET accounting/price-books/:id."},"stageId":{"type":"string","description":"The identifier of the stage the opportunity currently sits in: one of the stages on GET crm/opportunity-stages/:id, where :id is this opportunity's entityId."},"opportunityName":{"type":"string","description":"The free-text display name of the opportunity. Absent when none is set."},"closeDate":{"type":"string","format":"date","description":"The expected close date of the deal. Format YYYY-MM-DD. Absent when none is set."},"amount":{"type":"string","format":"decimal","description":"The expected deal amount, as a decimal in the opportunity's currency. Absent when none is set."},"crmId":{"type":"string","description":"The identifier of this opportunity in the external system it was imported from, for example a Salesforce record id. It is free text and not unique. Absent when none is set."},"dataSource":{"type":"string","description":"The system the record came from, for example 'Salesforce'. Records created in Lensing have the value 'Everest'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the opportunity record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"quotes":{"type":"array","items":{"type":"object","properties":{"quoteId":{"type":"string","description":"The identifier of the linked quote. See id on GET crm/quotes/:id."},"isPrimary":{"type":"boolean","description":"Whether this is a primary quote for the opportunity. It is not guaranteed to be true for exactly one quote."}},"additionalProperties":false,"required":["quoteId","isPrimary"]},"description":"Every quote linked to this opportunity. An empty array when it has none."}},"additionalProperties":false,"required":["id","entityId","currency","priceBookId","stageId","quotes"]},"description":"The opportunities on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"cancelQuoteSigningOutput":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status afterward, 'approved'.","examples":["approved"]}},"additionalProperties":false,"required":["status"]},"cancelQuoteSigningInput":{"type":"object","properties":{},"additionalProperties":false},"sendQuoteForSignatureOutput":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status after sending, 'underSigning'.","examples":["underSigning"]}},"additionalProperties":false,"required":["status"]},"sendQuoteForSignatureInput":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the document, for example 'Master Services Agreement.pdf'. It is shown to the recipients."},"contentBase64":{"type":"string","description":"The PDF's bytes, base64-encoded with the standard alphabet and padding."}},"additionalProperties":false,"required":["fileName","contentBase64"]},"description":"PDF documents to send for signature, each at most 10 MB. Omit when includeQuoteDocument alone is enough.","examples":[[{"fileName":"Master Services Agreement.pdf","contentBase64":"JVBERi0xLjcKJcfsj6IK..."}]]},"includeQuoteDocument":{"type":"boolean","description":"Also send the quote document, generated from the active quote template. Omit or send false to send only files.","examples":[true]},"recipients":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","description":"The recipient's email address."},"name":{"type":"string","description":"The recipient's name. Omit to use the name of the quote contact with this email, if there is one."}},"additionalProperties":false,"required":["email"]},"description":"Who receives the documents to sign. When sent, exactly these recipients are used. When omitted, the quote's default signers are used: the default Sold-To contacts of a prospect, or the main contact of a customer.","examples":[[{"email":"jane.doe@example.com","name":"Jane Doe"}]]},"providerInstanceId":{"type":"string","description":"The e-signature provider to send through, by the id of its provider instance. Omit to use the default provider of the quote's entity."},"documentName":{"type":"string","description":"The name of the signing document at the provider. Omit to let the provider name it."},"emailSubject":{"type":"string","description":"The subject of the email the recipients receive. Omit for the provider's default.","examples":["Your quote is ready to sign"]},"emailMessage":{"type":"string","description":"The message of the email the recipients receive. Omit for the provider's default."},"useTextTags":{"type":"boolean","description":"Whether the PDFs carry the provider's text tags marking where to sign. Omit or send false to let the provider place the fields."}},"additionalProperties":false},"listQuotesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the quote."},"quoteNumber":{"type":"string","description":"The system-generated quote number, for example 'QT-1042'. Absent while none has been assigned."},"quoteType":{"type":"string","description":"The kind of quote. Possible values: 'new', 'upsell', 'renewal', 'changeOrder'."},"status":{"type":"string","description":"Where the quote stands in its business process. Possible values: 'created', 'underApproval', 'approved', 'underSigning', 'signed', 'completed'. Absent on a quote that has not entered the process."},"approvalStatus":{"type":"string","description":"Where the quote stands in its approval process. Possible values: 'pendingSubmission', 'pendingApproval', 'approved', 'rejected'. Absent until the approval process has run."},"isPrimary":{"type":"boolean","description":"Whether this is the primary quote of its opportunity."},"quoteDate":{"type":"string","format":"date","description":"The date the quote was drawn up. Format YYYY-MM-DD. Product prices are validated against the opportunity's price book as of this date."},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. No subscription on the quote starts before it."},"signDate":{"type":"string","format":"date","description":"The date the quote was signed by the customer and the legal entity. Format YYYY-MM-DD. Absent when not recorded."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to invoices created from this quote. See code on GET accounting/payment-terms."},"memo":{"type":"string","description":"A free-text memo recorded on the quote. Absent when none is set."},"needsPSACalculation":{"type":"boolean","description":"Whether the quote takes its product data from a PSA project rather than from the product catalog."},"currency":{"type":"string","description":"The currency of every amount on the quote. A quote takes the currency of its opportunity and has none of its own. Format ISO 4217, for example 'USD'."},"totalPrice":{"type":"string","format":"decimal","description":"The sum of the quote's lines before tax, less any one-time discount, in the quote's currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount applied to the whole quote, in the quote's currency."},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the quote's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'."},"billableTimeEstimate":{"type":"string","format":"decimal","description":"The estimated total of the quote's billable-time lines, in the quote's currency."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the quote's currency."},"opportunityId":{"type":"string","description":"The opportunity this quote belongs to. See id on GET crm/opportunities/:id."},"opportunityName":{"type":"string","description":"The name of the opportunity this quote belongs to. Absent when the opportunity has no name."},"opportunityNumber":{"type":"string","description":"The opportunity number of the opportunity this quote belongs to, for example 'OP-1042'. Absent while none has been assigned."},"billToAddressId":{"type":"string","description":"The bill-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address on the quote, a copy the quote keeps of its own rather than the source it was copied from. There is no endpoint for it."},"salesArrangementId":{"type":"string","description":"The sales arrangement this quote is assigned to. Set on change-order quotes. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the quote record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","quoteType","isPrimary","quoteDate","serviceStartDate","paymentTerm","opportunityId","lastModifiedDate"]},"description":"The quotes on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quoteNumber":"QT-1042","quoteType":"new","status":"approved","approvalStatus":"approved","isPrimary":true,"quoteDate":"2026-08-01","serviceStartDate":"2026-09-01","signDate":"2026-08-14","paymentTerm":"net30","memo":"Two-year platform subscription, renegotiated after the pilot.","needsPSACalculation":false,"currency":"USD","totalPrice":"48000.00","oneTimeDiscountAmount":"2000.00","oneTimeDiscountAllocation":"firstInvoice","opportunityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","opportunityName":"Northwind — platform expansion","opportunityNumber":"OPP-2291","billToAddressId":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","soldToAddressId":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","lastModifiedDate":"2026-08-14T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"nextCursor":"MTA","hasMore":true}]}},"additionalProperties":false,"required":["items","pagination"]},"getOpportunityStagesOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of this set of stages. It currently equals entityId; treat it as opaque."},"entityId":{"type":"string","description":"The legal entity the stages belong to. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time any of the stages last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"stages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the stage. An opportunity's stageId holds this value."},"stageName":{"type":"string","description":"The display name of the stage, for example 'Qualification'."},"stageType":{"enum":["open","closedWon","closedLost"],"description":"What reaching the stage means for an opportunity."},"probability":{"type":"string","format":"decimal","description":"The likelihood that an opportunity in this stage closes as won, as a percentage from 0 to 100. For example, 25 means 25%. A percentage, not an amount, so it has no currency."},"orderIndex":{"type":"number","description":"The position of the stage; stages are ordered by it. Unique within the entity. After any write the positions are 0, 1, 2 … with no gaps."},"isDeactivated":{"type":"boolean","description":"Whether the stage is retired. A deactivated stage stays on record but is not offered for new opportunities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the stage record last changed, in UTC. Every write to the entity's stages updates it for every stage. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","stageName","stageType","probability","orderIndex","isDeactivated"]},"description":"The stages, ordered by orderIndex."}},"additionalProperties":false,"required":["id","entityId","stages"]},"updateProspectOutput":{"type":"object","properties":{},"additionalProperties":false},"updateProspectInput":{"type":"object","properties":{"prospectName":{"type":"string","description":"The name of the prospect organization. Must not be empty. Omit to leave unchanged."},"entityId":{"type":"string","description":"The legal entity that owns the prospect. See id on GET base/entities. Omit to leave unchanged."},"billingEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address invoices for this prospect would be sent to. Send null to clear, omit to leave unchanged.","examples":["invoices@northwind.example"]},"crmId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this prospect in an external CRM system. Send null to clear, omit to leave unchanged."},"customerType":{"enum":["default","partner"],"description":"The commercial relationship. Omit to leave unchanged."},"defaultCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency quotes for this prospect default to, ISO 4217. Send null to clear, omit to leave unchanged."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. Switching it on copies the bill-to address over the sold-to address. Omit to leave unchanged."},"billToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Must not be empty. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear, omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Must not be empty. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'; otherwise send an empty string to clear. Omit to leave unchanged."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty. Omit to leave unchanged."},"attention":{"type":"string","description":"The person or department that mail to this address is for. Send an empty string to clear, omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the bill-to address. Omit to leave it unchanged.","examples":[{"line1":"500 Terry Avenue North"}]},"soldToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Must not be empty. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear, omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Must not be empty. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'; otherwise send an empty string to clear. Omit to leave unchanged."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty. Omit to leave unchanged."},"attention":{"type":"string","description":"The person or department that mail to this address is for. Send an empty string to clear, omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the sold-to address. Must be omitted while sameAsBillToAddress is true."},"createContacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An existing contact to link. It must not belong to another prospect. When set, send no other contact details."},"displayName":{"type":"string","description":"The contact's display name. Required for a new contact."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at. Required for a new contact. When an existing contact has this address, that contact is linked instead of a new one, as in the app."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Defaults to false."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Defaults to false."}},"additionalProperties":false},"description":"Contacts to add to the prospect. Each is a new contact, or an existing one linked by id.","examples":[[{"displayName":"Ravi Menon","emailAddress":"ravi.menon@northwind.example","isDefaultBillToContact":true}]]},"updateContacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for a contact of the prospect."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Omit to leave unchanged."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to the role flags of contacts already on the prospect.","examples":[[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","isDefaultBillToContact":false}]]},"deleteContacts":{"type":"array","items":{"type":"string"},"description":"The ids of contacts to remove from the prospect. The contact records are kept."}},"additionalProperties":false},"createProspectOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created prospect.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createProspectInput":{"type":"object","properties":{"prospectName":{"type":"string","description":"The name of the prospect organization. Must not be empty.","examples":["Northwind Logistics"]},"entityId":{"type":"string","description":"The legal entity that owns the prospect. See id on GET base/entities.","examples":["a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"]},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to.","examples":["ap@northwind.example"]},"crmId":{"type":"string","description":"The identifier of this prospect in an external CRM system."},"customerType":{"enum":["default","partner"],"description":"The commercial relationship. Defaults to 'default'.","examples":["default"]},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'.","examples":["USD"]},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. When true, omit soldToAddress. Defaults to false.","examples":[true]},"billToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box. Must not be empty."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality. Must not be empty."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The prospect's bill-to address.","examples":[{"line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"US-WA","country":"US","zipCode":"98109"}]},"soldToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box. Must not be empty."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality. Must not be empty."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The prospect's sold-to address. Required unless sameAsBillToAddress is true, and must be omitted when it is."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An existing contact to link. It must not belong to another prospect. When set, send no other contact details."},"displayName":{"type":"string","description":"The contact's display name. Required for a new contact."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at. Required for a new contact."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Defaults to false."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Defaults to false."}},"additionalProperties":false},"description":"The prospect's contacts. Each is a new contact, or an existing one linked by id.","examples":[[{"displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","isDefaultBillToContact":true,"isDefaultSoldToContact":true}]]}},"additionalProperties":false,"required":["prospectName","entityId","billToAddress"]},"bulkCreateProspectsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for a created prospect."}},"additionalProperties":false,"required":["id"]},"description":"The created prospects, in the same order as the input. Match rows to inputs by index.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateProspectsInput":{"type":"object","properties":{"prospects":{"type":"array","items":{"type":"object","properties":{"prospectName":{"type":"string","description":"The name of the prospect organization. Must not be empty."},"entityId":{"type":"string","description":"The legal entity that owns the prospect. See id on GET base/entities."},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to."},"crmId":{"type":"string","description":"The identifier of this prospect in an external CRM system."},"customerType":{"enum":["default","partner"],"description":"The commercial relationship. Defaults to 'default'."},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. When true, omit soldToAddress. Defaults to false."},"billToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box. Must not be empty."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality. Must not be empty."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The prospect's bill-to address."},"soldToAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box. Must not be empty."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality. Must not be empty."},"stateProvince":{"type":"string","description":"The state, province or region, as an ISO 3166-2 code of the country, for example 'US-WA'. Required when country is 'US'."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code. Must not be empty."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The prospect's sold-to address. Required unless sameAsBillToAddress is true, and must be omitted when it is."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An existing contact to link. It must not belong to another prospect. When set, send no other contact details."},"displayName":{"type":"string","description":"The contact's display name. Required for a new contact."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at. Required for a new contact."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the bill-to address. Defaults to false."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the sold-to address. Defaults to false."}},"additionalProperties":false},"description":"The prospect's contacts. Each is a new contact, or an existing one linked by id."}},"additionalProperties":false,"required":["prospectName","entityId","billToAddress"]},"description":"The prospects to create, at most 100. Each takes the input of POST crm/prospects. If any entry is invalid, nothing is created.","examples":[[{"prospectName":"Northwind Logistics","entityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","sameAsBillToAddress":true,"billToAddress":{"line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"US-WA","country":"US","zipCode":"98109"}},{"prospectName":"Contoso Freight","entityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","sameAsBillToAddress":true,"billToAddress":{"line1":"1 Harbour Road","city":"Portland","stateProvince":"US-OR","country":"US","zipCode":"97201"}}]]}},"additionalProperties":false,"required":["prospects"]},"approveQuoteOutput":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status after the approval: 'approved' once every required approval is in, otherwise still 'underApproval'.","examples":["approved"]},"approvalStatus":{"type":"string","description":"The quote's approval status after the approval: 'approved' or 'pendingApproval'.","examples":["approved"]}},"additionalProperties":false,"required":["status","approvalStatus"]},"approveQuoteInput":{"type":"object","properties":{},"additionalProperties":false},"listProspectsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the prospect."},"prospectNumber":{"type":"string","description":"The prospect number, for example 'PR-1042'. Absent while none has been assigned."},"prospectName":{"type":"string","description":"The name of the prospect organization."},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to."},"crmId":{"type":"string","description":"The identifier of this prospect in the external CRM system it was integrated from."},"customerType":{"type":"string","description":"The commercial relationship. Possible values: 'default', 'partner', 'endCustomer'."},"dataSource":{"type":"string","description":"The system the prospect came from, for example 'Salesforce' or 'HubSpot'. Prospects created in Lensing have the value 'Everest'."},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'."},"entityId":{"type":"string","description":"The legal entity that owns the prospect."},"entityName":{"type":"string","description":"The name of the legal entity that owns the prospect. See entityName on GET base/entities."},"customerId":{"type":"string","description":"The identifier of the customer created from this prospect. Absent until the prospect has been converted, so its presence marks a converted prospect. See id on GET accounting/customers/:id."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. soldToAddress is populated either way, so you never have to resolve this flag to read an address."},"billToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's bill-to address, with the default contact for that role. Absent when none is recorded."},"soldToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's sold-to address, with the default contact for that role. Absent when none is recorded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the prospect record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","prospectName","entityId","lastModifiedDate"]},"description":"The prospects on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","prospectNumber":"PR-1042","prospectName":"Northwind Logistics","billingEmail":"ap@northwind.example","crmId":"0035g00000ABCDEF","customerType":"default","dataSource":"Salesforce","defaultCurrency":"USD","entityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","entityName":"Acme Inc.","sameAsBillToAddress":true,"billToAddress":{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}},"soldToAddress":{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}},"lastModifiedDate":"2026-08-14T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"nextCursor":"MTA","hasMore":true}]}},"additionalProperties":false,"required":["items","pagination"]},"getProspectOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the prospect.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"prospectNumber":{"type":"string","description":"The prospect number, for example 'PR-1042'. Absent while none has been assigned.","examples":["PR-1042"]},"prospectName":{"type":"string","description":"The name of the prospect organization.","examples":["Northwind Logistics"]},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to.","examples":["ap@northwind.example"]},"crmId":{"type":"string","description":"The identifier of this prospect in the external CRM system it was integrated from.","examples":["0035g00000ABCDEF"]},"customerType":{"type":"string","description":"The commercial relationship. Possible values: 'default', 'partner', 'endCustomer'.","examples":["default"]},"dataSource":{"type":"string","description":"The system the prospect came from, for example 'Salesforce' or 'HubSpot'. Prospects created in Lensing have the value 'Everest'.","examples":["Salesforce"]},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'.","examples":["USD"]},"entityId":{"type":"string","description":"The legal entity that owns the prospect.","examples":["a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88"]},"entityName":{"type":"string","description":"The name of the legal entity that owns the prospect. See entityName on GET base/entities.","examples":["Acme Inc."]},"customerId":{"type":"string","description":"The identifier of the customer created from this prospect. Absent until the prospect has been converted, so its presence marks a converted prospect. See id on GET accounting/customers/:id."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. soldToAddress is populated either way, so you never have to resolve this flag to read an address.","examples":[true]},"billToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's bill-to address, with the default contact for that role. Absent when none is recorded.","examples":[{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}}]},"soldToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's sold-to address, with the default contact for that role. Absent when none is recorded.","examples":[{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}}]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the prospect record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:44.000Z"]},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the prospect's bill-to address. At most one contact is."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the prospect's sold-to address. At most one contact is."}},"additionalProperties":false,"required":["id","isDefaultBillToContact","isDefaultSoldToContact"]},"description":"Every contact recorded against the prospect, with the two per-role defaults flagged. An empty array when the prospect has none. GET crm/prospects/:id and POST crm/prospects/search return this array. GET crm/prospects omits it.","examples":[[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142","isDefaultBillToContact":true,"isDefaultSoldToContact":true},{"id":"c9e7f6a3-8b12-4d50-9a47-6f2c5d1b0e83","displayName":"Ravi Menon","salutation":"Mr","firstName":"Ravi","lastName":"Menon","emailAddress":"ravi.menon@northwind.example","isDefaultBillToContact":false,"isDefaultSoldToContact":false}]]}},"additionalProperties":false,"required":["id","prospectName","entityId","lastModifiedDate","contacts"]},"searchOpportunitiesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the opportunity."},"opportunityNumber":{"type":"string","description":"The system-generated opportunity number, for example 'OP-1042'. Absent while none has been assigned."},"entityId":{"type":"string","description":"The legal entity that owns the opportunity."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'."},"customerId":{"type":"string","description":"The identifier of the customer or prospect this opportunity is for. customerPath says which kind of record it is. Absent when it points at neither. See id on GET accounting/customers/:id for a customer, or GET crm/prospects/:id for a prospect."},"customerPath":{"type":"string","description":"Which kind of record customerId identifies. The value ends in 'Customer.id' when it is a customer and in 'Prospect.id' when it is a prospect. Absent when neither resolves."},"endCustomerId":{"type":"string","description":"The identifier of the end customer behind a partner customer. Absent unless one is on record. See id on GET accounting/customers/:id."},"priceBookId":{"type":"string","description":"The identifier of the price book quotes on this opportunity are priced from. See id on GET accounting/price-books/:id."},"stageId":{"type":"string","description":"The identifier of the stage the opportunity currently sits in: one of the stages GET crm/opportunity-stages returns for this opportunity's entityId."},"opportunityName":{"type":"string","description":"The free-text display name of the opportunity. Absent when none is set."},"closeDate":{"type":"string","format":"date","description":"The expected close date of the deal. Format YYYY-MM-DD. Absent when none is set."},"amount":{"type":"string","format":"decimal","description":"The expected deal amount, as a decimal in the opportunity's currency. Absent when none is set."},"crmId":{"type":"string","description":"The identifier of this opportunity in the external system it was imported from, for example a Salesforce record id. It is free text and not unique. Absent when none is set."},"dataSource":{"type":"string","description":"The system the record came from, for example 'Salesforce'. Records created in Lensing have the value 'Everest'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the opportunity record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"quotes":{"type":"array","items":{"type":"object","properties":{"quoteId":{"type":"string","description":"The identifier of the linked quote. See id on GET crm/quotes/:id."},"isPrimary":{"type":"boolean","description":"Whether this is a primary quote for the opportunity. It is not guaranteed to be true for exactly one quote."}},"additionalProperties":false,"required":["quoteId","isPrimary"]},"description":"Every quote linked to this opportunity. An empty array when it has none."}},"additionalProperties":false,"required":["id","entityId","currency","priceBookId","stageId","quotes"]},"description":"The opportunities on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchOpportunitiesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the opportunity with this id."},"opportunityNumber":{"type":"string","description":"Limits results to the opportunity with this number, for example 'OP-1042'. The match is exact."},"opportunityName":{"type":"string","description":"Limits results to opportunities whose name contains this text. The match is case-insensitive."},"entityIds":{"type":"array","items":{"type":"string"},"description":"Limits results to opportunities owned by any of these legal entities. Omit or pass an empty array for every entity."},"customerIds":{"type":"array","items":{"type":"string"},"description":"Limits results to opportunities for any of these customers or prospects, matched against either. Omit or pass an empty array for every customer."},"currencies":{"type":"array","items":{"type":"string"},"description":"Limits results to opportunities in any of these currencies. Each is an ISO 4217 code, for example 'USD'. Omit or pass an empty array for every currency."},"crmId":{"type":"string","description":"Limits results to opportunities with this external system identifier. The match is exact."},"createdDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest creation time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest creation time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the opportunity was created, in UTC. Both bounds are inclusive, and omitting one leaves that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the opportunity last changed, in UTC. Both bounds are inclusive, and omitting one leaves that side open."}},"additionalProperties":false,"description":"The filters to apply. An opportunity must match every filter you send. Omit all of them to return every opportunity you can see."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of opportunities per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return. Omit for the first page at the default size."}},"additionalProperties":false},"searchOpportunityStagesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the stage. An opportunity's stageId holds this value."},"entityId":{"type":"string","description":"The legal entity the stage belongs to. Stages are scoped per entity: an opportunity's stage is always one of its own entity's stages. See id on GET base/entities."},"stageName":{"type":"string","description":"The display name of the stage, for example 'Qualification'."},"stageType":{"oneOf":[{"const":"open","description":"The deal is still in progress."},{"const":"closedWon","description":"The deal is won."},{"const":"closedLost","description":"The deal is lost."}],"description":"What reaching the stage means for an opportunity."},"probability":{"type":"string","format":"decimal","description":"The likelihood that an opportunity in this stage closes as won, as a percentage from 0 to 100. For example, 25 means 25%. A percentage, not an amount, so it has no currency."},"orderIndex":{"type":"number","description":"The position of the stage within its entity; an entity's stages are ordered by it. Unique within the entity. After any write the positions are 0, 1, 2 … with no gaps."},"isDeactivated":{"type":"boolean","description":"Whether the stage is retired. A deactivated stage stays on record, and opportunities already in it keep it, but it is not offered for new opportunities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"When the stage record last changed. Every write to an entity's stages updates it for every stage of that entity. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."}},"additionalProperties":false,"required":["id","entityId","stageName","stageType","probability","orderIndex","isDeactivated","lastModifiedDate"]},"description":"The matching stages, in id order. An empty array when nothing matches.","examples":[[{"id":"0e3a9f41-6c2b-4d7e-8a15-2b9c7d4e6f10","entityId":"ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3","stageName":"Proposal","stageType":"open","probability":"50","orderIndex":2,"isDeactivated":false,"lastModifiedDate":"2026-08-14T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchOpportunityStagesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"stageName":{"type":"string","description":"Limits results to stages whose name contains this text. The match is case-insensitive."},"entityIds":{"type":"array","items":{"type":"string"},"description":"Limits results to stages of any of these legal entities. Omit or pass an empty array for every entity. See id on GET base/entities."},"stageTypes":{"type":"array","items":{"enum":["open","closedWon","closedLost"]},"description":"Limits results to stages of any of these types. Omit or pass an empty array for every type."},"isDeactivated":{"type":"boolean","description":"True limits results to deactivated stages, false to active ones. Omit for both."}},"additionalProperties":false,"description":"The filters to apply. A stage must match every filter you send. Omit all of them to return every stage.","examples":[{"stageName":"proposal","entityIds":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"],"isDeactivated":false}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Do not construct it. Omit on the first request."},"size":{"type":"number","description":"The number of stages per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"updateOpportunityStagesOutput":{"type":"object","properties":{},"additionalProperties":false},"updateOpportunityStagesInput":{"type":"object","properties":{"createStages":{"type":"array","items":{"type":"object","properties":{"stageName":{"type":"string","description":"The display name of the stage. Must not be empty."},"stageType":{"enum":["open","closedWon","closedLost"],"description":"What reaching the stage means for an opportunity."},"probability":{"type":"string","format":"decimal","description":"The likelihood that an opportunity in this stage closes as won, as a percentage from 0 to 100. For example, 25 means 25%."},"orderIndex":{"type":"number","description":"Where the stage goes: the stages are ordered by this value, which must be unique among the resulting stages. Omit to place the stage after every other stage."},"isDeactivated":{"type":"boolean","description":"Whether the stage starts out retired. Defaults to false."}},"additionalProperties":false,"required":["stageName","stageType","probability"]},"description":"New stages to add. Omit for none.","examples":[[{"stageName":"Proposal","stageType":"open","probability":"50","orderIndex":2}]]},"updateStages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the stage to change. It must belong to this entity."},"stageName":{"type":"string","description":"The new display name. Must not be empty. Omit to leave unchanged."},"stageType":{"enum":["open","closedWon","closedLost"],"description":"The new stage type. Omit to leave unchanged."},"probability":{"type":"string","format":"decimal","description":"The new probability, as a percentage from 0 to 100. Omit to leave unchanged."},"orderIndex":{"type":"number","description":"Where the stage goes: the stages are ordered by this value, which must be unique among the resulting stages. Omit to leave unchanged."},"isDeactivated":{"type":"boolean","description":"Whether the stage is retired. A stage that has opportunities cannot be deactivated. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to existing stages, each keyed by the stage's id. Omit for none.","examples":[[{"id":"5b0e7c3a-2f6d-4a8b-9c1e-7d4f3a2b1c09","orderIndex":3},{"id":"0e3a9f41-6c2b-4d7e-8a15-2b9c7d4e6f10","stageName":"Contract Sent"}]]},"deleteStages":{"type":"array","items":{"type":"string"},"description":"The ids of the stages to delete. A stage that has opportunities cannot be deleted. Omit for none.","examples":[["7d1c2b3a-9e8f-4a6b-b5c4-3d2e1f0a9b87"]]}},"additionalProperties":false},"updateQuoteOutput":{"type":"object","properties":{},"additionalProperties":false},"updateQuoteInput":{"type":"object","properties":{"quoteDate":{"type":"string","format":"date","description":"The date the quote is drawn up. Format YYYY-MM-DD. Omit to leave unchanged."},"serviceStartDate":{"type":"string","format":"date","description":"The first date products or services on this quote are delivered. Format YYYY-MM-DD. Omit to leave unchanged."},"paymentTerm":{"type":"string","description":"The code of the payment term. See code on GET accounting/payment-terms. Omit to leave unchanged."},"billToAddressId":{"type":"string","description":"The address to bill; the quote's own copy is overwritten with it. Not accepted on a 'changeOrder' quote. Omit to leave unchanged."},"soldToAddressId":{"type":"string","description":"The address the products are sold to; the quote's own copy is overwritten with it. Not accepted on a 'changeOrder' quote. Omit to leave unchanged."},"isPrimary":{"type":"boolean","description":"Pass true to make this the opportunity's primary quote. A primary quote cannot be unset; make another quote primary instead. Omit to leave unchanged."},"memo":{"type":"string","description":"A free-text memo for the quote. Omit to leave unchanged.","examples":["Renegotiated after the pilot."]},"signDate":{"type":"string","format":"date","description":"The date the quote was signed. Format YYYY-MM-DD. Omit to leave unchanged."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-time discount on the whole quote, in the quote's currency. Omit to leave unchanged."},"oneTimeDiscountAllocation":{"enum":["firstInvoice","alignToInvoiceFrequency","custom"],"description":"How oneTimeDiscountAmount is spread across the quote's invoices. Omit to leave unchanged."},"billableTimeCappedPrice":{"type":"string","format":"decimal","description":"The ceiling on the total of the quote's billable-time lines, in the quote's currency. Omit to leave unchanged."},"createSubscriptions":{"type":"array","items":{"type":"object","properties":{"termType":{"enum":["termed","evergreen"],"description":"Whether the subscription runs to a fixed end date or renews indefinitely."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Required on a termed subscription."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The renewal term in months."},"quoteProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal."},"rampInterval":{"enum":["annually","specificDates"],"description":"How the ramp steps. Only with isRampDeal."},"rampInvoiceTiming":{"enum":["allAtOnce","perInterval"],"description":"How a ramp deal is invoiced. Only with isRampDeal."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"The products in this subscription."}},"additionalProperties":false,"required":["termType","serviceStartDate","quoteProducts"]},"description":"Subscriptions to add, each with its products, in the shape POST crm/quotes takes."},"updateSubscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the subscription on this quote."},"termType":{"enum":["termed","evergreen"],"description":"Whether the subscription runs to a fixed end date or renews indefinitely. Omit to leave unchanged."},"serviceStartDate":{"type":"string","format":"date","description":"The first date the subscription delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"serviceEndDate":{"type":"string","format":"date","description":"The last date the subscription delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically. Omit to leave unchanged."},"renewalTerm":{"type":"number","description":"The renewal term in months. Omit to leave unchanged."},"createQuoteProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal."},"rampInterval":{"enum":["annually","specificDates"],"description":"How the ramp steps. Only with isRampDeal."},"rampInvoiceTiming":{"enum":["allAtOnce","perInterval"],"description":"How a ramp deal is invoiced. Only with isRampDeal."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"Products to add to this subscription."},"updateQuoteProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the quote product in this subscription."},"isRampDeal":{"type":"boolean","description":"Whether this product is priced as a ramp deal. Omit to leave unchanged."},"rampInterval":{"enum":["annually","specificDates"],"description":"How the ramp steps. Omit to leave unchanged."},"rampInvoiceTiming":{"enum":["allAtOnce","perInterval"],"description":"How a ramp deal is invoiced. Omit to leave unchanged."},"createQuoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to the quote product's product. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"Lines to add to this quote product."},"updateQuoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the line on this quote product."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount. Omit to leave unchanged."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency. Omit to leave unchanged."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency. Omit to leave unchanged."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency. Omit to leave unchanged."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent. Omit to leave unchanged."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Omit to leave unchanged."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced. Omit to leave unchanged."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Omit to leave unchanged."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for. Omit to leave unchanged."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in. Omit to leave unchanged."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Omit to leave unchanged."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Omit to leave unchanged."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"orderIndex":{"type":"number","description":"The position of this line within its quote product. Omit to leave unchanged."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The line's pricing bands, replacing the current ones. Omit to leave unchanged."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of a rate-card entry already on this line, to change it in place; the fields sent overwrite its values and the others are kept. Omit to add a new entry."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The line's rate-card entries, replacing the current set: an entry with an id updates that entry, one without adds an entry, and a current entry left out is deleted. Omit to leave unchanged."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The line's invoice milestones, replacing the current ones. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to lines of this quote product, each matched by id."},"deleteQuoteProductLines":{"type":"array","items":{"type":"string"},"description":"Identifiers of lines of this quote product to remove."}},"additionalProperties":false,"required":["id"]},"description":"Changes to products of this subscription, each matched by id."},"deleteQuoteProducts":{"type":"array","items":{"type":"string"},"description":"Identifiers of products of this subscription to remove, with their lines."}},"additionalProperties":false,"required":["id"]},"description":"Changes to existing subscriptions, each matched by id.","examples":[[{"id":"c2e1f4a7-8b90-4d33-9a15-6f7e8d2b0c41","updateQuoteProducts":[{"id":"d4f2a1b8-3c67-4e05-8b92-1a7d0e6c5f38","updateQuoteProductLines":[{"id":"f6b4c3d0-5e89-4a27-8d14-3c9f2a8e7b50","quantity":"120"}]}]}]]},"deleteSubscriptions":{"type":"array","items":{"type":"string"},"description":"Identifiers of subscriptions to remove, with their products."},"createNonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","description":"The catalog product. See id on GET accounting/products/:id."},"quoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to productId. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"The priced lines of this quote product, at least one."}},"additionalProperties":false,"required":["productId","quoteProductLines"]},"description":"Products outside any subscription to add, in the shape POST crm/quotes takes."},"updateNonRecurringProducts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the quote product outside any subscription."},"createQuoteProductLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"The catalog product line to price. It must belong to the quote product's product. See id on GET accounting/product-lines/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Billable-time and travel-expense lines only."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Tiered and volume models need lineTiers, rateCard needs rateCardEntries."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Prepaid lines only."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Prepaid lines only."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD."},"orderIndex":{"type":"number","description":"The position of this line within its quote product, for display ordering."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The pricing bands of a tiered, volume or stairstep line."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The rate-card pricing of a rateCard line, one entry per billable component."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The invoice milestones of a line invoiced by milestone. Their totals must add up to the line total."}},"additionalProperties":false,"required":["productLineId"]},"description":"Lines to add to this quote product."},"updateQuoteProductLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the line on this quote product."},"quantity":{"type":"string","format":"decimal","description":"The quantity, as a count, not an amount. Omit to leave unchanged."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency. Omit to leave unchanged."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency. Omit to leave unchanged."},"discountAmount":{"type":"string","format":"decimal","description":"The per-unit discount, in the quote's currency. Omit to leave unchanged."},"discountPercentage":{"type":"string","format":"decimal","description":"The per-unit discount off the list price on a 0-100 scale, so 10 means ten percent. Stored as a 0-1 fraction, which is what GET crm/quotes/:id returns. Used only when neither unitPrice nor discountAmount is sent. Omit to leave unchanged."},"cappedPrice":{"type":"string","format":"decimal","description":"The ceiling on what this line may total, in the quote's currency. Omit to leave unchanged."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce","termEnd"],"description":"How often this line is invoiced. Omit to leave unchanged."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How the price is derived from quantity. Omit to leave unchanged."},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"The period the unit price is quoted for. Omit to leave unchanged."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the quantity is counted in. Omit to leave unchanged."},"overConsumptionBehavior":{"enum":["allowNegative","overage"],"description":"What happens when consumption exceeds a prepaid balance. Omit to leave unchanged."},"rolloverAtRenewal":{"type":"boolean","description":"Whether an unused prepaid balance carries forward at renewal. Omit to leave unchanged."},"serviceStartDate":{"type":"string","format":"date","description":"The first date this line delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"serviceEndDate":{"type":"string","format":"date","description":"The last date this line delivers service. Format YYYY-MM-DD. Omit to leave unchanged."},"orderIndex":{"type":"number","description":"The position of this line within its quote product. Omit to leave unchanged."},"lineTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The lower bound of the band, inclusive. A quantity, not an amount."},"toQuantity":{"type":"string","format":"decimal","description":"The upper bound of the band, inclusive. Omit on the top band."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"How this band prices."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price for this band after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price for this band before discount, in the quote's currency."}},"additionalProperties":false,"required":["fromQuantity","priceModel"]},"description":"The line's pricing bands, replacing the current ones. Omit to leave unchanged."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of a rate-card entry already on this line, to change it in place; the fields sent overwrite its values and the others are kept. Omit to add a new entry."},"billableComponentId":{"type":"string","description":"The billable component this entry prices. There is no endpoint for it."},"description":{"type":"string","description":"A label that distinguishes entries that otherwise have the same data."},"unitPrice":{"type":"string","format":"decimal","description":"The per-unit price after discount, in the quote's currency."},"listPrice":{"type":"string","format":"decimal","description":"The per-unit list price before discount, in the quote's currency."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the price is quoted per."},"quantity":{"type":"string","format":"decimal","description":"The quantity of billable units, as a count, not an amount."},"usageType":{"enum":["consumption","overage","thresholdCounter","payg"],"description":"What the usage represents."},"conversion":{"type":"string","format":"decimal","description":"The factor that converts usage units to billable units. A ratio, not an amount."},"billableUnitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case","word","record"],"description":"The unit the entry is billed in, when it differs from unitOfMeasure."}},"additionalProperties":false,"required":["unitOfMeasure"]},"description":"The line's rate-card entries, replacing the current set: an entry with an id updates that entry, one without adds an entry, and a current entry left out is deleted. Omit to leave unchanged."},"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone covers."},"totalPrice":{"type":"string","format":"decimal","description":"The amount invoiced at this milestone, in the quote's currency."},"percentage":{"type":"string","format":"decimal","description":"The share of the line total this milestone invoices."},"projectedDate":{"type":"string","format":"date","description":"The date the milestone is expected to be reached. Format YYYY-MM-DD."}},"additionalProperties":false},"description":"The line's invoice milestones, replacing the current ones. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Changes to lines of this quote product, each matched by id."},"deleteQuoteProductLines":{"type":"array","items":{"type":"string"},"description":"Identifiers of lines of this quote product to remove."}},"additionalProperties":false,"required":["id"]},"description":"Changes to products outside any subscription, each matched by id."},"deleteNonRecurringProducts":{"type":"array","items":{"type":"string"},"description":"Identifiers of products outside any subscription to remove, with their lines.","examples":[["d0f8a7b4-9c23-4e61-8b58-7a3d6e2c1f94"]]}},"additionalProperties":false},"searchProspectsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the prospect."},"prospectNumber":{"type":"string","description":"The prospect number, for example 'PR-1042'. Absent while none has been assigned."},"prospectName":{"type":"string","description":"The name of the prospect organization."},"billingEmail":{"type":"string","description":"The email address invoices for this prospect would be sent to."},"crmId":{"type":"string","description":"The identifier of this prospect in the external CRM system it was integrated from."},"customerType":{"type":"string","description":"The commercial relationship. Possible values: 'default', 'partner', 'endCustomer'."},"dataSource":{"type":"string","description":"The system the prospect came from, for example 'Salesforce' or 'HubSpot'. Prospects created in Lensing have the value 'Everest'."},"defaultCurrency":{"type":"string","description":"The currency quotes for this prospect default to. Format ISO 4217, for example 'USD'."},"entityId":{"type":"string","description":"The legal entity that owns the prospect."},"entityName":{"type":"string","description":"The name of the legal entity that owns the prospect. See entityName on GET base/entities."},"customerId":{"type":"string","description":"The identifier of the customer created from this prospect. Absent until the prospect has been converted, so its presence marks a converted prospect. See id on GET accounting/customers/:id."},"sameAsBillToAddress":{"type":"boolean","description":"Whether the sold-to address repeats the bill-to address. soldToAddress is populated either way, so you never have to resolve this flag to read an address."},"billToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's bill-to address, with the default contact for that role. Absent when none is recorded."},"soldToAddress":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region. Absent where the country has no such division."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"contact":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."}},"additionalProperties":false,"required":["id"],"description":"The default contact for this address role. Absent when the prospect has no default contact for it."}},"additionalProperties":false,"required":["id"],"description":"The prospect's sold-to address, with the default contact for that role. Absent when none is recorded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the prospect record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the contact."},"displayName":{"type":"string","description":"The contact's display name, assembled from the name parts."},"salutation":{"type":"string","description":"The contact's form of address, for example 'Ms' or 'Dr'."},"firstName":{"type":"string","description":"The contact's given name."},"middleName":{"type":"string","description":"The contact's middle name or initial."},"lastName":{"type":"string","description":"The contact's family name."},"suffix":{"type":"string","description":"The contact's name suffix, for example 'Jr' or 'PhD'."},"emailAddress":{"type":"string","description":"The email address the contact is reached at."},"workPhone":{"type":"string","description":"The contact's work telephone number."},"isDefaultBillToContact":{"type":"boolean","description":"Whether this is the default contact for the prospect's bill-to address. At most one contact is."},"isDefaultSoldToContact":{"type":"boolean","description":"Whether this is the default contact for the prospect's sold-to address. At most one contact is."}},"additionalProperties":false,"required":["id","isDefaultBillToContact","isDefaultSoldToContact"]},"description":"Every contact recorded against the prospect, with the two per-role defaults flagged. An empty array when the prospect has none. GET crm/prospects/:id and POST crm/prospects/search return this array. GET crm/prospects omits it."}},"additionalProperties":false,"required":["id","prospectName","entityId","lastModifiedDate","contacts"]},"description":"The prospects on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","prospectNumber":"PR-1042","prospectName":"Northwind Logistics","billingEmail":"ap@northwind.example","crmId":"0035g00000ABCDEF","customerType":"default","dataSource":"Salesforce","defaultCurrency":"USD","entityId":"a1c4d7e0-5b62-4c19-8e73-9f0d2a6b4c88","entityName":"Acme Inc.","sameAsBillToAddress":true,"billToAddress":{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}},"soldToAddress":{"id":"6f9a2b1c-33d4-4a55-9e21-0b7c8d4e1f02","line1":"410 Terry Avenue North","city":"Seattle","stateProvince":"WA","country":"US","zipCode":"98109","contact":{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142"}},"lastModifiedDate":"2026-08-14T09:12:44.000Z","contacts":[{"id":"b8d6e5f2-7a01-4c49-8f36-5e1b4c0a9d72","displayName":"Dana Whitfield","firstName":"Dana","lastName":"Whitfield","emailAddress":"dana.whitfield@northwind.example","workPhone":"+1-206-555-0142","isDefaultBillToContact":true,"isDefaultSoldToContact":true},{"id":"c9e7f6a3-8b12-4d50-9a47-6f2c5d1b0e83","displayName":"Ravi Menon","salutation":"Mr","firstName":"Ravi","lastName":"Menon","emailAddress":"ravi.menon@northwind.example","isDefaultBillToContact":false,"isDefaultSoldToContact":false}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether another page follows. A full page may still be the last, so branch on this."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchProspectsInput":{"type":"object","properties":{"text":{"type":"string","description":"Limits results to prospects whose name contains this text. The match is case-insensitive.","examples":["northwind"]},"billingEmail":{"type":"string","description":"Limits results to the prospect with this billing email address. The match is exact."},"crmId":{"type":"string","description":"Limits results to the prospect with this identifier in the external CRM system. The match is exact."},"prospectNumber":{"type":"string","description":"Limits results to the prospect with this number, for example 'PR-1042'. The match is exact."},"customerType":{"type":"array","items":{"enum":["default","partner","endCustomer"]},"description":"Limits results to prospects of any of these commercial relationships. Possible values: 'default', 'partner', 'endCustomer'. Omit or pass an empty array for every type.","examples":[["partner","endCustomer"]]},"dataSource":{"type":"array","items":{"type":"string"},"description":"Limits results to prospects from any of these systems, for example 'Salesforce' or 'HubSpot'. Use 'Everest' for prospects created in Lensing. Omit it or send an empty array to include every system."},"defaultCurrency":{"type":"array","items":{"type":"string"},"description":"Limits results to prospects whose default currency is any of these codes. Each is an ISO 4217 code, for example 'USD'. Omit or pass an empty array for every currency.","examples":[["USD"]]},"entityId":{"type":"string","description":"Limits results to prospects owned by this legal entity. Omit for every entity."},"customerId":{"type":"string","description":"Limits results to prospects converted to this customer. Omit for every customer."},"converted":{"type":"boolean","description":"Limits results to prospects already converted to a customer when true, and to those not yet converted when false. Omit for both."},"sameAsBillToAddress":{"type":"boolean","description":"Limits results to prospects whose sold-to address repeats their bill-to address when true, and to the rest when false. Omit for both."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the prospect last changed, in UTC. Both bounds are inclusive, and omitting one leaves that side open."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of prospects per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"markQuoteAsSignedOutput":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status afterward, 'signed'.","examples":["signed"]}},"additionalProperties":false,"required":["status"]},"markQuoteAsSignedInput":{"type":"object","properties":{"file":{"type":"object","properties":{"fileName":{"type":"string","description":"The name of the document, for example 'Signed quote.pdf'."},"contentBase64":{"type":"string","description":"The PDF's bytes, base64-encoded with the standard alphabet and padding."}},"additionalProperties":false,"required":["fileName","contentBase64"],"description":"The signed document, a PDF of at most 10 MB. Send this or includeQuoteDocument, not both.","examples":[{"fileName":"Signed quote.pdf","contentBase64":"JVBERi0xLjcKJcfsj6IK..."}]},"includeQuoteDocument":{"type":"boolean","description":"Record the quote document, generated from the active quote template, as the signed document. Send this or file, not both."}},"additionalProperties":false},"opportunityStagesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the stage. An opportunity's stageId holds this value."},"entityId":{"type":"string","description":"The legal entity the stage belongs to. Stages are scoped per entity: an opportunity's stage is always one of its own entity's stages. See id on GET base/entities."},"stageName":{"type":"string","description":"The display name of the stage, for example 'Qualification'."},"stageType":{"oneOf":[{"const":"open","description":"The deal is still in progress."},{"const":"closedWon","description":"The deal is won."},{"const":"closedLost","description":"The deal is lost."}],"description":"What reaching the stage means for an opportunity."},"probability":{"type":"string","format":"decimal","description":"The likelihood that an opportunity in this stage closes as won, as a percentage from 0 to 100. For example, 25 means 25%. A percentage, not an amount, so it has no currency."},"orderIndex":{"type":"number","description":"The position of the stage within its entity; an entity's stages are ordered by it. Unique within the entity. After any write the positions are 0, 1, 2 … with no gaps."},"isDeactivated":{"type":"boolean","description":"Whether the stage is retired. A deactivated stage stays on record, and opportunities already in it keep it, but it is not offered for new opportunities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"When the stage record last changed. Every write to an entity's stages updates it for every stage of that entity. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."}},"additionalProperties":false},"getOpportunityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the opportunity."},"opportunityNumber":{"type":"string","description":"The system-generated opportunity number, for example 'OP-1042'. Absent while none has been assigned."},"entityId":{"type":"string","description":"The legal entity that owns the opportunity."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'."},"customerId":{"type":"string","description":"The identifier of the customer or prospect this opportunity is for. customerPath says which kind of record it is. Absent when it points at neither. See id on GET accounting/customers/:id for a customer, or GET crm/prospects/:id for a prospect."},"customerPath":{"type":"string","description":"Which kind of record customerId identifies. The value ends in 'Customer.id' when it is a customer and in 'Prospect.id' when it is a prospect. Absent when neither resolves."},"endCustomerId":{"type":"string","description":"The identifier of the end customer behind a partner customer. Absent unless one is on record. See id on GET accounting/customers/:id."},"priceBookId":{"type":"string","description":"The identifier of the price book quotes on this opportunity are priced from. See id on GET accounting/price-books/:id."},"stageId":{"type":"string","description":"The identifier of the stage the opportunity currently sits in: one of the stages GET crm/opportunity-stages returns for this opportunity's entityId."},"opportunityName":{"type":"string","description":"The free-text display name of the opportunity. Absent when none is set."},"closeDate":{"type":"string","format":"date","description":"The expected close date of the deal. Format YYYY-MM-DD. Absent when none is set."},"amount":{"type":"string","format":"decimal","description":"The expected deal amount, as a decimal in the opportunity's currency. Absent when none is set."},"crmId":{"type":"string","description":"The identifier of this opportunity in the external system it was imported from, for example a Salesforce record id. It is free text and not unique. Absent when none is set."},"dataSource":{"type":"string","description":"The system the record came from, for example 'Salesforce'. Records created in Lensing have the value 'Everest'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the opportunity record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"quotes":{"type":"array","items":{"type":"object","properties":{"quoteId":{"type":"string","description":"The identifier of the linked quote. See id on GET crm/quotes/:id."},"isPrimary":{"type":"boolean","description":"Whether this is a primary quote for the opportunity. It is not guaranteed to be true for exactly one quote."}},"additionalProperties":false,"required":["quoteId","isPrimary"]},"description":"Every quote linked to this opportunity. An empty array when it has none."}},"additionalProperties":false,"required":["id","entityId","currency","priceBookId","stageId","quotes"]},"rejectQuoteOutput":{"type":"object","properties":{"status":{"type":"string","description":"The quote's status after the rejection, 'underApproval'.","examples":["underApproval"]},"approvalStatus":{"type":"string","description":"The quote's approval status after the rejection, 'rejected'.","examples":["rejected"]}},"additionalProperties":false,"required":["status","approvalStatus"]},"rejectQuoteInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the quote is rejected, recorded with the rejection. Omit for none.","examples":["Discount exceeds the approved limit."]}},"additionalProperties":false},"createOpportunityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the created opportunity.","examples":["7d1c2b3a-9e8f-4a6b-b5c4-3d2e1f0a9b87"]}},"additionalProperties":false,"required":["id"]},"createOpportunityInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity that owns the opportunity. It must be active. See id on GET base/entities.","examples":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"]},"customerId":{"type":"string","description":"The customer or prospect the opportunity is for. A customer must not be an end customer (send its partner instead). A prospect already converted to a customer is replaced by that customer, so the same rules apply to it: if that customer is an end customer the request fails with CUSTOMER_IS_END_CUSTOMER, and if it is a partner it needs endCustomerId (END_CUSTOMER_REQUIRED). See id on GET accounting/customers/:id or GET crm/prospects/:id.","examples":["0e3a9f41-6c2b-4d7e-8a15-2b9c7d4e6f10"]},"endCustomerId":{"type":"string","description":"The end customer behind a partner customer: required when customerId is a partner, not allowed otherwise. See id on GET accounting/customers/:id."},"currency":{"type":"string","description":"The currency the opportunity is denominated in, and the currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"priceBookId":{"type":"string","description":"The price book quotes on this opportunity are priced from. See id on GET accounting/price-books/:id.","examples":["5b0e7c3a-2f6d-4a8b-9c1e-7d4f3a2b1c09"]},"stageId":{"type":"string","description":"The stage the opportunity starts in: an active open stage of entityId, as GET crm/opportunity-stages returns them. Omit to start in the entity's first active open stage."},"opportunityName":{"type":"string","description":"The display name of the opportunity. Must not be empty.","examples":["Acme renewal 2027"]},"closeDate":{"type":"string","format":"date","description":"The expected close date of the deal. Format YYYY-MM-DD.","examples":["2027-03-31"]},"amount":{"type":"string","format":"decimal","description":"The expected deal amount, as a decimal in currency. Must not be negative.","examples":["125000.00"]},"crmId":{"type":"string","description":"The identifier of this opportunity in an external system, for example a Salesforce record id. Free text."}},"additionalProperties":false,"required":["entityId","customerId","currency","priceBookId","opportunityName"]},"applyPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"applyPaymentInput":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to apply the payment to. See id on GET accounting/invoices/:id."},"amount":{"type":"string","format":"decimal","description":"The amount to apply to this invoice, in the payment currency. Must be greater than 0."},"appliedDate":{"type":"string","format":"date","description":"The date the application is recognized. Use format YYYY-MM-DD."},"earlyPaymentDiscount":{"type":"string","format":"decimal","description":"The early-payment discount granted on this application, in the payment currency."},"smallBalanceWriteOffAmount":{"type":"string","format":"decimal","description":"The small-balance write-off amount on this application, in the payment currency."}},"additionalProperties":false,"required":["invoiceId","amount","appliedDate"]},"description":"The per-invoice amounts to apply from the payment."}},"additionalProperties":false,"required":["invoices"]},"getAccountingPeriodStatusOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this entity-book period status row. This identifies the (entity, book, period) combination, not the shared accounting period."},"accountingPeriodId":{"type":"string","description":"The identifier of the underlying accounting period, shared by every entity that uses this fiscal calendar. See id on GET accounting/accounting-periods/:id."},"entityId":{"type":"string","description":"The identifier of the legal entity this status belongs to. See id on GET base/entities. Absent only when the entity-book link is broken."},"entityName":{"type":"string","description":"The name of the legal entity this status belongs to."},"bookId":{"type":"string","description":"The identifier of the accounting book this status belongs to. A period is opened and closed per book. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this status belongs to."},"periodName":{"type":"string","description":"The display name of the period as its fiscal calendar defines it, for example 'Jan 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"fiscalYear":{"type":"string","description":"The fiscal year label this period belongs to, for example 'FY2024'. Set by the calendar, so it need not match the calendar year of startDate. It is a label, not a number: a filter must match its spelling exactly, so read the distinct values first. A fiscal year runs from the earliest startDate to the latest endDate of its periods for one entity and book."},"fiscalQuarter":{"type":"string","description":"The fiscal quarter label this period belongs to, for example 'Q1 2026'."},"startDate":{"type":"string","format":"date","description":"The first day of the period, inclusive. Format YYYY-MM-DD. Absent only when the underlying period was deleted."},"endDate":{"type":"string","format":"date","description":"The last day of the period, inclusive. Format YYYY-MM-DD."},"status":{"type":"string","description":"The status this entity and book have put the period in. Possible values: 'created' (generated, not yet opened), 'open', 'closed', 'reopened'. Only 'open' and 'reopened' accept postings."},"postable":{"type":"boolean","description":"Whether the period currently accepts postings for this entity and book, true when its status is 'open' or 'reopened'. This does not account for journal-type-specific locks."},"postableReason":{"type":"string","description":"Why the period does not accept postings, for example 'status is closed'. Empty when it is postable."},"reopeningReason":{"type":"string","description":"The free-text reason recorded when the period was reopened. Set only when status is 'reopened'."},"reopenedByCascade":{"type":"boolean","description":"Whether this period was reopened as a side effect of reopening a later one, rather than directly."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this status row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It changes when the period is opened, closed or reopened for this entity and book."},"closeTasks":{"type":"array","items":{"type":"object","properties":{"taskCode":{"type":"string","description":"The code identifying the task, and the value to pass as task to POST accounting/period-status/:id/execute-task. The forward tasks, for example 'open', 'close', 'reopen', 'lockAP', 'lockAR', 'lockRevenue', 'lockJournals', 'runRevaluation', 'calculateConsolidationRates'. The task that undoes one is in reverseTaskCode."},"reverseTaskCode":{"type":"string","description":"The code of the task that undoes this one, for example 'unlockAP' for 'lockAP'. Empty when the task cannot be reversed."},"isExecuted":{"type":"boolean","description":"Whether this task has already run for this entity-book period."},"isExecutable":{"type":"boolean","description":"Whether this task can run now. It is false for a task already done and for one whose preconditions are unmet. notExecutableReason says which."},"notExecutableReason":{"type":"string","description":"Why the task cannot run now. Present only when isExecutable is false and a reason is available."},"isReversible":{"type":"boolean","description":"Whether the task that undoes this one can run now."},"notReversibleReason":{"type":"string","description":"Why the reversal cannot run now. Present only when isReversible is false and a reason is available."},"notApplicable":{"type":"boolean","description":"Whether this task does not apply to this entity-book period at all, for example a consolidation task on an entity that does not consolidate. Such a task is neither executed nor executable and does not block the close."},"message":{"type":"string","description":"A human-readable, translated description of the task's state: the applied message when it has run, the not-applied message when it has not, or the not-applicable message when it does not apply."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this task's state last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on a task that has never run."},"lastModifiedBy":{"type":"string","description":"The identifier of the user who last changed this task's state. Absent on a task that has never run."}},"additionalProperties":false,"required":["taskCode","isExecuted","isExecutable","isReversible"]},"description":"The period-close checklist for this entity and book, one entry per task. An empty array when the row has no tasks yet. Check isExecutable before running a task with POST accounting/period-status/:id/execute-task."}},"additionalProperties":false,"required":["id","status","postable","postableReason","lastModifiedDate"]},"updateInvoiceMilestoneOutput":{"type":"object","properties":{},"additionalProperties":false},"updateInvoiceMilestoneInput":{"type":"object","properties":{"description":{"type":"string","description":"What the milestone stands for, as it appears on the invoice line. Omit to leave unchanged.","examples":["Go-live (phase 2)"]},"orderSequence":{"type":"number","description":"The milestone's position among the sales order's milestones. Omit to leave unchanged."},"percentage":{"type":"string","format":"decimal","description":"The share of the sales order the milestone bills, in percent. A number, not an amount; it is stored as given. Omit to leave unchanged."},"projectedDate":{"type":"string","format":"date","description":"When the milestone is expected to be reached. Format YYYY-MM-DD. Omit to leave unchanged.","examples":["2027-01-15"]}},"additionalProperties":false},"createAccountingSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created sales return."}},"additionalProperties":false,"required":["id"]},"createAccountingSalesReturnInput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order to return against. The order must be partially or fully invoiced. See id on GET accounting/sales-orders/:id."},"returnType":{"type":"string","description":"The resolution path for the return. Accepted values: 'credit', 'replacement'. It cannot be changed once the return moves past 'draft'."},"returnDate":{"type":"string","description":"The transaction date for the return. Use format YYYY-MM-DD."},"reasonCode":{"type":"string","description":"The header-level reason for the return. Accepted values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'."},"lines":{"type":"array","items":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The sales order product line being returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return. It must be above 0 and not exceed what remains returnable on the line."},"reasonCode":{"type":"string","description":"The reason for this line. Accepted values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund for this line, such as a restocking fee, in the sales order's currency. Credit returns only."}},"additionalProperties":false,"required":["salesOrderProductLineId","quantity"]},"description":"The return lines. At least one line with a quantity above 0 is required."},"notes":{"type":"string","description":"Free-form notes for the return."},"shippingRefundAmount":{"type":"string","format":"decimal","description":"The shipping charge to refund to the customer, in the sales order's currency. Credit returns only. Requires shippingSalesOrderProductLineId."},"shippingSalesOrderProductLineId":{"type":"string","description":"The shipping sales order product line whose charge is refunded. Its product has product type 'shipping'."}},"additionalProperties":false,"required":["salesOrderId","returnType","returnDate","lines"]},"listBookEntityAssignmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entity assignment."},"bookId":{"type":"string","description":"The accounting book this assignment belongs to, the same book named on the path. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The display name of the accounting book."},"entityId":{"type":"string","description":"The legal entity assigned to the book. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the assigned legal entity."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts used for this entity on this book. Absent when none is assigned. See id on GET accounting/chart-of-accounts/:id."},"chartOfAccountsName":{"type":"string","description":"The name of the chart of accounts. Absent when none is assigned."},"fiscalCalendarId":{"type":"string","description":"The fiscal calendar used for this entity on this book. Absent when none is assigned. See id on GET accounting/fiscal-calendars/:id."},"fiscalCalendarName":{"type":"string","description":"The name of the fiscal calendar. Absent when none is assigned."},"currency":{"type":"string","description":"The functional currency the entity keeps in this book: the currency of functionalDebit, functionalCredit and glAmount on its journal entry lines. Format ISO 4217, for example 'USD'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the entity assignment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","bookId","entityId","lastModifiedDate"]},"description":"The book's entity assignments, one per legal entity that posts to it. An empty array when the book has none."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the page query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more assignments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"getInvoiceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice."},"invoiceNumber":{"type":"string","description":"The invoice number, for example 'INV-1', unique within the tenant. Absent while none has been assigned."},"invoiceDate":{"type":"string","format":"date","description":"The date the invoice was issued. Format YYYY-MM-DD. Payment terms and the general ledger impact are both based on this date."},"dueDate":{"type":"string","format":"date","description":"The date payment falls due: the invoice date plus the payment term, or, for an invoice billed through a combined invoice, the combined invoice's due date. Format YYYY-MM-DD. Absent when no term has been resolved. An invoice is overdue on a date when this date is before it and an amount is still due; age by this date, never by invoiceDate."},"lastPaidDate":{"type":"string","format":"date","description":"The date the last payment applied to the invoice was received (its paymentDate), set only once invoiceStatus is 'paidInFull'. Format YYYY-MM-DD. Absent on an invoice that is not paid in full, including a partly paid one."},"invoiceStatus":{"type":"string","description":"The payment status of the invoice, derived from its amounts and due date as they stand today (in the entity's time zone), so it can change overnight with no posting. The first matching value wins: 'disputed' (disputeStatus is 'disputed', whatever is paid); 'unpaid' (an amount due above zero equal to totalAmount, due date not passed); 'paidInFull' (nothing due, not all of it by credit); 'creditedInFull' (nothing due because totalCredited equals totalAmount); 'partiallyPaid' (part paid or credited, part due, due date not passed); 'isOverdue' (an amount due after the due date, even when part was paid). Absent when an amount is due but there is no due date, or when more was applied than is due. Approval plays no part, and a zero-amount invoice reads 'paidInFull'. For an earlier date, see totalAmountDue."},"approvalStatus":{"type":"string","description":"The finance approval status of the invoice. Possible values: 'draft', 'pendingApproval', 'approved', 'revise', 'rejected'. Invoices have no approval step, so an invoice is 'approved' when it is created, by an invoice run, the import route or a migration load that sets no other value. Invoices created before this rule were set to 'approved' by the package's upgrade migration, which published no invoiceUpdated event. An invoice posts to the ledger and is owed whatever this value is, so it does not scope receivables, billings or revenue."},"deliveryStatus":{"type":"string","description":"How far the invoice has got in being sent to the customer. Possible values: 'created', 'toBeSent', 'delivered', 'read', 'failed'."},"disputeStatus":{"type":"string","description":"The dispute status of the invoice, set only when payments against it are under dispute. Possible values: 'disputed', 'chargedBack'."},"dataSource":{"type":"string","description":"The system the invoice record was imported from, for invoices that arrived through an integration or migration rather than being created in this system. For example 'NetSuite', 'Quickbooks', 'Stripe' or 'MigrationFile'. Absent on invoices created in this system."},"currency":{"type":"string","description":"The currency of the invoice. Format ISO 4217, for example 'USD'. It applies to every amount on the record, on the header and on every line."},"customerMessage":{"type":"string","description":"A free-form message printed on the invoice for the customer."},"externalInvoiceId":{"type":"string","description":"The invoice's identifier in an external source system, kept for reconciliation. For identifiers owned by your other systems, prefer externalIdentifiers below."},"customerId":{"type":"string","description":"The customer the invoice is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer, as it appears on the document."},"customerNumber":{"type":"string","description":"The customer number of the customer, unique within the tenant."},"entityId":{"type":"string","description":"The legal entity issuing the invoice. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"salesOrderId":{"type":"string","description":"The sales order the invoice was billed from. Absent on invoices created directly. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"type":"string","description":"The number of the source sales order. Present whenever salesOrderId is."},"billToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address record. Absent when none is set."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The bill-to address the invoice is sent to. Absent when the invoice references no bill-to record."},"soldToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address record. Absent when none is set."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The sold-to address the product or service was delivered to, used for tax determination. Absent when the invoice references no sold-to record."},"invoiceEmail":{"type":"string","description":"The email address of the business contact that receives this invoice."},"purchaseOrders":{"type":"array","items":{"type":"string"},"description":"The purchase order references the customer supplied, derived from the sales order. These are the customer's own document numbers. An empty array when none were supplied."},"purchaseOrderOverride":{"type":"string","description":"A manually entered PO number that overrides the sales-order-derived values in purchaseOrders."},"paymentTermDays":{"type":"number","description":"The number of days after the invoice date that payment falls due, resolved from the invoice's payment term. The term record itself is not published, only its day count."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the invoice's currency to the entity's currency (currency on entities). A book that keeps the entity in another functional currency does not use it. It is 1 when the invoice is in the entity's currency."},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the invoice is left out of the tax engine. Derived from the sales order."},"subtotal":{"type":"string","format":"decimal","description":"The amount before taxes and discounts, in the invoice currency. Absent when no subtotal has been computed."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the invoice currency."},"totalDutiesAndCustoms":{"type":"string","format":"decimal","description":"The total duties and customs across all lines, in the invoice currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total invoiced, including taxes and duties, in the invoice currency. Late fees are not part of it; they are in totalLateFeeAmount."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount still due on the invoice after every application recorded so far, in the invoice currency: totalAmount minus paymentsApplied, totalCredited and adjustments, plus totalLateFeeAmount. It goes below zero when more is applied than is due. For an earlier date, take totalAmount less the appliedAmount, earlyPaymentDiscount and smallBalanceWriteOffAmount of the payment applications and the appliedAmount of the credit memo applications on this invoiceId with appliedDate on or before it, plus totalLateFeeAmount. No public field dates a late fee, so that figure includes fees charged after the date."},"totalCredited":{"type":"string","format":"decimal","description":"The total credited back against this invoice by credit memos, in the invoice currency."},"totalLateFeeAmount":{"type":"string","format":"decimal","description":"The total late fees charged on this invoice, in the invoice currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of discount amounts across all invoice lines, in the invoice currency."},"oneTimeDiscount":{"type":"string","format":"decimal","description":"The one-time discount applied to the invoice as a whole, in the invoice currency."},"paymentsApplied":{"type":"string","format":"decimal","description":"The amount settled by payments so far, in the invoice currency."},"adjustments":{"type":"string","format":"decimal","description":"The sum of small-balance write-offs and early-payment discounts recorded against this invoice, in the invoice currency."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the invoice record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"pdf":{"type":"string","x-file":true,"description":"The invoice PDF reflecting the invoice as it is now, as a short-lived file handle. Exchange it at GET /public/files/{handle}. Absent when no PDF template applies to the invoice."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice line."},"invoiceLineNumber":{"type":"string","description":"The sequential line number within the invoice."},"description":{"type":"string","description":"The line description, as shown to the customer."},"lineType":{"type":"string","description":"The kind of charge the line is. Possible values: 'recurring', 'oneTime', 'oneTimeDiscount', 'usageOverage', 'overage', 'payAsYouGo', 'commit', 'lateFee', 'creditCardProcessingFee', 'billableTime', 'billablePassThrough', 'billableTravelExpense'."},"productId":{"type":"string","description":"The billed product. Set only on lines created from a product reference, absent on free-text lines. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The product code as it stood when the line was created. A snapshot, so it does not follow later changes to the product."},"productDescription":{"type":"string","description":"The product description as it stood when the line was created. A snapshot, as with productCode."},"quantity":{"type":"string","format":"decimal","description":"The quantity billed. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'each', 'hour' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit actually charged, in the invoice currency."},"listPrice":{"type":"string","format":"decimal","description":"The undiscounted list price per unit, in the invoice currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax and duties, in the invoice currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount granted on the line, in the invoice currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount granted on the line as a percentage. A rate, not an amount, so it has no currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the invoice currency."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs charged on the line, in the invoice currency."},"amount":{"type":"string","format":"decimal","description":"The total billed for the line, including tax and duties, in the invoice currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The line's amount less the full amount of every credit memo line raised against it, applied or not, in the invoice currency. Payments are not deducted here: what is still to collect on the invoice is its totalAmountDue."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the invoice, each billing one product or free-text item. An empty array when the invoice has no lines. All line amounts are in the invoice currency."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a stable camelCase slug such as 'netsuiteInvoiceId', not the human-readable label. It must match an active external-identifier configuration for invoices."},"value":{"type":"string","description":"The identifier as the source system stores it."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the originating system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by your other systems. At most one entry per fieldName. An empty array when the invoice has none."}},"additionalProperties":false,"required":["id","invoiceDate","currency","customerId","entityId","lastModifiedDate"]},"getCreditCardEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit card entry."},"creditCardEntryNumber":{"type":"string","description":"The credit card entry number. Absent until one has been assigned."},"name":{"type":"string","description":"The display name of the credit card entry."},"description":{"type":"string","description":"A free-form description of the entry."},"transactionDate":{"type":"string","format":"date","description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD. Defaults to the transaction date where the entity's country requires a service date."},"currency":{"type":"string","description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"type":"string","description":"The reconciliation status of the entry. Possible values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"type":"string","description":"A label for the source system the entry was created from."},"externalUrl":{"type":"string","description":"A link to the source document in an external system."},"creditCardAccountId":{"type":"string","description":"The credit card general-ledger account this entry is recorded against. See id on GET accounting/accounts/:id."},"creditCardAccountName":{"type":"string","description":"The name of the credit card general-ledger account."},"entityId":{"type":"string","description":"The legal entity this entry is posted under. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the credit card entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A free-form description of the line."},"lineType":{"type":"string","description":"The kind of line. Possible values: 'oneTime', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The gross line amount, including VAT, in the entry currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217. It always matches the entry currency."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the entry currency."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount on the line, in the entry currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%."},"origin":{"type":"string","description":"A label for the source system, copied onto the line from the entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. There is no endpoint for it."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to. Present only for a custom-dimension tag. See id on GET base/custom-dimensions."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. An older entry can carry tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags assigned to this line, departmentId and businessUnitId included. Set them with create or update."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. To read its schedule lines, pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted entry reads 'notStarted' until the entry posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id. Absent on a schedule that has no schedule lines yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far by the schedule lines whose journal entries are posted, in the entry currency. Zero until the first schedule line's journal entry is posted."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. To read the schedule lines, use GET accounting/amortization-schedule-lines and filter on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id","reportingTags"]},"description":"The posting lines of the entry, one per general-ledger posting. An empty array when the entry has none."}},"additionalProperties":false,"required":["id","transactionDate","status","lastModifiedDate"]},"subscriptionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the subscription."},"subscriptionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The subscription number. Unique within the tenant. Example: 'SUB-1'."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer this subscription belongs to. See name on GET accounting/customers/:id."},"currency":{"type":"string","description":"The currency of annualRecurringRevenue and monthlyRecurringRevenue. Format ISO 4217, for example 'USD'."},"autoRenew":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The length of the auto-renewal term, in the subscription's term unit."},"renewalPriceChangePercentage":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The percentage by which the price changes on renewal."},"termType":{"enum":["termed","evergreen"],"description":"The term type of the subscription."},"subscriptionStatus":{"anyOf":[{"enum":["pendingActivation","notStarted","active","pendingOrderApproval","canceled","suspended"]},{"type":"null"}],"description":"The status of the subscription, derived now from the status of its lines, strongest first: any 'active' line makes it 'active'; otherwise 'suspended', 'pendingActivation', 'notStarted', 'pendingOrderApproval'; with none of those it is 'canceled'. 'canceled' therefore also covers a subscription whose term simply ended. A cancellation itself is isCancellationEnabled with a cancellationDate; read those, not this status, for any date other than today."},"serviceStartDateBasis":{"anyOf":[{"enum":["fixedDate","serviceActivation"]},{"type":"null"}],"description":"How the service start date is determined."},"serviceActivationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date service was activated. Set only when serviceStartDateBasis is 'serviceActivation'. Format YYYY-MM-DD."},"serviceStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The latest service end date across all of the subscription's lines. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"submissionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The submission date of the sales order this subscription came from. Format YYYY-MM-DD."},"cancellationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of service of a canceled subscription, which is out of service from the day after; its lines end on this date unless the cancellation set another end date for them. Absent when no cancellation has been recorded. Format YYYY-MM-DD."},"cancellationReason":{"anyOf":[{"enum":["noReasonGiven","budgetary","movingToCompetitors","lowCustomerSatisfaction","bankruptcy","acquisitionMerger"]},{"type":"null"}],"description":"The reason code for the cancellation. Absent when the subscription has not been canceled."},"isCancellationEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the cancellation procedure has been applied to this subscription."},"suspensionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date from which the subscription is or will be suspended. Absent when no suspension has been recorded. Format YYYY-MM-DD."},"suspensionReason":{"anyOf":[{"enum":["unpaidBalance","invalidPaymentMethod"]},{"type":"null"}],"description":"The reason code for the suspension. Absent when the subscription has not been suspended."},"isSuspensionEnabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the suspension process is enabled for this subscription."},"externalSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"annualRecurringRevenue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The annual recurring revenue, in the subscription's currency: the sum of annualRecurringRevenue across the lines that are active or suspended now."},"monthlyRecurringRevenue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The monthly recurring revenue, in the subscription's currency: the sum of monthlyRecurringRevenue across the lines that are active or suspended now."},"totalUserCount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The number of active users or seats across the subscription's active lines."},"prepaidBalance":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The prepaid balance remaining for this subscription, summed across the prepaid balances linked to it. The balance is a quantity, not a currency amount."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the subscription last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getPriceBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book."},"priceBookName":{"type":"string","description":"The display name of the price book, unique within the tenant and compared case-insensitively."},"priceBookNumber":{"type":"string","description":"The price book number, for example 'PB-000123'. Absent until a number range assigns one."},"description":{"type":"string","description":"A free-form description of the price book. Absent when none is set."},"active":{"type":"boolean","description":"Whether the price book is active and usable in transactions."},"isStandard":{"type":"boolean","description":"Whether this is the standard (default) price book. Only one price book is the standard at a time. It cannot be set through this API."},"dataSource":{"type":"string","description":"The source system that provided the price book data. Absent when none is set."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the price book was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the price book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","priceBookName","lastModifiedDate"]},"deleteSalesOrderShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted sales order shipment.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"searchFundTransferOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fund transfer."},"fundTransferNumber":{"type":"string","description":"The fund transfer number, for example 'FT-71122'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the fund transfer."},"description":{"type":"string","description":"A free-form description of the transfer."},"transferDate":{"type":"string","format":"date","description":"The date the money moved. Format YYYY-MM-DD."},"transferAmount":{"type":"string","format":"decimal","description":"The amount moved, in the transfer currency."},"currency":{"type":"string","description":"The transfer currency. Format ISO 4217, for example 'USD'. transferAmount is in this currency."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate applied when the two accounts are held in different currencies."},"isVoided":{"type":"boolean","description":"Whether the transfer has been voided. A voided transfer is kept for audit rather than deleted."},"isIntercompany":{"type":"boolean","description":"Whether the transfer moves money between two legal entities rather than between two accounts of one entity. When true, toEntityId names the receiving entity."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this transfer posted to, on GET accounting/journal-entries. Absent until the transfer has posted."},"origin":{"type":"string","description":"The system or process the transfer came from."},"externalUrl":{"type":"string","description":"An absolute http or https link to the source document in an external system."},"externalPaymentId":{"type":"string","description":"The identifier of this payment in the external system that initiated the transfer. It is not unique."},"fromAccountId":{"type":"string","description":"The general-ledger account the money left. See id on GET accounting/accounts/:id."},"fromAccountName":{"type":"string","description":"The name of the account the money left."},"toAccountId":{"type":"string","description":"The general-ledger account the money arrived in. See id on GET accounting/accounts/:id."},"toAccountName":{"type":"string","description":"The name of the account the money arrived in."},"entityId":{"type":"string","description":"The legal entity the transfer is posted under. On an intercompany transfer this is the sending entity. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the transfer is posted under."},"toEntityId":{"type":"string","description":"The receiving legal entity on an intercompany transfer. Absent on a same-entity transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of the receiving legal entity on an intercompany transfer."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fund transfer last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"accountType":{"type":"string","description":"Which side of the transfer this line is. Possible values: 'from', 'to'."},"description":{"type":"string","description":"A free-form description of the line."},"amount":{"type":"string","format":"decimal","description":"The line amount, in the line currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. It differs from the transfer currency only on a cross-currency transfer."},"bankFee":{"type":"string","format":"decimal","description":"The bank fee charged on this side of the transfer, in the line currency."}},"additionalProperties":false,"required":["id","accountType"]},"description":"The two sides of the transfer, one line per side. Read accountType to tell them apart rather than relying on order."}},"additionalProperties":false,"required":["id","transferDate","lastModifiedDate"]},"description":"The fund transfers on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchFundTransferInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the fund transfer with this identifier."},"fundTransferNumber":{"type":"string","description":"Limits results to the fund transfer with this number. The match is exact."},"journalEntryNumber":{"type":"string","description":"Limits results to fund transfers posted to the journal entry with this number. The match is exact."},"externalPaymentId":{"type":"string","description":"Limits results to fund transfers with this external payment identifier. It is not unique, so several transfers can match. The match is exact."},"fromAccountId":{"type":"string","description":"Limits results to transfers that left this general-ledger account. See id on GET accounting/accounts/:id."},"toAccountId":{"type":"string","description":"Limits results to transfers that arrived in this general-ledger account. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"Limits results to transfers posted under this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to transfers posted under the legal entity with this name. The match is exact and case-sensitive."},"isVoided":{"type":"boolean","description":"Limits results to voided transfers when true, and to live transfers when false. Omit to return both."},"isIntercompany":{"type":"boolean","description":"Limits results to intercompany transfers when true, and to same-entity transfers when false. Omit to return both."},"origin":{"type":"string","description":"Limits results to transfers with this origin. The match is exact."}},"additionalProperties":false,"description":"The filters to apply. A fund transfer must match every filter you send. Omit to return all fund transfers.","examples":[{"isVoided":false}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of fund transfers per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchAccountingProductsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product."},"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant."},"productNumber":{"type":"string","description":"The product number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"description":{"type":"string","description":"A description of the product shown to customers."},"internalDescription":{"type":"string","description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"type":"string","description":"The product's identifier in an external CRM system."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The date the product is no longer available. Format YYYY-MM-DD. Absent for a product with no end date."},"productFamily":{"type":"string","description":"The product family. Possible values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"The product type. Possible values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"productStatus":{"type":"string","description":"The product's availability status, computed by the system. Possible values: 'draft', 'available', 'unavailable', 'incomplete'. The status is derived from the product's lines, pricing, and effective dates and cannot be set directly."},"isInventory":{"type":"boolean","description":"Whether the product is tracked as inventory."},"itemIds":{"type":"array","items":{"type":"string"},"description":"The inventory items linked to this product. Used only when isInventory is true. Absent when the product has none. See id on GET inventory/items/:id."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the product record was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the product has none."}},"additionalProperties":false,"required":["id","productName","productCode","effectiveStartDate","lastModifiedDate"]},"description":"The products on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more products remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingProductsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"term":{"type":"string","description":"Limits results to products whose name, code or description contains this text. The match is case-insensitive."},"productCode":{"type":"string","description":"Limits results to the product with this product code. The match is exact."},"crmProductId":{"type":"string","description":"Limits results to the product with this CRM identifier. The match is exact."},"productStatus":{"type":"string","description":"Limits results to products with this status. Accepted values: 'draft', 'available', 'unavailable', 'incomplete'."},"productFamily":{"type":"string","description":"Limits results to products of this family. Accepted values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"Limits results to products of this type. Accepted values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"isInventory":{"type":"boolean","description":"Limits results to products with this inventory-tracking flag."},"effectiveStartDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound. Use format YYYY-MM-DD."},"end":{"type":"string","description":"The inclusive upper bound. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the date the product becomes available. Bounds are inclusive."},"effectiveEndDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound. Use format YYYY-MM-DD."},"end":{"type":"string","description":"The inclusive upper bound. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the date the product is no longer available. Bounds are inclusive. A product with no end date matches any lower bound."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the product last changed. Bounds are inclusive."},"entityId":{"type":"string","description":"Limits results to products visible to this legal entity: shared products and products assigned to it. See id on GET base/entities. An identifier that matches no entity returns an empty page, not an error."}},"additionalProperties":false,"description":"The filters to apply. A product must match every filter you send. Omit to return all products."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of products per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"listRefundsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the refund."},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'."},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD."},"approvalStatus":{"type":"string","description":"The approval status. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency of the refund. Every amount on it is in this currency. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency."},"unappliedAmount":{"type":"string","format":"decimal","description":"The unapplied balance remaining on the source payment, in the refund currency."},"refundNote":{"type":"string","description":"A free-form note attached to the refund. Absent when none was set."},"customerId":{"type":"string","description":"The customer receiving the refund. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer receiving the refund."},"entityId":{"type":"string","description":"The legal entity issuing the refund. See id on GET base/entities."},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id."},"paymentNumber":{"type":"string","description":"The number of the source payment being refunded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"description":"The refunds that match, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","refundNumber":"REF-1042","refundDate":"2026-08-01","approvalStatus":"approved","refundType":"ach","currency":"USD","amount":"150.00","unappliedAmount":"0.00","customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","customerName":"Northwind Traders","entityId":"1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45","paymentId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","paymentNumber":"PMT-7781","lastModifiedDate":"2026-08-01T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor input. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more refunds remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"getBankEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank entry."},"bankEntryNumber":{"type":"string","description":"The bank entry number. Absent until one has been assigned."},"name":{"type":"string","description":"The display name of the bank entry."},"description":{"type":"string","description":"A free-form description of the entry."},"transactionDate":{"type":"string","format":"date","description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD. Defaults to the transaction date where the entity's country requires a service date."},"currency":{"type":"string","description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"type":"string","description":"The reconciliation status of the entry. Possible values: 'matched', 'unmatched', 'voided', 'integrated'."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"type":"string","description":"A label for the source system the entry was created from."},"externalUrl":{"type":"string","description":"A link to the source document in an external system."},"bankAccountId":{"type":"string","description":"The bank general-ledger account this entry is recorded against. See id on GET accounting/accounts/:id."},"bankAccountName":{"type":"string","description":"The name of the bank general-ledger account."},"entityId":{"type":"string","description":"The legal entity this entry is posted under. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A free-form description of the line."},"lineType":{"type":"string","description":"The kind of line. Possible values: 'oneTime', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The gross line amount, including VAT, in the entry currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217. It always matches the entry currency."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the entry currency."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount on the line, in the entry currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%."},"origin":{"type":"string","description":"A label for the source system, copied onto the line from the entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. There is no endpoint for it."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to. Present only for a custom-dimension tag. See id on GET base/custom-dimensions."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. An older entry can carry tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags assigned to this line, departmentId and businessUnitId included. Set them with create or update."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. To read its schedule lines, pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted entry reads 'notStarted' until the entry posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id. Absent on a schedule that has no schedule lines yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far by the schedule lines whose journal entries are posted, in the entry currency. Zero until the first schedule line's journal entry is posted."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. To read the schedule lines, use GET accounting/amortization-schedule-lines and filter on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id","reportingTags"]},"description":"The posting lines of the entry, one per general-ledger posting. An empty array when the entry has none."}},"additionalProperties":false,"required":["id","transactionDate","status","lastModifiedDate"]},"voidJournalEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the voided journal entry."}},"additionalProperties":false,"required":["id"]},"voidJournalEntryInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"A free-form reason for voiding the journal entry. This reason will be saved as the entry's edit reason."}},"additionalProperties":false,"required":["voidReason"]},"createBankAccountOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bank account.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]}},"additionalProperties":false,"required":["id"]},"createBankAccountInput":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The account's identifier in the system that owns it, for example its IBAN or ACH account number. Must be unique within the tenant.","examples":["CH9300762011623852957"]},"accountId":{"type":"string","description":"The general-ledger account this bank account posts to. See id on GET accounting/accounts/:id.","examples":["d5397c8b-6d2b-47e9-83a3-712d9180711e"]},"reconciliationStartDate":{"type":"string","format":"date","description":"The date from which transactions on this account are reconciled. Use format YYYY-MM-DD.","examples":["2026-01-01"]},"paymentAllowed":{"type":"boolean","description":"Whether outbound payments may be made from this account.","examples":[true]},"financialInstitutionId":{"type":"string","description":"The financial institution holding the account. Omit when the account is not linked to one. There is no endpoint for it."},"currency":{"type":"string","description":"The account currency. Format ISO 4217, for example 'USD'.","examples":["CHF"]},"type":{"type":"string","description":"The kind of account, as free-form text. For example 'checking' or 'saving'.","examples":["checking"]},"reference":{"type":"string","description":"The IBAN or ACH account number. When referenceType is 'QRR' this must be a Swiss QR-IBAN.","examples":["CH4431999123000889012"]},"referenceType":{"type":"string","description":"How payment references on this account are structured. Accepted values: 'QRR', 'SCOR', 'NON'.","examples":["QRR"]},"referenceNumber":{"type":"string","description":"A structured creditor reference number for this account."},"receivableAccount":{"type":"boolean","description":"Whether the account may receive incoming payments. Defaults to false.","examples":[false]}},"additionalProperties":false,"required":["externalAccountId","accountId","reconciliationStartDate","paymentAllowed"]},"updateAccountingProductLineOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingProductLineInput":{"type":"object","properties":{"priceModel":{"type":"string","description":"How the product line is priced. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Omit to leave it unchanged. A value different from the current one fails with VALIDATION_FAILED when the product line has pricing, or when it has a paired 'usage' line (a 'prepaid' line, or a 'recurring' line priced 'thresholdBased')."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"name":{"type":"string","description":"The name of the product line. If you omit name, the current name is replaced with one generated from the product line's lineType."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Accepted values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Accepted values: 'allowNegative', 'overage'. 'allowNegative' lets the balance go negative and takes the shortfall from the new prepaid amount at renewal. 'overage' stops the balance at 0 and invoices further usage at the line's overage rate."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal."},"trueUpEstimationMethod":{"type":"string","description":"Makes a 'recurring' line a True-Up line: its quantity is an estimate, reconciled against uploaded usage each invoice period, and the difference is invoiced as an adjustment. Accepted value: 'startEstimate'. A True-Up line gets a paired 'usage' line, and pricing the True-Up line also prices that 'usage' line. The line must have a calculated invoiceFrequency ('monthly', 'biMonthly', 'quarterly', 'semiAnnually' or 'annually') and can't be priced 'thresholdBased'; otherwise the request fails with VALIDATION_FAILED."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."},"engine":{"type":"string","description":"The tax engine that computes this tax. Accepted values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."}},"additionalProperties":false,"required":["taxCode","entityId","engine"]},"description":"The full set of tax records for the product line. Sending productLineTaxes replaces the whole set, so pass every record that should stay. Send an empty array to remove every record. Omitting productLineTaxes also removes every record. Any update made while your tenant has no tax provider enabled removes every record too."}},"additionalProperties":false},"listPerformanceObligationProductsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this product mapping."},"productId":{"type":"string","description":"The mapped product. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product."},"productName":{"type":"string","description":"The name of that product."},"entityBookId":{"type":"string","description":"The entity book this mapping applies in. A product mapped in several entity books has one entry per book. See id on GET accounting/books/:bookId/entity-assignments."},"entityName":{"type":"string","description":"The name of the legal entity of that entity book."},"bookName":{"type":"string","description":"The name of the accounting book of that entity book."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this mapping applies. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this mapping applies. Format YYYY-MM-DD. Absent when the mapping is open-ended."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this mapping last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["effectiveStartDate","lastModifiedDate"]},"description":"The obligation's product mappings on this page, newest first. An empty array when the obligation maps no products."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more mappings remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"createBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created accounting book.","examples":["3f2a9c14-6d0b-4b8e-9f1a-2c7d5e8b9a10"]}},"additionalProperties":false,"required":["id"]},"createBookInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the accounting book. Must not be empty or blank. Names are not unique.","examples":["IFRS"]},"type":{"enum":["full","adjustment"],"description":"The kind of accounting book: 'full' or 'adjustment'. Defaults to 'full'. An adjustment book adjusts the full book named in baseBookId.","examples":["full"]},"accountingStandard":{"type":"string","description":"The accounting standard a full book follows, for example 'IFRS' or 'US GAAP': the name of an active, non-base accounting standard. Required on a full book. Rejected on an adjustment book, which copies it from its base book.","examples":["IFRS"]},"consolidation":{"type":"boolean","description":"Whether the book consolidates its legal entities. Full book only; defaults to false. Rejected on an adjustment book, which copies it from its base book.","examples":[false]},"baseBookId":{"type":"string","description":"The full book an adjustment book adjusts. Required on an adjustment book, rejected on a full book. See id on GET accounting/books/:id."},"allEntities":{"type":"boolean","description":"Whether every legal entity is assigned to the book. Defaults to false. When true, each legal entity is assigned with the properties it has in the book it is copied from, and the book cannot lose an entity afterwards. Non-legal reporting entities are not copied.","examples":[false]},"description":{"type":"string","description":"A free-form description of the accounting book.","examples":["Group reporting under IFRS"]},"exchangeRateGroupId":{"type":"string","description":"The exchange rate group the book takes its exchange rates from. Defaults to the tenant's default exchange rate group."}},"additionalProperties":false,"required":["name"]},"reverseJournalEntryOutput":{"type":"object","properties":{"reversalJournalEntryId":{"type":"string","description":"The unique identifier for the created reversal journal entry."}},"additionalProperties":false,"required":["reversalJournalEntryId"]},"reverseJournalEntryInput":{"type":"object","properties":{"reversalDate":{"type":"string","format":"date","description":"The posting date of the reversal entry. Use format YYYY-MM-DD. It must be on or after the original entry's posting date."},"reversalReason":{"type":"string","description":"The reason for the reversal. Accepted values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'. Any other value fails with INVALID_REVERSAL_REASON."},"reversalDescription":{"type":"string","description":"A free-form reversal description recorded on the original entry's header. Required unless reversalReason is 'other', which fails with REVERSAL_DESCRIPTION_REQUIRED."}},"additionalProperties":false,"required":["reversalDate","reversalReason"]},"taxConfigurationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax configuration."},"entityId":{"type":"string","description":"The legal entity this configuration belongs to. An entity has at most one tax configuration. See id on GET base/entities."},"status":{"enum":["Active","Inactive"],"description":"The status of the tax configuration. The tax codes of an inactive configuration are not offered on documents."},"taxRegime":{"enum":["EU_VAT","India_GST","Canada_GST","Ghana_VAT","SingleRate_GST","Mexico_IVA"],"description":"The tax system that determines which tax components are valid."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the tax configuration record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"invoicesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice."},"invoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice number, for example 'INV-1', unique within the tenant. Absent while none has been assigned."},"invoiceDate":{"type":"string","format":"date","description":"The date the invoice was issued. Format YYYY-MM-DD. Payment terms and the general ledger impact are both based on this date."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date payment falls due: the invoice date plus the payment term, or, for an invoice billed through a combined invoice, the combined invoice's due date. Format YYYY-MM-DD. Absent when no term has been resolved. An invoice is overdue on a date when this date is before it and an amount is still due; age by this date, never by invoiceDate."},"lastPaidDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the last payment applied to the invoice was received (its paymentDate), set only once invoiceStatus is 'paidInFull'. Format YYYY-MM-DD. Absent on an invoice that is not paid in full, including a partly paid one."},"invoiceStatus":{"anyOf":[{"enum":["unpaid","isOverdue","partiallyPaid","paidInFull","creditedInFull","disputed"]},{"type":"null"}],"description":"The payment status of the invoice, derived from its amounts and due date as they stand today (in the entity's time zone), so it can change overnight with no posting. The first matching value wins: 'disputed' (disputeStatus is 'disputed', whatever is paid); 'unpaid' (an amount due above zero equal to totalAmount, due date not passed); 'paidInFull' (nothing due, not all of it by credit); 'creditedInFull' (nothing due because totalCredited equals totalAmount); 'partiallyPaid' (part paid or credited, part due, due date not passed); 'isOverdue' (an amount due after the due date, even when part was paid). Absent when an amount is due but there is no due date, or when more was applied than is due. Approval plays no part, and a zero-amount invoice reads 'paidInFull'. For an earlier date, see totalAmountDue."},"approvalStatus":{"anyOf":[{"enum":["draft","pendingApproval","revise","approved","rejected"]},{"type":"null"}],"description":"The finance approval status of the invoice. Possible values: 'draft', 'pendingApproval', 'approved', 'revise', 'rejected'. Invoices have no approval step, so an invoice is 'approved' when it is created, by an invoice run, the import route or a migration load that sets no other value. Invoices created before this rule were set to 'approved' by the package's upgrade migration, which published no invoiceUpdated event. An invoice posts to the ledger and is owed whatever this value is, so it does not scope receivables, billings or revenue."},"deliveryStatus":{"anyOf":[{"enum":["toBeSent","delivered","read","created","failed"]},{"type":"null"}],"description":"How far the invoice has got in being sent to the customer."},"disputeStatus":{"anyOf":[{"enum":["disputed","chargedBack"]},{"type":"null"}],"description":"The dispute status of the invoice, set only when payments against it are under dispute."},"dataSource":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system the invoice record was imported from, for invoices that arrived through an integration or migration rather than being created in this system. For example 'NetSuite', 'Quickbooks', 'Stripe' or 'MigrationFile'. Absent on invoices created in this system."},"currency":{"type":"string","description":"The currency of the invoice. Format ISO 4217, for example 'USD'. It applies to every amount on the record, on the header and on every line."},"customerMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form message printed on the invoice for the customer."},"externalInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice's identifier in an external source system, kept for reconciliation. For identifiers owned by your other systems, prefer externalIdentifiers below."},"invoiceEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address of the business contact that receives this invoice."},"purchaseOrderOverride":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A manually entered PO number that overrides the sales-order-derived values in purchaseOrders."},"paymentTermDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days after the invoice date that payment falls due, resolved from the invoice's payment term. The term record itself is not published, only its day count."},"exchangeRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The rate used to convert the invoice's currency to the entity's currency (currency on entities). A book that keeps the entity in another functional currency does not use it. It is 1 when the invoice is in the entity's currency."},"excludeFromTaxEngine":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the invoice is left out of the tax engine. Derived from the sales order."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer the invoice is issued to. See id on GET accounting/customers/:id."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the customer, as it appears on the document."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number of the customer, unique within the tenant."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity issuing the invoice. See id on GET base/entities."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the issuing legal entity."},"salesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order the invoice was billed from. Absent on invoices created directly. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the source sales order. Present whenever salesOrderId is."},"subtotal":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount before taxes and discounts, in the invoice currency. Absent when no subtotal has been computed."},"totalTax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total tax across all lines, in the invoice currency."},"totalDutiesAndCustoms":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total duties and customs across all lines, in the invoice currency."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total invoiced, including taxes and duties, in the invoice currency. Late fees are not part of it; they are in totalLateFeeAmount."},"totalAmountDue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount still due on the invoice after every application recorded so far, in the invoice currency: totalAmount minus paymentsApplied, totalCredited and adjustments, plus totalLateFeeAmount. It goes below zero when more is applied than is due. For an earlier date, take totalAmount less the appliedAmount, earlyPaymentDiscount and smallBalanceWriteOffAmount of the payment applications and the appliedAmount of the credit memo applications on this invoiceId with appliedDate on or before it, plus totalLateFeeAmount. No public field dates a late fee, so that figure includes fees charged after the date."},"totalCredited":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total credited back against this invoice by credit memos, in the invoice currency."},"totalLateFeeAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total late fees charged on this invoice, in the invoice currency."},"lineDiscounts":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of discount amounts across all invoice lines, in the invoice currency."},"oneTimeDiscount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The one-time discount applied to the invoice as a whole, in the invoice currency."},"paymentsApplied":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount settled by payments so far, in the invoice currency."},"adjustments":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of small-balance write-offs and early-payment discounts recorded against this invoice, in the invoice currency."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the invoice record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateBookOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBookInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the accounting book. Must not be empty or blank. Omit to leave it unchanged.","examples":["IFRS (group)"]},"description":{"type":"string","description":"A free-form description of the accounting book. Omit to leave it unchanged; send an empty string to clear it.","examples":[""]},"allEntities":{"type":"boolean","description":"Whether the book is marked as assigned to all legal entities: none of its legal entities can be removed from it. Omit to leave it unchanged. Switching it on assigns no legal entity by itself; assign the missing ones with POST accounting/books/entity-assignments. The tenant's first book must keep it on."},"consolidation":{"type":"boolean","description":"Whether the book consolidates its legal entities. Full book only. Omit to leave it unchanged. A consolidating book requires every subsidiary of an assigned legal entity to be assigned too."},"accountingStandard":{"type":"string","description":"The accounting standard the book follows: the name of an active, non-base accounting standard. Full book only. Omit to leave it unchanged. Locked once the book has transactions."},"exchangeRateGroupId":{"type":"string","description":"The exchange rate group the book takes its exchange rates from. Omit to leave it unchanged. Locked once the book has transactions."}},"additionalProperties":false},"updateEntityOutput":{"type":"object","properties":{},"additionalProperties":false},"updateEntityInput":{"type":"object","properties":{"entityName":{"type":"string","description":"The name of the entity. At most 120 characters; must be unique within the tenant. Omit to leave unchanged."},"status":{"enum":["active","inactive"],"description":"The lifecycle status to move the entity to: 'active' activates a created entity, 'inactive' deactivates an active one (with endDate). Sending the entity's current status changes nothing. An inactive entity's end date cannot be moved. Omit to leave unchanged.","examples":["active"]},"parentEntityId":{"type":"string","description":"The parent entity in the hierarchy. Cannot be the entity itself or one of its descendants, and cannot change once the entity has a chart of accounts in a book. It cannot be cleared. Not accepted on a non-legal reporting entity, which is always top-level (FIELD_NOT_ALLOWED); a legal entity may name a non-legal reporting entity as its parent. Omit to leave unchanged. See id on GET base/entities/:id."},"currency":{"type":"string","description":"The entity's functional currency. Format ISO 4217, for example 'USD'. A code outside the supported currencies fails with INVALID_FIELD_VALUE. Locked once the entity has transactions. When multi-book is off and the entity has a book assignment, only that book's currency is accepted. Cannot be cleared. Omit to leave unchanged."},"timeZone":{"type":"string","description":"The time zone the entity operates in. Format IANA time-zone name, for example 'Europe/Berlin'. An unknown zone fails with INVALID_FIELD_VALUE. Cannot be cleared. Omit to leave unchanged."},"country":{"type":"string","description":"The country the entity is registered in. Format ISO 3166-1 alpha-2, for example 'US'. An unknown code fails with INVALID_FIELD_VALUE. Send an empty string to clear it. Omit to leave unchanged."},"entityCode":{"type":"string","description":"A short code for the entity, separate from its entityNumber. Send an empty string to clear it. Omit to leave unchanged."},"localeCode":{"type":"string","description":"The locale for documents sent from this entity. Format BCP 47, for example 'en-US'. A locale the tenant does not offer fails with INVALID_FIELD_VALUE. Send an empty string to clear it. Omit to leave unchanged."},"startDate":{"type":"string","format":"date","description":"The date the entity becomes effective. Format YYYY-MM-DD. Cannot be before the parent's start date or after a child's, and cannot be in the future on an active entity (DATE_CONFLICT). Postponing it fails when records before the new date depend on the entity. Omit to leave unchanged.","examples":["2026-01-01"]},"endDate":{"type":"string","format":"date","description":"The date the entity stops being effective. Format YYYY-MM-DD. Accepted only when deactivating an active entity (status 'inactive'). Must be on or after startDate, on or before the parent's end date, and on or after every child's end date."},"registeredAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line. Cannot be cleared. Omit to leave unchanged."},"line2":{"type":"string","description":"The second address line. Send an empty string to clear it. Omit to leave unchanged."},"city":{"type":"string","description":"The city or locality. Cannot be cleared. Omit to leave unchanged."},"stateProvince":{"type":"string","description":"The state, province, or region. Send an empty string to clear it. Omit to leave unchanged."},"country":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'US'. An unknown code fails with INVALID_FIELD_VALUE. Cannot be cleared. Omit to leave unchanged."},"zipCode":{"type":"string","description":"The postal or ZIP code. Cannot be cleared. Omit to leave unchanged."}},"additionalProperties":false,"description":"Changes to the registered address. Only the sub-fields you send change. Omit to leave the address unchanged."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier."},"value":{"type":"string","description":"The identifier as the source system holds it. Cannot be empty."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Anything else fails with INVALID_FIELD_VALUE."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. A fieldName the entity already has fails with DUPLICATE_EXTERNAL_IDENTIFIER. List the configured fieldNames on GET base/entity-external-identifier-fields; any other fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the entry to rewrite."},"value":{"type":"string","description":"The identifier as the source system holds it. Cannot be empty."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Anything else fails with INVALID_FIELD_VALUE. Send an empty string to clear the stored link. Omit to keep it."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to rewrite, matched by fieldName. A fieldName the entity does not have fails with EXTERNAL_IDENTIFIER_NOT_FOUND."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove. A fieldName the entity does not have fails with EXTERNAL_IDENTIFIER_NOT_FOUND. An entry whose configuration was retired can still be removed."}},"additionalProperties":false},"getPerformanceObligationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the performance obligation."},"performanceObligationNumber":{"type":"string","description":"The performance obligation number. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the performance obligation, as it appears on revenue contracts and schedules."},"description":{"type":"string","description":"A free-form description of what the obligation covers. Absent when none is set."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this obligation is in effect. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this obligation is in effect. Format YYYY-MM-DD. Absent when the obligation is open-ended."},"allocationStartDate":{"type":"string","format":"date","description":"The date from which revenue for this obligation takes part in allocation. Format YYYY-MM-DD. Absent when none is set."},"isAllocationExcluded":{"type":"boolean","description":"Whether the revenue contract lines of this obligation are left out of fair-value allocation."},"isNetAccounting":{"type":"boolean","description":"Whether the obligation is accounted net rather than gross."},"defaultAmortizationMethod":{"type":"string","description":"The default amortization method used when scheduling this obligation's revenue. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"standaloneSellingPriceRangeType":{"type":"string","description":"How the obligation's standalone selling price ranges are expressed. Possible values: 'percentage', 'amount'."},"revenueSchedulingTemplateId":{"type":"string","description":"The unique identifier for the revenue scheduling template that schedules this obligation's revenue. See id on GET accounting/revenue-scheduling-templates/:id."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template that schedules this obligation's revenue."},"standaloneSellingPriceStratificationConfigurationId":{"type":"string","description":"The unique identifier for the standalone selling price stratification configuration this obligation stratifies by. Absent when none is set. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the performance obligation last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"standaloneSellingPriceRanges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the standalone selling price range."},"rangeNumber":{"type":"string","description":"The standalone selling price range number."},"rangeType":{"type":"string","description":"How this range is expressed. Possible values: 'percentage', 'amount'."},"currency":{"type":"string","description":"The currency the amounts are given in. Format ISO 4217, for example 'USD'. Absent on a percentage range."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this range applies. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this range applies. Format YYYY-MM-DD. Absent when the range is open-ended."},"lowAmount":{"type":"string","format":"decimal","description":"The lower bound of the standalone selling price, in the range currency. Set on an amount range."},"midAmount":{"type":"string","format":"decimal","description":"The midpoint of the standalone selling price, in the range currency. Set on an amount range."},"highAmount":{"type":"string","format":"decimal","description":"The upper bound of the standalone selling price, in the range currency. Set on an amount range."},"lowPercentage":{"type":"string","format":"decimal","description":"The lower bound of the standalone selling price, as a percentage of list price. Set on a percentage range."},"midPercentage":{"type":"string","format":"decimal","description":"The midpoint of the standalone selling price, as a percentage of list price. Set on a percentage range."},"highPercentage":{"type":"string","format":"decimal","description":"The upper bound of the standalone selling price, as a percentage of list price. Set on a percentage range."},"term":{"type":"string","description":"The period the range's prices are quoted over. Possible values: 'monthly', 'annually', 'none'."},"unitOfMeasure":{"type":"string","description":"The unit the range's prices are quoted per."},"productId":{"type":"string","description":"The product this range prices. Absent on a range that applies to the whole obligation. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product."},"productName":{"type":"string","description":"The name of that product."}},"additionalProperties":false,"required":["effectiveStartDate"]},"description":"The obligation's standalone selling price ranges, one per product and effective period. An empty array when none are configured. Which of the amount and percentage fields are set follows each range's rangeType."}},"additionalProperties":false,"required":["id","name","effectiveStartDate","isAllocationExcluded","isNetAccounting","lastModifiedDate"]},"listAccountingSalesReturnsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"salesReturnNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The RMA number, for example 'SR-1'. Absent while none has been assigned."},"status":{"anyOf":[{"enum":["draft","submitted","received","approved","completed","cancelled","rejected"]},{"type":"null"}],"description":"The lifecycle status of the sales return."},"returnType":{"enum":["credit","replacement"],"description":"The resolution path for the return. It cannot be changed once status moves past 'draft'."},"returnDate":{"type":"string","format":"date","description":"The transaction date for the return. Format YYYY-MM-DD."},"salesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order this return is against. A sales return is always against exactly one sales order. See id on GET accounting/sales-orders/:id."},"currency":{"type":"string","description":"The currency of every amount on this record and its lines. Format ISO 4217, for example 'USD'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the sales return last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getChartOfAccountsOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the chart of accounts."},"name":{"type":"string","description":"The display name of the chart of accounts."},"accountNumbering":{"type":"string","description":"How account numbers are assigned within this chart of accounts. Possible values: 'hierarchical' (numbers follow the account's position in the hierarchy), 'manual' (numbers are assigned by hand)."},"accountNumberingDigits":{"type":"string","description":"The total width of an account number, which caps how deep the hierarchy can go. Possible values: 'sixDigits' (up to 4 levels), 'sevenDigits' (5), 'eightDigits' (6), 'nineDigits' (7), 'tenDigits' (8). Absent when no width was set. A width and the numbering strategy are independent, so check this field directly rather than inferring it from accountNumbering."},"description":{"type":"string","description":"A free-form description of the chart of accounts. Absent when none was set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the chart-of-accounts record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","accountNumbering","lastModifiedDate"]},"runFinancialStatementOutput":{"type":"object","properties":{"statementId":{"type":"string","description":"The statement template that produced this report, echoing the statementId input."},"statementName":{"type":"string","description":"The template's configured name."},"statementType":{"type":"string","description":"The reporting standard and statement kind of the template that ran. Possible values: 'generic', 'coaIncomeStatement', 'coaBalanceSheet', 'gaapIncomeStatement', 'gaapBalanceSheet', 'cashFlow', 'hgbIncomeStatement', 'hgbBalanceSheet', 'ifrsStatementOfProfitOrLoss', 'ifrsStatementOfFinancialPosition', 'ifrsStatementOfOtherComprehensiveIncome', 'sfrsStatementOfProfitOrLoss', 'sfrsStatementOfFinancialPosition', 'sfrsStatementOfOtherComprehensiveIncome'."},"data":{"$ref":"#/components/schemas/UnknownValue","description":"The computed report, produced by the statement calculation. It has no fixed schema: the shape depends on the template's type and on splitBy. Expect a hierarchy of statement lines with their computed amounts per column, and account-level detail rows are always present, so you can aggregate or drill down. Treat unfamiliar fields as data rather than an error."}},"additionalProperties":false,"required":["statementId","statementName","statementType","data"]},"runFinancialStatementInput":{"type":"object","properties":{"statementId":{"type":"string","description":"The configured statement template to run. A template that has been deleted is reported as STATEMENT_NOT_FOUND. This API has no endpoint that lists the templates."},"entityId":{"type":"string","description":"The entity to report on. When consolidated is false, this is the reporting entity on its own. When true, this is the consolidating parent and the report covers its whole hierarchy. Exactly one entity per request. See id on GET base/entities."},"bookId":{"type":"string","description":"The accounting book to report from. It must belong to entityId. A book that belongs to another entity is reported as BOOK_NOT_FOUND. Exactly one book per request, because amounts from different books are not comparable. See id on GET accounting/books/:id."},"periodIds":{"type":"array","items":{"type":"string"},"description":"The accounting periods to report over, at least one. Period names are not accepted, because their format varies per fiscal calendar. The periods need not be contiguous, and how they become columns depends on the template and on splitBy. See id on GET accounting/accounting-periods/:id."},"consolidated":{"type":"boolean","description":"Whether to report the consolidated statement for entityId and every entity beneath it, with amounts translated into the parent's currency. When false, only this entity is reported, with no translation. Defaults to false."},"splitBy":{"enum":["month","quarter","year","entity","department","aggregatedDepartment","businessUnit","vendor","customer"],"description":"Adds a further column split to the report, beyond the periods it reports over. Omit for the plain statement with no split. The time splits 'month', 'quarter' and 'year' subdivide the requested periods. The dimension splits break each figure out by that dimension, such as entity, department, business unit, vendor or customer. 'entity' is meaningful only when consolidated is true. 'aggregatedDepartment' rolls the department hierarchy up to its top level, where 'department' keeps each department on its own."}},"additionalProperties":false,"required":["statementId","entityId","bookId","periodIds"]},"UnknownScalar":{"type":["string","number","boolean"]},"UnknownArray":{"type":"array","items":{"$ref":"#/components/schemas/UnknownValue"}},"UnknownObject":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UnknownValue"}},"UnknownValue":{"oneOf":[{"$ref":"#/components/schemas/UnknownScalar"},{"$ref":"#/components/schemas/UnknownArray"},{"$ref":"#/components/schemas/UnknownObject"}]},"revenueSchedulingTemplatesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue scheduling template."},"revenueSchedulingTemplateNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The template number, unique within the tenant, for example 'RST-0007'. Absent while none has been assigned."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template."},"revenueRecognitionPattern":{"enum":["upfront","overTime","asDelivered","asConsumed"],"description":"How revenue is recognized under this template."},"revenueSchedulingEvent":{"enum":["revenueArrangementCreation","uponInvoicing","uponUsageConsumption","manualRelease","uponInvoicingPercentInvoiced","uponInvoicingFullAmount","serviceActivation"],"description":"The event that creates a revenue plan under this template."},"amortizationMethod":{"anyOf":[{"enum":["exactDays","pointInTime","straightLineProRateFirstLast","straightLine","usageBased"]},{"type":"null"}],"description":"How the scheduled amount is spread over the plan's periods. Absent when the recognition pattern does not spread revenue over time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue scheduling template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"paymentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment."},"paymentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment number, unique within the tenant. A human-readable reference used for reconciliation."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The payment method."},"currency":{"type":"string","description":"The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'."},"paymentAccountCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the bank account the payment was received into. Present only when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The rate used to convert the payment currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount paid, in the payment currency."},"appliedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion applied so far, in the payment currency: the sum of the payment's applications to invoices, debit memos and manual taxable documents, whatever their appliedDate. For an earlier date, sum only the applications dated on or before it."},"unappliedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion not yet applied, in the payment currency. unappliedAmount = amount - appliedAmount - refundAmount. For an earlier date, subtract only the payment applications and the approved refunds (listRefunds) dated on or before it."},"refundAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion refunded through approved refunds, in the payment currency."},"bankFeeAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The bank fee deducted from the payment, in the payment currency."},"smallBalanceWriteOffAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total written off as a small residual balance across the payment's applications, in the payment currency."},"totalEarlyPaymentDiscount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total early-payment discount granted across the payment's applications, in the payment currency."},"customerPaymentStatus":{"anyOf":[{"enum":["appliedInFull","partiallyApplied","unapplied","partiallyRefunded","refunded","disputed","chargedBack"]},{"type":"null"}],"description":"The derived lifecycle status of the payment; the first match wins: 'disputed' or 'chargedBack' (from its dispute status); then, with nothing left unapplied, 'appliedInFull' (some of it was applied) or 'refunded' (none applied, some refunded); otherwise 'partiallyApplied' (some applied), 'partiallyRefunded' (none applied, some refunded) or 'unapplied'."},"disputeStatus":{"anyOf":[{"enum":["disputed","chargedBack"]},{"type":"null"}],"description":"The dispute state of the payment. Absent on an undisputed payment."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer the payment came from."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer of record the payment belongs to."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that received the payment."},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the ledger account the payment was posted to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"bulkUpdateAccountsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkUpdateAccountsInput":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the account to update."},"accountNumber":{"type":"string","description":"The new account number, unique within its chart of accounts. Only with manual numbering; with hierarchical numbering the number follows the parent account. Omit to leave unchanged."},"accountName":{"type":"string","description":"The new display name. Omit to leave unchanged."},"accountType":{"type":"string","description":"The new top-level classification. Accepted values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'. Locked once the account or one of its descendants has postings. A grouping account passes the new type to its descendants, and is refused with INVALID_FIELD_VALUE while a descendant posting account has a sub-type that does not belong to the new type. Omit to leave unchanged."},"accountSubType":{"type":"string","description":"The new sub-type, for posting accounts only. Accepted values per accountType: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset' (asset); 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability' (liability); 'equity', 'otherComprehensiveIncome' (equity); and the sub-type named like the type for 'income', 'costOfGoodsSold', 'expense', 'otherIncome' and 'otherExpense'. Locked once the account has postings. Switching to 'bank' or 'creditCard' needs entityId and currency, and is refused with FIELD_NOT_ALLOWED on elimination while the account has elimination true, unless the request also sends elimination false. Switching away from 'bank' or 'creditCard' drops the account's entityId and currency, and is refused with FIELD_NOT_ALLOWED on payOnBehalf while payOnBehalf is true, unless the request also sends payOnBehalf false. Omit to leave unchanged."},"description":{"type":"string","description":"The new description. Omit to leave unchanged."},"chartOfAccountsId":{"type":"string","description":"The account's chart of accounts. It cannot change: accepted only when it names the current one. Omit to leave unchanged."},"parentAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new parent grouping account, in the same chart of accounts with the same accountType, and not the account itself or one of its descendants. Pass null to move the account to the top level (not allowed for a posting account under hierarchical numbering). Omit to leave unchanged."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping account. It cannot change: accepted only when it matches the stored value. Omit to leave unchanged."},"entityId":{"type":"string","description":"The new legal entity of a 'bank' or 'creditCard' account, assigned to the chart of accounts. Locked once the account has postings. Omit to leave unchanged."},"currency":{"type":"string","description":"The new currency of a 'bank' or 'creditCard' account. Format ISO 4217. Locked once the account has postings. Omit to leave unchanged."},"payOnBehalf":{"type":"boolean","description":"Whether this account takes part in pay-on-behalf accounting. true is only allowed on 'bank' and 'creditCard' accounts of a legal entity that has subsidiaries or a parent entity. Omit to leave unchanged."},"elimination":{"type":"boolean","description":"Whether this account is eliminated during consolidation. true is not allowed on grouping, 'bank' or 'creditCard' accounts. Locked once the account has postings. Omit to leave unchanged."},"revaluationMode":{"type":"string","description":"Which revaluation results this account recognizes. Accepted values: 'recognizeAll' (both unrealized gains and unrealized losses), 'recognizeAllButUnrealizedGains' (only unrealized losses), 'none' (the account is not revalued). Posting accounts only. Once the account has postings it may move between the two recognizing modes but not to or from 'none'. Which modes an account can take depends on its sub-type, on a bank or credit-card account's currency against its book's currency, and on the accounting standard of the chart's book; a mode the account cannot take is rejected with INVALID_FIELD_VALUE, whose allowedValues lists the modes it can take, never replaced. Omit to leave unchanged."},"accountStatus":{"type":"string","description":"The new status, posting accounts only. Accepted values: 'enabled', 'disabled'. A disabled account accepts a request only when it sets 'enabled'. Disabling unlinks the bank accounts that post to the account. Sending 'disabled' alone for an account that is already disabled changes nothing and succeeds. Omit to leave unchanged."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. GET accounting/account-external-identifier-fields lists the accepted keys."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system; anything else is rejected with INVALID_FIELD_VALUE. Omit to leave none."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. Rejected with DUPLICATE_EXTERNAL_IDENTIFIER when the account already has the fieldName."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. GET accounting/account-external-identifier-fields lists the accepted keys."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An absolute http(s) link to the object in the source system; anything else is rejected with INVALID_FIELD_VALUE. Omit to keep the stored link; send null to remove it."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to rewrite, matched by fieldName. Rejected with EXTERNAL_IDENTIFIER_NOT_FOUND when the account does not have the fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"fieldNames of the external identifiers to remove. Rejected with EXTERNAL_IDENTIFIER_NOT_FOUND when the account does not have one."}},"additionalProperties":false,"required":["id"]},"description":"The accounts to update, each the same object PATCH accounting/accounts/:id takes plus its id. Each account may appear once. At most 100 rows; more fails with TOO_MANY_ACCOUNTS. If any row is invalid, nothing is changed.","examples":[[{"id":"7d3c2b1a-9e8f-4d6c-b5a4-3e2f1d0c9b8a","accountName":"Prepaid Insurance (Annual)"},{"id":"2b4d6f80-1a3c-4e5f-8a9b-c0d1e2f3a4b5","accountStatus":"disabled"}]]}},"additionalProperties":false,"required":["accounts"]},"unapplyPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"unapplyPaymentInput":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to unapply the payment from. See id on GET accounting/invoices/:id."},"amount":{"type":"string","format":"decimal","description":"The amount to unapply from this invoice, in the payment currency. Must be greater than 0."},"unappliedDate":{"type":"string","format":"date","description":"The date the reversal is recognized. Use format YYYY-MM-DD."},"earlyPaymentDiscount":{"type":"string","format":"decimal","description":"The early-payment discount to reverse for this invoice, in the payment currency."},"smallBalanceWriteOffAmount":{"type":"string","format":"decimal","description":"The small-balance write-off amount to reverse for this invoice, in the payment currency."}},"additionalProperties":false,"required":["invoiceId","amount","unappliedDate"]},"description":"The per-invoice amounts to unapply from the payment."}},"additionalProperties":false,"required":["invoices"]},"searchInvoiceOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice."},"invoiceNumber":{"type":"string","description":"The invoice number, for example 'INV-1', unique within the tenant. Absent while none has been assigned."},"invoiceDate":{"type":"string","format":"date","description":"The date the invoice was issued. Format YYYY-MM-DD. Payment terms and the general ledger impact are both based on this date."},"dueDate":{"type":"string","format":"date","description":"The date payment falls due: the invoice date plus the payment term, or, for an invoice billed through a combined invoice, the combined invoice's due date. Format YYYY-MM-DD. Absent when no term has been resolved. An invoice is overdue on a date when this date is before it and an amount is still due; age by this date, never by invoiceDate."},"lastPaidDate":{"type":"string","format":"date","description":"The date the last payment applied to the invoice was received (its paymentDate), set only once invoiceStatus is 'paidInFull'. Format YYYY-MM-DD. Absent on an invoice that is not paid in full, including a partly paid one."},"invoiceStatus":{"type":"string","description":"The payment status of the invoice, derived from its amounts and due date as they stand today (in the entity's time zone), so it can change overnight with no posting. The first matching value wins: 'disputed' (disputeStatus is 'disputed', whatever is paid); 'unpaid' (an amount due above zero equal to totalAmount, due date not passed); 'paidInFull' (nothing due, not all of it by credit); 'creditedInFull' (nothing due because totalCredited equals totalAmount); 'partiallyPaid' (part paid or credited, part due, due date not passed); 'isOverdue' (an amount due after the due date, even when part was paid). Absent when an amount is due but there is no due date, or when more was applied than is due. Approval plays no part, and a zero-amount invoice reads 'paidInFull'. For an earlier date, see totalAmountDue."},"approvalStatus":{"type":"string","description":"The finance approval status of the invoice. Possible values: 'draft', 'pendingApproval', 'approved', 'revise', 'rejected'. Invoices have no approval step, so an invoice is 'approved' when it is created, by an invoice run, the import route or a migration load that sets no other value. Invoices created before this rule were set to 'approved' by the package's upgrade migration, which published no invoiceUpdated event. An invoice posts to the ledger and is owed whatever this value is, so it does not scope receivables, billings or revenue."},"deliveryStatus":{"type":"string","description":"How far the invoice has got in being sent to the customer. Possible values: 'created', 'toBeSent', 'delivered', 'read', 'failed'."},"disputeStatus":{"type":"string","description":"The dispute status of the invoice, set only when payments against it are under dispute. Possible values: 'disputed', 'chargedBack'."},"dataSource":{"type":"string","description":"The system the invoice record was imported from, for invoices that arrived through an integration or migration rather than being created in this system. For example 'NetSuite', 'Quickbooks', 'Stripe' or 'MigrationFile'. Absent on invoices created in this system."},"currency":{"type":"string","description":"The currency of the invoice. Format ISO 4217, for example 'USD'. It applies to every amount on the record, on the header and on every line."},"customerMessage":{"type":"string","description":"A free-form message printed on the invoice for the customer."},"externalInvoiceId":{"type":"string","description":"The invoice's identifier in an external source system, kept for reconciliation. For identifiers owned by your other systems, prefer externalIdentifiers below."},"customerId":{"type":"string","description":"The customer the invoice is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer, as it appears on the document."},"customerNumber":{"type":"string","description":"The customer number of the customer, unique within the tenant."},"entityId":{"type":"string","description":"The legal entity issuing the invoice. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"salesOrderId":{"type":"string","description":"The sales order the invoice was billed from. Absent on invoices created directly. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"type":"string","description":"The number of the source sales order. Present whenever salesOrderId is."},"billToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address record. Absent when none is set."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The bill-to address the invoice is sent to. Absent when the invoice references no bill-to record."},"soldToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address record. Absent when none is set."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The sold-to address the product or service was delivered to, used for tax determination. Absent when the invoice references no sold-to record."},"invoiceEmail":{"type":"string","description":"The email address of the business contact that receives this invoice."},"purchaseOrders":{"type":"array","items":{"type":"string"},"description":"The purchase order references the customer supplied, derived from the sales order. These are the customer's own document numbers. An empty array when none were supplied."},"purchaseOrderOverride":{"type":"string","description":"A manually entered PO number that overrides the sales-order-derived values in purchaseOrders."},"paymentTermDays":{"type":"number","description":"The number of days after the invoice date that payment falls due, resolved from the invoice's payment term. The term record itself is not published, only its day count."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the invoice's currency to the entity's currency (currency on entities). A book that keeps the entity in another functional currency does not use it. It is 1 when the invoice is in the entity's currency."},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the invoice is left out of the tax engine. Derived from the sales order."},"subtotal":{"type":"string","format":"decimal","description":"The amount before taxes and discounts, in the invoice currency. Absent when no subtotal has been computed."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the invoice currency."},"totalDutiesAndCustoms":{"type":"string","format":"decimal","description":"The total duties and customs across all lines, in the invoice currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total invoiced, including taxes and duties, in the invoice currency. Late fees are not part of it; they are in totalLateFeeAmount."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount still due on the invoice after every application recorded so far, in the invoice currency: totalAmount minus paymentsApplied, totalCredited and adjustments, plus totalLateFeeAmount. It goes below zero when more is applied than is due. For an earlier date, take totalAmount less the appliedAmount, earlyPaymentDiscount and smallBalanceWriteOffAmount of the payment applications and the appliedAmount of the credit memo applications on this invoiceId with appliedDate on or before it, plus totalLateFeeAmount. No public field dates a late fee, so that figure includes fees charged after the date."},"totalCredited":{"type":"string","format":"decimal","description":"The total credited back against this invoice by credit memos, in the invoice currency."},"totalLateFeeAmount":{"type":"string","format":"decimal","description":"The total late fees charged on this invoice, in the invoice currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of discount amounts across all invoice lines, in the invoice currency."},"oneTimeDiscount":{"type":"string","format":"decimal","description":"The one-time discount applied to the invoice as a whole, in the invoice currency."},"paymentsApplied":{"type":"string","format":"decimal","description":"The amount settled by payments so far, in the invoice currency."},"adjustments":{"type":"string","format":"decimal","description":"The sum of small-balance write-offs and early-payment discounts recorded against this invoice, in the invoice currency."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the invoice record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice line."},"invoiceLineNumber":{"type":"string","description":"The sequential line number within the invoice."},"description":{"type":"string","description":"The line description, as shown to the customer."},"lineType":{"type":"string","description":"The kind of charge the line is. Possible values: 'recurring', 'oneTime', 'oneTimeDiscount', 'usageOverage', 'overage', 'payAsYouGo', 'commit', 'lateFee', 'creditCardProcessingFee', 'billableTime', 'billablePassThrough', 'billableTravelExpense'."},"productId":{"type":"string","description":"The billed product. Set only on lines created from a product reference, absent on free-text lines. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The product code as it stood when the line was created. A snapshot, so it does not follow later changes to the product."},"productDescription":{"type":"string","description":"The product description as it stood when the line was created. A snapshot, as with productCode."},"quantity":{"type":"string","format":"decimal","description":"The quantity billed. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'each', 'hour' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit actually charged, in the invoice currency."},"listPrice":{"type":"string","format":"decimal","description":"The undiscounted list price per unit, in the invoice currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax and duties, in the invoice currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount granted on the line, in the invoice currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount granted on the line as a percentage. A rate, not an amount, so it has no currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the invoice currency."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs charged on the line, in the invoice currency."},"amount":{"type":"string","format":"decimal","description":"The total billed for the line, including tax and duties, in the invoice currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The line's amount less the full amount of every credit memo line raised against it, applied or not, in the invoice currency. Payments are not deducted here: what is still to collect on the invoice is its totalAmountDue."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the invoice, each billing one product or free-text item. An empty array when the invoice has no lines. All line amounts are in the invoice currency."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a stable camelCase slug such as 'netsuiteInvoiceId', not the human-readable label. It must match an active external-identifier configuration for invoices."},"value":{"type":"string","description":"The identifier as the source system stores it."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the originating system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by your other systems. At most one entry per fieldName. An empty array when the invoice has none."}},"additionalProperties":false,"required":["id","invoiceDate","currency","customerId","entityId","lastModifiedDate"]},"description":"The invoices on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchInvoiceInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the invoice with this id."},"invoiceNumber":{"type":"string","description":"Limits results to the invoice with this invoice number, for example 'INV-1'. The match is exact."},"customerId":{"type":"string","description":"Limits results to invoices issued to this customer, given as the customer id. An id that matches no customer matches no invoice."},"customerName":{"type":"string","description":"Limits results to invoices whose customer name contains this text. The match is case-insensitive."},"customerNumber":{"type":"string","description":"Limits results to invoices issued to the customer with this customer number. The match is exact."},"entityId":{"type":"string","description":"Limits results to invoices issued by this legal entity, given as the entity id. An id that matches no entity matches no invoice."},"entityName":{"type":"string","description":"Limits results to invoices whose issuing legal entity's name contains this text. The match is case-insensitive."},"salesOrderId":{"type":"string","description":"Limits results to invoices billed from this sales order, given as the sales order id. An id that matches no sales order matches no invoice."},"salesOrderNumber":{"type":"string","description":"Limits results to invoices billed from the sales order with this number. The match is exact."},"invoiceStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to invoices in any of these settlement statuses. Accepted values: 'unpaid', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'isOverdue', 'disputed'. Any other value matches no invoice. An empty array does not constrain."},"approvalStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to invoices in any of these approval statuses. Accepted values: 'draft', 'pendingApproval', 'approved', 'revise', 'rejected'. Any other value matches no invoice. An empty array does not constrain."},"deliveryStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to invoices in any of these delivery statuses. Accepted values: 'created', 'toBeSent', 'delivered', 'read', 'failed'. Any other value matches no invoice. An empty array does not constrain."},"disputeStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to invoices in any of these dispute statuses. Accepted values: 'disputed', 'chargedBack'. Any other value matches no invoice. An empty array does not constrain."},"customerMessage":{"type":"string","description":"Limits results to invoices whose customer message contains this text. The match is case-insensitive."},"billToAddress":{"type":"string","description":"Limits results to invoices whose bill-to address contains this text across line1, line2, city, stateProvince and zipCode. The match is case-insensitive. Country is excluded, because it is an ISO code and a short term would match every address in the country."},"soldToAddress":{"type":"string","description":"Limits results to invoices whose sold-to address contains this text across line1, line2, city, stateProvince and zipCode. The match is case-insensitive. Country is excluded, as with billToAddress."},"invoiceEmail":{"type":"string","description":"Limits results to invoices with this billing email. The match is exact and case-sensitive."},"purchaseOrderOverride":{"type":"string","description":"Limits results to invoices with this PO override. The match is exact."},"externalInvoiceId":{"type":"string","description":"Limits results to invoices with this identifier in an external source system. The match is exact."},"invoiceDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to invoices whose invoiceDate falls within these bounds. Omit either bound to leave that side open."},"dueDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to invoices whose dueDate falls within these bounds. Omit either bound to leave that side open. An aging report is this filter with an open lower bound."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to invoices changed within this window, for polling an incremental sync. Omit either bound to leave that side open."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a stable camelCase slug such as 'netsuiteInvoiceId', not the human-readable label. It must match an active external-identifier configuration for invoices, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system stores it. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Matches one identifier owned by another system. Both members are required, because a fieldName on its own would match every value stored under that key. Several invoices may share one value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. An invoice must match every filter you send. Omit to return all invoices."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of invoices per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"updateCreditCardEntryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateCreditCardEntryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the entry is posted under. See id on GET base/entities."},"creditCardAccountId":{"type":"string","description":"The general-ledger account behind the credit card account this entry posts against. See id on GET accounting/accounts/:id."},"transactionDate":{"type":"string","format":"date","description":"The date the transaction took place. Use format YYYY-MM-DD. Changing it re-resolves the posting period."},"currency":{"type":"string","description":"The currency of the entry. Format ISO 4217, for example 'USD'. When supplied it must match the account's currency."},"status":{"type":"string","description":"The reconciliation status. Accepted values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'."},"name":{"type":"string","description":"A short name for the entry.","examples":["February bank fees — revised"]},"description":{"type":"string","description":"A free-form description of the entry."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD."},"origin":{"type":"string","description":"The system or process the entry originated from."},"externalUrl":{"type":"string","description":"A link to the entry in the originating system."},"createLines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage or taxCodeId is supplied. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. It must differ from the entry's entity, cross charging must be set up for both entities, and the line must not be prepaid, or the request fails with CROSS_CHARGE_INVALID."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. Supplying it requires businessPartnerId. It must match exactly one active tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. It fills the VAT rate, VAT account and reverse-charge account the line does not state. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a region record when dimensionCode is 'region'."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for this new line, at most one per reporting dimension. Each tag pairs a dimensionCode with a modelId, and the referenced record must exist. A department or businessUnit tag must agree with departmentId or businessUnitId when both are sent. Omit or send an empty array for a line tagged only by departmentId and businessUnitId."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this new line over, one per accounting book. A plain array because the line does not exist yet, so there is nothing to change or remove. Only a prepaid line may carry them."}},"additionalProperties":false,"required":["accountId","amount"]},"description":"Lines to add. Each has the same shape as a line on create, with no id because the line does not exist yet.","examples":[[{"accountId":"9994c3ed-f812-44c1-9454-7f36b2bfb0fb","amount":"-25.00","description":"Wire fee"}]]},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this credit card entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage or taxCodeId is supplied. There is no endpoint for it."},"crossChargeEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Omit to leave unchanged, or send null to clear it. It must differ from the entry's entity, cross charging must be set up for both entities, and the line must not be prepaid, or the request fails with CROSS_CHARGE_INVALID."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. Supplying it requires businessPartnerId. It must match exactly one active tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. It fills the VAT rate, VAT account and reverse-charge account the line does not state. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a region record when dimensionCode is 'region'."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for the line, at most one per reporting dimension. Omit to keep the current tags. Send an empty array to clear them, apart from the tags departmentId and businessUnitId keep. Send a list to replace them. Changing departmentId or businessUnitId alone replaces only that dimension's tag."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book. A book the line already has a schedule for is refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this line, one per accounting book it does not already have one for. Omit all three amortization arrays to leave the line's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the schedule to change. It must be one this line already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by its id and belonging to this line. Every field but the id is optional. Changing the dates without the term, or the term without the dates, is refused with AMORTIZATION_TERM_MISMATCH when the two would disagree."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this line. Each must be one this line already carries. The schedule is deleted, not merely unlinked."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by its id. Every field but the id is optional, and omitting one leaves that field unchanged.","examples":[[{"id":"7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9","amount":"-150.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove. Each must belong to this credit card entry.","examples":[["1f2e3d4c-5b6a-7089-9a8b-7c6d5e4f3a2b"]]}},"additionalProperties":false},"createCreditMemoOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created credit memo. Read the full record with GET accounting/credit-memos/:id."}},"additionalProperties":false,"required":["id"]},"createCreditMemoInput":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer the credit memo is issued to. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity issuing the credit memo. See id on GET base/entities."},"currency":{"type":"string","description":"The currency of the credit memo. Every amount on the credit memo is in this currency. Format ISO 4217, for example 'USD'."},"creditMemoDate":{"type":"string","format":"date","description":"The date the credit memo is issued. Use format YYYY-MM-DD."},"manualCreditMemoType":{"type":"string","description":"The reason for the credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Although the field is optional in the schema, a credit memo cannot be created without it; INVALID_FIELD_VALUE lists the configured keys."},"description":{"type":"string","description":"A free-form description of the credit memo."},"externalCreditMemoId":{"type":"string","description":"The identifier of this credit memo in an external source system."},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"The line description, as shown to the customer."},"totalPrice":{"type":"string","format":"decimal","description":"The line total before tax, in the credit memo currency."}},"additionalProperties":false,"required":["description","totalPrice"]},"description":"The lines of the credit memo. At least one is required, even when the request also has applications. Each line has a description and a total price. Tax is added internally."},"applications":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice this application targets. See id on GET accounting/invoices/:id."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount to apply, in the credit memo currency. Must be positive."},"appliedDate":{"type":"string","format":"date","description":"The date the application is recorded. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["invoiceId","appliedAmount","appliedDate"]},"description":"Initial applications, each applying the credit memo to an invoice when it is created."}},"additionalProperties":false,"required":["customerId","entityId","currency","creditMemoDate","lines"]},"getBookEntityAssignmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entity assignment."},"bookId":{"type":"string","description":"The accounting book. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The display name of the accounting book."},"entityId":{"type":"string","description":"The legal entity assigned to the book. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the assigned legal entity."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts used for this entity on this book. Absent when none is assigned. See id on GET accounting/chart-of-accounts/:id."},"chartOfAccountsName":{"type":"string","description":"The name of the chart of accounts. Absent when none is assigned."},"fiscalCalendarId":{"type":"string","description":"The fiscal calendar used for this entity on this book. Absent when none is assigned. See id on GET accounting/fiscal-calendars/:id."},"fiscalCalendarName":{"type":"string","description":"The name of the fiscal calendar. Absent when none is assigned."},"currency":{"type":"string","description":"The currency for this entity on this book. Format ISO 4217, for example 'USD'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"When the entity assignment last changed. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."}},"additionalProperties":false,"required":["id","bookId","entityId","lastModifiedDate"]},"searchAccountingProductLinesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product line."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"type":"string","description":"The display name of the product. See productName on GET accounting/products/:id."},"productLineNumber":{"type":"string","description":"The product line number, assigned by the system and unique within the tenant. Example: 'PL-1001'."},"name":{"type":"string","description":"The name of the product line."},"lineType":{"type":"string","description":"The type of product line. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"priceModel":{"type":"string","description":"How the product line is priced. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"taxMode":{"type":"string","description":"How the product line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'. Absent if no tax provider was enabled in your tenant when the product line was last saved."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"hasUsage":{"type":"boolean","description":"Whether the product line has a paired 'usage' line. True for 'prepaid' lines, and for 'recurring' lines whose priceModel is 'thresholdBased' or whose commitInvoicing or trueUpEstimationMethod has a value."},"hasBeenUsed":{"type":"boolean","description":"Whether the product line is on at least one sales order."},"commitInvoicing":{"type":"string","description":"When the minimum spend commit of a 'recurring' product line is invoiced. Possible values: 'advance', 'arrears'. Absent when the product line has no minimum spend commit."},"trueUpEstimationMethod":{"type":"string","description":"How the estimated quantity of a True-Up 'recurring' line is set. Possible value: 'startEstimate'. Absent when the product line is not a True-Up line."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative', 'overage'. Applies only when lineType is 'prepaid'."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal. Applies only when lineType is 'prepaid'."},"parentProductLineId":{"type":"string","description":"The product line this 'usage' line is paired with. See id on GET accounting/product-lines/:id. Absent when the product line is not a paired 'usage' line."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the product line was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product line last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax record."},"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"engine":{"type":"string","description":"The tax engine that computes this tax. Possible values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."}},"additionalProperties":false,"required":["id","taxCode","engine"]},"description":"The tax records of the product line. Absent when the product line has none."},"pricingHeaders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header. See id on GET accounting/pricing/:id."},"headerNumber":{"type":"string","description":"The pricing header number, assigned by the system and unique within the tenant."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book entry."},"priceBookEntryNumber":{"type":"string","description":"The price book entry number, assigned by the system."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. On a rate-card entry, the list price is the rate."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Used only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Absent on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"rateCardEntry":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Absent when no price model was set on the rate-card entry."}},"additionalProperties":false,"required":["id","unitOfMeasure"],"description":"The rate-card entry attached to this price book entry. Absent when the entry is not rate-card priced."}},"additionalProperties":false,"required":["id"]},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["id","currency","validFrom","priceBookEntries"]},"description":"The pricing headers of the product line, each with its price book entries. Absent when the product line has no pricing."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the product line has none."}},"additionalProperties":false,"required":["id","productId","name","lastModifiedDate"]},"description":"The product lines on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more product lines remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingProductLinesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"term":{"type":"string","description":"Limits results to product lines whose name or product line number contains this text. The match is case-insensitive."},"productId":{"type":"string","description":"Limits results to the product lines of this product. See id on GET accounting/products/:id."},"productLineNumber":{"type":"string","description":"Limits results to the product line with this product line number. The match is exact."},"crmProductId":{"type":"string","description":"Limits results to product lines with this CRM identifier. The match is exact."},"lineType":{"type":"string","description":"Limits results to product lines of this type. Accepted values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"priceModel":{"type":"string","description":"Limits results to product lines with this price model. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"pricingTerm":{"type":"string","description":"Limits results to product lines with this pricing term. Accepted values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"invoiceFrequency":{"type":"string","description":"Limits results to product lines with this invoice frequency. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"unitOfMeasure":{"type":"string","description":"Limits results to product lines with this unit of measure. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"taxMode":{"type":"string","description":"Limits results to product lines with this tax mode. Accepted values: 'TaxInclusive', 'TaxExclusive'."},"enforceListPrice":{"type":"boolean","description":"Limits results to product lines that enforce, or do not enforce, the list price."},"hasUsage":{"type":"boolean","description":"Limits results to product lines that have, or do not have, a paired 'usage' line."},"parentProductLineId":{"type":"string","description":"Limits results to the 'usage' line paired with this product line. See id on GET accounting/product-lines/:id."},"dataSource":{"type":"string","description":"Limits results to product lines from this source system or import job. The match is exact. Example: 'Salesforce'."},"createdDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the product line was created. Bounds are inclusive."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the product line last changed. Bounds are inclusive."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label. A name that is not configured for product lines fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier's value in the source system. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to product lines with this external identifier. Send both fieldName and value."}},"additionalProperties":false,"description":"The filters to apply. A product line must match every filter you send. Omit to return all product lines."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of product lines per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"searchAccountingSalesReturnOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"salesReturnNumber":{"type":"string","description":"The RMA number, for example 'SR-1'. Absent while none has been assigned."},"status":{"type":"string","description":"The lifecycle status of the sales return. Possible values: 'draft', 'submitted', 'received', 'approved', 'completed', 'cancelled', 'rejected'."},"returnType":{"type":"string","description":"The resolution path for the return. Possible values: 'credit', 'replacement'. It cannot be changed once status moves past 'draft'."},"returnDate":{"type":"string","description":"The transaction date for the return. Format YYYY-MM-DD."},"salesOrderId":{"type":"string","description":"The sales order this return is against. A sales return is always against exactly one sales order. See id on GET accounting/sales-orders/:id."},"currency":{"type":"string","description":"The currency of every amount on this record and its lines. Format ISO 4217, for example 'USD'."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return. Possible values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'. It is for reporting and does not affect how the return is resolved."},"notes":{"type":"string","description":"Free-form notes for the return."},"returnTrackingNumber":{"type":"string","description":"The carrier tracking number for the inbound return shipment."},"totalReturnAmount":{"type":"string","format":"decimal","description":"The total return amount, the sum of every line's totalPrice, in the return currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund, such as a restocking fee, in the return currency. Credit returns only. It is set either here or on the lines, never both."},"shippingRefundAmount":{"type":"string","format":"decimal","description":"The shipping charge refunded to the customer, in the return currency. Credit returns only."},"totalRevenueImpact":{"type":"string","format":"decimal","description":"The revenue reversed to the customer, the product-line revenue impact plus the shipping refund, in the return currency. Always 0 for the replacement path."},"revenueStatus":{"type":"string","description":"The revenue reversal status. Possible values: 'notApplicable', 'notStarted', 'reversed'. 'notApplicable' is the replacement path, and 'reversed' is a completed credit return."},"inventoryReturnNumber":{"type":"string","description":"The document number of the linked inventory sales return. Absent until one has been created."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales return last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this return line."},"salesOrderProductLineId":{"type":"string","description":"The sales order product line this line returns. See salesOrderProductLineId on GET accounting/sales-orders/:id."},"lineType":{"type":"string","description":"The product line type, copied from the sales order line at creation."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned."},"unitOfMeasure":{"type":"string","description":"The unit of measure, copied from the sales order line."},"currency":{"type":"string","description":"The currency of unitPrice, totalPrice and returnFeeAmount on this line, copied from the sales return. Format ISO 4217, for example 'USD'."},"unitPrice":{"type":"string","format":"decimal","description":"The unit price, copied from the sales order line at creation, in this line's currency."},"totalPrice":{"type":"string","format":"decimal","description":"The total price for the line, quantity times unitPrice, in this line's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund for this line, in this line's currency. Credit returns only. Set only when fees are tracked per line rather than on the header."},"revenueImpactAmount":{"type":"string","format":"decimal","description":"The revenue reversed for this line, in this line's currency. 0 for the replacement path."},"lineStatus":{"type":"string","description":"The lifecycle status of this line. Possible values: 'pending', 'received', 'approved', 'completed', 'cancelled', 'rejected'."}},"additionalProperties":false,"required":["id","salesOrderProductLineId","lineType","quantity","unitOfMeasure","currency","unitPrice","lineStatus"]},"description":"The product lines being returned."}},"additionalProperties":false,"required":["id","status","returnType","returnDate","salesOrderId","currency","lastModifiedDate","lines"]},"description":"The sales returns on this page, oldest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more sales returns remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingSalesReturnInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the sales return with this identifier."},"salesReturnNumber":{"type":"string","description":"Limits results to the sales return with this RMA number, for example 'SR-104'."},"status":{"type":"array","items":{"type":"string"},"description":"Limits results to sales returns in any of these statuses. Accepted values: 'draft', 'submitted', 'received', 'approved', 'completed', 'cancelled', 'rejected'. An unknown value matches nothing. An empty array does not constrain."},"returnType":{"type":"array","items":{"type":"string"},"description":"Limits results to sales returns of any of these resolution paths. Accepted values: 'credit', 'replacement'. An unknown value matches nothing. An empty array does not constrain."},"reasonCode":{"type":"array","items":{"type":"string"},"description":"Limits results to sales returns with any of these header-level reasons. Accepted values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'. An empty array does not constrain."},"salesOrderId":{"type":"string","description":"Limits results to sales returns raised against the sales order with this identifier. An identifier matching no sales order returns an empty page."},"currency":{"type":"string","description":"Limits results to sales returns in this currency. Format ISO 4217, for example 'USD'."},"notes":{"type":"string","description":"Limits results to sales returns whose notes contain this text. The match is case-insensitive."},"returnTrackingNumber":{"type":"string","description":"Limits results to the sales return with this carrier tracking number."},"returnDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest date to include. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest date to include. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to sales returns whose returnDate falls in this range. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest time to include, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The latest time to include, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to sales returns changed in this range, for polling an incremental sync. Omit either bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A sales return must match every filter you send. Omit to return all sales returns."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of sales returns per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"getFiscalCalendarOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fiscal calendar."},"calendarName":{"type":"string","description":"The name of the fiscal calendar, unique within the tenant."},"description":{"type":"string","description":"A description of the fiscal calendar. Absent when none has been set."},"periodFormat":{"type":"string","description":"How the fiscal calendar divides a fiscal year into periods. Possible values: 'calendarMonths' (twelve monthly periods), '4-4-5', '4-5-4', '5-4-4' (retail quarters of thirteen weeks, split into periods of that many weeks)."},"status":{"type":"string","description":"The lifecycle status of the fiscal calendar. Possible values: 'new', 'active', 'deactivated'. Absent when none has been set."},"fiscalYearsCount":{"type":"number","description":"The number of distinct fiscal years on this calendar. Absent until the first fiscal year exists."},"fiscalYears":{"type":"array","items":{"type":"string"},"description":"The distinct fiscal years this calendar spans, taken from its accounting periods, in no guaranteed order. Each is a free-text label such as 'FY2024'. An empty array when the calendar has no fiscal years yet."},"assignedEntities":{"type":"array","items":{"type":"string"},"description":"The names, not the identifiers, of the legal entities this calendar is assigned to, in no guaranteed order. An empty array when it is assigned to none."},"anchorDate":{"type":"string","format":"date","description":"The anchor reference date, set only for retail calendars (a '4-4-5', '4-5-4' or '5-4-4' periodFormat). It is the last day of the month before the first period starts. Format YYYY-MM-DD. Absent on a calendarMonths calendar."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fiscal calendar last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","calendarName","periodFormat","lastModifiedDate"]},"getRefundOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the refund.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'. Assigned on create.","examples":["REF-1042"]},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD.","examples":["2026-08-01"]},"approvalStatus":{"type":"string","description":"The approval status. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. A refund created through POST accounting/refunds is approved immediately.","examples":["approved"]},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'.","examples":["ach"]},"currency":{"type":"string","description":"The currency of the refund. Every amount on it is in this currency. Format ISO 4217, for example 'USD'.","examples":["USD"]},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency.","examples":["150.00"]},"unappliedAmount":{"type":"string","format":"decimal","description":"The unapplied balance remaining on the source payment, in the refund currency.","examples":["0.00"]},"refundNote":{"type":"string","description":"A free-form note attached to the refund. Absent when none was set."},"customerId":{"type":"string","description":"The customer receiving the refund. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"customerName":{"type":"string","description":"The name of the customer receiving the refund.","examples":["Northwind Traders"]},"entityId":{"type":"string","description":"The legal entity issuing the refund. See id on GET base/entities.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"paymentNumber":{"type":"string","description":"The number of the source payment being refunded.","examples":["PMT-7781"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T09:12:44.000Z"]}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"applyCreditMemoOutput":{"type":"object","properties":{},"additionalProperties":false},"applyCreditMemoInput":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to apply against. See id on GET accounting/invoices/:id."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount to apply, in the credit memo currency. Must be positive. The credit memo currency governs. There is no per-row currency."},"appliedDate":{"type":"string","format":"date","description":"The date the allocation is recorded. Use format YYYY-MM-DD. It must fall in an open accounting period."}},"additionalProperties":false,"required":["invoiceId","appliedAmount","appliedDate"]},"description":"The allocations to record. At least one is required. Several rows may target the same invoice, and are summed against that invoice's amount due."}},"additionalProperties":false,"required":["applications"]},"voidFundTransferOutput":{"type":"object","properties":{},"additionalProperties":false},"voidFundTransferInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"The reason the transfer is being voided. It is stored on the transfer and shown in the audit trail. An empty or whitespace-only value is refused.","examples":["Duplicate of FT-881"]}},"additionalProperties":false,"required":["voidReason"]},"intercompanyBillsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the intercompany bill."},"intercompanyBillNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The intercompany bill number. Unique within the tenant. Example: 'ICB-1'."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the intercompany bill."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the intercompany bill."},"fromEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that issues the intercompany bill and is owed the amount. See id on GET base/entities."},"fromEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the issuing legal entity. See entityName on GET base/entities."},"toEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that receives the intercompany bill and is charged for it. See id on GET base/entities."},"toEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the receiving legal entity. See entityName on GET base/entities."},"intercompanyProcessId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The intercompany process whose intercompany receivable and payable accounts balance each legal entity's side of the bill's journal entry. Bills created by a system process that don't name one use the default 'Intercompany Transaction' process. No endpoint returns intercompany processes."},"intercompanyProcessName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the intercompany process."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the intercompany bill. Every amount on the bill and its lines is in this currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The rate used to convert amounts from the intercompany bill's currency to each legal entity's functional currency. The same rate is used for both legal entities."},"billMarkup":{"anyOf":[{"enum":["percentage","flatFee","none"]},{"type":"null"}],"description":"How markupAmount is applied to the lines. Possible values: 'none' (no markup: markupAmount and each line's markup are 0), 'percentage' (each line's markup is its amount multiplied by markupAmount), 'flatFee' (markupAmount is a total split evenly across the lines)."},"markupAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The markup on the lines. How to read markupAmount depends on billMarkup. When billMarkup is 'percentage', markupAmount is a decimal fraction of each line's amount, so 0.1 is 10%. When billMarkup is 'flatFee', markupAmount is a total in the intercompany bill's currency, split evenly across the lines and rounded to 2 decimal places, with any remainder on the first line. 0 when billMarkup is 'none'."},"billDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the intercompany bill. Format YYYY-MM-DD."},"paymentTerms":{"anyOf":[{"enum":["net30","net60","net90","dueOnReceipt","net15","custom"]},{"type":"null"}],"description":"The payment term of the intercompany bill."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the intercompany bill falls due. Format YYYY-MM-DD."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The start date of the service period the intercompany bill covers. Format YYYY-MM-DD."},"status":{"anyOf":[{"enum":["draft","open","partiallySettled","settled","voided"]},{"type":"null"}],"description":"The status of the intercompany bill."},"voidReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason given when the intercompany bill was voided. Absent when status is not 'voided'."},"type":{"anyOf":[{"enum":["manual","system"]},{"type":"null"}],"description":"How the intercompany bill was created: manually in the application, or by a system process such as an allocation run."},"postingDirection":{"anyOf":[{"enum":["normal","reverse"]},{"type":"null"}],"description":"The direction of the intercompany bill's journal entry postings. Possible values: 'normal', 'reverse'. When postingDirection is 'reverse', the debit and credit accounts of the intercompany process are swapped."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the intercompany bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchIntercompanyBillsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the intercompany bill."},"intercompanyBillNumber":{"type":"string","description":"The intercompany bill number. Unique within the tenant. Example: 'ICB-1'."},"name":{"type":"string","description":"The name of the intercompany bill."},"description":{"type":"string","description":"A description of the intercompany bill."},"fromEntityId":{"type":"string","description":"The legal entity that issues the intercompany bill and is owed the amount. See id on GET base/entities."},"fromEntityName":{"type":"string","description":"The name of the issuing legal entity. See entityName on GET base/entities."},"toEntityId":{"type":"string","description":"The legal entity that receives the intercompany bill and is charged for it. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of the receiving legal entity. See entityName on GET base/entities."},"intercompanyProcessId":{"type":"string","description":"The intercompany process whose intercompany receivable and payable accounts balance each legal entity's side of the bill's journal entry. Bills created by a system process that don't name one use the default 'Intercompany Transaction' process. No endpoint returns intercompany processes."},"intercompanyProcessName":{"type":"string","description":"The name of the intercompany process."},"currency":{"type":"string","description":"The currency of the intercompany bill. Every amount on the bill and its lines is in this currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert amounts from the intercompany bill's currency to each legal entity's functional currency. The same rate is used for both legal entities."},"billMarkup":{"type":"string","description":"How markupAmount is applied to the lines. Possible values: 'none' (no markup: markupAmount and each line's markup are 0), 'percentage' (each line's markup is its amount multiplied by markupAmount), 'flatFee' (markupAmount is a total split evenly across the lines)."},"markupAmount":{"type":"string","format":"decimal","description":"The markup on the lines. How to read markupAmount depends on billMarkup. When billMarkup is 'percentage', markupAmount is a decimal fraction of each line's amount, so 0.1 is 10%. When billMarkup is 'flatFee', markupAmount is a total in the intercompany bill's currency, split evenly across the lines and rounded to 2 decimal places, with any remainder on the first line. 0 when billMarkup is 'none'."},"billDate":{"type":"string","format":"date","description":"The date of the intercompany bill. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment term of the intercompany bill. Possible values: 'net30', 'net60', 'net90', 'dueOnReceipt', 'net15', 'custom'."},"dueDate":{"type":"string","format":"date","description":"The date the intercompany bill falls due. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The start date of the service period the intercompany bill covers. Format YYYY-MM-DD."},"status":{"type":"string","description":"The status of the intercompany bill. Possible values: 'draft', 'open', 'partiallySettled', 'settled', 'voided'."},"voidReason":{"type":"string","description":"The reason given when the intercompany bill was voided. Absent when status is not 'voided'."},"type":{"type":"string","description":"How the intercompany bill was created. Possible values: 'manual' (in the application), 'system' (by a system process, such as an allocation run)."},"postingDirection":{"type":"string","description":"The direction of the intercompany bill's journal entry postings. Possible values: 'normal', 'reverse'. When postingDirection is 'reverse', the debit and credit accounts of the intercompany process are swapped."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the intercompany bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"description":{"type":"string","description":"A description of the line."},"amount":{"type":"string","format":"decimal","description":"The amount of the line before markup, in the intercompany bill's currency."},"fromAccountId":{"type":"string","description":"The account the issuing legal entity credits with the line's amount, typically where it records the income or recharge. Markup is credited to the issuing entity's markup account instead. See id on GET accounting/accounts/:id."},"toAccountId":{"type":"string","description":"The account the receiving legal entity debits with the line's amount plus markup, typically where it records the cost or asset. See id on GET accounting/accounts/:id."},"fromValueAllocationId":{"type":"string","description":"The numeric id of the value accounting tags on the issuing legal entity's side, not a UUID. No endpoint returns value accounting tags. Absent when value accounting tags are not in use."},"toValueAllocationId":{"type":"string","description":"The numeric id of the value accounting tags on the receiving legal entity's side, not a UUID. No endpoint returns value accounting tags. Absent when value accounting tags are not in use."},"markupAmount":{"type":"string","format":"decimal","description":"The markup on the line, in the intercompany bill's currency, calculated from the bill's billMarkup and markupAmount."},"fromTaxAmount":{"type":"string","format":"decimal","description":"The tax the issuing legal entity charges on the line (output tax), in the intercompany bill's currency. It is the rate of the issuing entity's tax configuration multiplied by the line's amount plus markup. Absent when no tax applies."},"toTaxAmount":{"type":"string","format":"decimal","description":"The tax the receiving legal entity pays on the line and records as recoverable (input tax), in the intercompany bill's currency. It is the rate of the receiving entity's tax configuration multiplied by the line's amount plus markup. Absent when no tax applies."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the intercompany bill. An empty array when the bill has no lines."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The intercompany bills on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more intercompany bills remain after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchIntercompanyBillsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the intercompany bill with this identifier."},"intercompanyBillNumber":{"type":"string","description":"Limits results to the intercompany bill with this intercompany bill number. The match is exact. Example: 'ICB-1'."},"name":{"type":"string","description":"Limits results to intercompany bills whose name contains this text. The match is case-insensitive. A blank value is ignored."},"description":{"type":"string","description":"Limits results to intercompany bills whose description contains this text. The match is case-insensitive. A blank value is ignored."},"fromEntityId":{"type":"string","description":"Limits results to intercompany bills issued by this legal entity. See id on GET base/entities."},"toEntityId":{"type":"string","description":"Limits results to intercompany bills issued to this legal entity. See id on GET base/entities."},"eitherEntityId":{"type":"string","description":"Limits results to intercompany bills where this legal entity is either fromEntityId or toEntityId. See id on GET base/entities."},"status":{"type":"array","items":{"type":"string"},"description":"Limits results to intercompany bills in any of these statuses. Accepted values: 'draft', 'open', 'partiallySettled', 'settled', 'voided'. Any other value matches no intercompany bill."},"type":{"type":"array","items":{"type":"string"},"description":"Limits results to intercompany bills of any of these types. Accepted values: 'manual', 'system'. Any other value matches no intercompany bill."},"billMarkup":{"type":"array","items":{"type":"string"},"description":"Limits results to intercompany bills with any of these markup types. Accepted values: 'none', 'percentage', 'flatFee'. Any other value matches no intercompany bill."},"postingDirection":{"type":"array","items":{"type":"string"},"description":"Limits results to intercompany bills with any of these posting directions. Accepted values: 'normal', 'reverse'. Any other value matches no intercompany bill."},"currency":{"type":"string","description":"Limits results to intercompany bills in this currency. The match is exact. Format ISO 4217, for example 'USD'."},"paymentTerms":{"type":"string","description":"Limits results to intercompany bills with this payment term. Accepted values: 'net30', 'net60', 'net90', 'dueOnReceipt', 'net15', 'custom'. Any other value matches no intercompany bill."},"exchangeRate":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"The inclusive lower bound."},"max":{"type":"string","format":"decimal","description":"The inclusive upper bound."}},"additionalProperties":false,"description":"Limits results to intercompany bills whose exchangeRate is in this range. Omit either bound to leave that side open."},"markupAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"The inclusive lower bound."},"max":{"type":"string","format":"decimal","description":"The inclusive upper bound."}},"additionalProperties":false,"description":"Limits results to intercompany bills whose markupAmount is in this range. Omit either bound to leave that side open."},"billDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to intercompany bills dated in this range. Omit either bound to leave that side open."},"dueDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to intercompany bills falling due in this range. Omit either bound to leave that side open."},"serviceDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to intercompany bills whose serviceDate is in this range. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","format":"date-time","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to intercompany bills last changed in this range. Omit either bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. An intercompany bill must match every filter you send. Omit to return all intercompany bills."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of intercompany bills per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"searchSalesOrderShipmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order shipment."},"salesOrderId":{"type":"string","description":"The sales order this shipment fulfills. See id on GET accounting/sales-orders/:id."},"inventoryShipmentId":{"type":"number","description":"The numeric identifier of the shipment document in inventory, which owns the shipment. Absent only on legacy rows written before the mirroring existed."},"shipmentNumber":{"type":"string","description":"The shipment document number, assigned by inventory. Absent until inventory has issued one."},"status":{"type":"string","description":"The lifecycle status of the shipment. Possible values: 'pendingShipment', 'shipped', 'cancelled'. 'pendingShipment' is drafted in inventory but not yet dispatched, 'shipped' is dispatched, and 'cancelled' means the inventory shipment was deleted and this mirror was soft-canceled."},"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL, when one has been recorded."},"carrier":{"type":"string","description":"The name of the carrier handling the shipment."},"incoterm":{"type":"string","description":"The incoterm governing shipping responsibility for this shipment. For example 'DAP' or 'EXW'."},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. See id on GET inventory/warehouses/:id."},"shipToContactEmail":{"type":"string","description":"The email of the contact who receives this shipment."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer asked for delivery. Format YYYY-MM-DD."},"shipDate":{"type":"string","format":"date","description":"The date the shipment was dispatched. Format YYYY-MM-DD. Absent while the shipment is still pending."},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment was, or is expected to be, delivered. Format YYYY-MM-DD."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line. PATCH matches updateItems and deleteItems on it."},"salesOrderProductItemId":{"type":"string","description":"The sales order product item this shipment line is for. See items[].id on GET accounting/sales-orders/:id."},"shippedQty":{"type":"string","format":"decimal","description":"The quantity shipped on this line, as a count of units."},"orderedQty":{"type":"string","format":"decimal","description":"The total quantity ordered for the sales order product item, as a count of units."},"unshippedQty":{"type":"string","format":"decimal","description":"The quantity still outstanding on this line, as a count of units: orderedQty minus shippedQty."}},"additionalProperties":false,"required":["id","salesOrderProductItemId","shippedQty","orderedQty","unshippedQty"]},"description":"The shipped lines, oldest first. An empty array when the shipment has no lines."}},"additionalProperties":false,"required":["id","salesOrderId","lastModifiedDate","items"]},"description":"The shipments on this page, ordered by ship date with the most recent first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","salesOrderId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","inventoryShipmentId":4242,"shipmentNumber":"SHP-1042","status":"shipped","carrier":"DHL","shipDate":"2026-08-19","lastModifiedDate":"2026-08-20T10:15:00.000Z","items":[]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more shipments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchSalesOrderShipmentsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"Limits results to shipments that fulfill this sales order. See id on GET accounting/sales-orders/:id."},"inventoryShipmentId":{"type":"number","description":"Limits results to the shipment mirroring this inventory shipment, given as its numeric inventory shipment id. At most one shipment matches."},"warehouseId":{"type":"string","description":"Limits results to shipments dispatched from this warehouse location. See id on GET inventory/warehouses/:id."},"status":{"type":"array","items":{"enum":["pendingShipment","shipped","cancelled"]},"description":"Limits results to shipments in any of these states. Omit or pass an empty array to match every state."},"salesOrderProductItemId":{"type":"string","description":"Limits results to shipments for this sales order product item. See items[].id on GET accounting/sales-orders/:id."},"shipmentNumber":{"type":"string","description":"Limits results to shipments whose shipment number contains this text. The match is case-insensitive."},"trackingId":{"type":"string","description":"Limits results to shipments whose tracking number or URL contains this text. The match is case-insensitive."},"carrier":{"type":"string","description":"Limits results to shipments whose carrier name contains this text. The match is case-insensitive."},"incoterm":{"type":"string","description":"Limits results to shipments whose incoterm contains this text. The match is case-insensitive."},"shipToContactEmail":{"type":"string","description":"Limits results to shipments whose shipping contact email contains this text. The match is case-insensitive."},"shipDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest dispatch date to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest dispatch date to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by dispatch date. Both bounds are inclusive. Omit one to leave that side open."},"deliveryDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest delivery date to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest delivery date to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by delivery date. Both bounds are inclusive. Omit one to leave that side open."},"customerRequestDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest requested delivery date to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest requested delivery date to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the date the customer requested delivery. Both bounds are inclusive. Omit one to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The earliest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ in UTC."},"end":{"type":"string","format":"date-time","description":"The latest change time to include, inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ in UTC."}},"additionalProperties":false,"description":"Limits results by last change. Both bounds are inclusive. Format YYYY-MM-DDTHH:mm:ss.sssZ in UTC. Omit one to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A shipment must match every filter you send. Omit to return all shipments.","examples":[{"carrier":"dhl","status":["pendingShipment","shipped"]}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of shipments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchBankEntryOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank entry."},"bankEntryNumber":{"type":"string","description":"The bank entry number. Absent until one has been assigned."},"name":{"type":"string","description":"The display name of the bank entry."},"description":{"type":"string","description":"A free-form description of the entry."},"transactionDate":{"type":"string","format":"date","description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"type":"string","description":"The reconciliation status of the entry. Possible values: 'matched', 'unmatched', 'voided', 'integrated'."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"type":"string","description":"A label for the source system the entry was created from."},"externalUrl":{"type":"string","description":"A link to the source document in an external system."},"bankAccountId":{"type":"string","description":"The bank general-ledger account this entry is recorded against. See id on GET accounting/accounts/:id."},"bankAccountName":{"type":"string","description":"The name of the bank general-ledger account."},"entityId":{"type":"string","description":"The legal entity this entry is posted under. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A free-form description of the line."},"lineType":{"type":"string","description":"The kind of line. Possible values: 'oneTime', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The gross line amount, including VAT, in the entry currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217. It always matches the entry currency."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the entry currency."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount on the line, in the entry currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%."},"origin":{"type":"string","description":"A label for the source system, copied onto the line from the entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. There is no endpoint for it."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to. Present only for a custom-dimension tag. See id on GET base/custom-dimensions."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. An older entry can carry tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags assigned to this line, departmentId and businessUnitId included. Set them with create or update."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. To read its schedule lines, pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted entry reads 'notStarted' until the entry posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id. Absent on a schedule that has no schedule lines yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far by the schedule lines whose journal entries are posted, in the entry currency. Zero until the first schedule line's journal entry is posted."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. To read the schedule lines, use GET accounting/amortization-schedule-lines and filter on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id","reportingTags"]},"description":"The posting lines of the entry, one per general-ledger posting. An empty array when the entry has none."}},"additionalProperties":false,"required":["id","transactionDate","status","lastModifiedDate"]},"description":"The bank entries on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor to pass as page.cursor for the next page. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchBankEntryInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the bank entry with this identifier."},"bankEntryNumber":{"type":"string","description":"Limits results to the bank entry with this number. The match is exact."},"journalEntryNumber":{"type":"string","description":"Limits results to entries that posted to the journal entry with this number. The match is exact."},"status":{"type":"string","description":"Limits results to entries in this status. Accepted values: 'matched', 'unmatched', 'voided', 'integrated'. Any other value matches nothing."},"currency":{"type":"string","description":"Limits results to entries denominated in this currency. Format ISO 4217, for example 'USD'."},"bankAccountId":{"type":"string","description":"Limits results to entries recorded against this bank general-ledger account. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"Limits results to entries posted under this legal entity. See id on GET base/entities."},"origin":{"type":"string","description":"Limits results to entries created by this source system. The match is exact."}},"additionalProperties":false,"description":"The filters to apply. A bank entry must match every filter you send. Omit to return all bank entries.","examples":[{"status":"unmatched"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of bank entries per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"creditCardEntriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit card entry."},"creditCardEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The credit card entry number. Absent until one has been assigned."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the credit card entry."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the entry."},"transactionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services were delivered. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"anyOf":[{"enum":["Voided","Posted","Integrated","Matched","Unmatched"]},{"type":"null"}],"description":"The reconciliation status of the entry."},"journalEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A label for the source system the entry was created from."},"creditCardAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the credit card general-ledger account."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the credit card entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getAccountingPeriodOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this entity-book accounting period row. This identifies the (entity, book, period) combination, not the shared accounting period."},"accountingPeriodId":{"type":"string","description":"The identifier of the underlying accounting period, shared by every entity that uses this fiscal calendar. See id on GET accounting/accounting-periods/:id."},"entityId":{"type":"string","description":"The identifier of the legal entity this status belongs to. See id on GET base/entities. Absent only when the entity-book link is broken."},"entityName":{"type":"string","description":"The name of the legal entity this status belongs to."},"bookId":{"type":"string","description":"The identifier of the accounting book this status belongs to. A period is opened and closed per book. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this status belongs to."},"fiscalCalendarId":{"type":"string","description":"The identifier of the fiscal calendar this period belongs to. See id on GET accounting/fiscal-calendars/:id. Absent when the period was deleted from under its status row."},"fiscalCalendarName":{"type":"string","description":"The name of the fiscal calendar this period belongs to."},"periodName":{"type":"string","description":"The display name of the period as its fiscal calendar defines it, for example 'Jan 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"fiscalYear":{"type":"string","description":"The fiscal year label this period belongs to, for example 'FY2024'. Set by the calendar, so it need not match the calendar year of startDate. It is a label, not a number: a filter must match its spelling exactly, so read the distinct values first. A fiscal year runs from the earliest startDate to the latest endDate of its periods for one entity and book."},"fiscalQuarter":{"type":"string","description":"The fiscal quarter label this period belongs to, for example 'Q1 2026'."},"startDate":{"type":"string","format":"date","description":"The first day of the period, inclusive. Format YYYY-MM-DD. Absent only when the underlying period was deleted."},"endDate":{"type":"string","format":"date","description":"The last day of the period, inclusive. Format YYYY-MM-DD."},"durationDays":{"type":"number","description":"The number of days the period spans, both bounds inclusive. Absent when startDate or endDate is."},"status":{"type":"string","description":"The status this entity and book have put the period in. Possible values: 'created' (generated, not yet opened), 'open', 'closed', 'reopened'. Only 'open' and 'reopened' accept postings."},"postable":{"type":"boolean","description":"Whether the period currently accepts postings for this entity and book, true when its status is 'open' or 'reopened'. This does not account for journal-type-specific locks."},"postableReason":{"type":"string","description":"Why the period does not accept postings, for example 'status is closed'. Empty when it is postable."},"reopeningReason":{"type":"string","description":"The free-text reason recorded when the period was reopened. Set only when status is 'reopened'."},"reopenedByCascade":{"type":"boolean","description":"Whether this period was reopened as a side effect of reopening a later one, rather than directly."},"hasTransactions":{"type":"boolean","description":"Whether at least one journal entry line has been posted into the underlying period, by any entity."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this status row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It changes when the period is opened, closed or reopened for this entity and book."},"closeTasks":{"type":"array","items":{"type":"object","properties":{"taskCode":{"type":"string","description":"The code identifying the task, and the value to pass as task to POST accounting/period-status/:id/execute-task. The forward tasks, for example 'open', 'close', 'reopen', 'lockAP', 'lockAR', 'lockRevenue', 'lockJournals', 'runRevaluation', 'calculateConsolidationRates'. The task that undoes one is in reverseTaskCode."},"reverseTaskCode":{"type":"string","description":"The code of the task that undoes this one, for example 'unlockAP' for 'lockAP'. Empty when the task cannot be reversed."},"isExecuted":{"type":"boolean","description":"Whether this task has already run for this entity-book period."},"isExecutable":{"type":"boolean","description":"Whether this task can run now. It is false for a task already done and for one whose preconditions are unmet. notExecutableReason says which."},"notExecutableReason":{"type":"string","description":"Why the task cannot run now. Present only when isExecutable is false and a reason is available."},"isReversible":{"type":"boolean","description":"Whether the task that undoes this one can run now."},"notReversibleReason":{"type":"string","description":"Why the reversal cannot run now. Present only when isReversible is false and a reason is available."},"notApplicable":{"type":"boolean","description":"Whether this task does not apply to this entity-book period at all, for example a consolidation task on an entity that does not consolidate. Such a task is neither executed nor executable and does not block the close."},"message":{"type":"string","description":"A human-readable, translated description of the task's state: the applied message when it has run, the not-applied message when it has not, or the not-applicable message when it does not apply."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this task's state last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on a task that has never run."},"lastModifiedBy":{"type":"string","description":"The identifier of the user who last changed this task's state. Absent on a task that has never run."}},"additionalProperties":false,"required":["taskCode","isExecuted","isExecutable","isReversible"]},"description":"The period-close checklist for this entity and book, one entry per task. An empty array when the row has no tasks yet. Check isExecutable before running a task with POST accounting/period-status/:id/execute-task."}},"additionalProperties":false,"required":["id","status","postable","postableReason","lastModifiedDate"]},"getFundTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fund transfer."},"fundTransferNumber":{"type":"string","description":"The fund transfer number, for example 'FT-71122'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the fund transfer."},"description":{"type":"string","description":"A free-form description of the transfer."},"transferDate":{"type":"string","format":"date","description":"The date the money moved. Format YYYY-MM-DD."},"transferAmount":{"type":"string","format":"decimal","description":"The amount moved, in the transfer currency."},"currency":{"type":"string","description":"The transfer currency. Format ISO 4217, for example 'USD'. transferAmount is in this currency."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate applied when the two accounts are held in different currencies."},"isVoided":{"type":"boolean","description":"Whether the transfer has been voided. A voided transfer is kept for audit rather than deleted."},"isIntercompany":{"type":"boolean","description":"Whether the transfer moves money between two legal entities rather than between two accounts of one entity. When true, toEntityId names the receiving entity."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this transfer posted to, on GET accounting/journal-entries. Absent until the transfer has posted."},"origin":{"type":"string","description":"The system or process the transfer came from."},"externalUrl":{"type":"string","description":"An absolute http or https link to the source document in an external system."},"externalPaymentId":{"type":"string","description":"The identifier of this payment in the external system that initiated the transfer. It is not unique."},"fromAccountId":{"type":"string","description":"The general-ledger account the money left. See id on GET accounting/accounts/:id."},"fromAccountName":{"type":"string","description":"The name of the account the money left."},"toAccountId":{"type":"string","description":"The general-ledger account the money arrived in. See id on GET accounting/accounts/:id."},"toAccountName":{"type":"string","description":"The name of the account the money arrived in."},"entityId":{"type":"string","description":"The legal entity the transfer is posted under. On an intercompany transfer this is the sending entity. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the transfer is posted under."},"toEntityId":{"type":"string","description":"The receiving legal entity on an intercompany transfer. Absent on a same-entity transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of the receiving legal entity on an intercompany transfer."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fund transfer last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"accountType":{"type":"string","description":"Which side of the transfer this line is. Possible values: 'from', 'to'."},"description":{"type":"string","description":"A free-form description of the line."},"amount":{"type":"string","format":"decimal","description":"The line amount, in the line currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. It differs from the transfer currency only on a cross-currency transfer."},"bankFee":{"type":"string","format":"decimal","description":"The bank fee charged on this side of the transfer, in the line currency."}},"additionalProperties":false,"required":["id","accountType"]},"description":"The two sides of the transfer, one line per side. Read accountType to tell them apart rather than relying on order."}},"additionalProperties":false,"required":["id","transferDate","lastModifiedDate"]},"voidCreditCardEntryOutput":{"type":"object","properties":{},"additionalProperties":false},"voidCreditCardEntryInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the entry is being voided. It is stored on the entry for the audit trail. An empty or whitespace-only string is refused.","examples":["Duplicate of CCE-2201"]}},"additionalProperties":false,"required":["voidReason"]},"searchTaxConfigurationOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax configuration."},"entityId":{"type":"string","description":"The legal entity this configuration belongs to. An entity has at most one tax configuration. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the owning legal entity."},"status":{"type":"string","description":"The status of the tax configuration. The tax codes of an inactive configuration are not offered on documents. Possible values: 'Active', 'Inactive'."},"taxRegime":{"type":"string","description":"The tax system that determines which tax components are valid. Possible values: 'EU_VAT', 'India_GST', 'Canada_GST', 'Ghana_VAT', 'SingleRate_GST', 'Mexico_IVA'."},"externalId":{"type":"string","description":"An external system's identifier for this configuration, set when it was migrated from another system."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the tax configuration record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax code line."},"taxCode":{"type":"string","description":"The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'. Absent when none was supplied."},"title":{"type":"string","description":"The display title of the tax code. Unique within the configuration."},"comment":{"type":"string","description":"A free-form note on when to use this tax code. Absent when none was set."},"vatDeclarationField":{"type":"string","description":"The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Free text, not evaluated. Absent when none was set."},"percentage":{"type":"string","format":"decimal","description":"The tax rate, as a decimal fraction. For example, 0.19 is 19%. 0 for a zero-rated or exempt code."},"rateType":{"type":"string","description":"The legal rate classification of the tax code. Possible values: 'Standard', 'Reduced', 'SuperReduced', 'Zero', 'Exempt'."},"scope":{"type":"string","description":"The territorial scope of the transaction. Possible values: 'Domestic', 'IntraEU_B2B', 'IntraEU_B2C', 'ExtraEU_Goods', 'ExtraEU_Services'."},"direction":{"type":"string","description":"Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales. Possible values: 'Input', 'Output'."},"isReverseCharge":{"type":"boolean","description":"Whether the recipient rather than the supplier accounts for the tax, for example under §13b UStG. A reverse-charge line books a second, crediting entry to reverseChargeCreditAccountId on each of its accounts."},"cashBasis":{"type":"boolean","description":"Cash basis: the tax becomes creditable only when the bill is paid. It posts to the uncollected account and moves to the collected account on payment."},"isActive":{"type":"boolean","description":"Whether the tax code is offered for selection on new documents. Inactive codes stay readable on existing documents."},"index":{"type":"number","description":"The position of the line within its configuration, used for display order."},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account mapping."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount on a reverse-charge line. Absent when isReverseCharge is false. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["id","chartOfAccountsId","accountId"]},"description":"The general ledger accounts this tax code books to, usually one for each chart of accounts the entity books in. Every tax code has at least one, including exempt and zero-rated codes, which book a tax line at zero."},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the component."},"taxComponentCode":{"type":"string"},"percentage":{"type":"string","format":"decimal"},"isRecoverable":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chartOfAccountsId":{"type":"string"},"accountId":{"type":"string"},"reverseChargeCreditAccountId":{"type":"string"},"collectedAccountId":{"type":"string"}},"additionalProperties":false,"required":["id","chartOfAccountsId","accountId"]}}},"additionalProperties":false,"required":["id","taxComponentCode","percentage","isRecoverable","accounts"]},"description":"The tax components of this code, with their GL accounts. Empty for a code that has line-level accounts only."}},"additionalProperties":false,"required":["id","title","percentage","rateType","scope","direction","isReverseCharge","cashBasis","isActive","index","accounts","components"]},"description":"The tax codes of this configuration, in display order. Every configuration has at least one."}},"additionalProperties":false,"required":["id","entityId","status","taxRegime","lastModifiedDate","lines"]},"description":"The matching tax configurations for this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchTaxConfigurationInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the tax configuration with this identifier."},"entityId":{"type":"string","description":"Limits results to the configuration of this legal entity. An entity has at most one, so this returns at most one match. See id on GET base/entities."},"status":{"type":"string","description":"Limits results to configurations of this status. Possible values: 'Active', 'Inactive'. Any other value matches no configuration."},"taxRegime":{"type":"string","description":"Limits results to configurations of this tax regime. Possible values: 'EU_VAT', 'India_GST', 'Canada_GST', 'Ghana_VAT', 'SingleRate_GST', 'Mexico_IVA'. Any other value matches no configuration."}},"additionalProperties":false,"description":"The filters to apply. A tax configuration must match every filter you send. Omit to return all tax configurations."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of tax configurations per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"releaseInvoiceMilestoneOutput":{"type":"object","properties":{},"additionalProperties":false},"releaseInvoiceMilestoneInput":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date","description":"The date the milestone is to be invoiced on. Its accounting period must be open. Format YYYY-MM-DD.","examples":["2026-12-15"]}},"additionalProperties":false,"required":["invoiceDate"]},"ingestUsageOutput":{"type":"object","properties":{"data":{"type":"object","properties":{"dataExtractionId":{"type":"number","description":"The identifier of the ingestion job. Pass it to GET accounting/usages/ingestions to poll per-record results."}},"additionalProperties":false,"required":["dataExtractionId"],"description":"The accepted ingestion job."}},"additionalProperties":false,"required":["data"]},"ingestUsageInput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"usageIdentifier":{"type":"string","description":"The subscription the usage belongs to: its external subscription ID or its internal subscription number (SUB-...). A customer name is also accepted when that customer has exactly one subscription. It does not identify the usage record: a record for the same subscription line, usage component, unit of measure and dateTime replaces the current one."},"dateTime":{"type":"string","description":"The date or date and time the usage was recorded against. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'."},"quantity":{"type":"string","description":"The quantity of usage, as a decimal string to keep precision. Send 0 to reset the usage recorded for the period."},"usageComponent":{"type":"string","description":"The billable component this usage maps to, by name or identifier. Omit to have it resolved from productIdentifier and unitOfMeasure."},"productIdentifier":{"type":"string","description":"The product code or identifier this usage is attributed to. It is used to resolve the billable component when usageComponent is omitted."},"description":{"type":"string","description":"A free-form description of the usage record, returned by GET accounting/usages/{id}. Omit to leave it unset. It does not take part in matching, so changing it does not create a new record."},"trackId":{"type":"string","description":"An identifier you supply to track this row through GET accounting/usages/ingestions."}},"additionalProperties":false,"required":["usageIdentifier","dateTime","unitOfMeasure","quantity"]},"description":"The usage records to ingest, in the default usage ingestion schema."},"mapping":{"type":"string","description":"The column mapping to apply. Defaults to 'Usage API Mapping' when omitted."},"sync":{"type":"boolean","description":"Whether to wait until ingestion finishes before responding. Defaults to false, which returns at once with a dataExtractionId to poll with GET accounting/usages/ingestions."}},"additionalProperties":false,"required":["items"]},"searchCreditCardEntryOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit card entry."},"creditCardEntryNumber":{"type":"string","description":"The credit card entry number. Absent until one has been assigned."},"name":{"type":"string","description":"The display name of the credit card entry."},"description":{"type":"string","description":"A free-form description of the entry."},"transactionDate":{"type":"string","format":"date","description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"type":"string","description":"The reconciliation status of the entry. Possible values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'."},"journalEntryNumber":{"type":"string","description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"type":"string","description":"A label for the source system the entry was created from."},"externalUrl":{"type":"string","description":"A link to the source document in an external system."},"creditCardAccountId":{"type":"string","description":"The credit card general-ledger account this entry is recorded against. See id on GET accounting/accounts/:id."},"creditCardAccountName":{"type":"string","description":"The name of the credit card general-ledger account."},"entityId":{"type":"string","description":"The legal entity this entry is posted under. See id on GET base/entities."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the credit card entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A free-form description of the line."},"lineType":{"type":"string","description":"The kind of line. Possible values: 'oneTime', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The gross line amount, including VAT, in the entry currency."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217. It always matches the entry currency."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the entry currency."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount on the line, in the entry currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%."},"origin":{"type":"string","description":"A label for the source system, copied onto the line from the entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. There is no endpoint for it."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to. Present only for a custom-dimension tag. See id on GET base/custom-dimensions."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. An older entry can carry tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags assigned to this line, departmentId and businessUnitId included. Set them with create or update."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. To read its schedule lines, pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted entry reads 'notStarted' until the entry posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id. Absent on a schedule that has no schedule lines yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far by the schedule lines whose journal entries are posted, in the entry currency. Zero until the first schedule line's journal entry is posted."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. To read the schedule lines, use GET accounting/amortization-schedule-lines and filter on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id","reportingTags"]},"description":"The posting lines of the entry, one per general-ledger posting. An empty array when the entry has none."}},"additionalProperties":false,"required":["id","transactionDate","status","lastModifiedDate"]},"description":"The credit card entries on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor to pass as page.cursor for the next page. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchCreditCardEntryInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the credit card entry with this identifier."},"creditCardEntryNumber":{"type":"string","description":"Limits results to the credit card entry with this number. The match is exact."},"journalEntryNumber":{"type":"string","description":"Limits results to entries that posted to the journal entry with this number. The match is exact."},"status":{"type":"string","description":"Limits results to entries in this status. Accepted values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'. Any other value matches nothing."},"currency":{"type":"string","description":"Limits results to entries denominated in this currency. Format ISO 4217, for example 'USD'."},"creditCardAccountId":{"type":"string","description":"Limits results to entries recorded against this credit card general-ledger account. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"Limits results to entries posted under this legal entity. See id on GET base/entities."},"origin":{"type":"string","description":"Limits results to entries created by this source system. The match is exact."}},"additionalProperties":false,"description":"The filters to apply. A credit card entry must match every filter you send. Omit to return all credit card entries.","examples":[{"status":"Unmatched"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of credit card entries per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchSalesOrderOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order."},"orderNumber":{"type":"string","description":"The sales order number. Unique within the tenant. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'. 'upsell' is a mid-term modification of a subscription: the order is stored as 'midTermModification', the name POST accounting/subscriptions/:id/modify uses, and this version reports it as 'upsell'. API version v2 reports it as 'midTermModification'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved order is booked business: an invoice run raises invoices for approved orders only. 'draft', 'pendingApproval' and 'revise' are awaiting approval and never share a total with approved orders."},"bookDate":{"type":"string","format":"date","description":"The date the sales order was booked. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the order's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the order's service period. Absent when isEvergreen is true. A subscription cancellation does not change it; a cancellation is read on the order's subscriptions (isCancellationEnabled, cancellationDate). Format YYYY-MM-DD."},"signDate":{"type":"string","format":"date","description":"The date the sales order was signed. Format YYYY-MM-DD."},"salesEffectiveDate":{"type":"string","format":"date","description":"The date the contract legally takes effect. salesEffectiveDate can be earlier than signDate. Format YYYY-MM-DD."},"isEvergreen":{"type":"boolean","description":"Whether the order is evergreen, meaning at least one of its subscriptions has no end date and keeps billing until it is canceled. It stays true after that cancellation; read cancellations on the subscriptions."},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the invoices, credit memos, and debit memos created from this order are left out of the tax engine. Always false when your tenant does not allow sales orders to be excluded from the tax engine."},"term":{"type":"string","format":"decimal","description":"The length of the order's term, in months. Absent when isEvergreen is true."},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'."},"totalContract":{"type":"string","format":"decimal","description":"The total value of the order before tax, in the order currency: the sum of totalPrice across its lines minus oneTimeDiscountAmount. It does not bound what an evergreen or pay-as-you-go-only order will bill, so on those totalContract minus invoicedAmount is not what remains."},"invoicedAmount":{"type":"string","format":"decimal","description":"The amount invoiced from this order so far, before tax, in the order currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"The one-time discount on the order as a whole, in the order currency."},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the order's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to the order's invoices. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"memo":{"type":"string","description":"A memo on the sales order."},"crmContractId":{"type":"string","description":"The identifier of the contract this order came from, in an external CRM system."},"salesArrangement":{"type":"string","description":"The number of the sales arrangement this order belongs to. No endpoint returns sales arrangements."},"salesArrangementId":{"type":"string","description":"The sales arrangement this order belongs to. No endpoint returns sales arrangements."},"paymentTermId":{"type":"string","description":"The payment term applied to the order's invoices. See id on GET accounting/payment-terms."},"opportunityId":{"type":"string","description":"The identifier of the opportunity this order came from, in an external CRM system."},"opportunityName":{"type":"string","description":"The name of the opportunity this order came from."},"dataSource":{"type":"string","description":"The system the order came from. Examples: 'Salesforce', 'NetSuite'."},"priceBookId":{"type":"string","description":"The price book the order's list prices come from. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The name of the price book the order's list prices come from. See priceBookName on GET accounting/price-books/:id."},"externalizedInvoicing":{"type":"boolean","description":"Whether another system invoices this order. When true, no invoice plans are created for the order."},"customer":{"type":"object","properties":{"id":{"type":"string","description":"The customer's identifier. See id on GET accounting/customers/:id."},"customerNumber":{"type":"string","description":"The customer number. Example: 'CUS-789012'."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to."},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"segment":{"type":"string","description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax."}},"additionalProperties":false,"required":["id","name"],"description":"The customer this order is for."},"entityId":{"type":"string","description":"The legal entity that owns this sales order. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this sales order. See entityName on GET base/entities."},"entityNumber":{"type":"string","description":"The number of the legal entity that owns this sales order. See entityNumber on GET base/entities."},"soldToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The sold-to address of the order. It is the customer address used to calculate tax."},"billToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The bill-to address of the order."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The subscription's identifier. See id on GET accounting/subscriptions/:id."},"subscriptionNumber":{"type":"string","format":"decimal","description":"The subscription number. See subscriptionNumber on GET accounting/subscriptions/:id."},"externalSubscriptionId":{"type":"string","description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"serviceStartDate":{"type":"string","format":"date","description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The latest service end date across all of the subscription's lines, including lines from other orders. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"products":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"The code of the product. See productCode on GET accounting/products/:id."},"productId":{"type":"string","description":"The product ordered on this line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line ordered on this line. See id on GET accounting/product-lines/:id."},"productName":{"type":"string","description":"The product's current name. See productName on GET accounting/products/:id."},"salesOrderProductLineId":{"type":"string","description":"The unique identifier for this order line. On a ramp deal, the identifier of the earliest ramp's line. The other ramps' line identifiers are not returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered on this line. On a ramp deal, it is the first ramp's quantity."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit, in the order currency. unitPrice = listPrice - discountAmount = listPrice × (1 - discountPercentage)."},"totalPrice":{"type":"string","format":"decimal","description":"The total price of the line, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit, as a decimal fraction of listPrice. For example, 0.1 is 10%."},"invoiceFrequency":{"type":"string","description":"How often the line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'. See invoiceFrequency on GET accounting/product-lines/:id."},"invoiceTiming":{"type":"string","description":"When the line is invoiced relative to the period it covers. Possible values: 'advance' (at the start of the period), 'arrears' (at the end of the period)."},"lineInvoiceDay":{"type":"string","description":"The day of the period the line is invoiced on. Possible values: 'anniversary', 'first', 'last', 'specific'."},"priceModel":{"type":"string","description":"How the price of this order line depends on quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. See priceModel on GET accounting/product-lines/:id."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. See unitOfMeasure on GET accounting/product-lines/:id."},"pricingTerm":{"type":"string","description":"The period the unit price covers. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'. See pricingTerm on GET accounting/product-lines/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of this line's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this line's service period. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array when the line has none."},"overage":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price per unit of overage usage, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit of overage usage, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, as a decimal fraction of listPrice. For example, 0.1 is 10%. Absent when discountAmount is present."}},"additionalProperties":false,"description":"The pricing for usage above the line's allowance. Absent when the line has no overage discount."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate card entry."},"identifier":{"type":"string","description":"The identifier of the billable component this entry prices. No endpoint returns billable components."},"label":{"type":"string","description":"A description of the rate card entry."},"unitOfMeasure":{"type":"string","description":"The unit this entry is priced in, for example 'user' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in this entry's currency."},"currency":{"type":"string","description":"The currency of unitPrice. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","unitOfMeasure","unitPrice","currency"]},"description":"The rate card entries of this line. Absent when the line has none."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier starts."},"toQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier ends. Absent on the last tier, which has no upper limit."},"unitPrice":{"type":"string","format":"decimal","description":"The price for this tier, in the order currency. When priceModel is 'perUnit', it is charged for each unit priced in this tier. When priceModel is 'flat', it is charged once for the tier, whatever the number of units."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this tier before discount, in the order currency."},"priceModel":{"type":"string","description":"How unitPrice applies within this tier. Possible values: 'flat', 'perUnit'."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of this line, lowest fromQuantity first. Absent when the line has none."},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The name of the tag dimension, for example 'Department'."},"value":{"type":"string","description":"The tag value within the dimension, for example 'Engineering'."}},"additionalProperties":false,"required":["dimension","value"]},"description":"The value accounting tags of this product, as dimension and value pairs. Every line of the same product has the same tags. Absent when the product has no tags."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the order's record of this item."},"itemId":{"type":"string","description":"The inventory item. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item code of the inventory item. See itemCode on GET inventory/items/:id."},"itemName":{"type":"string","description":"The name of the inventory item."},"productName":{"type":"string","description":"The name of the product the item belongs to."},"itemOrdered":{"type":"string","format":"decimal","description":"The quantity of this item ordered: the total quantity of the product across its lines on this order. It is not multiplied by the item's quantity in the product definition."},"totalShipped":{"type":"string","format":"decimal","description":"The quantity of this item shipped so far, summed across its shipments."}},"additionalProperties":false,"required":["id","itemOrdered"]},"description":"The inventory items of this product. Every line of the same product has the same items. Absent when the product has no items or is a ramp deal."},"rampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"How the ramp periods are set. Possible values: 'annually', 'specificDates'."},"invoiceTiming":{"type":"string","description":"How the ramp deal is invoiced. Possible values: 'perInterval', 'allAtOnce'."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"The first day of this ramp. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this ramp. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity for this ramp."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit for this ramp before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit for this ramp, in the order currency."},"invoiceFrequency":{"type":"string","description":"How often this ramp is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."}},"additionalProperties":false,"required":["serviceStartDate","serviceEndDate","quantity"]},"description":"The ramps of the deal, earliest first."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Present only when the product is a ramp deal. The entry then represents the whole product, and each ramp in ramps is one of its product lines, with its own dates, quantity, and prices, earliest first. On a ramp deal, the entry has no listPrice, unitPrice, totalPrice, discountAmount, discountPercentage, serviceStartDate, serviceEndDate, items, tiers, rateCardEntries, overage, or prepaidConfiguration."},"prepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative' (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews), 'overage' (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate)."},"rolloverAtRenewal":{"type":"boolean","description":"Whether unused balance rolls over when the subscription renews."},"balance":{"type":"string","format":"decimal","description":"The prepaid units (credits) left in the balance."},"consumedAmount":{"type":"string","format":"decimal","description":"The prepaid units (credits) used so far: the quantity funded by this line minus the current balance. Absent when balance is absent."}},"additionalProperties":false,"required":["overConsumptionBehavior","rolloverAtRenewal"],"description":"The prepaid balance settings of this line. Absent when the line is not a prepaid line."}},"additionalProperties":false,"required":["productCode","productId","productLineId","quantity","externalIdentifiers"]},"description":"The product lines of this subscription on this order, one entry per product line. For a ramp deal, one entry represents the whole product, and each ramp in rampDeal.ramps is one of its product lines."}},"additionalProperties":false,"required":["products"]},"description":"The order's subscriptions, each with the product lines that belong to it. An empty array when the order has none."},"nonSubscriptionProducts":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"The code of the product. See productCode on GET accounting/products/:id."},"productId":{"type":"string","description":"The product ordered on this line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line ordered on this line. See id on GET accounting/product-lines/:id."},"productName":{"type":"string","description":"The product's current name. See productName on GET accounting/products/:id."},"salesOrderProductLineId":{"type":"string","description":"The unique identifier for this order line. On a ramp deal, the identifier of the earliest ramp's line. The other ramps' line identifiers are not returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered on this line. On a ramp deal, it is the first ramp's quantity."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit, in the order currency. unitPrice = listPrice - discountAmount = listPrice × (1 - discountPercentage)."},"totalPrice":{"type":"string","format":"decimal","description":"The total price of the line, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit, as a decimal fraction of listPrice. For example, 0.1 is 10%."},"invoiceFrequency":{"type":"string","description":"How often the line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'. See invoiceFrequency on GET accounting/product-lines/:id."},"invoiceTiming":{"type":"string","description":"When the line is invoiced relative to the period it covers. Possible values: 'advance' (at the start of the period), 'arrears' (at the end of the period)."},"lineInvoiceDay":{"type":"string","description":"The day of the period the line is invoiced on. Possible values: 'anniversary', 'first', 'last', 'specific'."},"priceModel":{"type":"string","description":"How the price of this order line depends on quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. See priceModel on GET accounting/product-lines/:id."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. See unitOfMeasure on GET accounting/product-lines/:id."},"pricingTerm":{"type":"string","description":"The period the unit price covers. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'. See pricingTerm on GET accounting/product-lines/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of this line's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this line's service period. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array when the line has none."},"overage":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price per unit of overage usage, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit of overage usage, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, as a decimal fraction of listPrice. For example, 0.1 is 10%. Absent when discountAmount is present."}},"additionalProperties":false,"description":"The pricing for usage above the line's allowance. Absent when the line has no overage discount."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate card entry."},"identifier":{"type":"string","description":"The identifier of the billable component this entry prices. No endpoint returns billable components."},"label":{"type":"string","description":"A description of the rate card entry."},"unitOfMeasure":{"type":"string","description":"The unit this entry is priced in, for example 'user' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in this entry's currency."},"currency":{"type":"string","description":"The currency of unitPrice. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","unitOfMeasure","unitPrice","currency"]},"description":"The rate card entries of this line. Absent when the line has none."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier starts."},"toQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier ends. Absent on the last tier, which has no upper limit."},"unitPrice":{"type":"string","format":"decimal","description":"The price for this tier, in the order currency. When priceModel is 'perUnit', it is charged for each unit priced in this tier. When priceModel is 'flat', it is charged once for the tier, whatever the number of units."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this tier before discount, in the order currency."},"priceModel":{"type":"string","description":"How unitPrice applies within this tier. Possible values: 'flat', 'perUnit'."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of this line, lowest fromQuantity first. Absent when the line has none."},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The name of the tag dimension, for example 'Department'."},"value":{"type":"string","description":"The tag value within the dimension, for example 'Engineering'."}},"additionalProperties":false,"required":["dimension","value"]},"description":"The value accounting tags of this product, as dimension and value pairs. Every line of the same product has the same tags. Absent when the product has no tags."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the order's record of this item."},"itemId":{"type":"string","description":"The inventory item. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item code of the inventory item. See itemCode on GET inventory/items/:id."},"itemName":{"type":"string","description":"The name of the inventory item."},"productName":{"type":"string","description":"The name of the product the item belongs to."},"itemOrdered":{"type":"string","format":"decimal","description":"The quantity of this item ordered: the total quantity of the product across its lines on this order. It is not multiplied by the item's quantity in the product definition."},"totalShipped":{"type":"string","format":"decimal","description":"The quantity of this item shipped so far, summed across its shipments."}},"additionalProperties":false,"required":["id","itemOrdered"]},"description":"The inventory items of this product. Every line of the same product has the same items. Absent when the product has no items or is a ramp deal."},"rampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"How the ramp periods are set. Possible values: 'annually', 'specificDates'."},"invoiceTiming":{"type":"string","description":"How the ramp deal is invoiced. Possible values: 'perInterval', 'allAtOnce'."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"The first day of this ramp. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this ramp. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity for this ramp."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit for this ramp before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit for this ramp, in the order currency."},"invoiceFrequency":{"type":"string","description":"How often this ramp is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."}},"additionalProperties":false,"required":["serviceStartDate","serviceEndDate","quantity"]},"description":"The ramps of the deal, earliest first."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Present only when the product is a ramp deal. The entry then represents the whole product, and each ramp in ramps is one of its product lines, with its own dates, quantity, and prices, earliest first. On a ramp deal, the entry has no listPrice, unitPrice, totalPrice, discountAmount, discountPercentage, serviceStartDate, serviceEndDate, items, tiers, rateCardEntries, overage, or prepaidConfiguration."},"prepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative' (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews), 'overage' (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate)."},"rolloverAtRenewal":{"type":"boolean","description":"Whether unused balance rolls over when the subscription renews."},"balance":{"type":"string","format":"decimal","description":"The prepaid units (credits) left in the balance."},"consumedAmount":{"type":"string","format":"decimal","description":"The prepaid units (credits) used so far: the quantity funded by this line minus the current balance. Absent when balance is absent."}},"additionalProperties":false,"required":["overConsumptionBehavior","rolloverAtRenewal"],"description":"The prepaid balance settings of this line. Absent when the line is not a prepaid line."}},"additionalProperties":false,"required":["productCode","productId","productLineId","quantity","externalIdentifiers"]},"description":"The order's product lines that belong to no subscription, with the same fields as subscriptions[].products. An empty array when the order has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to product lines do not update it."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The order's identifiers in other systems, at most one per field name. An empty array when the order has none."}},"additionalProperties":false,"required":["id","orderNumber","bookDate","currency","customer","entityId","entityNumber","soldToAddress","billToAddress","subscriptions","nonSubscriptionProducts","lastModifiedDate"]},"description":"The sales orders on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSalesOrderInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the sales order with this identifier."},"orderNumber":{"type":"string","description":"Limits results to the sales order with this order number, for example 'SO-1042'. The match is exact."},"orderType":{"type":"string","description":"Limits results to sales orders of this type. Accepted values: 'new', 'upsell', 'midTermModification', 'earlyRenewal', 'renewal', 'replacement'. 'upsell' and 'midTermModification' both select mid-term modification orders, which the results report as 'upsell'. Any other value matches no sales order."},"approvalStatus":{"type":"string","description":"Limits results to sales orders with this approval status. Accepted values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Any other value matches no sales order."},"purchaseOrder":{"type":"string","description":"Limits results to sales orders with this purchase-order reference. The match is exact."},"entityId":{"type":"string","description":"Limits results to sales orders owned by this legal entity. See id on GET base/entities."},"customerId":{"type":"string","description":"Limits results to sales orders sold to this customer. See customer.id on this response or id on POST accounting/customers/search."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. A field name that is not configured for sales orders fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier in the other system. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to sales orders with this identifier in another system. Send both fieldName and value."}},"additionalProperties":false,"description":"The filters to apply. A sales order must match every filter you send. Omit to return all sales orders."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of sales orders per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"getCustomerOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the customer."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"customerNumber":{"type":"string","description":"The customer number. Example: 'CUS-789012'."},"customerType":{"type":"string","description":"The customer type. Possible values: 'default' (a direct customer), 'partner' (a reseller or third-party payer that is invoiced for its end customers), 'endCustomer' (a customer that buys through a partner)."},"partnerType":{"type":"string","description":"The partner type of a customer whose customerType is 'partner'. Possible values: 'reseller', 'thirdPartyPayer'."},"businessType":{"type":"string","description":"The business type of the customer. Possible values: 'company', 'individual'."},"entityId":{"type":"string","description":"The legal entity that invoices this customer."},"entityName":{"type":"string","description":"The name of the legal entity that invoices this customer."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the customer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to."},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax."},"defaultCurrency":{"type":"string","description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code."},"segment":{"type":"string","description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'. Absent when businessType is 'individual'."},"paymentTermLabel":{"type":"string","description":"The display name of the payment term applied to the customer's invoices. See label on GET accounting/payment-terms."},"exemptionNumber":{"type":"string","description":"The tax-exemption certificate number. Absent when taxExempt is false."},"addresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Possible values: 'billTo', 'soldTo'."},"isDefault":{"type":"boolean","description":"Whether this is the customer's default address of its type."},"addressId":{"type":"string","description":"The unique identifier for the address."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","isDefault"]},"description":"The customer's addresses, bill-to entries first, then sold-to. Each entry names its type and whether it is that type's default. An empty array when the customer has no address."},"taxExemptCode":{"type":"string","description":"The tax-exemption reason code."},"salesChannel":{"type":"string","description":"The sales channel for this customer. Possible values: 'salesAssisted' (sold through a salesperson), 'selfServe'."},"additionalContactEmail":{"type":"string","description":"Another email address for the customer, besides invoiceEmail and mainEmail."},"mainContactName":{"type":"string","description":"The name of the customer's main contact."},"preferredLanguage":{"type":"string","description":"The customer's preferred language. Possible values: 'english'."},"crmCustomerId":{"type":"string","description":"The customer's identifier in an external CRM system."},"businessIdentificationNumber":{"type":"string","description":"The customer's business registration number."},"invoiceConsolidation":{"type":"string","description":"How the customer's invoices are consolidated. Possible values: 'customer', 'purchaseOrderNumber', 'salesArrangement'."},"invoiceDeliveryMode":{"type":"string","description":"How invoices are delivered to the customer. Possible values: 'manual', 'automated'."},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether the customer is exempt from credit-card fees."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel and expense items appear on invoices. Possible values: 'detailed', 'consolidated'."},"status":{"type":"string","description":"The status of the customer. Possible values: 'active', 'inactive'."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to the customer's invoices. See code on GET accounting/payment-terms. `paymentTermLabel` is its display name."},"taxRegistrations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"The country the registration applies in, as an ISO 3166-1 code."},"taxNumber":{"type":"string","description":"The tax identification number issued by the tax authority."},"type":{"type":"string","description":"The kind of tax registration. Possible values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'."},"effectiveDate":{"type":"string","description":"The date the registration takes effect. Format YYYY-MM-DD."},"isActive":{"type":"boolean","description":"Whether the registration is active. Only one active registration is allowed per country and tax type."},"note":{"type":"string","description":"An internal note on the registration."},"validationStatus":{"type":"string","description":"The validation state the tax engine assigned."},"validationMessages":{"type":"string","description":"Detail behind the validation state, when the tax engine recorded any."}},"additionalProperties":false,"required":["country","taxNumber","type"]},"description":"The customer's tax registrations. An empty array when the customer has none."},"payment":{"type":"object","properties":{"provider":{"type":"string","description":"The name of the payment provider. Example: 'Stripe'."},"externalCustomerId":{"type":"string","description":"The customer's identifier in the payment provider's system."},"externalPaymentMethodId":{"type":"string","description":"The customer's default payment method in the payment provider's system."}},"additionalProperties":false,"description":"The customer's link to a payment provider. Absent when no provider is linked."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The customer's identifiers in other systems, one per configured field name. An empty array when the customer has none."}},"additionalProperties":false,"required":["id","name","customerNumber","entityId","lastModifiedDate"]},"createSalesOrderShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created sales order shipment.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createSalesOrderShipmentInput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The approved sales order to ship. Its inventory products and their items define what goes on the shipment. See id on GET accounting/sales-orders/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL to record on the shipment. Omit to leave it unset."},"carrier":{"type":"string","description":"The name of the carrier handling the shipment. Omit to leave it unset.","examples":["DHL"]},"incoterm":{"type":"string","description":"The incoterm governing shipping responsibility. For example 'DAP' or 'EXW'. Omit to leave it unset.","examples":["DAP"]},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. Omit to leave it unset. See id on GET inventory/warehouses/:id."},"shipToContactEmail":{"type":"string","description":"The email of the contact who receives this shipment. Omit to leave it unset."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer asked for delivery. Use format YYYY-MM-DD. Omit to leave it unset."},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment is expected to be delivered. Use format YYYY-MM-DD. Omit to leave it unset."}},"additionalProperties":false,"required":["salesOrderId"]},"createChartOfAccountsOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created chart of accounts.","examples":["4b6f7c1e-2a9d-4e3b-8f51-0c7d2e9a6b14"]}},"additionalProperties":false,"required":["id"]},"createChartOfAccountsInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the chart of accounts. Must not be empty.","examples":["US GAAP Chart of Accounts"]},"description":{"type":"string","description":"A free-form description of the chart of accounts. Omit it, or send an empty string, for none.","examples":["Chart of accounts for the US entities"]},"accountNumbering":{"type":"string","description":"How account numbers are assigned within this chart of accounts. Accepted values: 'hierarchical' (numbers follow the account's position in the hierarchy), 'manual' (numbers are assigned by hand). Defaults to 'hierarchical'. Locked once the chart of accounts has accounts, draft accounts included.","examples":["hierarchical"]},"accountNumberingDigits":{"type":"string","description":"The total width of an account number, which caps how deep the hierarchy can go. Accepted values: 'sixDigits' (up to 4 levels), 'sevenDigits' (5), 'eightDigits' (6), 'nineDigits' (7), 'tenDigits' (8). Defaults to 'sixDigits' when accountNumbering is 'hierarchical'; not accepted when it is 'manual'. Locked once the chart of accounts has accounts, draft accounts included.","examples":["sixDigits"]}},"additionalProperties":false,"required":["name"]},"updateBankAccountOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankAccountInput":{"type":"object","properties":{"externalAccountId":{"type":"string","description":"The account's identifier in the system that owns it, for example its IBAN or ACH account number. Must be unique within the tenant. Omit to leave unchanged. The account's own current value is not a collision."},"accountId":{"type":"string","description":"The general-ledger account this bank account posts to. Omit to leave unchanged. See id on GET accounting/accounts/:id."},"financialInstitutionId":{"type":"string","description":"The financial institution holding the account. Omit to leave unchanged. There is no endpoint for it."},"currency":{"type":"string","description":"The account currency. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"type":{"type":"string","description":"The kind of account, as free-form text. For example 'checking' or 'saving'. Omit to leave unchanged.","examples":["savings"]},"reference":{"type":"string","description":"The IBAN or ACH account number. When referenceType is 'QRR' this must be a Swiss QR-IBAN. Omit to leave unchanged."},"referenceType":{"type":"string","description":"How payment references on this account are structured. Accepted values: 'QRR', 'SCOR', 'NON'. Omit to leave unchanged.","examples":["NON"]},"referenceNumber":{"type":"string","description":"A structured creditor reference number for this account. Omit to leave unchanged."},"receivableAccount":{"type":"boolean","description":"Whether the account may receive incoming payments. Omit to leave unchanged.","examples":[true]}},"additionalProperties":false},"updateSalesOrderShipmentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateSalesOrderShipmentInput":{"type":"object","properties":{"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL. Omit to leave unchanged."},"shipmentNumber":{"type":"string","description":"The shipment document number. Omit to leave unchanged."},"carrier":{"type":"string","description":"The name of the carrier handling the shipment. Omit to leave unchanged.","examples":["DHL"]},"incoterm":{"type":"string","description":"The incoterm. For example 'DAP' or 'EXW'. Omit to leave unchanged."},"status":{"enum":["pendingShipment","shipped","cancelled"],"description":"The lifecycle status. Omit to leave unchanged. Setting 'cancelled' soft-cancels the accounting mirror only and leaves the inventory shipment untouched.","examples":["shipped"]},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. Omit to leave unchanged. See id on GET inventory/warehouses/:id."},"shipToContactEmail":{"type":"string","description":"The shipping contact email. Omit to leave unchanged."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer requested delivery. Use format YYYY-MM-DD. Omit to leave unchanged."},"shipDate":{"type":"string","format":"date","description":"The date the shipment was dispatched. Use format YYYY-MM-DD. Omit to leave unchanged."},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment is delivered. Use format YYYY-MM-DD. Omit to leave unchanged."},"createItems":{"type":"array","items":{"type":"object","properties":{"salesOrderProductItemId":{"type":"string","description":"The sales order product item the new shipment line is for. If no product item has this id, the request fails with SALES_ORDER_PRODUCT_ITEMS_NOT_FOUND. See items[].id on GET accounting/sales-orders/:id."},"shippedQty":{"type":"string","format":"decimal","description":"The quantity shipped on the new line, as a count of units."}},"additionalProperties":false,"required":["salesOrderProductItemId","shippedQty"]},"description":"Lines to add to the shipment. Each has no id because the line doesn't exist yet, and its orderedQty is copied from the sales order product item. Omit for no additions."},"updateItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line to change. It must belong to this shipment, or the request fails with SHIPMENT_ITEMS_NOT_FOUND."},"shippedQty":{"type":"string","format":"decimal","description":"The new shipped quantity for the line, as a count of units. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, matched by the line's own id. Omit for no changes.","examples":[[{"id":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","shippedQty":"5"}]]},"deleteItems":{"type":"array","items":{"type":"string"},"description":"The identifiers of the shipment lines to remove. Each must belong to this shipment, or the request fails with SHIPMENT_ITEMS_NOT_FOUND. Omit for no removals."}},"additionalProperties":false},"pricingRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header."},"headerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The pricing header number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The product line this pricing header prices. See id on GET accounting/product-lines/:id."},"productLineName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the product line. See name on GET accounting/product-lines/:id."},"productLineNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product line number. See productLineNumber on GET accounting/product-lines/:id."},"productId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the product. See productName on GET accounting/products/:id."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"dataSource":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system or import job that produced the pricing header. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"hasBeenUsed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether at least one sales order line uses this pricing header."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the pricing header was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the pricing header last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"cancelAccountingSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"status":{"type":"string","description":"The lifecycle status after the call. Always 'cancelled' on success."}},"additionalProperties":false,"required":["id","status"]},"cancelAccountingSalesReturnInput":{"type":"object","properties":{},"additionalProperties":false},"createEntityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the created entity.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createEntityInput":{"type":"object","properties":{"entityName":{"type":"string","description":"The name of the entity. At most 120 characters; must be unique within the tenant.","examples":["Acme GmbH"]},"entityType":{"enum":["LegalEntity","NonLegalReportingEntity"],"description":"Whether the entity is a legal entity or a non-legal reporting entity. Defaults to 'LegalEntity'. Cannot be changed later. A non-legal reporting entity is always a top-level entity: it has no parent, so send it without parentEntityId (also when other entities exist). It may be the parent of legal entities."},"parentEntityId":{"type":"string","description":"The parent entity in the hierarchy. For a legal entity: required once any entity exists; omit it only for the first, top-level entity. Any existing entity may be the parent, including a non-legal reporting entity. For a non-legal reporting entity: not accepted (FIELD_NOT_ALLOWED), since it is always top-level. See id on GET base/entities/:id.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"currency":{"type":"string","description":"The entity's functional currency. Format ISO 4217, for example 'USD'. A code outside the supported currencies fails with INVALID_FIELD_VALUE. Entity-only: it is not copied to any book assignment.","examples":["EUR"]},"timeZone":{"type":"string","description":"The time zone the entity operates in. Format IANA time-zone name, for example 'Europe/Berlin'. Defaults to 'Etc/UTC'. An unknown zone fails with INVALID_FIELD_VALUE.","examples":["Europe/Berlin"]},"country":{"type":"string","description":"The country the entity is registered in. Format ISO 3166-1 alpha-2, for example 'US'. An unknown code fails with INVALID_FIELD_VALUE.","examples":["DE"]},"entityCode":{"type":"string","description":"A short code for the entity, separate from its entityNumber."},"localeCode":{"type":"string","description":"The locale for documents sent from this entity. Format BCP 47, for example 'en-US'. A locale the tenant does not offer fails with INVALID_FIELD_VALUE."},"startDate":{"type":"string","format":"date","description":"The date the entity becomes effective. Format YYYY-MM-DD. Cannot be before the parent's start date. Required later to activate the entity."},"registeredAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'US'. An unknown code fails with INVALID_FIELD_VALUE."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The entity's registered address.","examples":[{"line1":"Friedrichstrasse 68","city":"Berlin","country":"DE","zipCode":"10117"}]},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteSubsidiaryId'."},"value":{"type":"string","description":"The identifier as the source system holds it. Cannot be empty."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Anything else fails with INVALID_FIELD_VALUE."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems. At most one entry per fieldName, and each fieldName must be configured. List the configured fieldNames on GET base/entity-external-identifier-fields; any other fails with UNKNOWN_EXTERNAL_IDENTIFIER.","examples":[[{"fieldName":"netsuiteSubsidiaryId","value":"12"}]]}},"additionalProperties":false,"required":["entityName"]},"searchPriceBookOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book."},"priceBookName":{"type":"string","description":"The display name of the price book, unique within the tenant and compared case-insensitively."},"priceBookNumber":{"type":"string","description":"The price book number, for example 'PB-000123'. Absent until a number range assigns one."},"description":{"type":"string","description":"A free-form description of the price book. Absent when none is set."},"active":{"type":"boolean","description":"Whether the price book is active and usable in transactions."},"isStandard":{"type":"boolean","description":"Whether this is the standard (default) price book. Only one price book is the standard at a time. It cannot be set through this API."},"dataSource":{"type":"string","description":"The source system that provided the price book data. Absent when none is set."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the price book was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the price book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","priceBookName","lastModifiedDate"]},"description":"The price books that match, ordered by id. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPriceBookInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the price book with this identifier. The match is exact."},"priceBookNumber":{"type":"string","description":"Limits results to the price book with this price book number, for example 'PB-000123'. The match is exact."},"priceBookName":{"type":"string","description":"Limits results to price books whose name contains this text. The match is case-insensitive."},"isStandard":{"type":"boolean","description":"Limits results to the standard price book when true, or to non-standard price books when false."},"active":{"type":"boolean","description":"Limits results to active price books when true, or inactive ones when false."},"dataSource":{"type":"string","description":"Limits results to price books whose data source is this value."},"createdDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The inclusive start of the range, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","format":"date-time","description":"The inclusive end of the range, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to price books created within this date range. Both bounds are inclusive, and omitting one leaves that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The inclusive start of the range, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","format":"date-time","description":"The inclusive end of the range, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to price books last changed within this date range. Both bounds are inclusive, and omitting one leaves that side open."}},"additionalProperties":false,"description":"The filters to apply. A price book must match every filter you send. Omit to return all price books."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of price books per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"getIntercompanyBillOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the intercompany bill."},"intercompanyBillNumber":{"type":"string","description":"The intercompany bill number. Unique within the tenant. Example: 'ICB-1'."},"name":{"type":"string","description":"The name of the intercompany bill."},"description":{"type":"string","description":"A description of the intercompany bill."},"fromEntityId":{"type":"string","description":"The legal entity that issues the intercompany bill and is owed the amount. See id on GET base/entities."},"fromEntityName":{"type":"string","description":"The name of the issuing legal entity. See entityName on GET base/entities."},"toEntityId":{"type":"string","description":"The legal entity that receives the intercompany bill and is charged for it. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of the receiving legal entity. See entityName on GET base/entities."},"intercompanyProcessId":{"type":"string","description":"The intercompany process whose intercompany receivable and payable accounts balance each legal entity's side of the bill's journal entry. Bills created by a system process that don't name one use the default 'Intercompany Transaction' process. No endpoint returns intercompany processes."},"intercompanyProcessName":{"type":"string","description":"The name of the intercompany process."},"currency":{"type":"string","description":"The currency of the intercompany bill. Every amount on the bill and its lines is in this currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert amounts from the intercompany bill's currency to each legal entity's functional currency. The same rate is used for both legal entities."},"billMarkup":{"type":"string","description":"How markupAmount is applied to the lines. Possible values: 'none' (no markup: markupAmount and each line's markup are 0), 'percentage' (each line's markup is its amount multiplied by markupAmount), 'flatFee' (markupAmount is a total split evenly across the lines)."},"markupAmount":{"type":"string","format":"decimal","description":"The markup on the lines. How to read markupAmount depends on billMarkup. When billMarkup is 'percentage', markupAmount is a decimal fraction of each line's amount, so 0.1 is 10%. When billMarkup is 'flatFee', markupAmount is a total in the intercompany bill's currency, split evenly across the lines and rounded to 2 decimal places, with any remainder on the first line. 0 when billMarkup is 'none'."},"billDate":{"type":"string","format":"date","description":"The date of the intercompany bill. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment term of the intercompany bill. Possible values: 'net30', 'net60', 'net90', 'dueOnReceipt', 'net15', 'custom'."},"dueDate":{"type":"string","format":"date","description":"The date the intercompany bill falls due. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The start date of the service period the intercompany bill covers. Format YYYY-MM-DD."},"status":{"type":"string","description":"The status of the intercompany bill. Possible values: 'draft', 'open', 'partiallySettled', 'settled', 'voided'."},"voidReason":{"type":"string","description":"The reason given when the intercompany bill was voided. Absent when status is not 'voided'."},"type":{"type":"string","description":"How the intercompany bill was created. Possible values: 'manual' (in the application), 'system' (by a system process, such as an allocation run)."},"postingDirection":{"type":"string","description":"The direction of the intercompany bill's journal entry postings. Possible values: 'normal', 'reverse'. When postingDirection is 'reverse', the debit and credit accounts of the intercompany process are swapped."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the intercompany bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"description":{"type":"string","description":"A description of the line."},"amount":{"type":"string","format":"decimal","description":"The amount of the line before markup, in the intercompany bill's currency."},"fromAccountId":{"type":"string","description":"The account the issuing legal entity credits with the line's amount, typically where it records the income or recharge. Markup is credited to the issuing entity's markup account instead. See id on GET accounting/accounts/:id."},"toAccountId":{"type":"string","description":"The account the receiving legal entity debits with the line's amount plus markup, typically where it records the cost or asset. See id on GET accounting/accounts/:id."},"fromValueAllocationId":{"type":"string","description":"The numeric id of the value accounting tags on the issuing legal entity's side, not a UUID. No endpoint returns value accounting tags. Absent when value accounting tags are not in use."},"toValueAllocationId":{"type":"string","description":"The numeric id of the value accounting tags on the receiving legal entity's side, not a UUID. No endpoint returns value accounting tags. Absent when value accounting tags are not in use."},"markupAmount":{"type":"string","format":"decimal","description":"The markup on the line, in the intercompany bill's currency, calculated from the bill's billMarkup and markupAmount."},"fromTaxAmount":{"type":"string","format":"decimal","description":"The tax the issuing legal entity charges on the line (output tax), in the intercompany bill's currency. It is the rate of the issuing entity's tax configuration multiplied by the line's amount plus markup. Absent when no tax applies."},"toTaxAmount":{"type":"string","format":"decimal","description":"The tax the receiving legal entity pays on the line and records as recoverable (input tax), in the intercompany bill's currency. It is the rate of the receiving entity's tax configuration multiplied by the line's amount plus markup. Absent when no tax applies."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the intercompany bill. An empty array when the bill has no lines."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"accountsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account."},"accountNumber":{"type":"string","description":"The account number, unique within its chart of accounts."},"accountName":{"type":"string","description":"The display name of the account."},"accountType":{"enum":["asset","liability","equity","income","costOfGoodsSold","expense","otherIncome","otherExpense"],"description":"The top-level classification of the account."},"accountSubType":{"anyOf":[{"enum":["bank","accountsReceivable","fixedAsset","cip","prepaidExpenses","deferredExpenses","otherCurrentAsset","otherAsset","unbilledReceivable","longTermAsset","accountsPayable","creditCard","deferredRevenue","otherCurrentLiability","longTermLiability","equity","income","costOfGoodsSold","expense","otherIncome","otherExpense","otherComprehensiveIncome"]},{"type":"null"}],"description":"A finer classification within accountType. Absent when none is assigned."},"accountStatus":{"anyOf":[{"enum":["enabled","disabled","draft","draftErrors"]},{"type":"null"}],"description":"The lifecycle status of the account. Possible values: 'enabled' (available on transactions), 'disabled' (not available for new transactions), 'draft' (created but not yet reviewed), 'draftErrors' (a draft with validation errors to resolve before it can be enabled)."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the account. Absent when none was set."},"chartOfAccountsId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the chart of accounts this account belongs to. An account belongs to exactly one. See id on GET accounting/chart-of-accounts/:id."},"parentAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the parent account this account rolls up to. Absent for a top-level account. See id on GET accounting/accounts/:id."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Balances from child accounts aggregate here, and journal entries cannot be posted to it directly."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the legal entity this account is denominated for. Set only on bank and credit-card accounts. See id on GET base/entities."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account's currency. Format ISO 4217, for example 'USD'. Set only on accounts linked to a cash account, alongside entityId."},"revaluation":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether balances on this account are revalued for exchange-rate changes."},"revaluationMode":{"anyOf":[{"enum":["recognizeAll","recognizeAllButUnrealizedGains","none"]},{"type":"null"}],"description":"Which revaluation results this account recognizes. Possible values: 'recognizeAll' (both unrealized gains and unrealized losses), 'recognizeAllButUnrealizedGains' (only unrealized losses, leaving gains unposted as the imparity principle requires), 'none' (the account is not revalued). Absent when the account has no mode set. `revaluation` is true for every value other than 'none'."},"payOnBehalf":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this account takes part in pay-on-behalf accounting."},"elimination":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this account is eliminated during consolidation: a consolidated ledger offsets, with 'elimination' lines, the amounts on it whose customer, vendor or intercompany partner represents another entity of the consolidated hierarchy. intercompanyPartnerId on journal entry lines is only one of those partners, so filtering on it does not find every eliminated line."},"exchangeRateType":{"anyOf":[{"enum":["historical","average","current"]},{"type":"null"}],"description":"Which rate translates this account's amounts on revaluation. Absent on grouping accounts."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the account record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateCreditMemoOutput":{"type":"object","properties":{},"additionalProperties":false},"updateCreditMemoInput":{"type":"object","properties":{"creditMemoDate":{"type":"string","format":"date","description":"The new issue date. Use format YYYY-MM-DD."},"description":{"type":"string","description":"The new description."},"externalCreditMemoId":{"type":"string","description":"The new identifier of this credit memo in an external source system."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo line to edit, as returned by GET accounting/credit-memos/:id."},"description":{"type":"string","description":"The new line description, as shown to the customer. On a manual credit memo it cannot be cleared, because a description is required there."}},"additionalProperties":false,"required":["id"]},"description":"The line edits, keyed by line id. Only the description can be edited. Lines cannot be added or removed here."}},"additionalProperties":false},"journalEntriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the journal entry."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the journal entry."},"status":{"enum":["posted","unposted","voided"],"description":"The posting status of the journal entry."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the entry originated, for example 'manual', 'invoice', 'revaluation' or 'reversal'. A system-assigned value."},"consolidationAdjustmentType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set on a consolidation adjustment. Possible values: 'consolidationAdjustment'. Absent on a regular journal entry."},"approvalStatus":{"anyOf":[{"enum":["draft","pendingApproval","revise","approved","rejected"]},{"type":"null"}],"description":"The approval status of the journal entry. Absent on entries that never entered the approval workflow."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Format YYYY-MM-DD."},"reversalDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The reversal date recorded on the entry. Format YYYY-MM-DD. Set on an entry that is or will be reversed: the date its reversal posts. The reversal entry itself carries none; its posting date is this date, its type is 'reversal' ('revaluationReversal' for a revaluation), and no public field links it back to this entry."},"reversalReason":{"anyOf":[{"enum":["accrualReversal","revaluationReversal","estimate","rebook","reversingSFD","other"]},{"type":"null"}],"description":"The reason recorded for the reversal, on the entry being reversed. Possible values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'."},"reversalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description recorded on the reversal."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the journal entry."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A link to the source document this entry comes from."},"bookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the accounting book this entry posts to. See name on GET accounting/books/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the journal entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchPerformanceObligationOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the performance obligation."},"performanceObligationNumber":{"type":"string","description":"The performance obligation number. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the performance obligation, as it appears on revenue contracts and schedules."},"description":{"type":"string","description":"A free-form description of what the obligation covers. Absent when none is set."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this obligation is in effect. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this obligation is in effect. Format YYYY-MM-DD. Absent when the obligation is open-ended."},"allocationStartDate":{"type":"string","format":"date","description":"The date from which revenue for this obligation takes part in allocation. Format YYYY-MM-DD. Absent when none is set."},"isAllocationExcluded":{"type":"boolean","description":"Whether the revenue contract lines of this obligation are left out of fair-value allocation."},"isNetAccounting":{"type":"boolean","description":"Whether the obligation is accounted net rather than gross."},"defaultAmortizationMethod":{"type":"string","description":"The default amortization method used when scheduling this obligation's revenue. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"standaloneSellingPriceRangeType":{"type":"string","description":"How the obligation's standalone selling price ranges are expressed. Possible values: 'percentage', 'amount'."},"revenueSchedulingTemplateId":{"type":"string","description":"The unique identifier for the revenue scheduling template that schedules this obligation's revenue. See id on GET accounting/revenue-scheduling-templates/:id."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template that schedules this obligation's revenue."},"standaloneSellingPriceStratificationConfigurationId":{"type":"string","description":"The unique identifier for the standalone selling price stratification configuration this obligation stratifies by. Absent when none is set. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the performance obligation last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"standaloneSellingPriceRanges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the standalone selling price range."},"rangeNumber":{"type":"string","description":"The standalone selling price range number."},"rangeType":{"type":"string","description":"How this range is expressed. Possible values: 'percentage', 'amount'."},"currency":{"type":"string","description":"The currency the amounts are given in. Format ISO 4217, for example 'USD'. Absent on a percentage range."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this range applies. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The last date this range applies. Format YYYY-MM-DD. Absent when the range is open-ended."},"lowAmount":{"type":"string","format":"decimal","description":"The lower bound of the standalone selling price, in the range currency. Set on an amount range."},"midAmount":{"type":"string","format":"decimal","description":"The midpoint of the standalone selling price, in the range currency. Set on an amount range."},"highAmount":{"type":"string","format":"decimal","description":"The upper bound of the standalone selling price, in the range currency. Set on an amount range."},"lowPercentage":{"type":"string","format":"decimal","description":"The lower bound of the standalone selling price, as a percentage of list price. Set on a percentage range."},"midPercentage":{"type":"string","format":"decimal","description":"The midpoint of the standalone selling price, as a percentage of list price. Set on a percentage range."},"highPercentage":{"type":"string","format":"decimal","description":"The upper bound of the standalone selling price, as a percentage of list price. Set on a percentage range."},"term":{"type":"string","description":"The period the range's prices are quoted over. Possible values: 'monthly', 'annually', 'none'."},"unitOfMeasure":{"type":"string","description":"The unit the range's prices are quoted per."},"productId":{"type":"string","description":"The product this range prices. Absent on a range that applies to the whole obligation. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The code of that product."},"productName":{"type":"string","description":"The name of that product."}},"additionalProperties":false,"required":["effectiveStartDate"]},"description":"The obligation's standalone selling price ranges, one per product and effective period. An empty array when none are configured. Which of the amount and percentage fields are set follows each range's rangeType."}},"additionalProperties":false,"required":["id","name","effectiveStartDate","isAllocationExcluded","isNetAccounting","lastModifiedDate"]},"description":"The performance obligations on this page, newest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more performance obligations remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPerformanceObligationInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the performance obligation with this identifier."},"performanceObligationNumber":{"type":"string","description":"Limits results to the performance obligation with this number, for example 'POB-1042'."},"name":{"type":"string","description":"Limits results to performance obligations whose name contains this text. The match is case-insensitive."},"revenueSchedulingTemplateId":{"type":"string","description":"Limits results to obligations scheduled by the revenue scheduling template with this identifier. An identifier matching no template returns an empty page."},"standaloneSellingPriceRangeType":{"type":"string","description":"Limits results to obligations whose standalone selling price ranges are expressed this way. Accepted values: 'percentage', 'amount'. Any other value matches nothing."},"isAllocationExcluded":{"type":"boolean","description":"Limits results by whether the obligation's revenue contract lines are left out of fair-value allocation."},"productId":{"type":"string","description":"Limits results to obligations that have a product line for the product with this identifier. An identifier matching no product, or a product no obligation covers, returns an empty page."}},"additionalProperties":false,"description":"The filters to apply. A performance obligation must match every filter you send. Omit to return all performance obligations."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of performance obligations per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"createRefundOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created refund.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'. Assigned on create.","examples":["REF-1042"]},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD.","examples":["2026-08-01"]},"approvalStatus":{"type":"string","description":"The approval status, always 'approved' immediately after create.","examples":["approved"]},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'.","examples":["ach"]},"currency":{"type":"string","description":"The currency of the refund, derived from the source payment. Every amount on it is in this currency. Format ISO 4217, for example 'USD'.","examples":["USD"]},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency.","examples":["150.00"]},"customerId":{"type":"string","description":"The customer receiving the refund, derived from the source payment. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"entityId":{"type":"string","description":"The legal entity issuing the refund, derived from the source payment. See id on GET base/entities.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T09:12:44.000Z"]}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"createRefundInput":{"type":"object","properties":{"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"refundDate":{"type":"string","format":"date","description":"The date the refund is issued. Use format YYYY-MM-DD. Must fall in an open accounting period.","examples":["2026-08-01"]},"refundType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The payment method used for the refund.","examples":["ach"]},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the source payment's currency. Must be greater than 0.","examples":["150.00"]},"refundNote":{"type":"string","description":"A free-form note attached to the refund.","examples":["Customer requested partial refund"]},"unapply":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to unapply the payment from. See id on GET accounting/invoices/:id."},"amount":{"type":"string","format":"decimal","description":"The amount to unapply from this invoice, in the payment currency."}},"additionalProperties":false,"required":["invoiceId","amount"]},"description":"Invoices to unapply the source payment from before the refund is created, freeing balance for the refund. The amount unapplied from each invoice is recognized on refundDate."}},"additionalProperties":false,"required":["paymentId","refundDate","refundType","amount"]},"searchChartOfAccountsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the chart of accounts."},"name":{"type":"string","description":"The display name of the chart of accounts."},"accountNumbering":{"type":"string","description":"How account numbers are assigned within this chart of accounts. Possible values: 'hierarchical' (numbers follow the account's position in the hierarchy), 'manual' (numbers are assigned by hand)."},"accountNumberingDigits":{"type":"string","description":"The total width of an account number, which caps how deep the hierarchy can go. Possible values: 'sixDigits' (up to 4 levels), 'sevenDigits' (5), 'eightDigits' (6), 'nineDigits' (7), 'tenDigits' (8). Absent when no width was set. A width and the numbering strategy are independent, so check this field directly rather than inferring it from accountNumbering."},"description":{"type":"string","description":"A free-form description of the chart of accounts. Absent when none was set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the chart-of-accounts record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","accountNumbering","lastModifiedDate"]},"description":"The charts of accounts that match, ordered by name. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchChartOfAccountsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the chart of accounts with this identifier. The match is exact. A value that is not a valid identifier matches nothing."},"name":{"type":"string","description":"Limits results to charts of accounts whose name contains this text. The match is case-insensitive, and '%' and '_' match themselves rather than acting as wildcards. An empty or blank value matches nothing."},"description":{"type":"string","description":"Limits results to charts of accounts whose description contains this text. The match is case-insensitive."},"accountNumbering":{"type":"string","description":"Limits results to charts of accounts with this numbering strategy. Possible values: 'hierarchical', 'manual'. Any other value matches nothing."},"accountNumberingDigits":{"type":"string","description":"Limits results to charts of accounts with this account-number width. Possible values: 'sixDigits', 'sevenDigits', 'eightDigits', 'nineDigits', 'tenDigits'. Any other value matches nothing. A width and the numbering strategy are independent."}},"additionalProperties":false,"description":"The filters to apply. A chart of accounts must match every filter you send. Omit to return all charts of accounts."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of charts of accounts per page, between 1 and 200. Defaults to 50. A value outside that range fails with INVALID_PAGE_SIZE rather than being adjusted."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"updatePaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePaymentInput":{"type":"object","properties":{"paymentDate":{"type":"string","format":"date","description":"The new payment date. Use format YYYY-MM-DD. Omit to leave it unchanged."},"paymentType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The new payment method. Omit to leave it unchanged."},"amount":{"type":"string","format":"decimal","description":"The new total payment amount, in the payment's currency. Must be greater than 0. Omit to leave it unchanged."},"accountId":{"type":"string","description":"A different ledger account to post the payment to. Omit to leave it unchanged. See id on GET accounting/accounts/:id."},"paymentReference":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A new payer-supplied reference. Omit to leave it unchanged. Pass null to clear it."},"paymentNote":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A new free-form note. Omit to leave it unchanged. Pass null to clear it."},"bankFeeAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"A new bank fee, in the payment's currency. Omit to leave it unchanged. Pass null to clear it."},"thirdPartyPayerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A different third-party payer. Omit to leave it unchanged. Pass null to clear it, attributing the payment back to the invoiced customer. See id on GET accounting/customers/:id."}},"additionalProperties":false},"updateFundTransferOutput":{"type":"object","properties":{},"additionalProperties":false},"updateFundTransferInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity to post the transfer under. See id on GET base/entities."},"fromAccountId":{"type":"string","description":"The general-ledger account the money leaves. It must differ from toAccountId. See id on GET accounting/accounts/:id."},"toAccountId":{"type":"string","description":"The general-ledger account the money arrives in. It must differ from fromAccountId. See id on GET accounting/accounts/:id."},"transferDate":{"type":"string","format":"date","description":"The date the transfer takes place. Use format YYYY-MM-DD. It sets the posting period."},"transferAmount":{"type":"string","format":"decimal","description":"The amount leaving the from-account, in the transfer currency. It must be greater than zero.","examples":["2750.00"]},"currency":{"type":"string","description":"The currency of the transfer amount. Format ISO 4217, for example 'USD'. Omit to use the from-account's own currency. A value that does not match it fails with CURRENCY_MISMATCH."},"toAmount":{"type":"string","format":"decimal","description":"The amount actually received in the to-account, in that account's currency. Supply it for a cross-currency transfer. Omit to mirror the amount sent."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate applied between the two account currencies. It must be greater than zero."},"status":{"type":"string","description":"The payment status. Accepted values: 'recorded', 'inProgress', 'completed', 'voided', 'failed', 'noStatus', 'unknown'. Defaults to 'recorded'."},"name":{"type":"string","description":"A short name for the transfer, shown in listings.","examples":["February sweep — revised"]},"description":{"type":"string","description":"A free-form description of the transfer. It is copied onto both lines."},"toEntityId":{"type":"string","description":"The receiving legal entity, for a transfer between entities. Defaults to entityId. See id on GET base/entities."},"origin":{"type":"string","description":"The system or process the transfer came from."},"externalUrl":{"type":"string","description":"An absolute http or https link to the transfer in the originating system."},"externalPaymentId":{"type":"string","description":"The identifier of the payment in the source system this transfer settles."}},"additionalProperties":false},"listSalesOrderShipmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order shipment."},"salesOrderId":{"type":"string","description":"The sales order this shipment fulfills. See id on GET accounting/sales-orders/:id."},"inventoryShipmentId":{"type":"number","description":"The numeric identifier of the shipment document in inventory, which owns the shipment. Absent only on legacy rows written before the mirroring existed."},"shipmentNumber":{"type":"string","description":"The shipment document number, assigned by inventory. Absent until inventory has issued one."},"status":{"type":"string","description":"The lifecycle status of the shipment. Possible values: 'pendingShipment', 'shipped', 'cancelled'. 'pendingShipment' is drafted in inventory but not yet dispatched, 'shipped' is dispatched, and 'cancelled' means the inventory shipment was deleted and this mirror was soft-canceled."},"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL, when one has been recorded."},"carrier":{"type":"string","description":"The name of the carrier handling the shipment."},"incoterm":{"type":"string","description":"The incoterm governing shipping responsibility for this shipment. For example 'DAP' or 'EXW'."},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. See id on GET inventory/warehouses/:id."},"shipToContactEmail":{"type":"string","description":"The email of the contact who receives this shipment."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer asked for delivery. Format YYYY-MM-DD."},"shipDate":{"type":"string","format":"date","description":"The date the shipment was dispatched. Format YYYY-MM-DD. Absent while the shipment is still pending."},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment was, or is expected to be, delivered. Format YYYY-MM-DD."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line. PATCH matches updateItems and deleteItems on it."},"salesOrderProductItemId":{"type":"string","description":"The sales order product item this shipment line is for. See items[].id on GET accounting/sales-orders/:id."},"shippedQty":{"type":"string","format":"decimal","description":"The quantity shipped on this line, as a count of units."},"orderedQty":{"type":"string","format":"decimal","description":"The total quantity ordered for the sales order product item, as a count of units."},"unshippedQty":{"type":"string","format":"decimal","description":"The quantity still outstanding on this line, as a count of units: orderedQty minus shippedQty."}},"additionalProperties":false,"required":["id","salesOrderProductItemId","shippedQty","orderedQty","unshippedQty"]},"description":"The shipped lines, oldest first. An empty array when the shipment has no lines."}},"additionalProperties":false,"required":["id","salesOrderId","lastModifiedDate","items"]},"description":"The shipments on this page, ordered by ship date with the most recent first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","salesOrderId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","inventoryShipmentId":4242,"shipmentNumber":"SHP-1042","status":"shipped","carrier":"DHL","shipDate":"2026-08-19","lastModifiedDate":"2026-08-20T10:15:00.000Z","items":[{"id":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","salesOrderProductItemId":"7d345a0f-3e6d-4c8e-9b21-9c2a6a10b7f1","shippedQty":"3","orderedQty":"5","unshippedQty":"2"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more shipments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchTrialBalanceOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The account this row reports on. See id on GET accounting/accounts/:id.","examples":["0383f7c4-6176-4dc3-89e7-48c49511070f"]},"accountNumber":{"type":"string","description":"The account number, as defined by the chart of accounts. Rows are ordered by it.","examples":["111101"]},"accountName":{"type":"string","description":"The name of the account. Absent when the account has none recorded.","examples":["Chase Checking"]},"accountType":{"type":"string","description":"The type of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'.","examples":["asset"]},"isGroupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Its four figures are the sums of its descendants and are already counted in its children's rows, so sum only the rows where this is false, or use totals.","examples":[false]},"parentAccountId":{"type":"string","description":"The grouping account this row rolls up into. Absent at the root of the chart of accounts. See id on GET accounting/accounts/:id.","examples":["64e38cef-4809-47b8-b014-59065920d070"]},"functionalStartingBalance":{"type":"string","format":"decimal","description":"The account's balance immediately before startDate, in reportingCurrency. Positive is a debit balance, negative a credit balance. Zero at the start of a fiscal year for an income or expense account, because the year-end rollover moves the prior year's result into retained earnings.","examples":["0"]},"functionalDebit":{"type":"string","format":"decimal","description":"Total debit movements within the window, in reportingCurrency. Always present, and zero when there was no movement. Never negative, because a reversal is booked as a credit.","examples":["5000701.99"]},"functionalCredit":{"type":"string","format":"decimal","description":"Total credit movements within the window, in reportingCurrency. Always present, and zero when there was no movement. Never negative.","examples":["503350.02"]},"functionalEndingBalance":{"type":"string","format":"decimal","description":"The account's balance at the close of endDate, in reportingCurrency. functionalEndingBalance = functionalStartingBalance + functionalDebit - functionalCredit.","examples":["4497351.97"]}},"additionalProperties":false,"required":["accountId","accountNumber","isGroupingAccount","functionalStartingBalance","functionalDebit","functionalCredit","functionalEndingBalance"]},"description":"One row per account that has a balance or a movement in scope, ordered by account number. The rows are the whole chart of accounts, so read isGroupingAccount before summing. For an income-statement account, a window that spans a fiscal-year start includes in functionalDebit or functionalCredit the reset of the prior year's result into retained earnings, so activity of those accounts is read from a window within one fiscal year. An empty array when no account has a balance or movement in the window."},"totals":{"type":"object","properties":{"functionalStartingBalance":{"type":"string","format":"decimal","description":"The sum of functionalStartingBalance over the leaf rows. Zero in a balanced ledger.","examples":["0"]},"functionalDebit":{"type":"string","format":"decimal","description":"The sum of functionalDebit over the leaf rows. Equals functionalCredit when the report ties out.","examples":["6156388.01"]},"functionalCredit":{"type":"string","format":"decimal","description":"The sum of functionalCredit over the leaf rows.","examples":["6156388.01"]},"functionalEndingBalance":{"type":"string","format":"decimal","description":"The sum of functionalEndingBalance over the leaf rows. Zero in a balanced ledger.","examples":["0"]}},"additionalProperties":false,"required":["functionalStartingBalance","functionalDebit","functionalCredit","functionalEndingBalance"],"description":"The report's column totals, in reportingCurrency, summed over the leaf rows only. functionalDebit and functionalCredit here are the two figures a trial balance compares."},"tiesOut":{"type":"boolean","description":"Whether totals.functionalDebit equals totals.functionalCredit, computed from the figures in this response. When false, the response is still returned in full, with a TRIAL_BALANCE_DOES_NOT_TIE_OUT warning.","examples":[true]},"reportingCurrency":{"type":"string","description":"The currency every amount in this response is expressed in. Format ISO 4217, for example 'USD'. When consolidated is false this is the entity's own functional currency, and when true it is the consolidating parent's.","examples":["USD"]}},"additionalProperties":false,"required":["items","totals","tiesOut","reportingCurrency"]},"searchTrialBalanceInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The entity to report on. When consolidated is false, only this entity's own postings are included. When true, this is the consolidating parent and the report covers its whole hierarchy. Exactly one entity per request. See id on GET base/entities.","examples":["ebbe16c9-2c44-4a8e-a813-6ed5a78ffab3"]},"bookId":{"type":"string","description":"The accounting book to report on. It must belong to entityId. A book that belongs to another entity is reported as BOOK_NOT_FOUND. Exactly one book per request, because balances from different books are not comparable. See id on GET accounting/books/:id.","examples":["8d534b26-2998-40dd-8727-9fe3f89ff503"]},"consolidated":{"type":"boolean","description":"Whether to return the consolidated trial balance for entityId and its hierarchy. When true, subsidiary balances are translated into the parent's currency and intercompany eliminations are applied. When false, only this entity's own trial balance is returned, with no translation and no elimination.","examples":[false]},"startDate":{"type":"string","format":"date","description":"The inclusive start of the reporting window. Format YYYY-MM-DD. functionalStartingBalance is the position immediately before this date. Interpreted on the axis named by dateAxis.","examples":["2025-01-01"]},"endDate":{"type":"string","format":"date","description":"The inclusive end of the reporting window. Format YYYY-MM-DD. functionalEndingBalance is the position at the close of this date. Interpreted on the axis named by dateAxis.","examples":["2025-12-31"]},"dateAxis":{"enum":["postingDate","accountingPeriod"],"description":"Which axis the reporting window is measured on. 'postingDate' counts a movement on the date it was booked, the axis audit and reconciliation want. 'accountingPeriod' counts it in the period it was booked into, where budget comparisons belong. There is no default, because the two axes genuinely disagree for a line booked into an earlier period.","examples":["postingDate"]}},"additionalProperties":false,"required":["entityId","bookId","consolidated","startDate","endDate","dateAxis"]},"searchRevenueContractOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract."},"revenueContractNumber":{"type":"string","description":"The revenue contract number, unique within the tenant."},"approvalStatus":{"type":"string","description":"The approval status of the contract: 'pendingApproval' when it is created and 'approved' once approved; the other values of the vocabulary ('draft', 'revise', 'rejected') do not occur on a contract. Only an approved contract is recognized: a contract pending approval has a plan but no revenue, and filtering the sales order's approvalStatus instead still includes contracts pending approval."},"generalStatus":{"type":"string","description":"The overall status of the contract, combining approval and any active revenue hold. Possible values: 'approved', 'approvedOnHold', 'pendingApproval', 'pendingApprovalOnHold'."},"revenueStatus":{"type":"string","description":"The revenue-recognition progress across the contract's lines. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isContractClosed":{"type":"boolean","description":"Whether the contract has been closed, with its open revenue moved to a new combined revenue contract."},"isContractCombined":{"type":"boolean","description":"Whether the contract is the combination target that absorbed a closed contract's open revenue."},"isLongTermContract":{"type":"boolean","description":"Whether the recognition window from revenueStartDate to revenueEndDate exceeds 366 days."},"sspCompliant":{"type":"boolean","description":"Whether every line not excluded from allocation is standalone-selling-price compliant. Absent when every line is excluded from allocation."},"currency":{"type":"string","description":"The currency the contract is denominated in. Every amount on the contract is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"type":"string","description":"The owning entity's functional currency. Present only when it differs from the contract currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the contract currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"entityId":{"type":"string","description":"The legal entity that owns this contract. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this contract."},"customerId":{"type":"string","description":"The customer this contract is with. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer this contract is with."},"salesOrderId":{"type":"string","description":"The sales order this contract was created from. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"type":"string","description":"The number of the sales order this contract was created from."},"modifiedRevenueContractId":{"type":"string","description":"The revenue contract this one was combined or modified into. Absent when there is no such successor. See id on GET accounting/revenue-contracts/:id."},"closeContractDate":{"type":"string","format":"date-time","description":"The date and time the contract was closed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on an open contract."},"migrationDate":{"type":"string","format":"date","description":"The date this contract's opening balances were migrated from a prior system. Format YYYY-MM-DD. Absent on a contract created natively."},"revenueStartDate":{"type":"string","format":"date","description":"The earliest revenue-recognition start date across the contract's lines. Format YYYY-MM-DD."},"revenueEndDate":{"type":"string","format":"date","description":"The latest revenue-recognition end date across the contract's lines. Format YYYY-MM-DD."},"salesEffectiveDate":{"type":"string","format":"date","description":"The book date of the sales order this contract was created from. Format YYYY-MM-DD."},"totalContractValue":{"type":"string","format":"decimal","description":"The total contract value, in the contract currency. It is the total price of the sales order this contract was created from, less the contract's cost-of-contract-value."},"totalContractAmount":{"type":"string","format":"decimal","description":"The total contract amount across the contract's open lines, in the contract currency."},"totalCostOfContractValue":{"type":"string","format":"decimal","description":"The total cost-of-contract-value excluded from the revenue calculation, in the contract currency."},"totalCostOfRevenue":{"type":"string","format":"decimal","description":"The total cost of revenue recognized, in the contract currency."},"totalEstimatedTransactionPrice":{"type":"string","format":"decimal","description":"The total estimated transaction price used in allocation, in the contract currency."},"totalFairValueAmount":{"type":"string","format":"decimal","description":"The total fair value used in allocation, in the contract currency."},"totalVariableConsideration":{"type":"string","format":"decimal","description":"The total variable consideration across the contract's lines, in the contract currency."},"deferredRevenue":{"type":"string","format":"decimal","description":"The deferred revenue not yet recognized, in the contract currency, as of today. Zero once the contract is closed. A subledger figure: it sums only the journal entry lines linked to the contract, plus balances migrated onto the contract, so it need not equal the deferred-revenue accounts in the ledger."},"revenueAmount":{"type":"string","format":"decimal","description":"The total revenue across the contract's lines, in the contract currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The cumulative revenue recognized to date, in the contract currency, as of today; revenue recognized as of an earlier date comes from posted journal entry lines. On a combined contract (isContractCombined) it is the revenue recognized in the related contracts."},"revenueRemaining":{"type":"string","format":"decimal","description":"The revenue remaining to be recognized, billed or not, in the contract currency, as of today: the revenue amount of the contract's lines less what they have recognized."},"remainingPerformanceObligation":{"type":"string","format":"decimal","description":"The remaining performance obligation, in the contract currency. It is contract value plus returns and variable consideration, less committed recognized revenue. Zero once the contract is closed."},"unbilledReceivables":{"type":"string","format":"decimal","description":"The sum of unbilled journal entries for this contract, in the contract currency."},"returnedAmount":{"type":"string","format":"decimal","description":"The amount returned against the contract's revenue plan, in the contract currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"The one-time discount allocated across the contract's lines, in the contract currency."},"pctRevenueRecognized":{"type":"string","format":"decimal","description":"The fraction of total contract value recognized to date, from 0 to 1. 1 once the contract is closed. A ratio, not an amount, with no currency of its own."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteRevenueContractId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The contract's identifiers in other systems, one per configured field name. An empty array or absent when the contract has none."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract line."},"revenueContractLineNumber":{"type":"string","description":"The revenue contract line number, unique within the contract."},"type":{"type":"string","description":"The kind of line. Possible values: 'standard', 'thresholdIncrement', 'overage'."},"currency":{"type":"string","description":"The currency the line is denominated in. Every amount on the line and its revenue plan is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"type":"string","description":"The owning entity's functional currency. Present only when it differs from the line currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the line currency to the functional currency. A ratio, not an amount, with no currency of its own."},"generalStatus":{"type":"string","description":"The overall status of the line, combining approval and any active revenue hold. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"revenueStatus":{"type":"string","description":"The revenue-recognition progress for the line. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isClosed":{"type":"boolean","description":"Whether the line has been closed, with its open revenue moved to a combined contract."},"isLongTerm":{"type":"boolean","description":"Whether the line's recognition window exceeds 366 days."},"isEvergreen":{"type":"boolean","description":"Whether the line has no fixed end date and recognizes indefinitely."},"sspCompliant":{"type":"boolean","description":"Whether the line is standalone-selling-price compliant."},"isAllocationExcluded":{"type":"boolean","description":"Whether the line is excluded from the contract's revenue allocation."},"productCode":{"type":"string","description":"The code of the product the line covers, as it stood when the line was created."},"unitOfMeasure":{"type":"string","description":"The unit the line's quantity is measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"performanceObligationName":{"type":"string","description":"The name of the performance obligation the line satisfies."},"operationalPerformanceObligationNumber":{"type":"string","description":"The number of the operational performance obligation the line is tracked under."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template that generated the line's plan."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized over the line's term. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"amortizationMethod":{"type":"string","description":"How the line's amount is spread across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"revenueSchedulingEvent":{"type":"string","description":"The event that starts recognition on the line. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"revenueAccount":{"type":"string","description":"The name of the revenue account the line recognizes into."},"deferredRevenueAccount":{"type":"string","description":"The name of the deferred-revenue account the line defers into."},"revRecStartDate":{"type":"string","format":"date","description":"The first day of the line's revenue-recognition window. Format YYYY-MM-DD."},"revRecEndDate":{"type":"string","format":"date","description":"The last day of the line's revenue-recognition window, inclusive. Format YYYY-MM-DD."},"salesOrderBookingDate":{"type":"string","format":"date","description":"The book date of the sales order line this line was created from. Format YYYY-MM-DD."},"revenueTerm":{"type":"string","format":"decimal","description":"The length of the line's revenue term, in the line's scheduling unit. A count, not an amount."},"salesOrderProductLine":{"type":"string","description":"The number of the sales order product line this line was created from."},"contractAmount":{"type":"string","format":"decimal","description":"The contract amount booked on the line, in the line currency."},"adjustedContractAmount":{"type":"string","format":"decimal","description":"The contract amount after modifications, in the line currency."},"listPrice":{"type":"string","format":"decimal","description":"The undiscounted list price of the line, in the line currency."},"totalContractValue":{"type":"string","format":"decimal","description":"The total contract value attributed to the line, in the line currency."},"totalCostOfContractValue":{"type":"string","format":"decimal","description":"The cost-of-contract-value excluded from the line's revenue calculation, in the line currency."},"costOfRevenueAmount":{"type":"string","format":"decimal","description":"The cost of revenue booked on the line, in the line currency."},"costOfRevenueRecognized":{"type":"string","format":"decimal","description":"The cost of revenue recognized to date on the line, in the line currency."},"estimatedTransactionPrice":{"type":"string","format":"decimal","description":"The estimated transaction price used for the line in allocation, in the line currency."},"fairValueAmount":{"type":"string","format":"decimal","description":"The fair value used for the line in allocation, in the line currency."},"variableConsideration":{"type":"string","format":"decimal","description":"The variable consideration on the line, in the line currency."},"extendedSSP":{"type":"string","format":"decimal","description":"The extended standalone selling price of the line, unit standalone selling price times quantity, in the line currency."},"revenueAmount":{"type":"string","format":"decimal","description":"The revenue allocated to the line, in the line currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The revenue recognized to date on the line, in the line currency."},"revenueRemaining":{"type":"string","format":"decimal","description":"The revenue still to be recognized on the line, in the line currency."},"deferredRevenueAmount":{"type":"string","format":"decimal","description":"The deferred revenue outstanding on the line, in the line currency."},"remainingPerformanceObligation":{"type":"string","format":"decimal","description":"The remaining performance obligation on the line, in the line currency."},"unbilledReceivables":{"type":"string","format":"decimal","description":"The unbilled receivables on the line, in the line currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The revenue on the line not yet scheduled into a plan period, in the line currency."},"totalInvoicedAmount":{"type":"string","format":"decimal","description":"The total invoiced against the line to date, in the line currency."},"oneTimeDiscountAllocationAmount":{"type":"string","format":"decimal","description":"The one-time discount allocated to the line, in the line currency."},"fvAllocationRatio":{"type":"string","format":"decimal","description":"The share of the contract's fair value allocated to the line, from 0 to 1. A ratio, not an amount, with no currency of its own."},"revenuePlanHeader":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue plan header."},"revenuePlanHeaderNumber":{"type":"string","description":"The revenue plan header number."},"status":{"type":"string","description":"The status of the plan. Possible values: 'notStarted', 'pendingRecognition', 'inProgress', 'complete', 'completeModified'."},"currency":{"type":"string","description":"The currency the plan is denominated in. Every amount on the plan and its plan lines is in this currency. Format ISO 4217, for example 'USD'."},"amortizationMethod":{"type":"string","description":"How the plan spreads its amount across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"revenueSchedulingEvent":{"type":"string","description":"The event that starts recognition on the plan. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"isContractClosed":{"type":"boolean","description":"Whether the contract behind the plan has been closed."},"revRecStartDate":{"type":"string","format":"date","description":"The first day of the plan's recognition window. Format YYYY-MM-DD."},"revRecEndDate":{"type":"string","format":"date","description":"The last day of the plan's recognition window, inclusive. Format YYYY-MM-DD."},"comments":{"type":"string","description":"Free-form comments recorded on the plan."},"amount":{"type":"string","format":"decimal","description":"The total amount the plan schedules, in the plan currency."},"totalRecognized":{"type":"string","format":"decimal","description":"The total recognized across the plan's lines to date, in the plan currency."},"remainingDeferred":{"type":"string","format":"decimal","description":"The amount still deferred on the plan, in the plan currency."},"returnedAmount":{"type":"string","format":"decimal","description":"The amount returned against the plan, in the plan currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The plan amount not yet scheduled into a period, in the plan currency."},"revenuePlanLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue plan line."},"lineId":{"type":"string","description":"The line identifier within the plan."},"revenuePlanType":{"type":"string","description":"What the plan line schedules. Possible values: 'revenueRecognition', 'returnRevenueRecognition', 'unCommittedRevenueRecognition', 'modificationDeferredRevenueAdjustment', 'allowance', 'overage', 'usageExpiration', 'costOfRevenue', 'unholdRevenuePeriod', 'retrospectiveAdjustment'."},"currency":{"type":"string","description":"The currency the plan line is denominated in. Format ISO 4217, for example 'USD'."},"plannedPeriod":{"type":"string","description":"The name of the accounting period this row is planned for."},"plannedPeriodDate":{"type":"string","format":"date","description":"The start date of the planned accounting period. Format YYYY-MM-DD. Plan lines are returned in ascending order of this date."},"postingPeriod":{"type":"string","description":"The name of the accounting period the row was posted in, when it differs from the planned one."},"isPosted":{"type":"boolean","description":"Whether the row has been posted to the general ledger."},"holdStatus":{"type":"string","description":"Whether revenue on the row is held back. Possible values: 'notHold', 'holdPlaced', 'holdRemoved'."},"releaseUnit":{"type":"string","description":"The unit the release amount is expressed in. Possible values: 'quantity', 'percent', 'amount'."},"releaseAmount":{"type":"string","format":"decimal","description":"The amount or quantity released in this period, in the unit given by releaseUnit."},"pctRecognizedInPeriod":{"type":"string","format":"decimal","description":"The fraction of the plan recognized in this period, from 0 to 1. A ratio, not an amount, with no currency of its own."},"cumulativePercentage":{"type":"string","format":"decimal","description":"The fraction of the plan recognized cumulatively through this period, from 0 to 1. A ratio, not an amount, with no currency of its own."},"revenueAccount":{"type":"string","description":"The name of the revenue account this row recognizes into."},"deferredRevenueAccount":{"type":"string","description":"The name of the deferred-revenue account this row releases from."},"journalEntry":{"type":"string","description":"The number of the journal entry this row posted through, once posted."},"amount":{"type":"string","format":"decimal","description":"The amount scheduled for this period, in the plan line currency."},"revenueAmount":{"type":"string","format":"decimal","description":"The revenue scheduled for this period, in the plan line currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The revenue recognized in this period, in the plan line currency."},"cumulativeRecognition":{"type":"string","format":"decimal","description":"The revenue recognized cumulatively through this period, in the plan line currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The amount on this row not yet scheduled, in the plan line currency."},"postedAmount":{"type":"string","format":"decimal","description":"The amount actually posted to the ledger for this row, in the plan line currency."}},"additionalProperties":false,"required":["id","revenuePlanType","currency"]},"description":"The plan's period rows, the recognition schedule, one entry per planned period, earliest planned period first. An empty array when the plan has not been scheduled yet."}},"additionalProperties":false,"required":["id","currency","revenueSchedulingEvent","isContractClosed"],"description":"The line's revenue plan, the schedule revenue is recognized against. At most one per line. Absent when no plan has been generated for the line yet."}},"additionalProperties":false,"required":["id","type","currency","isClosed","revenueSchedulingEvent"]},"description":"The contract's revenue lines, in line order, each with its revenue plan nested. An empty array when the contract has no lines."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue contract last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","approvalStatus","isContractClosed","isContractCombined","currency","exchangeRate","lastModifiedDate"]},"description":"The revenue contracts on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more revenue contracts remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchRevenueContractInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the revenue contract with this id."},"revenueContractNumber":{"type":"string","description":"Limits results to the revenue contract with this number. The match is exact."},"approvalStatus":{"type":"string","description":"Limits results to contracts in this approval status. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Any other value matches no contract."},"generalStatus":{"type":"string","description":"Limits results to contracts in this general status. Possible values: 'approved', 'approvedOnHold', 'pendingApproval', 'pendingApprovalOnHold'. Any other value matches no contract."},"revenueStatus":{"type":"string","description":"Limits results to contracts in this revenue-recognition status. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'. Any other value matches no contract."},"currency":{"type":"string","description":"Limits results to contracts in this currency. Format ISO 4217, for example 'USD'."},"isContractClosed":{"type":"boolean","description":"Limits results to closed contracts when true, or open contracts when false."},"isContractCombined":{"type":"boolean","description":"Limits results to combination-target contracts when true, or ordinary contracts when false."},"customerId":{"type":"string","description":"Limits results to contracts with this customer. See id on GET accounting/customers/:id. An id that matches no customer returns no contracts."},"entityId":{"type":"string","description":"Limits results to contracts owned by this legal entity. See id on GET base/entities. An id that matches no entity returns no contracts."},"salesOrderId":{"type":"string","description":"Limits results to contracts created from this sales order. See id on GET accounting/sales-orders/:id. An id that matches no sales order returns no contracts."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteRevenueContractId'."},"value":{"type":"string","description":"The identifier value to match, exactly as the other system stores it."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to the contract with this external identifier. Give both fieldName and value. A fieldName alone would match every system's value for that key."},"revenueStartDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest revenueStartDate to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest revenueStartDate to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to contracts whose revenueStartDate falls in this range. Omit either bound to leave that side open. Both bounds are inclusive."},"revenueEndDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest revenueEndDate to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest revenueEndDate to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to contracts whose revenueEndDate falls in this range. Omit either bound to leave that side open. Both bounds are inclusive."}},"additionalProperties":false,"description":"The filters to apply. A revenue contract must match every filter you send. Omit to return all revenue contracts."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of revenue contracts per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"getUsageOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the usage record."},"usageNumber":{"type":"string","description":"The usage number, unique within the tenant. Absent while none has been assigned."},"usageIdentifier":{"type":"string","description":"The external identifier for this usage record, as supplied at ingestion."},"date":{"type":"string","format":"date-time","description":"The date and time the usage occurred, without a time zone. Format YYYY-MM-DDTHH:mm:ss."},"description":{"type":"string","description":"A free-form description of the usage record. Absent when none is set."},"productIdentifier":{"type":"string","description":"The product code or identifier this usage is attributed to, as supplied at ingestion."},"billableComponentId":{"type":"string","description":"The billable component this usage is attributed to. Absent until it is resolved. There is no endpoint for it."},"usageComponent":{"type":"string","description":"The billable component's name or identifier, included so you do not need a second read."},"quantity":{"type":"string","format":"decimal","description":"The quantity of usage recorded, in unitOfMeasure."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit for this usage. This record has no currency field. The currency is on the subscription or contract this usage bills against."},"status":{"type":"string","description":"The lifecycle status of the usage record. Possible values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'."},"usagePeriodId":{"type":"string","description":"The unique identifier for the usage period this record belongs to. There is no endpoint for it."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"Custom data recorded on this usage record, as a JSON object. Absent when none was set."},"orderIndex":{"type":"number","description":"The position of this usage record within the batch it was created in. Absent when not known."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the usage record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","date","quantity","unitPrice","status","usagePeriodId","lastModifiedDate"]},"chartsOfAccountsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the chart of accounts."},"name":{"type":"string","description":"The display name of the chart of accounts."},"accountNumbering":{"enum":["hierarchical","manual"],"description":"How account numbers are assigned within this chart of accounts. Possible values: 'hierarchical' (numbers follow the account's position in the hierarchy), 'manual' (numbers are assigned by hand)."},"accountNumberingDigits":{"anyOf":[{"enum":["sixDigits","sevenDigits","eightDigits","nineDigits","tenDigits"]},{"type":"null"}],"description":"The total width of an account number, which caps how deep the hierarchy can go. Possible values: 'sixDigits' (up to 4 levels), 'sevenDigits' (5), 'eightDigits' (6), 'nineDigits' (7), 'tenDigits' (8). Absent when no width was set. A width and the numbering strategy are independent, so check this field directly rather than inferring it from accountNumbering."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the chart of accounts. Absent when none was set."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the chart-of-accounts record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateAccountingSalesReturnOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingSalesReturnInput":{"type":"object","properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New free-form notes for the return."},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new header-level reason for the return. Accepted values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'."},"returnTrackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new carrier tracking number for the inbound return shipment."}},"additionalProperties":false},"productsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product."},"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant."},"productNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the product shown to customers."},"internalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product's identifier in an external CRM system."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Format YYYY-MM-DD."},"effectiveEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the product is no longer available. Format YYYY-MM-DD. Absent for a product with no end date."},"productFamily":{"anyOf":[{"enum":["software","services","physicalProducts"]},{"type":"null"}],"description":"The product family."},"productType":{"anyOf":[{"enum":["sub","termLicense","support","professionalServices","training","usage","billableTravelExpense","bundle","hardwareConsumables","billablePassThrough","merchandise","shipping"]},{"type":"null"}],"description":"The product type."},"productStatus":{"anyOf":[{"enum":["available","draft","unavailable","incomplete"]},{"type":"null"}],"description":"The product's availability status, computed by the system. It is derived from the product's lines, pricing and effective dates and cannot be set directly."},"isInventory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the product is tracked as inventory."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateBankEntryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankEntryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the entry is posted under. See id on GET base/entities."},"bankAccountId":{"type":"string","description":"The general-ledger account behind the bank account this entry posts against. See id on GET accounting/accounts/:id."},"transactionDate":{"type":"string","format":"date","description":"The date the transaction took place. Use format YYYY-MM-DD. Changing it re-resolves the posting period."},"currency":{"type":"string","description":"The currency of the entry. Format ISO 4217, for example 'USD'. When supplied it must match the account's currency."},"status":{"type":"string","description":"The reconciliation status. Accepted values: 'matched', 'unmatched', 'voided', 'integrated'."},"name":{"type":"string","description":"A short name for the entry.","examples":["February bank fees — revised"]},"description":{"type":"string","description":"A free-form description of the entry."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD."},"origin":{"type":"string","description":"The system or process the entry originated from."},"externalUrl":{"type":"string","description":"A link to the entry in the originating system."},"createLines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage or taxCodeId is supplied. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. It must differ from the entry's entity, cross charging must be set up for both entities, and the line must not be prepaid, or the request fails with CROSS_CHARGE_INVALID."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. Supplying it requires businessPartnerId. It must match exactly one active tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. It fills the VAT rate, VAT account and reverse-charge account the line does not state. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a region record when dimensionCode is 'region'."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for this new line, at most one per reporting dimension. Each tag pairs a dimensionCode with a modelId, and the referenced record must exist. A department or businessUnit tag must agree with departmentId or businessUnitId when both are sent. Omit or send an empty array for a line tagged only by departmentId and businessUnitId."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this new line over, one per accounting book. A plain array because the line does not exist yet, so there is nothing to change or remove. Only a prepaid line may carry them."}},"additionalProperties":false,"required":["accountId","amount"]},"description":"Lines to add. Each has the same shape as a line on create, with no id because the line does not exist yet.","examples":[[{"accountId":"9994c3ed-f812-44c1-9454-7f36b2bfb0fb","amount":"-25.00","description":"Wire fee"}]]},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this bank entry."},"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage or taxCodeId is supplied. There is no endpoint for it."},"crossChargeEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Omit to leave unchanged, or send null to clear it. It must differ from the entry's entity, cross charging must be set up for both entities, and the line must not be prepaid, or the request fails with CROSS_CHARGE_INVALID."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. Supplying it requires businessPartnerId. It must match exactly one active tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. It fills the VAT rate, VAT account and reverse-charge account the line does not state. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a region record when dimensionCode is 'region'."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for the line, at most one per reporting dimension. Omit to keep the current tags. Send an empty array to clear them, apart from the tags departmentId and businessUnitId keep. Send a list to replace them. Changing departmentId or businessUnitId alone replaces only that dimension's tag."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book. A book the line already has a schedule for is refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this line, one per accounting book it does not already have one for. Omit all three amortization arrays to leave the line's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the schedule to change. It must be one this line already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by its id and belonging to this line. Every field but the id is optional. Changing the dates without the term, or the term without the dates, is refused with AMORTIZATION_TERM_MISMATCH when the two would disagree."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this line. Each must be one this line already carries. The schedule is deleted, not merely unlinked."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by its id. Every field but the id is optional, and omitting one leaves that field unchanged.","examples":[[{"id":"7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9","amount":"-150.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove. Each must belong to this bank entry.","examples":[["1f2e3d4c-5b6a-7089-9a8b-7c6d5e4f3a2b"]]}},"additionalProperties":false},"searchPaymentOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment."},"paymentNumber":{"type":"string","description":"The payment number, unique within the tenant. A human-readable reference used for reconciliation."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"The payment method. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'."},"paymentAccountCurrency":{"type":"string","description":"The currency of the bank account the payment was received into. Present only when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The amount paid, in the payment currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The portion applied so far, in the payment currency: the sum of the payment's applications to invoices, debit memos and manual taxable documents, whatever their appliedDate. For an earlier date, sum only the applications dated on or before it."},"unappliedAmount":{"type":"string","format":"decimal","description":"The portion not yet applied, in the payment currency. unappliedAmount = amount - appliedAmount - refundAmount. For an earlier date, subtract only the payment applications and the approved refunds (listRefunds) dated on or before it."},"refundAmount":{"type":"string","format":"decimal","description":"The portion refunded through approved refunds, in the payment currency."},"bankFeeAmount":{"type":"string","format":"decimal","description":"The bank fee deducted from the payment, in the payment currency."},"smallBalanceWriteOffAmount":{"type":"string","format":"decimal","description":"The total written off as a small residual balance across the payment's applications, in the payment currency."},"totalEarlyPaymentDiscount":{"type":"string","format":"decimal","description":"The total early-payment discount granted across the payment's applications, in the payment currency."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the payment currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"customerPaymentStatus":{"type":"string","description":"The derived lifecycle status of the payment; the first match wins: 'disputed' or 'chargedBack' (from its dispute status); then, with nothing left unapplied, 'appliedInFull' (some of it was applied) or 'refunded' (none applied, some refunded); otherwise 'partiallyApplied' (some applied), 'partiallyRefunded' (none applied, some refunded) or 'unapplied'."},"disputeStatus":{"type":"string","description":"The dispute state of the payment. Possible values: 'disputed', 'chargedBack'. Absent on an undisputed payment."},"paymentReference":{"type":"string","description":"The reference the payer supplied with the payment, for example a remittance or wire reference. Absent when none was supplied."},"paymentNote":{"type":"string","description":"A free-form note recorded on the payment. Absent when none was set."},"customerId":{"type":"string","description":"The customer the payment came from. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer the payment came from."},"thirdPartyPayerId":{"type":"string","description":"The customer who actually paid, when a third party paid on the invoiced customer's behalf. Absent when the invoiced customer paid. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity that received the payment. See id on GET base/entities."},"accountId":{"type":"string","description":"The ledger account the payment was posted to. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the ledger account the payment was posted to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","paymentDate","paymentType","currency","lastModifiedDate"]},"description":"The payments that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPaymentInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the payment with this identifier."},"paymentNumber":{"type":"string","description":"Limits results to the payment with this payment number."},"paymentType":{"type":"string","description":"Limits results to payments tendered this way. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'. Any other value matches no payment."},"customerPaymentStatus":{"type":"string","description":"Limits results to payments in this lifecycle status. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull', 'partiallyRefunded', 'refunded', 'disputed', 'chargedBack'. Any other value matches no payment."},"disputeStatus":{"type":"string","description":"Limits results to payments in this dispute state. Possible values: 'disputed', 'chargedBack'. Any other value matches no payment."},"paymentReference":{"type":"string","description":"Limits results to payments with this payer-supplied reference."},"customerId":{"type":"string","description":"Limits results to payments from this customer. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"Limits results to payments received by this legal entity. See id on GET base/entities."},"paymentDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest paymentDate to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest paymentDate to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to payments whose paymentDate falls in this range. Both bounds are inclusive. Omit either bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A payment must match every filter you send. Omit to return all payments."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of payments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"getDebitMemoOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo."},"debitMemoNumber":{"type":"string","description":"The debit memo number, for example 'DM-1'. A standalone debit memo that isn't approved yet carries a placeholder such as 'DRAFT-3' instead, and gets its number when it's approved. Absent while none has been assigned."},"creditMemoId":{"type":"string","description":"The source credit memo this debit memo settles. Absent on a standalone debit memo. See id on GET accounting/credit-memos/:id."},"creditMemoNumber":{"type":"string","description":"The number of the source credit memo. Present whenever creditMemoId is."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo was issued. Format YYYY-MM-DD."},"dueDate":{"type":"string","format":"date","description":"The date the debit memo falls due. Format YYYY-MM-DD. Computed from debitMemoDate plus the payment term's days."},"taxDate":{"type":"string","format":"date","description":"The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate."},"approvalStatus":{"type":"string","description":"The approval status of the debit memo. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved debit memo has financial effect."},"debitMemoStatus":{"type":"string","description":"The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull'. Absent before approval. Not refreshed daily: it is recomputed on approval, when an approved debit memo's date or due date changes, and whenever a payment or credit is applied to it or unapplied. So a partly covered debit memo stays 'partiallyPaid' past its due date, and 'isOverdue' appears on an uncovered one only once a recompute runs after the due date."},"debitMemoType":{"type":"string","description":"The reason key for the charge, for example 'orderEntryError'. The accepted keys are configured per tenant."},"currency":{"type":"string","description":"The currency of the debit memo. Format ISO 4217, for example 'USD'. It governs every amount on the record."},"customerId":{"type":"string","description":"The customer the debit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer."},"customerNumber":{"type":"string","description":"The customer number."},"entityId":{"type":"string","description":"The legal entity that issued the debit memo. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"paymentTerm":{"type":"string","description":"The payment-term key applied to the debit memo. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"customerMessage":{"type":"string","description":"A free-text message shown to the customer on the document."},"externalDebitMemoId":{"type":"string","description":"The identifier of this debit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"isMigrated":{"type":"boolean","description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed."},"debitGlAccountId":{"type":"string","description":"The general ledger account the journal entry debits for the debit memo's full amount. See id on GET accounting/accounts/:id."},"billToAddressId":{"type":"string","description":"The bill-to address on the document. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address on the document. There is no endpoint for it."},"subtotal":{"type":"string","format":"decimal","description":"The sum of the lines' pre-discount totals, in the debit memo currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total including tax, in the debit memo currency."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the debit memo currency."},"totalAmountDebited":{"type":"string","format":"decimal","description":"The gross amount debited, in the debit memo currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of the prorated discount amounts across all lines, in the debit memo currency."},"unappliedCreditAmount":{"type":"string","format":"decimal","description":"The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"pdf":{"type":"string","x-file":true,"description":"The debit memo PDF reflecting the debit memo as it is now, as a short-lived file handle. Exchange it at GET /public/files/{handle}. Absent while the debit memo is not approved, or when no PDF template applies to it."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo line."},"lineNumber":{"type":"string","description":"The sequential line number within the debit memo."},"description":{"type":"string","description":"A free-text line description, shown to the customer."},"productId":{"type":"string","description":"The debited product. Absent on a free-text line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line the line bills. Absent unless a standalone line names one."},"creditMemoLineId":{"type":"string","description":"The source credit memo line this line debits. Absent on a standalone debit memo. See lines[].id on GET accounting/credit-memos/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit as it stood on the source credit memo line, in the debit memo currency."},"listPriceTotal":{"type":"string","format":"decimal","description":"The pre-discount line total, in the debit memo currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount from the source credit memo line, in the debit memo currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount as a percentage of the list price. A percentage, not an amount, so it has no currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency."},"amountDebited":{"type":"string","format":"decimal","description":"The amount debited for the line, in the debit memo currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount of the source credit memo line still available to debit, in the debit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"taxMode":{"type":"string","description":"How the line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code applied to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. See id on GET accounting/accounts/:id."},"vatAccountingType":{"enum":["domesticStandardRate","domesticReducedRate","domesticSalesZeroRated","domesticSalesExempt","vatIntraEuStandardRate","vatIntraEuReducedRate","nonEuExempt","reverseCharge"],"description":"The VAT type of the line. Absent unless a standalone line carries one."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array or absent when the line has none."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the debit memo, each debiting one line of the source credit memo. An empty array when the debit memo has no lines. All line amounts are in the debit memo currency."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The debit memo's identifiers in other systems, one per configured field name. An empty array or absent when the debit memo has none."}},"additionalProperties":false,"required":["id","debitMemoDate","debitMemoType","currency","customerId","entityId","paymentTerm","billToAddressId","soldToAddressId","lastModifiedDate"]},"updateAccountOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountInput":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The new account number, unique within its chart of accounts. Only with manual numbering; with hierarchical numbering the number follows the parent account. Omit to leave unchanged."},"accountName":{"type":"string","description":"The new display name. Omit to leave unchanged.","examples":["Operating Bank USD (Main)"]},"accountType":{"type":"string","description":"The new top-level classification. Accepted values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'. Locked once the account or one of its descendants has postings. A grouping account passes the new type to its descendants, and is refused with INVALID_FIELD_VALUE while a descendant posting account has a sub-type that does not belong to the new type. Omit to leave unchanged."},"accountSubType":{"type":"string","description":"The new sub-type, for posting accounts only. Accepted values per accountType: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset' (asset); 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability' (liability); 'equity', 'otherComprehensiveIncome' (equity); and the sub-type named like the type for 'income', 'costOfGoodsSold', 'expense', 'otherIncome' and 'otherExpense'. Locked once the account has postings. Switching to 'bank' or 'creditCard' needs entityId and currency, and is refused with FIELD_NOT_ALLOWED on elimination while the account has elimination true, unless the request also sends elimination false. Switching away from 'bank' or 'creditCard' drops the account's entityId and currency, and is refused with FIELD_NOT_ALLOWED on payOnBehalf while payOnBehalf is true, unless the request also sends payOnBehalf false. Omit to leave unchanged."},"description":{"type":"string","description":"The new description. Omit to leave unchanged.","examples":["Main operating account"]},"chartOfAccountsId":{"type":"string","description":"The account's chart of accounts. It cannot change: accepted only when it names the current one. Omit to leave unchanged."},"parentAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new parent grouping account, in the same chart of accounts with the same accountType, and not the account itself or one of its descendants. Pass null to move the account to the top level (not allowed for a posting account under hierarchical numbering). Omit to leave unchanged."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping account. It cannot change: accepted only when it matches the stored value. Omit to leave unchanged."},"entityId":{"type":"string","description":"The new legal entity of a 'bank' or 'creditCard' account, assigned to the chart of accounts. Locked once the account has postings. Omit to leave unchanged."},"currency":{"type":"string","description":"The new currency of a 'bank' or 'creditCard' account. Format ISO 4217. Locked once the account has postings. Omit to leave unchanged."},"payOnBehalf":{"type":"boolean","description":"Whether this account takes part in pay-on-behalf accounting. true is only allowed on 'bank' and 'creditCard' accounts of a legal entity that has subsidiaries or a parent entity. Omit to leave unchanged."},"elimination":{"type":"boolean","description":"Whether this account is eliminated during consolidation. true is not allowed on grouping, 'bank' or 'creditCard' accounts. Locked once the account has postings. Omit to leave unchanged."},"revaluationMode":{"type":"string","description":"Which revaluation results this account recognizes. Accepted values: 'recognizeAll' (both unrealized gains and unrealized losses), 'recognizeAllButUnrealizedGains' (only unrealized losses), 'none' (the account is not revalued). Posting accounts only. Once the account has postings it may move between the two recognizing modes but not to or from 'none'. Which modes an account can take depends on its sub-type, on a bank or credit-card account's currency against its book's currency, and on the accounting standard of the chart's book; a mode the account cannot take is rejected with INVALID_FIELD_VALUE, whose allowedValues lists the modes it can take, never replaced. Omit to leave unchanged."},"accountStatus":{"type":"string","description":"The new status, posting accounts only. Accepted values: 'enabled', 'disabled'. A disabled account accepts a request only when it sets 'enabled'. Disabling unlinks the bank accounts that post to the account. Sending 'disabled' alone for an account that is already disabled changes nothing and succeeds. Omit to leave unchanged.","examples":["enabled"]},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. GET accounting/account-external-identifier-fields lists the accepted keys."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system; anything else is rejected with INVALID_FIELD_VALUE. Omit to leave none."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. Rejected with DUPLICATE_EXTERNAL_IDENTIFIER when the account already has the fieldName."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. GET accounting/account-external-identifier-fields lists the accepted keys."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An absolute http(s) link to the object in the source system; anything else is rejected with INVALID_FIELD_VALUE. Omit to keep the stored link; send null to remove it."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to rewrite, matched by fieldName. Rejected with EXTERNAL_IDENTIFIER_NOT_FOUND when the account does not have the fieldName.","examples":[[{"fieldName":"netsuiteAccountId","value":"1011"}]]},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"fieldNames of the external identifiers to remove. Rejected with EXTERNAL_IDENTIFIER_NOT_FOUND when the account does not have one."}},"additionalProperties":false},"getTaxConfigurationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax configuration."},"entityId":{"type":"string","description":"The legal entity this configuration belongs to. An entity has at most one tax configuration. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the owning legal entity."},"status":{"type":"string","description":"The status of the tax configuration. The tax codes of an inactive configuration are not offered on documents. Possible values: 'Active', 'Inactive'."},"taxRegime":{"type":"string","description":"The tax system that determines which tax components are valid. Possible values: 'EU_VAT', 'India_GST', 'Canada_GST', 'Ghana_VAT', 'SingleRate_GST', 'Mexico_IVA'."},"externalId":{"type":"string","description":"An external system's identifier for this configuration, set when it was migrated from another system."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the tax configuration record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax code line."},"taxCode":{"type":"string","description":"The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'. Absent when none was supplied."},"title":{"type":"string","description":"The display title of the tax code. Unique within the configuration."},"comment":{"type":"string","description":"A free-form note on when to use this tax code. Absent when none was set."},"vatDeclarationField":{"type":"string","description":"The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Free text, not evaluated. Absent when none was set."},"percentage":{"type":"string","format":"decimal","description":"The tax rate, as a decimal fraction. For example, 0.19 is 19%. 0 for a zero-rated or exempt code."},"rateType":{"type":"string","description":"The legal rate classification of the tax code. Possible values: 'Standard', 'Reduced', 'SuperReduced', 'Zero', 'Exempt'."},"scope":{"type":"string","description":"The territorial scope of the transaction. Possible values: 'Domestic', 'IntraEU_B2B', 'IntraEU_B2C', 'ExtraEU_Goods', 'ExtraEU_Services'."},"direction":{"type":"string","description":"Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales. Possible values: 'Input', 'Output'."},"isReverseCharge":{"type":"boolean","description":"Whether the recipient rather than the supplier accounts for the tax, for example under §13b UStG. A reverse-charge line books a second, crediting entry to reverseChargeCreditAccountId on each of its accounts."},"cashBasis":{"type":"boolean","description":"Cash basis: the tax becomes creditable only when the bill is paid. It posts to the uncollected account and moves to the collected account on payment."},"isActive":{"type":"boolean","description":"Whether the tax code is offered for selection on new documents. Inactive codes stay readable on existing documents."},"index":{"type":"number","description":"The position of the line within its configuration, used for display order."},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account mapping."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount on a reverse-charge line. Absent when isReverseCharge is false. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["id","chartOfAccountsId","accountId"]},"description":"The general ledger accounts this tax code books to, usually one for each chart of accounts the entity books in. Every tax code has at least one, including exempt and zero-rated codes, which book a tax line at zero."},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the component."},"taxComponentCode":{"type":"string"},"percentage":{"type":"string","format":"decimal"},"isRecoverable":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chartOfAccountsId":{"type":"string"},"accountId":{"type":"string"},"reverseChargeCreditAccountId":{"type":"string"},"collectedAccountId":{"type":"string"}},"additionalProperties":false,"required":["id","chartOfAccountsId","accountId"]}}},"additionalProperties":false,"required":["id","taxComponentCode","percentage","isRecoverable","accounts"]},"description":"The tax components of this code, with their GL accounts. Empty for a code that has line-level accounts only."}},"additionalProperties":false,"required":["id","title","percentage","rateType","scope","direction","isReverseCharge","cashBasis","isActive","index","accounts","components"]},"description":"The tax codes of this configuration, in display order. Every configuration has at least one."}},"additionalProperties":false,"required":["id","entityId","status","taxRegime","lastModifiedDate","lines"]},"entityExternalIdentifierFieldsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the field configuration."},"fieldName":{"type":"string","description":"The key to send as fieldName in an entity's external identifiers, a stable camelCase slug such as 'netsuiteSubsidiaryId'. Unique within the tenant."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system the identifier comes from, for example 'NetSuite'. Absent when none is set."},"instanceName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The instance of the source system, for example 'EU production'. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the field configuration last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getJournalEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the journal entry."},"approvalStatus":{"type":"string","description":"The approval status of the journal entry. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Absent on entries that never entered the approval workflow."},"bookId":{"type":"string","description":"The accounting book this entry posts to. See id on GET accounting/books/:id."},"description":{"type":"string","description":"A free-form description of the journal entry."},"name":{"type":"string","description":"The display name of the journal entry."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Format YYYY-MM-DD."},"reversalDate":{"type":"string","format":"date","description":"The reversal date recorded on the entry. Format YYYY-MM-DD. Set on an entry that is or will be reversed: the date its reversal posts. The reversal entry itself carries none; its posting date is this date, its type is 'reversal' ('revaluationReversal' for a revaluation), and no public field links it back to this entry."},"reversalDescription":{"type":"string","description":"The description recorded on the reversal."},"reversalReason":{"type":"string","description":"The reason recorded for the reversal, on the entry being reversed. Possible values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'."},"status":{"type":"string","description":"The posting status of the journal entry. Possible values: 'posted', 'unposted', 'voided'."},"type":{"type":"string","description":"How the entry originated, for example 'manual', 'invoice', 'revaluation' or 'reversal'. A system-assigned value."},"consolidationAdjustmentType":{"type":"string","description":"Set on a consolidation adjustment. Possible values: 'consolidationAdjustment'. Absent on a regular journal entry."},"url":{"type":"string","description":"A link to the source document this entry comes from."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the journal entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line has either a debit or a credit, not both."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line has either a debit or a credit, not both."},"description":{"type":"string","description":"A free-form description of the line."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"intercompanyPartnerId":{"type":"string","description":"The intercompany business partner that represents the counterparty legal entity on this line. Format: UUID. Each legal entity has one intercompany business partner, created with the entity. Absent on lines that are not intercompany."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate used to convert the line's transactional amount to its functional amount."},"functionalCredit":{"type":"string","format":"decimal","description":"The credit amount for this line, in the functional currency."},"functionalCurrency":{"type":"string","description":"The functional currency the posting entity keeps in the entry's book (currency on book entity assignments). Format ISO 4217, for example 'USD'."},"functionalDebit":{"type":"string","format":"decimal","description":"The debit amount for this line, in the functional currency."},"journalEntryId":{"type":"string","description":"The journal entry this line belongs to. See id on GET accounting/journal-entries/:id."},"lineNumber":{"type":"number","description":"The line's sequential number within the entry."},"lineType":{"type":"string","description":"The classification of the line, for example 'standard', 'tax', 'offset' or 'fxRoundingDifference'. A system-assigned value. Absent when the line has no classification."},"postingPeriodId":{"type":"string","description":"The accounting period this line posts to. See id on GET accounting/accounting-periods/:id."},"revaluation":{"type":"boolean","description":"True when the line's account is configured for currency revaluation and the line is not in the functional currency; on a bank or credit-card account, the bank's currency must also differ from the functional currency. A currency revaluation restates such a line. It does not mark revaluation postings: those are the entries whose type is 'revaluation', 'revaluationReversal' or 'RevaluationClose'."},"sourceTransaction":{"type":"string","description":"The identifier of the source transaction that generated this line, for example an invoice or payment number."},"transactionalCurrency":{"type":"string","description":"The currency of the line's transactional amounts. Format ISO 4217, for example 'USD'."},"transactionDate":{"type":"string","format":"date","description":"The date of the underlying transaction. Format YYYY-MM-DD. It can differ from the posting date."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this tag points to, on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to. Present only for a custom-dimension tag. See id on GET base/custom-dimensions."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. A historical entry can have tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags assigned to this line. Set them with create or update."}},"additionalProperties":false,"required":["id","accountId","entityId"]},"description":"The debit and credit lines of the entry."}},"additionalProperties":false,"required":["id","postingDate","status","lastModifiedDate","lines"]},"invoiceMilestonesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone."},"salesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order whose product lines the milestone bills."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the milestone stands for, as it appears on the invoice line."},"orderSequence":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The milestone's position among the sales order's milestones."},"percentage":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The share of the sales order the milestone bills, in percent. A number, not an amount."},"projectedDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"When the milestone is expected to be reached. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of amount, as a 3-letter ISO 4217 code."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount the milestone bills, in the milestone currency (see currency)."},"status":{"anyOf":[{"oneOf":[{"const":"open","description":"Not released for invoicing. The milestone can be changed."},{"const":"released","description":"Released for invoicing on invoiceDate; the invoice is not created yet."},{"const":"invoiced","description":"Invoiced."}]},{"type":"null"}],"description":"Where the milestone is in invoicing."},"invoiceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The planned invoice date of a released milestone, or the invoice date of an invoiced one. Absent while the milestone is open. Format YYYY-MM-DD."},"invoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the invoice that billed the milestone. Absent until it is invoiced."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the milestone last changed, in UTC. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."}},"additionalProperties":false},"revenueContractsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract."},"revenueContractNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The revenue contract number, unique within the tenant."},"approvalStatus":{"enum":["draft","pendingApproval","revise","approved","rejected"],"description":"The approval status of the contract: 'pendingApproval' when it is created and 'approved' once approved; the other values of the vocabulary ('draft', 'revise', 'rejected') do not occur on a contract. Only an approved contract is recognized: a contract pending approval has a plan but no revenue, and filtering the sales order's approvalStatus instead still includes contracts pending approval."},"generalStatus":{"anyOf":[{"enum":["approved","approvedOnHold","pendingApproval","pendingApprovalOnHold"]},{"type":"null"}],"description":"The overall status of the contract, combining approval and any active revenue hold."},"revenueStatus":{"anyOf":[{"enum":["notStarted","notStartedOnHold","inProgress","inProgressOnHold","complete","completeModified"]},{"type":"null"}],"description":"The revenue-recognition progress across the contract's lines."},"isContractClosed":{"type":"boolean","description":"Whether the contract has been closed, with its open revenue moved to a new combined revenue contract."},"isContractCombined":{"type":"boolean","description":"Whether the contract is the combination target that absorbed a closed contract's open revenue."},"isLongTermContract":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the recognition window from revenueStartDate to revenueEndDate exceeds 366 days."},"currency":{"type":"string","description":"The currency the contract is denominated in. Every amount on the contract is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The owning entity's functional currency. Present only when it differs from the contract currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the contract currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that owns this contract."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that owns the contract."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the customer this contract is with."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer the contract belongs to."},"initialSalesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order the contract was created for. A contract combined with an earlier one also holds that contract's open lines, so a revenue or cost figure attributed to sales orders through this field charges this order with them."},"migrationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date this contract's opening balances were migrated from a prior system. Format YYYY-MM-DD. Absent on a contract created natively."},"revenueStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The earliest revenue-recognition start date across the contract's lines. Format YYYY-MM-DD."},"revenueEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The latest revenue-recognition end date across the contract's lines. Format YYYY-MM-DD."},"totalContractValue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total contract value, in the contract currency. It is the total price of the sales order this contract was created from, less the contract's cost-of-contract-value."},"deferredRevenue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The deferred revenue not yet recognized, in the contract currency, as of today. Zero once the contract is closed. A subledger figure: it sums only the journal entry lines linked to the contract, plus balances migrated onto the contract, so it need not equal the deferred-revenue accounts in the ledger."},"revenueRecognized":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cumulative revenue recognized to date, in the contract currency, as of today; revenue recognized as of an earlier date comes from posted journal entry lines. On a combined contract (isContractCombined) it is the revenue recognized in the related contracts."},"revenueRemaining":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue remaining to be recognized, billed or not, in the contract currency, as of today: the revenue amount of the contract's lines less what they have recognized."},"totalCostOfContractValue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Contracted COST of the contract, in the contract currency (see `currency`): the value of the contract lines carried for cost rather than revenue. totalContractValue already excludes it, so the gross contracted value is the sum of the two. Do not pair it with revenueRecognized, which is a to-date figure."},"costOfRevenueRecognized":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Cost of revenue RECOGNIZED to date, in the contract currency (see `currency`) — the cost counterpart of revenueRecognized, and the one to pair it with for a realised margin. It is 0 on a contract that has recognized nothing, which is a real figure and not a missing one. Unreliable on a combined contract (isContractCombined): there the node fills it with the revenue recognized in the related contracts, not with their cost."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue contract last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getSalesOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order."},"orderNumber":{"type":"string","description":"The sales order number. Unique within the tenant. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'. 'upsell' is a mid-term modification of a subscription: the order is stored as 'midTermModification', the name POST accounting/subscriptions/:id/modify uses, and this version reports it as 'upsell'. API version v2 reports it as 'midTermModification'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved order is booked business: an invoice run raises invoices for approved orders only. 'draft', 'pendingApproval' and 'revise' are awaiting approval and never share a total with approved orders."},"bookDate":{"type":"string","format":"date","description":"The date the sales order was booked. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the order's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the order's service period. Absent when isEvergreen is true. A subscription cancellation does not change it; a cancellation is read on the order's subscriptions (isCancellationEnabled, cancellationDate). Format YYYY-MM-DD."},"signDate":{"type":"string","format":"date","description":"The date the sales order was signed. Format YYYY-MM-DD."},"salesEffectiveDate":{"type":"string","format":"date","description":"The date the contract legally takes effect. salesEffectiveDate can be earlier than signDate. Format YYYY-MM-DD."},"isEvergreen":{"type":"boolean","description":"Whether the order is evergreen, meaning at least one of its subscriptions has no end date and keeps billing until it is canceled. It stays true after that cancellation; read cancellations on the subscriptions."},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the invoices, credit memos, and debit memos created from this order are left out of the tax engine. Always false when your tenant does not allow sales orders to be excluded from the tax engine."},"term":{"type":"string","format":"decimal","description":"The length of the order's term, in months. Absent when isEvergreen is true."},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'."},"totalContract":{"type":"string","format":"decimal","description":"The total value of the order before tax, in the order currency: the sum of totalPrice across its lines minus oneTimeDiscountAmount. It does not bound what an evergreen or pay-as-you-go-only order will bill, so on those totalContract minus invoicedAmount is not what remains."},"invoicedAmount":{"type":"string","format":"decimal","description":"The amount invoiced from this order so far, before tax, in the order currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"The one-time discount on the order as a whole, in the order currency."},"oneTimeDiscountAllocation":{"type":"string","description":"How oneTimeDiscountAmount is spread across the order's invoices. Possible values: 'firstInvoice', 'alignToInvoiceFrequency', 'custom'."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to the order's invoices. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"memo":{"type":"string","description":"A memo on the sales order."},"crmContractId":{"type":"string","description":"The identifier of the contract this order came from, in an external CRM system."},"salesArrangement":{"type":"string","description":"The number of the sales arrangement this order belongs to. No endpoint returns sales arrangements."},"salesArrangementId":{"type":"string","description":"The sales arrangement this order belongs to. No endpoint returns sales arrangements."},"paymentTermId":{"type":"string","description":"The payment term applied to the order's invoices. See id on GET accounting/payment-terms."},"opportunityId":{"type":"string","description":"The identifier of the opportunity this order came from, in an external CRM system."},"opportunityName":{"type":"string","description":"The name of the opportunity this order came from."},"dataSource":{"type":"string","description":"The system the order came from. Examples: 'Salesforce', 'NetSuite'."},"priceBookId":{"type":"string","description":"The price book the order's list prices come from. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The name of the price book the order's list prices come from. See priceBookName on GET accounting/price-books/:id."},"externalizedInvoicing":{"type":"boolean","description":"Whether another system invoices this order. When true, no invoice plans are created for the order."},"customer":{"type":"object","properties":{"id":{"type":"string","description":"The customer's identifier. See id on GET accounting/customers/:id."},"customerNumber":{"type":"string","description":"The customer number. Example: 'CUS-789012'."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to."},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"segment":{"type":"string","description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax."}},"additionalProperties":false,"required":["id","name"],"description":"The customer this order is for."},"entityId":{"type":"string","description":"The legal entity that owns this sales order. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this sales order. See entityName on GET base/entities."},"entityNumber":{"type":"string","description":"The number of the legal entity that owns this sales order. See entityNumber on GET base/entities."},"soldToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The sold-to address of the order. It is the customer address used to calculate tax."},"billToAddress":{"type":"object","properties":{"addressId":{"type":"string","description":"The unique identifier for the address."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The bill-to address of the order."},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The subscription's identifier. See id on GET accounting/subscriptions/:id."},"subscriptionNumber":{"type":"string","format":"decimal","description":"The subscription number. See subscriptionNumber on GET accounting/subscriptions/:id."},"externalSubscriptionId":{"type":"string","description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"serviceStartDate":{"type":"string","format":"date","description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The latest service end date across all of the subscription's lines, including lines from other orders. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"products":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"The code of the product. See productCode on GET accounting/products/:id."},"productId":{"type":"string","description":"The product ordered on this line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line ordered on this line. See id on GET accounting/product-lines/:id."},"productName":{"type":"string","description":"The product's current name. See productName on GET accounting/products/:id."},"salesOrderProductLineId":{"type":"string","description":"The unique identifier for this order line. On a ramp deal, the identifier of the earliest ramp's line. The other ramps' line identifiers are not returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered on this line. On a ramp deal, it is the first ramp's quantity."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit, in the order currency. unitPrice = listPrice - discountAmount = listPrice × (1 - discountPercentage)."},"totalPrice":{"type":"string","format":"decimal","description":"The total price of the line, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit, as a decimal fraction of listPrice. For example, 0.1 is 10%."},"invoiceFrequency":{"type":"string","description":"How often the line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'. See invoiceFrequency on GET accounting/product-lines/:id."},"invoiceTiming":{"type":"string","description":"When the line is invoiced relative to the period it covers. Possible values: 'advance' (at the start of the period), 'arrears' (at the end of the period)."},"lineInvoiceDay":{"type":"string","description":"The day of the period the line is invoiced on. Possible values: 'anniversary', 'first', 'last', 'specific'."},"priceModel":{"type":"string","description":"How the price of this order line depends on quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. See priceModel on GET accounting/product-lines/:id."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. See unitOfMeasure on GET accounting/product-lines/:id."},"pricingTerm":{"type":"string","description":"The period the unit price covers. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'. See pricingTerm on GET accounting/product-lines/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of this line's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this line's service period. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array when the line has none."},"overage":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price per unit of overage usage, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit of overage usage, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, as a decimal fraction of listPrice. For example, 0.1 is 10%. Absent when discountAmount is present."}},"additionalProperties":false,"description":"The pricing for usage above the line's allowance. Absent when the line has no overage discount."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate card entry."},"identifier":{"type":"string","description":"The identifier of the billable component this entry prices. No endpoint returns billable components."},"label":{"type":"string","description":"A description of the rate card entry."},"unitOfMeasure":{"type":"string","description":"The unit this entry is priced in, for example 'user' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in this entry's currency."},"currency":{"type":"string","description":"The currency of unitPrice. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","unitOfMeasure","unitPrice","currency"]},"description":"The rate card entries of this line. Absent when the line has none."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier starts."},"toQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier ends. Absent on the last tier, which has no upper limit."},"unitPrice":{"type":"string","format":"decimal","description":"The price for this tier, in the order currency. When priceModel is 'perUnit', it is charged for each unit priced in this tier. When priceModel is 'flat', it is charged once for the tier, whatever the number of units."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this tier before discount, in the order currency."},"priceModel":{"type":"string","description":"How unitPrice applies within this tier. Possible values: 'flat', 'perUnit'."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of this line, lowest fromQuantity first. Absent when the line has none."},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The name of the tag dimension, for example 'Department'."},"value":{"type":"string","description":"The tag value within the dimension, for example 'Engineering'."}},"additionalProperties":false,"required":["dimension","value"]},"description":"The value accounting tags of this product, as dimension and value pairs. Every line of the same product has the same tags. Absent when the product has no tags."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the order's record of this item."},"itemId":{"type":"string","description":"The inventory item. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item code of the inventory item. See itemCode on GET inventory/items/:id."},"itemName":{"type":"string","description":"The name of the inventory item."},"productName":{"type":"string","description":"The name of the product the item belongs to."},"itemOrdered":{"type":"string","format":"decimal","description":"The quantity of this item ordered: the total quantity of the product across its lines on this order. It is not multiplied by the item's quantity in the product definition."},"totalShipped":{"type":"string","format":"decimal","description":"The quantity of this item shipped so far, summed across its shipments."}},"additionalProperties":false,"required":["id","itemOrdered"]},"description":"The inventory items of this product. Every line of the same product has the same items. Absent when the product has no items or is a ramp deal."},"rampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"How the ramp periods are set. Possible values: 'annually', 'specificDates'."},"invoiceTiming":{"type":"string","description":"How the ramp deal is invoiced. Possible values: 'perInterval', 'allAtOnce'."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"The first day of this ramp. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this ramp. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity for this ramp."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit for this ramp before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit for this ramp, in the order currency."},"invoiceFrequency":{"type":"string","description":"How often this ramp is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."}},"additionalProperties":false,"required":["serviceStartDate","serviceEndDate","quantity"]},"description":"The ramps of the deal, earliest first."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Present only when the product is a ramp deal. The entry then represents the whole product, and each ramp in ramps is one of its product lines, with its own dates, quantity, and prices, earliest first. On a ramp deal, the entry has no listPrice, unitPrice, totalPrice, discountAmount, discountPercentage, serviceStartDate, serviceEndDate, items, tiers, rateCardEntries, overage, or prepaidConfiguration."},"prepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative' (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews), 'overage' (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate)."},"rolloverAtRenewal":{"type":"boolean","description":"Whether unused balance rolls over when the subscription renews."},"balance":{"type":"string","format":"decimal","description":"The prepaid units (credits) left in the balance."},"consumedAmount":{"type":"string","format":"decimal","description":"The prepaid units (credits) used so far: the quantity funded by this line minus the current balance. Absent when balance is absent."}},"additionalProperties":false,"required":["overConsumptionBehavior","rolloverAtRenewal"],"description":"The prepaid balance settings of this line. Absent when the line is not a prepaid line."}},"additionalProperties":false,"required":["productCode","productId","productLineId","quantity","externalIdentifiers"]},"description":"The product lines of this subscription on this order, one entry per product line. For a ramp deal, one entry represents the whole product, and each ramp in rampDeal.ramps is one of its product lines."}},"additionalProperties":false,"required":["products"]},"description":"The order's subscriptions, each with the product lines that belong to it. An empty array when the order has none."},"nonSubscriptionProducts":{"type":"array","items":{"type":"object","properties":{"productCode":{"type":"string","description":"The code of the product. See productCode on GET accounting/products/:id."},"productId":{"type":"string","description":"The product ordered on this line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line ordered on this line. See id on GET accounting/product-lines/:id."},"productName":{"type":"string","description":"The product's current name. See productName on GET accounting/products/:id."},"salesOrderProductLineId":{"type":"string","description":"The unique identifier for this order line. On a ramp deal, the identifier of the earliest ramp's line. The other ramps' line identifiers are not returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered on this line. On a ramp deal, it is the first ramp's quantity."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit, in the order currency. unitPrice = listPrice - discountAmount = listPrice × (1 - discountPercentage)."},"totalPrice":{"type":"string","format":"decimal","description":"The total price of the line, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit, as a decimal fraction of listPrice. For example, 0.1 is 10%."},"invoiceFrequency":{"type":"string","description":"How often the line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'. See invoiceFrequency on GET accounting/product-lines/:id."},"invoiceTiming":{"type":"string","description":"When the line is invoiced relative to the period it covers. Possible values: 'advance' (at the start of the period), 'arrears' (at the end of the period)."},"lineInvoiceDay":{"type":"string","description":"The day of the period the line is invoiced on. Possible values: 'anniversary', 'first', 'last', 'specific'."},"priceModel":{"type":"string","description":"How the price of this order line depends on quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. See priceModel on GET accounting/product-lines/:id."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is counted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'. See unitOfMeasure on GET accounting/product-lines/:id."},"pricingTerm":{"type":"string","description":"The period the unit price covers. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'. See pricingTerm on GET accounting/product-lines/:id."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of this line's service period. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this line's service period. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array when the line has none."},"overage":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price per unit of overage usage, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit of overage usage, in the order currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, in the order currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount per unit of overage usage, as a decimal fraction of listPrice. For example, 0.1 is 10%. Absent when discountAmount is present."}},"additionalProperties":false,"description":"The pricing for usage above the line's allowance. Absent when the line has no overage discount."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate card entry."},"identifier":{"type":"string","description":"The identifier of the billable component this entry prices. No endpoint returns billable components."},"label":{"type":"string","description":"A description of the rate card entry."},"unitOfMeasure":{"type":"string","description":"The unit this entry is priced in, for example 'user' or 'gigabyte'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in this entry's currency."},"currency":{"type":"string","description":"The currency of unitPrice. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","unitOfMeasure","unitPrice","currency"]},"description":"The rate card entries of this line. Absent when the line has none."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier starts."},"toQuantity":{"type":"string","format":"decimal","description":"The quantity at which this tier ends. Absent on the last tier, which has no upper limit."},"unitPrice":{"type":"string","format":"decimal","description":"The price for this tier, in the order currency. When priceModel is 'perUnit', it is charged for each unit priced in this tier. When priceModel is 'flat', it is charged once for the tier, whatever the number of units."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this tier before discount, in the order currency."},"priceModel":{"type":"string","description":"How unitPrice applies within this tier. Possible values: 'flat', 'perUnit'."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of this line, lowest fromQuantity first. Absent when the line has none."},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The name of the tag dimension, for example 'Department'."},"value":{"type":"string","description":"The tag value within the dimension, for example 'Engineering'."}},"additionalProperties":false,"required":["dimension","value"]},"description":"The value accounting tags of this product, as dimension and value pairs. Every line of the same product has the same tags. Absent when the product has no tags."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the order's record of this item."},"itemId":{"type":"string","description":"The inventory item. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item code of the inventory item. See itemCode on GET inventory/items/:id."},"itemName":{"type":"string","description":"The name of the inventory item."},"productName":{"type":"string","description":"The name of the product the item belongs to."},"itemOrdered":{"type":"string","format":"decimal","description":"The quantity of this item ordered: the total quantity of the product across its lines on this order. It is not multiplied by the item's quantity in the product definition."},"totalShipped":{"type":"string","format":"decimal","description":"The quantity of this item shipped so far, summed across its shipments."}},"additionalProperties":false,"required":["id","itemOrdered"]},"description":"The inventory items of this product. Every line of the same product has the same items. Absent when the product has no items or is a ramp deal."},"rampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"How the ramp periods are set. Possible values: 'annually', 'specificDates'."},"invoiceTiming":{"type":"string","description":"How the ramp deal is invoiced. Possible values: 'perInterval', 'allAtOnce'."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"The first day of this ramp. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of this ramp. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity for this ramp."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit for this ramp before discount, in the order currency."},"unitPrice":{"type":"string","format":"decimal","description":"The discounted price per unit for this ramp, in the order currency."},"invoiceFrequency":{"type":"string","description":"How often this ramp is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."}},"additionalProperties":false,"required":["serviceStartDate","serviceEndDate","quantity"]},"description":"The ramps of the deal, earliest first."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Present only when the product is a ramp deal. The entry then represents the whole product, and each ramp in ramps is one of its product lines, with its own dates, quantity, and prices, earliest first. On a ramp deal, the entry has no listPrice, unitPrice, totalPrice, discountAmount, discountPercentage, serviceStartDate, serviceEndDate, items, tiers, rateCardEntries, overage, or prepaidConfiguration."},"prepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative' (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews), 'overage' (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate)."},"rolloverAtRenewal":{"type":"boolean","description":"Whether unused balance rolls over when the subscription renews."},"balance":{"type":"string","format":"decimal","description":"The prepaid units (credits) left in the balance."},"consumedAmount":{"type":"string","format":"decimal","description":"The prepaid units (credits) used so far: the quantity funded by this line minus the current balance. Absent when balance is absent."}},"additionalProperties":false,"required":["overConsumptionBehavior","rolloverAtRenewal"],"description":"The prepaid balance settings of this line. Absent when the line is not a prepaid line."}},"additionalProperties":false,"required":["productCode","productId","productLineId","quantity","externalIdentifiers"]},"description":"The order's product lines that belong to no subscription, with the same fields as subscriptions[].products. An empty array when the order has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to product lines do not update it."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The name of the external identifier field, as set up by an administrator in Settings & Policies > Integrations > External Identifiers."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The order's identifiers in other systems, at most one per field name. An empty array when the order has none."}},"additionalProperties":false,"required":["id","orderNumber","bookDate","currency","customer","entityId","entityNumber","soldToAddress","billToAddress","subscriptions","nonSubscriptionProducts","lastModifiedDate"]},"createAccountingProductOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created product."}},"additionalProperties":false,"required":["id"]},"createAccountingProductInput":{"type":"object","properties":{"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant. A code another product already uses fails with DUPLICATE_PRODUCT_CODE."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Use format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The date the product is no longer available. Use format YYYY-MM-DD. Omit for a product with no end date."},"productFamily":{"type":"string","description":"The product family. Accepted values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"The product type. Accepted values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"description":{"type":"string","description":"A description of the product shown to customers."},"internalDescription":{"type":"string","description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"type":"string","description":"The product's identifier in an external CRM system."},"isInventory":{"type":"boolean","description":"Whether the product is tracked as inventory. Defaults to false."},"itemIds":{"type":"array","items":{"type":"string"},"description":"The inventory items to link to this product. Used only when isInventory is true. See id on GET inventory/items/:id."},"entityId":{"type":"string","description":"The legal entity this product is scoped to. See id on GET base/entities. Omit to default to your current entity when entity-based visibility is enabled, otherwise the product is shared across all entities."},"productLines":{"type":"array","items":{"type":"object","properties":{"lineType":{"type":"string","description":"The type of product line. Accepted values: 'recurring', 'oneTime', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'. 'usage' is not accepted and fails with UNSUPPORTED_LINE_TYPE, because 'usage' lines are only created automatically with their parent line. 'commitWithOverage' is not supported and fails with VALIDATION_FAILED."},"priceModel":{"type":"string","description":"How the product line is priced. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"name":{"type":"string","description":"A name for the product line. Omit to have one generated."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Accepted values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd', 'perCharge'. 'perCharge' invoices each billable charge on its own planned date and is accepted on billableTime, billableTravelExpense and billablePassThrough lines only."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Accepted values: 'allowNegative', 'overage'. 'allowNegative' lets the balance go negative and takes the shortfall from the new prepaid amount at renewal. 'overage' stops the balance at 0 and invoices further usage at the line's overage rate."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal."},"trueUpEstimationMethod":{"type":"string","description":"Makes a 'recurring' line a True-Up line: its quantity is an estimate, reconciled against uploaded usage each invoice period, and the difference is invoiced as an adjustment. Accepted value: 'startEstimate'. A True-Up line gets a paired 'usage' line, and pricing the True-Up line also prices that 'usage' line. The line must have a calculated invoiceFrequency ('monthly', 'biMonthly', 'quarterly', 'semiAnnually' or 'annually') and can't be priced 'thresholdBased'; otherwise the request fails with VALIDATION_FAILED."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."},"engine":{"type":"string","description":"The tax engine that computes this tax. Accepted values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."}},"additionalProperties":false,"required":["taxCode","entityId","engine"]},"description":"The tax records to attach to the product line. Provide only when a tax provider is configured."},"priceBookHeadersToCreate":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. Required when the product line is priced 'flat' or 'perUnit'."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Omit on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["unitOfMeasure"],"description":"The rate-card entry to attach. Provide only on rate-card-priced entries."}},"additionalProperties":false},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","priceBookEntries"]},"description":"The pricing headers to create for the product line."},"priceBookHeadersForUsage":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this rate-card entry, in the header currency."}},"additionalProperties":false,"required":["usageType","unitOfMeasure"]},"description":"The rate-card entries on the header. Pricing of a 'usage' line is always rate-card based."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","rateCardEntries"]},"description":"The pricing for the paired 'usage' line that the API creates. Provide only when lineType is 'prepaid', or when lineType is 'recurring' and priceModel is 'thresholdBased'. On any other line the request fails with USAGE_PRICING_NOT_APPLICABLE."}},"additionalProperties":false,"required":["lineType","priceModel","unitOfMeasure"]},"description":"The product lines to create with this product, each with optional pricing. A 'prepaid' line, a 'recurring' line whose priceModel is 'thresholdBased', or a 'recurring' line with a trueUpEstimationMethod also creates a paired 'usage' line. Provide the pricing of a 'prepaid' or 'thresholdBased' line's paired 'usage' line in priceBookHeadersForUsage. A True-Up line's paired 'usage' line is priced with the line itself, so priceBookHeadersForUsage on it fails with USAGE_PRICING_NOT_APPLICABLE."}},"additionalProperties":false,"required":["productName","productCode","effectiveStartDate"]},"createPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payment."}},"additionalProperties":false,"required":["id"]},"createPaymentInput":{"type":"object","properties":{"customerId":{"type":"string","description":"The customer making the payment. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity receiving the payment. See id on GET base/entities."},"amount":{"type":"string","format":"decimal","description":"The total payment amount, in the payment currency. Must be greater than 0."},"currency":{"type":"string","description":"The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Use format YYYY-MM-DD."},"paymentType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The payment method."},"accountId":{"type":"string","description":"The ledger account to post the payment to. Omit to use the entity's configured electronic payment account, which fails with DEFAULT_ACCOUNT_NOT_CONFIGURED when it is not set. See id on GET accounting/accounts/:id."},"paymentReference":{"type":"string","description":"The reference the payer supplied with the payment, for example a check or wire reference."},"paymentNote":{"type":"string","description":"A free-form note to record on the payment."},"bankFeeAmount":{"type":"string","format":"decimal","description":"The bank fee deducted from the payment, in the payment currency."},"thirdPartyPayerId":{"type":"string","description":"The customer actually making the payment, when a third party pays on the invoiced customer's behalf. See id on GET accounting/customers/:id."}},"additionalProperties":false,"required":["customerId","entityId","amount","currency","paymentDate","paymentType"]},"customersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the customer."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number. Example: 'CUS-789012'."},"customerName":{"type":"string","description":"The name of the customer, as it appears on invoices."},"customerCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Customer code as maintained by whoever set the record up — a human-readable key that is not the system-assigned customerNumber, and absent where nobody assigned one. Do not treat it as unique unless the tenant maintains it that way. Returned only — it can be neither filtered nor sorted on."},"customerType":{"enum":["default","partner","endCustomer"],"description":"The customer type. Possible values: 'default' (a direct customer), 'partner' (a reseller or third-party payer that is invoiced for its end customers), 'endCustomer' (a customer that buys through a partner)."},"partnerType":{"anyOf":[{"oneOf":[{"const":"reseller","description":"Resells to its own end customers."},{"const":"thirdPartyPayer","description":"Pays on behalf of the end customer."}]},{"type":"null"}],"description":"Partner type, set only when customerType is 'partner'."},"businessType":{"enum":["individual","company"],"description":"The business type of the customer."},"customerSegment":{"anyOf":[{"enum":["SMB","MidMarket","Enterprise"]},{"type":"null"}],"description":"The market segment of the customer. Absent when businessType is 'individual'."},"status":{"anyOf":[{"oneOf":[{"const":"active","description":"The record is in use."},{"const":"inactive","description":"The record has been deactivated."}]},{"type":"null"}],"description":"Whether the customer record is active. This is the record's own state and says nothing about trading: an active customer may have no order and no receivable, and an inactive one may still carry an open balance. A report counting customers by commercial activity reads sales orders or invoices instead, and says which."},"salesChannel":{"anyOf":[{"oneOf":[{"const":"salesAssisted","description":"Sold through the sales team."},{"const":"selfServe","description":"Bought by the customer without a salesperson."}]},{"type":"null"}],"description":"How the customer was sold to."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that owns this customer."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that invoices this customer."},"globalParentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The top-level customer of the hierarchy this customer belongs to — the customer itself when it is the top. Absent when the customer belongs to no hierarchy. The id rather than the name, so a hierarchy can be traversed rather than only grouped."},"globalParentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the global parent customer. Returned only — it can be neither filtered nor sorted on."},"defaultCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code."},"taxExempt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the customer is exempt from tax."},"paymentTermLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the payment term applied to the customer's invoices. See label on GET accounting/payment-terms."},"exemptionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax-exemption certificate number. Absent when taxExempt is false."},"invoiceEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address invoices are sent to."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 3166 country code of the customer's DEFAULT sold-to address — the country a report groups or maps by. A customer with several addresses is counted once, at the default sold-to; absent when no default sold-to address is on file, which is a gap in the record rather than a customer without a country. The full address is on GET accounting/customers/:id."},"stateProvince":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State or province of the same default sold-to address. The spelling is NOT uniform: most values are ISO 3166-2 subdivision codes (US-CA, GB-ENG) and some are plain names (Idaho, Virginia), because the address record accepts either. A filter written for one form misses the other, and grouping by this field splits one state into two — normalise first, or group by country instead. Absent where the address carries no state."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the customer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchUsageOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the usage record."},"usageNumber":{"type":"string","description":"The usage number, unique within the tenant. Absent while none has been assigned."},"usageIdentifier":{"type":"string","description":"The external identifier for this usage record, as supplied at ingestion."},"date":{"type":"string","format":"date-time","description":"The date and time the usage occurred, without a time zone. Format YYYY-MM-DDTHH:mm:ss."},"description":{"type":"string","description":"A free-form description of the usage record. Absent when none is set."},"productIdentifier":{"type":"string","description":"The product code or identifier this usage is attributed to, as supplied at ingestion."},"billableComponentId":{"type":"string","description":"The billable component this usage is attributed to. Absent until it is resolved. There is no endpoint for it."},"usageComponent":{"type":"string","description":"The billable component's name or identifier, included so you do not need a second read."},"quantity":{"type":"string","format":"decimal","description":"The quantity of usage recorded, in unitOfMeasure."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit for this usage. This record has no currency field. The currency is on the subscription or contract this usage bills against."},"status":{"type":"string","description":"The lifecycle status of the usage record. Possible values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'."},"usagePeriodId":{"type":"string","description":"The unique identifier for the usage period this record belongs to. There is no endpoint for it."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"Custom data recorded on this usage record, as a JSON object. Absent when none was set."},"orderIndex":{"type":"number","description":"The position of this usage record within the batch it was created in. Absent when not known."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the usage record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","date","quantity","unitPrice","status","usagePeriodId","lastModifiedDate"]},"description":"The usage records on this page, newest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more usage records remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchUsageInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the usage record with this identifier."},"usageNumber":{"type":"string","description":"Limits results to the usage record with this usage number."},"usageIdentifier":{"type":"string","description":"Limits results to usage records with this external identifier."},"productIdentifier":{"type":"string","description":"Limits results to usage records with this product code or identifier."},"status":{"type":"string","description":"Limits results to usage records with this status. Accepted values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'. Any other value matches nothing."},"unitOfMeasure":{"type":"string","description":"Limits results to usage records in this unit, for example 'Hour', 'GB' or 'Call'."},"usagePeriodId":{"type":"string","description":"Limits results to usage records in the usage period with this identifier. An identifier matching no usage period returns an empty page."},"billableComponentId":{"type":"string","description":"Limits results to usage records attributed to the billable component with this identifier. An identifier matching no billable component returns an empty page."},"date":{"type":"object","properties":{"start":{"type":"string","description":"The earliest date to include. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ. A time zone is converted to UTC before matching."},"end":{"type":"string","description":"The latest date to include. Use format YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ. A time zone is converted to UTC before matching."}},"additionalProperties":false,"description":"Limits results to usage records whose date falls in this range. Omit either bound to leave that side open. Both bounds are inclusive."}},"additionalProperties":false,"description":"The filters to apply. A usage record must match every filter you send. Omit to return all usage records."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of usage records per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"searchAccountingPricingOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header."},"headerNumber":{"type":"string","description":"The pricing header number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The product line this pricing header prices. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of the product line. See name on GET accounting/product-lines/:id."},"productLineNumber":{"type":"string","description":"The product line number. See productLineNumber on GET accounting/product-lines/:id."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"type":"string","description":"The display name of the product. See productName on GET accounting/products/:id."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"dataSource":{"type":"string","description":"The source system or import job that produced the pricing header. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"hasBeenUsed":{"type":"boolean","description":"Whether at least one sales order line uses this pricing header."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the pricing header was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the pricing header last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book entry."},"priceBookEntryNumber":{"type":"string","description":"The price book entry number, assigned by the system."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. On a rate-card entry, the list price is the rate."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Used only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Absent on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"rateCardEntry":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Absent when no price model was set on the rate-card entry."}},"additionalProperties":false,"required":["id","unitOfMeasure"],"description":"The rate-card entry attached to this price book entry. Absent when the entry is not rate-card priced."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the price book entry has none."}},"additionalProperties":false,"required":["id"]},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry. An empty array when the header has none."}},"additionalProperties":false,"required":["id","productLineId","priceBookId","currency","validFrom","lastModifiedDate","priceBookEntries"]},"description":"The pricing headers on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more pricing headers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountingPricingInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"term":{"type":"string","description":"Limits results to pricing headers whose price book name, product line name, or header number contains this text. The match is case-insensitive."},"headerNumber":{"type":"string","description":"Limits results to the pricing header with this header number. The match is exact."},"productLineId":{"type":"string","description":"Limits results to pricing headers of this product line. See id on GET accounting/product-lines/:id."},"productId":{"type":"string","description":"Limits results to pricing headers of any product line of this product. See id on GET accounting/products/:id."},"priceBookId":{"type":"string","description":"Limits results to pricing headers in this price book. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"Limits results to pricing headers in this currency. Format ISO 4217, for example 'USD'. The match is exact."},"dataSource":{"type":"string","description":"Limits results to pricing headers from this source system or import job. The match is exact. Example: 'Salesforce'."},"hasBeenUsed":{"type":"boolean","description":"Limits results to pricing headers that at least one sales order line uses (true) or that no sales order line uses (false)."},"validFrom":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound. Use format YYYY-MM-DD."},"end":{"type":"string","description":"The inclusive upper bound. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the first date the header's prices are effective. Bounds are inclusive."},"validTo":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound. Use format YYYY-MM-DD."},"end":{"type":"string","description":"The inclusive upper bound. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results by the last date the header's prices are effective. Bounds are inclusive. A header with no end date never matches."},"createdDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the pricing header was created. Bounds are inclusive."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by the date and time the pricing header last changed. Bounds are inclusive."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label. A name that is not configured for price book entries fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier's value in the source system. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to pricing headers with a price book entry that has this external identifier. Send both fieldName and value."}},"additionalProperties":false,"description":"The filters to apply. A pricing header must match every filter you send. Omit to return all pricing headers."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of pricing headers per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"getSalesOrderShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order shipment.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"salesOrderId":{"type":"string","description":"The sales order this shipment fulfills. See id on GET accounting/sales-orders/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"inventoryShipmentId":{"type":"number","description":"The numeric identifier of the shipment document in inventory, which owns the shipment. Absent only on legacy rows written before the mirroring existed.","examples":[4242]},"shipmentNumber":{"type":"string","description":"The shipment document number, assigned by inventory. Absent until inventory has issued one.","examples":["SHP-1042"]},"status":{"type":"string","description":"The lifecycle status of the shipment. Possible values: 'pendingShipment', 'shipped', 'cancelled'. 'pendingShipment' is drafted in inventory but not yet dispatched, 'shipped' is dispatched, and 'cancelled' means the inventory shipment was deleted and this mirror was soft-canceled.","examples":["shipped"]},"trackingId":{"type":"string","description":"The carrier tracking number or tracking URL, when one has been recorded.","examples":["1Z999AA10123456784"]},"carrier":{"type":"string","description":"The name of the carrier handling the shipment.","examples":["DHL"]},"incoterm":{"type":"string","description":"The incoterm governing shipping responsibility for this shipment. For example 'DAP' or 'EXW'.","examples":["DAP"]},"warehouseId":{"type":"string","description":"The warehouse location the shipment is dispatched from. See id on GET inventory/warehouses/:id.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"shipToContactEmail":{"type":"string","description":"The email of the contact who receives this shipment."},"customerRequestDate":{"type":"string","format":"date","description":"The date the customer asked for delivery. Format YYYY-MM-DD."},"shipDate":{"type":"string","format":"date","description":"The date the shipment was dispatched. Format YYYY-MM-DD. Absent while the shipment is still pending.","examples":["2026-08-19"]},"deliveryDate":{"type":"string","format":"date","description":"The date the shipment was, or is expected to be, delivered. Format YYYY-MM-DD.","examples":["2026-08-22"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-20T10:15:00.000Z"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line. PATCH matches updateItems and deleteItems on it."},"salesOrderProductItemId":{"type":"string","description":"The sales order product item this shipment line is for. See items[].id on GET accounting/sales-orders/:id."},"shippedQty":{"type":"string","format":"decimal","description":"The quantity shipped on this line, as a count of units."},"orderedQty":{"type":"string","format":"decimal","description":"The total quantity ordered for the sales order product item, as a count of units."},"unshippedQty":{"type":"string","format":"decimal","description":"The quantity still outstanding on this line, as a count of units: orderedQty minus shippedQty."}},"additionalProperties":false,"required":["id","salesOrderProductItemId","shippedQty","orderedQty","unshippedQty"]},"description":"The shipped lines, oldest first. An empty array when the shipment has no lines.","examples":[[{"id":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","salesOrderProductItemId":"7d345a0f-3e6d-4c8e-9b21-9c2a6a10b7f1","shippedQty":"3","orderedQty":"5","unshippedQty":"2"}]]}},"additionalProperties":false,"required":["id","salesOrderId","lastModifiedDate","items"]},"listUsageOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the usage record."},"usageNumber":{"type":"string","description":"The usage number, unique within the tenant. Absent while none has been assigned."},"usageIdentifier":{"type":"string","description":"The external identifier for this usage record, as supplied at ingestion."},"date":{"type":"string","format":"date-time","description":"The date and time the usage occurred, without a time zone. Format YYYY-MM-DDTHH:mm:ss."},"description":{"type":"string","description":"A free-form description of the usage record. Absent when none is set."},"productIdentifier":{"type":"string","description":"The product code or identifier this usage is attributed to, as supplied at ingestion."},"billableComponentId":{"type":"string","description":"The billable component this usage is attributed to. Absent until it is resolved. There is no endpoint for it."},"usageComponent":{"type":"string","description":"The billable component's name or identifier, included so you do not need a second read."},"quantity":{"type":"string","format":"decimal","description":"The quantity of usage recorded, in unitOfMeasure."},"unitOfMeasure":{"type":"string","description":"The unit the quantity is measured in, for example 'Hour', 'GB' or 'Call'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit for this usage. This record has no currency field. The currency is on the subscription or contract this usage bills against."},"status":{"type":"string","description":"The lifecycle status of the usage record. Possible values: 'pending', 'processed', 'error', 'invoiced', 'pendingRebill', 'rebilled', 'staged', 'skipped'."},"usagePeriodId":{"type":"string","description":"The unique identifier for the usage period this record belongs to. There is no endpoint for it."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"Custom data recorded on this usage record, as a JSON object. Absent when none was set."},"orderIndex":{"type":"number","description":"The position of this usage record within the batch it was created in. Absent when not known."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the usage record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","date","quantity","unitPrice","status","usagePeriodId","lastModifiedDate"]},"description":"The usage records on this page, newest first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more usage records remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"unapplyCreditMemoOutput":{"type":"object","properties":{},"additionalProperties":false},"unapplyCreditMemoInput":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"invoiceId":{"type":"string","description":"The invoice to release the credit from. See id on GET accounting/invoices/:id."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount to reverse, in the credit memo currency. Must be positive. It is stored as a negative row and may not exceed what is currently applied to this invoice."},"appliedDate":{"type":"string","format":"date","description":"The date the reversal is recorded. Use format YYYY-MM-DD. It must fall in an open accounting period."}},"additionalProperties":false,"required":["invoiceId","appliedAmount","appliedDate"]},"description":"The reversals to record. At least one is required. Several rows may target the same invoice, and are summed against what is currently applied to it."}},"additionalProperties":false,"required":["applications"]},"paymentTermsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment term."},"code":{"type":"string","description":"The code of the payment term. Unique within the tenant. Other records refer to a payment term by this code. See paymentTermCode on POST accounting/customers. Examples: 'net30', 'dueOnReceipt'."},"label":{"type":"string","description":"The display name of the payment term. See paymentTermLabel on GET accounting/customers/:id. Example: 'Net 30'."},"description":{"type":"string","description":"A description of the payment term."},"numberOfDays":{"type":"number","description":"The number of days after the invoice date on which payment is due."},"discountPercentage":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The discount for paying within discountValidityDays, as a decimal fraction of the invoice amount. For example, 0.02 is 2%. 0 when the term has no discount."},"discountValidityDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days after the invoice date during which discountPercentage applies. 0 when the term has no discount."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment term last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getAccountingProductLineOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product line."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"type":"string","description":"The display name of the product. See productName on GET accounting/products/:id."},"productLineNumber":{"type":"string","description":"The product line number, assigned by the system and unique within the tenant. Example: 'PL-1001'."},"name":{"type":"string","description":"The name of the product line."},"lineType":{"type":"string","description":"The type of product line. Possible values: 'recurring', 'oneTime', 'commitWithOverage', 'payAsYouGo', 'usage', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'."},"priceModel":{"type":"string","description":"How the product line is priced. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Possible values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"taxMode":{"type":"string","description":"How the product line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'. Absent if no tax provider was enabled in your tenant when the product line was last saved."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"hasUsage":{"type":"boolean","description":"Whether the product line has a paired 'usage' line. True for 'prepaid' lines, and for 'recurring' lines whose priceModel is 'thresholdBased' or whose commitInvoicing or trueUpEstimationMethod has a value."},"hasBeenUsed":{"type":"boolean","description":"Whether the product line is on at least one sales order."},"commitInvoicing":{"type":"string","description":"When the minimum spend commit of a 'recurring' product line is invoiced. Possible values: 'advance', 'arrears'. Absent when the product line has no minimum spend commit."},"trueUpEstimationMethod":{"type":"string","description":"How the estimated quantity of a True-Up 'recurring' line is set. Possible value: 'startEstimate'. Absent when the product line is not a True-Up line."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative', 'overage'. Applies only when lineType is 'prepaid'."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal. Applies only when lineType is 'prepaid'."},"parentProductLineId":{"type":"string","description":"The product line this 'usage' line is paired with. See id on GET accounting/product-lines/:id. Absent when the product line is not a paired 'usage' line."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the product line was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product line last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the tax record."},"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"engine":{"type":"string","description":"The tax engine that computes this tax. Possible values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."}},"additionalProperties":false,"required":["id","taxCode","engine"]},"description":"The tax records of the product line. Absent when the product line has none."},"pricingHeaders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header. See id on GET accounting/pricing/:id."},"headerNumber":{"type":"string","description":"The pricing header number, assigned by the system and unique within the tenant."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book entry."},"priceBookEntryNumber":{"type":"string","description":"The price book entry number, assigned by the system."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. On a rate-card entry, the list price is the rate."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Used only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Absent on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"rateCardEntry":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Absent when no price model was set on the rate-card entry."}},"additionalProperties":false,"required":["id","unitOfMeasure"],"description":"The rate-card entry attached to this price book entry. Absent when the entry is not rate-card priced."}},"additionalProperties":false,"required":["id"]},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["id","currency","validFrom","priceBookEntries"]},"description":"The pricing headers of the product line, each with its price book entries. Absent when the product line has no pricing."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the product line has none."}},"additionalProperties":false,"required":["id","productId","name","lastModifiedDate"]},"getInvoiceRunOutput":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice run."},"invoiceRunNumber":{"type":"string","description":"The invoice run number, for example 'ISR-1042'. Absent while none has been assigned."},"status":{"type":"string","description":"The execution status of the run. Possible values: 'created', 'running', 'completed', 'error', 'completeAndError'. Keep polling on 'created' and 'running'. 'completeAndError' means some invoices were created and some lines failed."},"invoicesCreated":{"type":"number","description":"The number of invoices the run has created."},"startedAt":{"type":"string","description":"The date and time the run was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"finishedAt":{"type":"string","description":"The date and time the run finished, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent while the run is still working, and on a run whose worker stopped without recording one."},"lastModifiedDate":{"type":"string","description":"The date and time the invoice run record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"trigger":{"type":"string","description":"What started the run. Possible values: 'immediately', 'daily', 'monthly'. 'immediately' is an ad-hoc run. 'daily' and 'monthly' are scheduled."},"scope":{"type":"array","items":{"enum":["all","oneTimeAndRecurring","usageInArrears","billableProducts"]},"description":"The line types the run billed."},"entityId":{"type":"string","description":"The legal entity billed. See id on GET base/entities."},"salesOrderId":{"type":"string","description":"The sales order billed. Present on a sales-order-scoped run. See id on GET accounting/sales-orders/:id."},"customerId":{"type":"string","description":"The customer billed. Absent on a run that created no invoice and recorded no error. See id on GET accounting/customers/:id."},"progress":{"type":"object","properties":{"title":{"type":"string","description":"The phase the run is in, for example preparing data or creating invoices."},"message":{"type":"string","description":"Further detail on the current phase, when the run supplies any."},"progress":{"type":"number","description":"The number of items processed so far in the current phase."},"total":{"type":"number","description":"The number of items to process in the current phase."}},"additionalProperties":false,"description":"The run's own progress reporting while it works. It is advisory: absent before the run starts reporting, and never a substitute for 'status'."},"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice. See id on GET accounting/invoices/:id."},"invoiceNumber":{"type":"string","description":"The invoice number, for example 'INV-20841'."},"totalAmount":{"type":"string","format":"decimal","description":"The total amount of the invoice including tax, in the currency named by 'currency'."},"currency":{"type":"string","description":"The currency of the invoice. Format ISO 4217, for example 'EUR'."}},"additionalProperties":false,"required":["id"]},"description":"The invoices the run created. Each has its own currency, so there is no summed run total."},"errors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Why the line could not be billed. Possible values: 'system', 'avalaraAddress', 'taxCode', 'none', 'taxCalculation', 'vatEntity', 'accountConfig', 'vatCustomer', 'invoiceSetupIncomplete', 'invoiceDelivery'."},"detail":{"type":"string","description":"A description of why the line failed."},"customerId":{"type":"string","description":"The customer the failing line belongs to. See id on GET accounting/customers/:id."}},"additionalProperties":false,"required":["type"]},"description":"The lines the run could not bill, one entry each. A non-empty array with a non-zero 'invoicesCreated' is the 'completeAndError' outcome."}},"additionalProperties":false,"required":["id","status","invoicesCreated","scope","invoices","errors"],"description":"The requested invoice run.","examples":[{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completeAndError","invoicesCreated":2,"startedAt":"2026-09-30T08:14:22.000Z","finishedAt":"2026-09-30T08:15:07.000Z","trigger":"immediately","scope":["all"],"entityId":"6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53","salesOrderId":"8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39","customerId":"d41d8cd9-8f00-4b20-a204-9800998ecf84","invoices":[{"id":"a2c5e881-4f37-4b09-9d16-8e3b0c7a5d24","invoiceNumber":"INV-20841","totalAmount":"1210.00","currency":"EUR"}],"errors":[{"type":"taxCode","detail":"No tax code resolves for product line SO-114-3 in DE.","customerId":"d41d8cd9-8f00-4b20-a204-9800998ecf84"}]}]}},"additionalProperties":false,"required":["data"]},"createTaxConfigurationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created tax configuration."}},"additionalProperties":false,"required":["id"]},"createTaxConfigurationInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity this configuration belongs to. An entity has at most one tax configuration. See id on GET base/entities.","examples":["b6b3a6ce-6c66-4d43-9c8e-6c6c9b8f4a11"]},"status":{"enum":["Active","Inactive"],"description":"The status of the tax configuration. The tax codes of an inactive configuration are not offered on documents.","examples":["Active"]},"taxRegime":{"enum":["EU_VAT","India_GST","Canada_GST","Ghana_VAT","SingleRate_GST","Mexico_IVA"],"description":"The tax system that determines which tax components are valid. Omit to derive it from the entity's country. An unrecognized country derives EU VAT.","examples":["EU_VAT"]},"lines":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":"string","description":"The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'. Supply it when migrating from another system."},"title":{"type":"string","description":"The display title of the tax code. Must be unique within the configuration."},"comment":{"type":"string","description":"A free-form note on when to use this tax code."},"vatDeclarationField":{"type":"string","description":"The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Stored as free text and not evaluated."},"percentage":{"type":"string","format":"decimal","description":"The tax rate, as a decimal fraction. For example, 0.19 is 19%. Send 0 for a zero-rated or exempt code."},"rateType":{"enum":["Standard","Reduced","SuperReduced","Zero","Exempt"],"description":"The legal rate classification of the tax code."},"scope":{"enum":["Domestic","IntraEU_B2B","IntraEU_B2C","ExtraEU_Goods","ExtraEU_Services"],"description":"The territorial scope of the transaction."},"direction":{"enum":["Input","Output"],"description":"Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales."},"isReverseCharge":{"type":"boolean","description":"Whether the recipient rather than the supplier accounts for the tax, for example under §13b UStG. When true, every account on the line must set reverseChargeCreditAccountId."},"cashBasis":{"type":"boolean","description":"Cash basis: the tax becomes creditable only when the bill is paid. It posts to the uncollected account and moves to the collected account on payment. Input tax only. Requires components whose accounts all set collectedAccountId."},"isActive":{"type":"boolean","description":"Whether the tax code is offered for selection on new documents."},"accounts":{"type":"array","items":{"type":"object","properties":{"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount. Required on reverse-charge lines, ignored otherwise. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["chartOfAccountsId","accountId"]},"description":"The general ledger accounts this tax code books to, usually one entry for each chart of accounts the entity books in. Must not be empty, including for exempt and zero-rated codes, which book a tax line at zero."},"components":{"type":"array","items":{"type":"object","properties":{"taxComponentCode":{"type":"string","description":"The tax component code, for example 'VAT'."},"percentage":{"type":"string","format":"decimal","description":"The component's rate as a decimal fraction, for example 0.16 for 16%."},"isRecoverable":{"type":"boolean","description":"Whether the tax can be reclaimed. Every component of a cash-basis code must set true."},"accounts":{"type":"array","items":{"type":"object","properties":{"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. On a cash-basis code this is the uncollected account. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount on a reverse-charge code. See id on GET accounting/accounts/:id."},"collectedAccountId":{"type":"string","description":"Cash basis only. The account the tax moves to once the bill is paid. Required on every account of a cash-basis component, and must differ from accountId. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["chartOfAccountsId","accountId"]},"description":"The GL accounts for this component, one entry per chart of accounts the entity books in. Must not be empty."}},"additionalProperties":false,"required":["taxComponentCode","percentage","isRecoverable","accounts"]},"description":"The tax components of this code, for example a federal and a state part. Required when cashBasis is true. The components' percentages must add up to the line's percentage."}},"additionalProperties":false,"required":["title","percentage","rateType","scope","direction","isReverseCharge","isActive","accounts"]},"description":"The complete set of tax codes for this configuration. Must not be empty. Each line's title, and any taxCode supplied, must be unique within the array.","examples":[[{"title":"Standard rate","taxCode":"V19EUG","percentage":"0.19","rateType":"Standard","scope":"Domestic","direction":"Output","isReverseCharge":false,"isActive":true,"accounts":[{"chartOfAccountsId":"1b9c1f2e-4a6d-4c31-9f5e-2d7a08b6c410","accountId":"7e4d3c21-9b08-4a5f-8c62-1f0e5d9a3b74"}]}]]}},"additionalProperties":false,"required":["entityId","status","lines"]},"searchJournalEntriesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the journal entry."},"approvalStatus":{"type":"string","description":"The approval status of the journal entry. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Absent on entries that never entered the approval workflow."},"bookId":{"type":"string","description":"The accounting book this entry posts to. See id on GET accounting/books/:id."},"description":{"type":"string","description":"A free-form description of the journal entry."},"name":{"type":"string","description":"The display name of the journal entry."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Format YYYY-MM-DD."},"reversalDate":{"type":"string","format":"date","description":"The reversal date recorded on the entry. Format YYYY-MM-DD. Set on an entry that is or will be reversed: the date its reversal posts. The reversal entry itself carries none; its posting date is this date, its type is 'reversal' ('revaluationReversal' for a revaluation), and no public field links it back to this entry."},"reversalDescription":{"type":"string","description":"The description recorded on the reversal."},"reversalReason":{"type":"string","description":"The reason recorded for the reversal, on the entry being reversed. Possible values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'."},"status":{"type":"string","description":"The posting status of the journal entry. Possible values: 'posted', 'unposted', 'voided'."},"type":{"type":"string","description":"How the entry originated, for example 'manual', 'invoice', 'revaluation' or 'reversal'. A system-assigned value."},"consolidationAdjustmentType":{"type":"string","description":"Set on a consolidation adjustment. Possible values: 'consolidationAdjustment'. Absent on a regular journal entry."},"url":{"type":"string","description":"A link to the source document this entry comes from."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the journal entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line has either a debit or a credit, not both."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line has either a debit or a credit, not both."},"description":{"type":"string","description":"A free-form description of the line."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"intercompanyPartnerId":{"type":"string","description":"The intercompany business partner that represents the counterparty legal entity on this line. Format: UUID. Each legal entity has one intercompany business partner, created with the entity. Absent on lines that are not intercompany."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate used to convert the line's transactional amount to its functional amount."},"functionalCredit":{"type":"string","format":"decimal","description":"The credit amount for this line, in the functional currency."},"functionalCurrency":{"type":"string","description":"The functional currency the posting entity keeps in the entry's book (currency on book entity assignments). Format ISO 4217, for example 'USD'."},"functionalDebit":{"type":"string","format":"decimal","description":"The debit amount for this line, in the functional currency."},"journalEntryId":{"type":"string","description":"The journal entry this line belongs to. See id on GET accounting/journal-entries/:id."},"lineNumber":{"type":"number","description":"The line's sequential number within the entry."},"lineType":{"type":"string","description":"The classification of the line, for example 'standard', 'tax', 'offset' or 'fxRoundingDifference'. A system-assigned value. Absent when the line has no classification."},"postingPeriodId":{"type":"string","description":"The accounting period this line posts to. See id on GET accounting/accounting-periods/:id."},"revaluation":{"type":"boolean","description":"True when the line's account is configured for currency revaluation and the line is not in the functional currency; on a bank or credit-card account, the bank's currency must also differ from the functional currency. A currency revaluation restates such a line. It does not mark revaluation postings: those are the entries whose type is 'revaluation', 'revaluationReversal' or 'RevaluationClose'."},"sourceTransaction":{"type":"string","description":"The identifier of the source transaction that generated this line, for example an invoice or payment number."},"transactionalCurrency":{"type":"string","description":"The currency of the line's transactional amounts. Format ISO 4217, for example 'USD'."},"transactionDate":{"type":"string","format":"date","description":"The date of the underlying transaction. Format YYYY-MM-DD. It can differ from the posting date."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this tag points to, on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to. Present only for a custom-dimension tag. See id on GET base/custom-dimensions."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. A historical entry can have tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags assigned to this line. Set them with create or update."}},"additionalProperties":false,"required":["id","accountId","entityId"]},"description":"The debit and credit lines of the entry."}},"additionalProperties":false,"required":["id","postingDate","status","lastModifiedDate","lines"]},"description":"The journal entries that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more entries remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchJournalEntriesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the journal entry with this identifier."},"bookId":{"type":"string","description":"Limits results to entries in this accounting book. See id on GET accounting/books/:id."},"status":{"type":"string","description":"Limits results to entries with this posting status. Accepted values: 'posted', 'unposted', 'voided'. Any other value matches no entry."},"type":{"type":"string","description":"Limits results to entries of this origin type, for example 'manual' or 'invoice'."},"name":{"type":"string","description":"Limits results to entries whose name contains this text. The match is case-insensitive."},"description":{"type":"string","description":"Limits results to entries whose description contains this text. The match is case-insensitive."},"postingDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive start of the posting-date window. Use format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive end of the posting-date window. Use format YYYY-MM-DD."}},"additionalProperties":false,"description":"A window on the posting date. Both bounds are inclusive. Omit a bound to leave that side open."}},"additionalProperties":false,"description":"The filters to apply. A journal entry must match every filter you send. Omit to return all journal entries."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of entries per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"createBookEntityAssignmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created entity assignment.","examples":["9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"]}},"additionalProperties":false,"required":["id"]},"createBookEntityAssignmentInput":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book to assign the legal entity to. See id on GET accounting/books/:id.","examples":["3f2a9c14-6d0b-4b8e-9f1a-2c7d5e8b9a10"]},"entityId":{"type":"string","description":"The legal entity to assign. Must be a legal entity: non-legal reporting entities are refused. See id on GET base/entities.","examples":["6f9a2b1c-1d2e-4f3a-8b9c-0d1e2f3a4b5c"]},"chartOfAccountsId":{"type":"string","description":"The chart of accounts the entity uses in this book. Required when the entity is active. Rejected for an adjustment book, which copies it from the base book. See id on GET accounting/chart-of-accounts/:id.","examples":["a1c4d7e0-2b3c-4d5e-8f9a-1b2c3d4e5f60"]},"fiscalCalendarId":{"type":"string","description":"The fiscal calendar the entity uses in this book. Required when the entity is active. Rejected for an adjustment book, which copies it from the base book. See id on GET accounting/fiscal-calendars/:id.","examples":["c0ffee00-1234-4abc-9def-0123456789ab"]},"currency":{"type":"string","description":"The currency the entity uses in this book. Format ISO 4217, for example 'USD'. Required when the entity is active. Rejected for an adjustment book, which copies it from the base book.","examples":["EUR"]}},"additionalProperties":false,"required":["bookId","entityId"]},"accountExternalIdentifierFieldsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the configuration."},"fieldName":{"type":"string","description":"The key to send as fieldName in an account's external identifiers, a camelCase slug such as 'netsuiteAccountId'. Unique."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system that owns the identifiers, for example 'NetSuite' or 'QuickBooks'."},"instanceName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The specific instance of the source system, when a tenant connects more than one."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the configuration last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."}},"additionalProperties":false},"bulkCreateAccountsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the created account."}},"additionalProperties":false,"required":["id"]},"description":"The created accounts, in the same order as the input. Match rows to inputs by index.","examples":[[{"id":"7d3c2b1a-9e8f-4d6c-b5a4-3e2f1d0c9b8a"},{"id":"2b4d6f80-1a3c-4e5f-8a9b-c0d1e2f3a4b5"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateAccountsInput":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The account number, unique within its chart of accounts. Required when the chart of accounts uses manual numbering. Not allowed when it uses hierarchical numbering, where the number is derived from the parent account."},"accountName":{"type":"string","description":"The display name of the account."},"accountType":{"type":"string","description":"The top-level classification of the account. Accepted values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'."},"accountSubType":{"type":"string","description":"A finer classification within accountType, for posting accounts only. Accepted values per accountType: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset' (asset); 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability' (liability); 'equity', 'otherComprehensiveIncome' (equity); and the sub-type named like the type for 'income', 'costOfGoodsSold', 'expense', 'otherIncome' and 'otherExpense'. Required for posting accounts. 'bank' and 'creditCard' require entityId and currency."},"description":{"type":"string","description":"A free-form description of the account."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts the account belongs to. See id on GET accounting/chart-of-accounts/:id."},"parentAccountId":{"type":"string","description":"The grouping account this account rolls up to. It must already exist and be a grouping account in the same chart of accounts with the same accountType. Required for a posting account when the chart of accounts uses hierarchical numbering. Omit for a top-level account. See id on GET accounting/accounts/:id."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Defaults to false. A grouping account takes no accountSubType, entityId, currency or revaluationMode. Cannot be changed later."},"entityId":{"type":"string","description":"The legal entity a bank or credit-card account is denominated for. Required for, and only allowed on, 'bank' and 'creditCard' accounts. The entity must be assigned to the chart of accounts. See id on GET base/entities."},"currency":{"type":"string","description":"The account's currency. Format ISO 4217, for example 'USD'. Required for, and only allowed on, 'bank' and 'creditCard' accounts."},"payOnBehalf":{"type":"boolean","description":"Whether this account takes part in pay-on-behalf accounting. Defaults to false. true is only allowed on 'bank' and 'creditCard' accounts of a legal entity that has subsidiaries or a parent entity."},"elimination":{"type":"boolean","description":"Whether this account is eliminated during consolidation. Defaults to false. true is not allowed on grouping, 'bank' or 'creditCard' accounts."},"revaluationMode":{"type":"string","description":"Which revaluation results this account recognizes. Accepted values: 'recognizeAll' (both unrealized gains and unrealized losses), 'recognizeAllButUnrealizedGains' (only unrealized losses), 'none' (the account is not revalued). Posting accounts only. Omit to take the default the server derives. Which modes an account can take depends on its sub-type, on a bank or credit-card account's currency against its book's currency, and on the accounting standard of the chart's book; a mode the account cannot take is rejected with INVALID_FIELD_VALUE, whose allowedValues lists the modes it can take, never replaced."},"accountStatus":{"type":"string","description":"The account's status, posting accounts only. Accepted values: 'enabled', 'disabled'. Defaults to 'enabled'. A grouping account accepts only 'enabled', the status it reads back with."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. GET accounting/account-external-identifier-fields lists the accepted keys."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Anything else is rejected with INVALID_FIELD_VALUE."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Each fieldName must match an active account external-identifier configuration. GET accounting/account-external-identifier-fields lists them."}},"additionalProperties":false,"required":["accountName","accountType","chartOfAccountsId"]},"description":"The accounts to create, each the same object POST accounting/accounts takes. At most 100 rows; more fails with TOO_MANY_ACCOUNTS. If any row is invalid, nothing is created.","examples":[[{"accountName":"Prepaid Insurance","accountType":"asset","accountSubType":"prepaidExpenses","chartOfAccountsId":"5c1f0e2a-7b3d-4e8a-9f61-2d4b8c0a7e13","parentAccountId":"a8e2c4d1-3f5b-4a7c-8e9d-1b2c3d4e5f60"},{"accountName":"Office Supplies","accountType":"expense","accountSubType":"expense","chartOfAccountsId":"5c1f0e2a-7b3d-4e8a-9f61-2d4b8c0a7e13","parentAccountId":"c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f"}]]}},"additionalProperties":false,"required":["accounts"]},"searchBankAccountOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account."},"externalAccountId":{"type":"string","description":"The identifier this account has in the bank or aggregator it was connected from. Unique within the tenant."},"externalAccountName":{"type":"string","description":"The account name as reported by the bank or aggregator."},"externalDescription":{"type":"string","description":"The account description as reported by the bank or aggregator."},"type":{"type":"string","description":"The kind of account, as free-form text. For example 'checking', 'saving' or 'creditCard'."},"currency":{"type":"string","description":"The currency the account is held in. Format ISO 4217, for example 'USD'. balance is in this currency."},"balance":{"type":"string","format":"decimal","description":"The current account balance, in currency."},"mask":{"type":"string","description":"A masked form of the account number, for example '****1234'. Display it instead of reference where the full number is not needed."},"reference":{"type":"string","description":"The full account number, the IBAN or the ACH account number."},"referenceType":{"type":"string","description":"How referenceNumber is structured. Possible values: 'QRR', 'SCOR', 'NON'. 'QRR' is a Swiss QR reference, 'SCOR' an ISO 11649 creditor reference, and 'NON' none."},"referenceNumber":{"type":"string","description":"A structured payment reference for payments to this account, interpreted per referenceType."},"bankAccountCode":{"type":"string","description":"The bank identifier, the SWIFT/BIC code or the US routing number."},"bankAccountHolderName":{"type":"string","description":"The name the account is held in. This is personal data."},"paymentAllowed":{"type":"boolean","description":"Whether payments may be made from this account."},"receivableAccount":{"type":"boolean","description":"Whether this account may be used to receive money."},"payableAccount":{"type":"boolean","description":"Whether this account may be used to pay money out."},"isReady":{"type":"boolean","description":"Whether the account is fully set up and usable."},"reconciliationStartDate":{"type":"string","format":"date","description":"The date from which this account is reconciled. Format YYYY-MM-DD. Transactions before it are not reconciled."},"transactionsImportDate":{"type":"string","format":"date","description":"The date from which transactions are imported for this account. Format YYYY-MM-DD."},"accountId":{"type":"string","description":"The chart-of-accounts account this bank account is linked to. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the linked chart-of-accounts account."},"accountNumber":{"type":"string","description":"The number of the linked chart-of-accounts account. This is a general-ledger account number, not the bank account number, which is reference."},"bankName":{"type":"string","description":"The name of the bank this account is held at."},"financialInstitutionId":{"type":"string","description":"The financial institution this account is held at. There is no endpoint for it."},"entityId":{"type":"string","description":"The legal entity that owns this account. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this account."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank account last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","externalAccountId","paymentAllowed","reconciliationStartDate","lastModifiedDate"]},"description":"The bank accounts on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchBankAccountInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the bank account with this identifier."},"externalAccountId":{"type":"string","description":"Limits results to the bank account with this external identifier. It is unique within the tenant, so at most one account matches."},"externalAccountName":{"type":"string","description":"Limits results to bank accounts with this external account name. The match is exact."},"accountId":{"type":"string","description":"Limits results to the bank account linked to this chart-of-accounts account. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"Limits results to bank accounts whose linked chart-of-accounts account has this name. The match is exact."},"accountNumber":{"type":"string","description":"Limits results to bank accounts whose linked chart-of-accounts account has this number. This is a general-ledger number, not a bank account number. The match is exact."},"entityId":{"type":"string","description":"Limits results to bank accounts owned by this legal entity. See id on GET base/entities."},"financialInstitutionId":{"type":"string","description":"Limits results to bank accounts held at this financial institution. There is no endpoint for it."},"type":{"type":"string","description":"Limits results to bank accounts of this kind, for example 'checking'. The kind is free-form text, so an unknown value matches nothing."},"currency":{"type":"string","description":"Limits results to bank accounts held in this currency. Format ISO 4217, for example 'USD'."},"paymentAllowed":{"type":"boolean","description":"Limits results to accounts payments may be made from when true, and those they may not when false."},"receivableAccount":{"type":"boolean","description":"Limits results to accounts that may receive money when true, and those that may not when false."},"isReady":{"type":"boolean","description":"Limits results to accounts that are fully set up when true, and those that are not when false."}},"additionalProperties":false,"description":"The filters to apply. A bank account must match every filter you send. Omit to return all bank accounts.","examples":[{"type":"checking","paymentAllowed":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of bank accounts per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"deleteSalesOrderOutput":{"type":"object","properties":{},"additionalProperties":false},"modifySubscriptionOutput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"Id of the generated sales order (a UUID). For renew and earlyRenew it holds the copied lines and any added lines (only the added lines when renewExistingLines is false). Absent when a midTermModification payload contains only cancellations (no sales order is created)."},"subscriptionModificationId":{"type":"string","description":"Id of the created SubscriptionModification record (a UUID). Absent for renewal (a renewal creates no SubscriptionModification)."},"approvalStatus":{"type":"string","description":"Approval status of the result (pendingApproval, approved)"},"serviceStartDate":{"type":"string","format":"date","description":"renew and earlyRenew only: service start date of the new term (the day after the current service end date for renew, the modificationDate for earlyRenew)"},"serviceEndDate":{"type":"string","format":"date","description":"renew and earlyRenew only: service end date of the new term"},"term":{"type":"number","description":"renew and earlyRenew only: renewal term in months that was applied"}},"additionalProperties":false,"required":["approvalStatus"]},"modifySubscriptionInput":{"type":"object","properties":{"customerId":{"type":"string","description":"[fk: CustomerApi.customers.id] Id of the customer owning the subscription being modified (a UUID). The subscription must belong to this customer."},"externalOrderId":{"type":"string","description":"Idempotency key assigned by the upstream system (e.g. CPQ order id). When the tenant has a SalesOrderExternalIdentifierConfiguration for fieldName externalOrderId, the value is stamped on the generated sales order and a resubmission is rejected with DUPLICATE_EXTERNAL_ORDER_ID; without that configuration duplicates are not detected."},"modificationType":{"enum":["midTermModification","renew","earlyRenew"],"description":"Discriminator for the kind of modification. midTermModification applies the line arrays (addLines/changeLines/cancelLines/replaceGroups) on the modificationDate. renew renews the whole subscription: it carries term/priceChangePercentage/renewExistingLines and optional addLines, and must omit the other line arrays and modificationDate. earlyRenew renews the whole subscription early: same shape as renew plus the required modificationDate."},"bookDate":{"type":"string","format":"date","description":"Booking date for the generated sales order (ISO 8601, YYYY-MM-DD). Defaults to today for midTermModification and earlyRenew, and to the renewal service start date for renew."},"effectiveDate":{"type":"string","format":"date","description":"Sales effective date stamped on the generated sales order (ISO 8601, YYYY-MM-DD). Defaults to the modificationDate. Not supported for renewal payloads."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"Order-level one-time discount amount in the subscription currency. Not supported for renewal payloads."},"oneTimeDiscountAllocation":{"enum":["firstInvoice","alignToInvoiceFrequency"],"description":"How the one-time discount is allocated across invoices (firstInvoice, alignToInvoiceFrequency). Not supported for renewal payloads."},"billToAddressId":{"type":"string","description":"[fk: CustomerApi.customers.addresses.id] Bill-to address for the generated sales order (a UUID). Must belong to the customer. Defaults to the originating order's bill-to address. Not supported for renewal payloads."},"soldToAddressId":{"type":"string","description":"[fk: CustomerApi.customers.addresses.id] Sold-to address for the generated sales order (a UUID). Must belong to the customer. Defaults to the originating order's sold-to address. Not supported for renewal payloads."},"signDate":{"type":"string","format":"date","description":"Date the modification was signed/agreed upstream (ISO 8601, YYYY-MM-DD)"},"purchaseOrder":{"type":"string","description":"Customer purchase order reference"},"opportunityId":{"type":"string","description":"Upstream opportunity identifier (e.g. Salesforce opportunity id)"},"opportunityName":{"type":"string","description":"Upstream opportunity name"},"approvalStatus":{"enum":["pendingApproval","approved"],"description":"Approval status of the generated sales order. Authoritative upstream systems may pass approved to apply the modification without manual approval. Defaults to pendingApproval."},"externalizedCalculations":{"type":"boolean","description":"midTermModification, renew and earlyRenew. When true, the caller owns the totals of the lines it sends (on renew/earlyRenew, the added lines; copied lines are still calculated by Everest): every addLines entry (top-level and in replaceGroups) and every rampDeal ramp must carry totalPrice (TOTAL_PRICE_REQUIRED), every changeLines entry must carry totalPrice for its added quantity (CHANGE_LINE_TOTAL_PRICE_REQUIRED) and may not target a ramp line (EXTERNALIZED_RAMP_CHANGE_NOT_SUPPORTED), the value is stored as given, and Everest does not recalculate it. Defaults to false, where totals are calculated by Everest and any totalPrice is ignored."},"modificationDate":{"type":"string","format":"date","description":"Effective date of the modification (ISO 8601, YYYY-MM-DD). Required for midTermModification: service changes take effect on this date and it must fall within the subscription service period. Required for earlyRenew: the new term starts on this date, which must be after the current term's start date and no later than the service end date. Must be omitted for renew (the renewal starts the day after the current service end date)."},"term":{"type":"number","description":"renew and earlyRenew only: renewal term in months. Defaults to the subscription's configured auto-renewal term; when neither is set a renewal is rejected with RENEWAL_TERM_MISSING."},"priceChangePercentage":{"type":"string","format":"decimal","description":"renew and earlyRenew only: fractional price increase applied to the list and unit prices of every renewed line (0.05 = 5% increase; tiered lines keep their prices). Defaults to the subscription's configured auto-renewal price increase. Negative values are rejected. Rejected when renewExistingLines is false."},"renewExistingLines":{"type":"boolean","description":"renew and earlyRenew only: whether the new term copies the subscription's current lines. Defaults to true: the renewal sales order carries the current lines (with priceChangePercentage) plus any addLines. When false it carries only the addLines, like New Configuration on the subscription page: at least one addLines entry is required (NOTHING_TO_MODIFY), priceChangePercentage is rejected, product lines already on the subscription may be sent again and join their existing subscription lines on approval, and lines that are not sent end with the current term (for earlyRenew, at the modificationDate). earlyRenew with false also accepts subscriptions with ramp deals."},"note":{"type":"string","description":"Free-text note. Recorded on the SubscriptionModification for midTermModification and on the renewal sales order for renew/earlyRenew."},"addLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"[fk: ProductLineApi.productLines.id] Id of the product line defining pricing and billing rules (a UUID)"},"quantity":{"type":"string","format":"decimal","description":"Quantity of the product. Optional when (a) the line type sources quantity from usage records or external capture, or (b) rampDeal is provided (each ramp period carries its own quantity)."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce"],"description":"Invoice frequency. Defaults to product line setting."},"invoiceTiming":{"enum":["advance","arrears"],"description":"Invoice timing relative to service period (advance, arrears). Defaults to entity policy."},"lineInvoiceDay":{"type":"string","description":"Specific day for generating invoices. Defaults to entity policy."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"Pricing model. Defaults to product line setting."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case"],"description":"Unit of measure (instance, gigabyte, terabyte, user, seat, minute, hour, day, month, each, license, activeUser, megabyte, message, text, platform, employee, personnel, credit, currency, package, case). Defaults to product line setting."},"listPrice":{"type":"string","format":"decimal","description":"Standard list price before discounts. Defaults to unitPrice when omitted; must be omitted when the product line has enforceListPrice set."},"unitPrice":{"type":"string","format":"decimal","description":"Actual unit price after applying discounts. Required unless rampDeal is provided."},"totalPrice":{"type":"string","format":"decimal","description":"Total price of the added line, stored as given. Required when externalizedCalculations is true unless rampDeal is provided (each ramp then carries its own totalPrice); ignored otherwise."},"extendedListPrice":{"type":"string","format":"decimal","description":"Extended list price (list price x quantity over the term), stored as given. Honoured only when externalizedCalculations is true; ignored otherwise."},"altProductName":{"type":"string","description":"Alternative product name stored on the created sales order product. Passed through as given."},"discount":{"type":"string","format":"decimal","description":"Discount value (interpreted based on discountType)"},"discountType":{"enum":["amount","percentage"],"description":"Discount type (amount, percentage)"},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"Pricing term period. Defaults to product line setting."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of quantity range (inclusive). First tier must start at 0."},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of quantity range (inclusive). Omit on the last tier for open-ended ranges."},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit price for quantities in this tier after discount"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price before discount. Defaults to unitPrice."},"priceModel":{"enum":["flat","perUnit"],"description":"Per-tier price model (flat, perUnit). Defaults to perUnit."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"Pricing tiers for tiered/volume/stairstep price models. Tiers must cover contiguous quantity ranges starting at 0; bounds are inclusive and each tier's fromQuantity must be exactly the previous tier's toQuantity + 1 (e.g. 0-100, 101-500, 501-open)."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"BillableComponent identifier for this meter"},"description":{"type":"string","description":"Free-text description of the rate card entry"},"unitOfMeasure":{"type":"string","description":"Unit of measure for this meter"},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit rate negotiated for this modification"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price. Honored only when product line enforceListPrice is false."},"conversion":{"type":"string","format":"decimal","description":"Conversion factor between billable and reporting units"}},"additionalProperties":false,"required":["identifier","unitOfMeasure","unitPrice"]},"description":"Rate card entries for this product line. Required when priceModel is rateCard and the product line has no template entries."},"rampDeal":{"type":"object","properties":{"interval":{"enum":["annually","specificDates"],"description":"How ramps are defined. annually = auto-derive yearly ramps; specificDates = caller provides explicit serviceStartDate/serviceEndDate per ramp."},"invoiceTiming":{"enum":["perInterval","allAtOnce"],"description":"perInterval invoices at each ramp start; allAtOnce invoices the whole deal upfront and requires every ramp invoiceFrequency = allAtOnce."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"Ramp service start date (ISO 8601, YYYY-MM-DD). Required for specificDates; omit for annually."},"serviceEndDate":{"type":"string","format":"date","description":"Ramp service end date (ISO 8601, YYYY-MM-DD). Required for specificDates; omit for annually."},"quantity":{"type":"string","format":"decimal","description":"Quantity for this ramp"},"listPrice":{"type":"string","format":"decimal","description":"Ramp list price. Defaults to the ramp unitPrice when omitted; must be omitted when the product line has enforceListPrice set."},"unitPrice":{"type":"string","format":"decimal","description":"Ramp unit price after discount"},"totalPrice":{"type":"string","format":"decimal","description":"Total price of this ramp period, stored as given. Required when externalizedCalculations is true; ignored otherwise."},"extendedListPrice":{"type":"string","format":"decimal","description":"Extended list price (list price x quantity over the term), stored as given. Honoured only when externalizedCalculations is true; ignored otherwise."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce"],"description":"Ramp invoice frequency. Must be allAtOnce on every ramp when invoiceTiming is allAtOnce."}},"additionalProperties":false,"required":["quantity","unitPrice"]},"description":"One entry per ramp, in chronological order. Minimum 2 ramps."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Ramp deal definition for phased additions. Mutually exclusive with top-level quantity/unitPrice."},"serviceStartDate":{"type":"string","format":"date","description":"Service start date of the added product (ISO 8601, YYYY-MM-DD). Defaults to the modificationDate, or to the new term's start on renew and earlyRenew."},"serviceEndDate":{"type":"string","format":"date","description":"Service end date of the added product (ISO 8601, YYYY-MM-DD). Defaults to coterminous with the subscription, or to the new term's end on renew and earlyRenew."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"Field name defined in the corresponding ExternalIdentifierConfiguration"},"value":{"type":"string","description":"External identifier value"},"externalUrl":{"type":"string","description":"Optional link to record in originating system"}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to attach, e.g. from NetSuite or Salesforce"}},"additionalProperties":false,"required":["productLineId"]},"description":"New products to add to the subscription. Same pricing surface as SalesOrderApi.create subscription products (tiers, rate cards, ramp deals). On renew and earlyRenew the lines go on the renewal sales order and join the subscription when it is approved: each product line may be added once (DUPLICATE_ADD_PRODUCT_LINE) and, unless renewExistingLines is false, must not be on a line the renewal copies (ADD_LINE_ALREADY_RENEWED); every line runs for the whole new term (from the day after the current service end date for renew, from the modificationDate for earlyRenew), so serviceStartDate/serviceEndDate must be omitted or equal the new term and rampDeal periods must cover it without gaps or overlaps (ADD_LINE_TERM_MISMATCH); priceChangePercentage does not apply to them; rate-card and commit-with-overage product lines are not supported yet."},"changeLines":{"type":"array","items":{"type":"object","properties":{"subscriptionLineId":{"type":"string","description":"Id of the subscription line being changed (a UUID)"},"newQuantity":{"type":"string","format":"decimal","description":"New total quantity for the line (not the delta). v1 supports increases only."},"unitPrice":{"type":"string","format":"decimal","description":"Unit price for the added quantity when newQuantity is provided; defaults to the line's current unit price. This prices the delta only — use newUnitPrice to reprice the whole line."},"totalPrice":{"type":"string","format":"decimal","description":"Total price of the added quantity, stored as given on the delta line. Required when externalizedCalculations is true, where the line must not be a ramp line; ignored otherwise."},"newUnitPrice":{"type":"string","format":"decimal","description":"New unit price for the whole line from the modification date (reprice without quantity movement). Reserved: rejected with CHANGE_KIND_NOT_SUPPORTED until reprice ships."},"newListPrice":{"type":"string","format":"decimal","description":"New list price for the whole line. Only valid together with newUnitPrice; must be omitted when the product line has enforceListPrice set. Reserved: rejected with CHANGE_KIND_NOT_SUPPORTED until reprice ships."},"newDiscount":{"type":"string","format":"decimal","description":"New discount value for the line, interpreted based on newDiscountType. Reserved: rejected with CHANGE_KIND_NOT_SUPPORTED until reprice ships."},"newDiscountType":{"enum":["amount","percentage"],"description":"How newDiscount is interpreted (amount, percentage). Required when newDiscount is provided."},"newTiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of quantity range (inclusive). First tier must start at 0."},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of quantity range (inclusive). Omit on the last tier for open-ended ranges."},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit price for quantities in this tier after discount"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price before discount. Defaults to unitPrice."},"priceModel":{"enum":["flat","perUnit"],"description":"Per-tier price model (flat, perUnit). Defaults to perUnit."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"Replacement tier table for a tier/volume/stairstep priced line; same shape and rules as addLines.tiers. May be combined with newQuantity. Reserved: rejected with CHANGE_KIND_NOT_SUPPORTED until reprice ships."}},"additionalProperties":false,"required":["subscriptionLineId"]},"description":"Changes to existing subscription lines: quantity, price, discount, and tier changes. Every entry must carry at least one change field (CHANGE_LINE_NO_CHANGES). v1 implements quantity increases only: a decrease is rejected with QUANTITY_DECREASE_NOT_SUPPORTED (model a downgrade as a replaceGroup); tier/volume/stairstep and rate-card priced lines are supported, but flat-priced and usage-type lines are rejected with CHANGE_QUANTITY_UNSUPPORTED_LINE_TYPE. Price, discount, and tier changes (newUnitPrice, newListPrice, newDiscount, newDiscountType, newTiers) are reserved and rejected with CHANGE_KIND_NOT_SUPPORTED."},"cancelLines":{"type":"array","items":{"type":"object","properties":{"subscriptionLineId":{"type":"string","description":"Id of the subscription line to cancel (a UUID)"},"serviceEndDate":{"type":"string","format":"date","description":"Service end date (ISO 8601, YYYY-MM-DD). Defaults to the modificationDate; in v1 a differing value is rejected (service always ends on the modificationDate)."}},"additionalProperties":false,"required":["subscriptionLineId"]},"description":"Partial cancellations of existing subscription lines"},"replaceGroups":{"type":"array","items":{"type":"object","properties":{"cancelLines":{"type":"array","items":{"type":"object","properties":{"subscriptionLineId":{"type":"string","description":"Id of the subscription line being replaced (a UUID)"}},"additionalProperties":false,"required":["subscriptionLineId"]},"description":"Existing subscription lines this group replaces. Their service ends on the group's service start date; no per-line serviceEndDate can be provided."},"addLines":{"type":"array","items":{"type":"object","properties":{"productLineId":{"type":"string","description":"[fk: ProductLineApi.productLines.id] Id of the product line defining pricing and billing rules (a UUID)"},"quantity":{"type":"string","format":"decimal","description":"Quantity of the product. Optional when (a) the line type sources quantity from usage records or external capture, or (b) rampDeal is provided (each ramp period carries its own quantity)."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce"],"description":"Invoice frequency. Defaults to product line setting."},"invoiceTiming":{"enum":["advance","arrears"],"description":"Invoice timing relative to service period (advance, arrears). Defaults to entity policy."},"lineInvoiceDay":{"type":"string","description":"Specific day for generating invoices. Defaults to entity policy."},"priceModel":{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"],"description":"Pricing model. Defaults to product line setting."},"unitOfMeasure":{"enum":["instance","gigabyte","terabyte","user","seat","minute","hour","day","month","each","license","activeUser","megabyte","message","text","platform","employee","personnel","credit","currency","package","case"],"description":"Unit of measure (instance, gigabyte, terabyte, user, seat, minute, hour, day, month, each, license, activeUser, megabyte, message, text, platform, employee, personnel, credit, currency, package, case). Defaults to product line setting."},"listPrice":{"type":"string","format":"decimal","description":"Standard list price before discounts. Defaults to unitPrice when omitted; must be omitted when the product line has enforceListPrice set."},"unitPrice":{"type":"string","format":"decimal","description":"Actual unit price after applying discounts. Required unless rampDeal is provided."},"totalPrice":{"type":"string","format":"decimal","description":"Total price of the added line, stored as given. Required when externalizedCalculations is true; ignored otherwise."},"extendedListPrice":{"type":"string","format":"decimal","description":"Extended list price (list price x quantity over the term), stored as given. Honoured only when externalizedCalculations is true; ignored otherwise."},"altProductName":{"type":"string","description":"Alternative product name stored on the created sales order product. Passed through as given."},"discount":{"type":"string","format":"decimal","description":"Discount value (interpreted based on discountType)"},"discountType":{"enum":["amount","percentage"],"description":"Discount type (amount, percentage)"},"pricingTerm":{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"],"description":"Pricing term period. Defaults to product line setting."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of quantity range (inclusive). First tier must start at 0."},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of quantity range (inclusive). Omit on the last tier for open-ended ranges."},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit price for quantities in this tier after discount"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price before discount. Defaults to unitPrice."},"priceModel":{"enum":["flat","perUnit"],"description":"Per-tier price model (flat, perUnit). Defaults to perUnit."}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"Pricing tiers for tiered/volume/stairstep price models. Tiers must cover contiguous quantity ranges starting at 0; bounds are inclusive and each tier's fromQuantity must be exactly the previous tier's toQuantity + 1 (e.g. 0-100, 101-500, 501-open)."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"BillableComponent identifier for this meter"},"description":{"type":"string","description":"Free-text description of the rate card entry"},"unitOfMeasure":{"type":"string","description":"Unit of measure for this meter"},"unitPrice":{"type":"string","format":"decimal","description":"Per-unit rate negotiated for this modification"},"listPrice":{"type":"string","format":"decimal","description":"Per-unit list price. Honored only when product line enforceListPrice is false."},"conversion":{"type":"string","format":"decimal","description":"Conversion factor between billable and reporting units"}},"additionalProperties":false,"required":["identifier","unitOfMeasure","unitPrice"]},"description":"Rate card entries for this product line. Required when priceModel is rateCard and the product line has no template entries."},"rampDeal":{"type":"object","properties":{"interval":{"enum":["annually","specificDates"],"description":"How ramps are defined. annually = auto-derive yearly ramps; specificDates = caller provides explicit serviceStartDate/serviceEndDate per ramp."},"invoiceTiming":{"enum":["perInterval","allAtOnce"],"description":"perInterval invoices at each ramp start; allAtOnce invoices the whole deal upfront and requires every ramp invoiceFrequency = allAtOnce."},"ramps":{"type":"array","items":{"type":"object","properties":{"serviceStartDate":{"type":"string","format":"date","description":"Ramp service start date (ISO 8601, YYYY-MM-DD). Required for specificDates; omit for annually."},"serviceEndDate":{"type":"string","format":"date","description":"Ramp service end date (ISO 8601, YYYY-MM-DD). Required for specificDates; omit for annually."},"quantity":{"type":"string","format":"decimal","description":"Quantity for this ramp"},"listPrice":{"type":"string","format":"decimal","description":"Ramp list price. Defaults to the ramp unitPrice when omitted; must be omitted when the product line has enforceListPrice set."},"unitPrice":{"type":"string","format":"decimal","description":"Ramp unit price after discount"},"totalPrice":{"type":"string","format":"decimal","description":"Total price of this ramp period, stored as given. Required when externalizedCalculations is true; ignored otherwise."},"extendedListPrice":{"type":"string","format":"decimal","description":"Extended list price (list price x quantity over the term), stored as given. Honoured only when externalizedCalculations is true; ignored otherwise."},"invoiceFrequency":{"enum":["monthly","biMonthly","quarterly","semiAnnually","annually","once","custom","template","milestone","allAtOnce"],"description":"Ramp invoice frequency. Must be allAtOnce on every ramp when invoiceTiming is allAtOnce."}},"additionalProperties":false,"required":["quantity","unitPrice"]},"description":"One entry per ramp, in chronological order. Minimum 2 ramps."}},"additionalProperties":false,"required":["interval","invoiceTiming","ramps"],"description":"Ramp deal definition for phased additions. Mutually exclusive with top-level quantity/unitPrice."},"serviceStartDate":{"type":"string","format":"date","description":"Service start date of the added product = the group's activation date (ISO 8601, YYYY-MM-DD). Defaults to the modificationDate."},"serviceEndDate":{"type":"string","format":"date","description":"Service end date of the added product (ISO 8601, YYYY-MM-DD). Defaults to coterminous with the subscription."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"Field name defined in the corresponding ExternalIdentifierConfiguration"},"value":{"type":"string","description":"External identifier value"},"externalUrl":{"type":"string","description":"Optional link to record in originating system"}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to attach, e.g. from NetSuite or Salesforce"}},"additionalProperties":false,"required":["productLineId"]},"description":"Replacement products to add. Same shape and pricing surface as top-level addLines. serviceStartDate defaults to the modificationDate and must resolve to the same date on every add in the group."}},"additionalProperties":false,"required":["cancelLines","addLines"]},"description":"Product replacements (swaps/downgrades). Each group is atomic: its added lines activate together on the group's service start date and each replaced line's service ends on that same date. A group must contain at least one cancelLine and one addLine (REPLACE_GROUP_INCOMPLETE), all its addLines must resolve to the same service start date (REPLACE_GROUP_START_DATE_MISMATCH), and in v1 that date must be the modificationDate. A line may be canceled only once across cancelLines and all groups (DUPLICATE_CANCEL_TARGET)."}},"additionalProperties":false,"required":["customerId","externalOrderId","modificationType"]},"priceBooksRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book."},"priceBookName":{"type":"string","description":"The display name of the price book, unique within the tenant and compared case-insensitively."},"priceBookNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The price book number, for example 'PB-000123'. Absent until a number range assigns one."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the price book. Absent when none is set."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the price book is active and usable in transactions."},"isStandard":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this is the standard (default) price book. Only one price book is the standard at a time. It cannot be set through this API."},"dataSource":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system that provided the price book data. Absent when none is set."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the price book was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the price book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchCustomerOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the customer."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"customerNumber":{"type":"string","description":"The customer number. Example: 'CUS-789012'."},"customerType":{"type":"string","description":"The customer type. Possible values: 'default' (a direct customer), 'partner' (a reseller or third-party payer that is invoiced for its end customers), 'endCustomer' (a customer that buys through a partner)."},"partnerType":{"type":"string","description":"The partner type of a customer whose customerType is 'partner'. Possible values: 'reseller', 'thirdPartyPayer'."},"businessType":{"type":"string","description":"The business type of the customer. Possible values: 'company', 'individual'."},"entityId":{"type":"string","description":"The legal entity that invoices this customer."},"entityName":{"type":"string","description":"The name of the legal entity that invoices this customer."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the customer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to."},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax."},"defaultCurrency":{"type":"string","description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code."},"segment":{"type":"string","description":"The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'. Absent when businessType is 'individual'."},"paymentTermLabel":{"type":"string","description":"The display name of the payment term applied to the customer's invoices. See label on GET accounting/payment-terms."},"exemptionNumber":{"type":"string","description":"The tax-exemption certificate number. Absent when taxExempt is false."},"addresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Possible values: 'billTo', 'soldTo'."},"isDefault":{"type":"boolean","description":"Whether this is the customer's default address of its type."},"addressId":{"type":"string","description":"The unique identifier for the address."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","isDefault"]},"description":"The customer's addresses, bill-to entries first, then sold-to. Each entry names its type and whether it is that type's default. An empty array when the customer has no address."},"taxExemptCode":{"type":"string","description":"The tax-exemption reason code."},"salesChannel":{"type":"string","description":"The sales channel for this customer. Possible values: 'salesAssisted' (sold through a salesperson), 'selfServe'."},"additionalContactEmail":{"type":"string","description":"Another email address for the customer, besides invoiceEmail and mainEmail."},"mainContactName":{"type":"string","description":"The name of the customer's main contact."},"preferredLanguage":{"type":"string","description":"The customer's preferred language. Possible values: 'english'."},"crmCustomerId":{"type":"string","description":"The customer's identifier in an external CRM system."},"businessIdentificationNumber":{"type":"string","description":"The customer's business registration number."},"invoiceConsolidation":{"type":"string","description":"How the customer's invoices are consolidated. Possible values: 'customer', 'purchaseOrderNumber', 'salesArrangement'."},"invoiceDeliveryMode":{"type":"string","description":"How invoices are delivered to the customer. Possible values: 'manual', 'automated'."},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether the customer is exempt from credit-card fees."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel and expense items appear on invoices. Possible values: 'detailed', 'consolidated'."},"status":{"type":"string","description":"The status of the customer. Possible values: 'active', 'inactive'."},"paymentTerm":{"type":"string","description":"The code of the payment term applied to the customer's invoices. See code on GET accounting/payment-terms. `paymentTermLabel` is its display name."},"taxRegistrations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"The country the registration applies in, as an ISO 3166-1 code."},"taxNumber":{"type":"string","description":"The tax identification number issued by the tax authority."},"type":{"type":"string","description":"The kind of tax registration. Possible values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'."},"effectiveDate":{"type":"string","description":"The date the registration takes effect. Format YYYY-MM-DD."},"isActive":{"type":"boolean","description":"Whether the registration is active. Only one active registration is allowed per country and tax type."},"note":{"type":"string","description":"An internal note on the registration."},"validationStatus":{"type":"string","description":"The validation state the tax engine assigned."},"validationMessages":{"type":"string","description":"Detail behind the validation state, when the tax engine recorded any."}},"additionalProperties":false,"required":["country","taxNumber","type"]},"description":"The customer's tax registrations. An empty array when the customer has none."},"payment":{"type":"object","properties":{"provider":{"type":"string","description":"The name of the payment provider. Example: 'Stripe'."},"externalCustomerId":{"type":"string","description":"The customer's identifier in the payment provider's system."},"externalPaymentMethodId":{"type":"string","description":"The customer's default payment method in the payment provider's system."}},"additionalProperties":false,"description":"The customer's link to a payment provider. Absent when no provider is linked."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The customer's identifiers in other systems, one per configured field name. An empty array when the customer has none."}},"additionalProperties":false,"required":["id","name","customerNumber","entityId","lastModifiedDate"]},"description":"The customers on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more customers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursors for the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchCustomerInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the customer with this id."},"customerNumber":{"type":"string","description":"Limits results to the customer with this customer number. The match is exact. Example: 'CUS-789012'."},"name":{"type":"string","description":"Limits results to customers whose name contains this text. The match is case-insensitive."},"entityId":{"type":"string","description":"Limits results to customers of this legal entity."},"customerType":{"type":"string","description":"Limits results to customers of this type. Accepted values: 'default', 'partner', 'endCustomer'. Any other value matches no customer."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. A name that is not configured fails with UNKNOWN_EXTERNAL_IDENTIFIER. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to customers that have this external identifier. Several customers can share one value."}},"additionalProperties":false,"description":"The filters to apply. A customer must match every filter you send. Omit to return all customers."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of customers per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"bulkUpdateInvoiceMilestonesOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkUpdateInvoiceMilestonesInput":{"type":"object","properties":{"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the invoice milestone to change."},"description":{"type":"string","description":"What the milestone stands for, as it appears on the invoice line. Omit to leave unchanged."},"orderSequence":{"type":"number","description":"The milestone's position among the sales order's milestones. Omit to leave unchanged."},"percentage":{"type":"string","format":"decimal","description":"The share of the sales order the milestone bills, in percent. A number, not an amount; it is stored as given. Omit to leave unchanged."},"projectedDate":{"type":"string","format":"date","description":"When the milestone is expected to be reached. Format YYYY-MM-DD. Omit to leave unchanged."},"amount":{"type":"string","format":"decimal","description":"The amount the milestone bills, in the sales order currency. Must be greater than zero. Omit to leave unchanged."},"salesOrderProductLineIds":{"type":"array","items":{"type":"string"},"description":"The Milestone-invoiced product lines of the sales order the milestone bills. Replaces the current lines; at least one. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"The milestones to change. If any row is invalid, or an order's milestones would not add up, nothing is changed.","examples":[[{"id":"4b8f2d61-0c3e-4f7a-9a15-6e2d8c90b7a4","amount":"5000.00","percentage":"50"},{"id":"7a1c3e95-5d20-4b6f-8e34-0f9b2d6c1a87","amount":"5000.00","percentage":"50"}]]}},"additionalProperties":false,"required":["invoiceMilestones"]},"createFundTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created fund transfer.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createFundTransferInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity to post the transfer under. See id on GET base/entities.","examples":["e8dc29b9-7e79-4709-bb32-95938bcb1bd1"]},"fromAccountId":{"type":"string","description":"The general-ledger account the money leaves. It must differ from toAccountId. See id on GET accounting/accounts/:id.","examples":["f50164c3-85e3-4dab-986e-3fdb39f8ecc1"]},"toAccountId":{"type":"string","description":"The general-ledger account the money arrives in. It must differ from fromAccountId. See id on GET accounting/accounts/:id.","examples":["9994c3ed-f812-44c1-9454-7f36b2bfb0fb"]},"transferDate":{"type":"string","format":"date","description":"The date the transfer takes place. Use format YYYY-MM-DD. It sets the posting period.","examples":["2026-02-14"]},"transferAmount":{"type":"string","format":"decimal","description":"The amount leaving the from-account, in the transfer currency. It must be greater than zero.","examples":["2500.00"]},"currency":{"type":"string","description":"The currency of the transfer amount. Format ISO 4217, for example 'USD'. Omit to use the from-account's own currency. A value that does not match it fails with CURRENCY_MISMATCH."},"toAmount":{"type":"string","format":"decimal","description":"The amount actually received in the to-account, in that account's currency. Supply it for a cross-currency transfer. Omit to mirror the amount sent."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate applied between the two account currencies. It must be greater than zero."},"status":{"type":"string","description":"The payment status. Accepted values: 'recorded', 'inProgress', 'completed', 'voided', 'failed', 'noStatus', 'unknown'. Defaults to 'recorded'."},"name":{"type":"string","description":"A short name for the transfer, shown in listings.","examples":["February sweep"]},"description":{"type":"string","description":"A free-form description of the transfer. It is copied onto both lines."},"toEntityId":{"type":"string","description":"The receiving legal entity, for a transfer between entities. Defaults to entityId. See id on GET base/entities."},"origin":{"type":"string","description":"The system or process the transfer came from."},"externalUrl":{"type":"string","description":"An absolute http or https link to the transfer in the originating system."},"externalPaymentId":{"type":"string","description":"The identifier of the payment in the source system this transfer settles."}},"additionalProperties":false,"required":["entityId","fromAccountId","toAccountId","transferDate","transferAmount"]},"createAccountingProductLinePricingOutput":{"type":"object","properties":{"createdPricingHeaderIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the created pricing headers, in the order you sent them."}},"additionalProperties":false,"required":["createdPricingHeaderIds"]},"createAccountingProductLinePricingInput":{"type":"object","properties":{"headers":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. Required when the product line is priced 'flat' or 'perUnit'."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Omit on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["unitOfMeasure"],"description":"The rate-card entry to attach. Provide only on rate-card-priced entries."}},"additionalProperties":false},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","priceBookEntries"]},"description":"The pricing headers to create for the product line."}},"additionalProperties":false,"required":["headers"]},"importInvoicesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The ids of the invoices recorded, one per requested entry and in the same order. Read each back with GET accounting/invoices/:id.","examples":[["f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"]]},"paymentIds":{"type":"array","items":{"type":"string"},"description":"The ids of the payments recorded, one per requested payment and in the same order. Empty when no payments were sent.","examples":[[]]}},"additionalProperties":false,"required":["ids","paymentIds"]},"importInvoicesInput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order these invoices bill. It must be flagged for externalized billing. One whose billing is scheduled in this system is refused with SALES_ORDER_NOT_EXTERNALISED. See id on GET accounting/sales-orders/:id.","examples":["8c1f4a92-3e77-4d21-9b05-6a2f1c8e4d33"]},"invoices":{"type":"array","items":{"type":"object","properties":{"externalInvoiceId":{"type":"string","description":"The id of this invoice in the source system, stamped on the created invoice for reconciliation."},"invoiceDate":{"type":"string","format":"date","description":"The date to stamp on this invoice. Format YYYY-MM-DD."},"lines":{"type":"array","items":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The unique identifier for the sales-order product line this invoice line bills against. There is no endpoint that returns a single sales-order product line."},"plannedDate":{"type":"string","format":"date","description":"The planned billing date of the target invoice-plan line. Format YYYY-MM-DD. When no plan line exists for this date and the schedule is still open, one is created using this as both its service start date and its invoice date."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period, for a plan line created on an open schedule. Format YYYY-MM-DD. Ignored when the line matches an existing plan line."},"totalPrice":{"type":"string","format":"decimal","description":"The pre-tax line total, in the sales order's currency. It must match the resolved plan line's total price. Any one-time discount must already be netted in."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs charged on this line, in the sales order's currency. Requires the entity's Duties and Customs feature to be enabled."},"taxAmount":{"type":"string","format":"decimal","description":"The total tax on this line, in the sales order's currency. When given, it must equal the sum of taxLines[].amount. When omitted, it is computed from that sum."},"taxCode":{"type":"string","description":"The line-level tax code, as the source tax engine issued it."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD. Typically the service end date or the invoice date."},"taxExemptCode":{"type":"string","description":"The exempt code applied to this line."},"exceptionNumber":{"type":"string","description":"The exception number for the tax exemption, as the source tax engine issued it."},"taxMode":{"enum":["TaxInclusive","TaxExclusive"],"description":"Whether totalPrice already includes tax."},"taxLines":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the tax as it should appear on the document, for example 'CA Sales Tax' or 'VAT'."},"amount":{"type":"string","format":"decimal","description":"The tax amount for this jurisdiction, in the sales order's currency."},"rate":{"type":"string","format":"decimal","description":"The tax rate as a decimal fraction. For example, 0.21 is 21%. A rate, not an amount, so it has no currency."},"taxableAmount":{"type":"string","format":"decimal","description":"The pre-tax amount the rate was applied to, in the sales order's currency."},"exemptAmount":{"type":"string","format":"decimal","description":"The portion of the taxable base that was exempted, in the sales order's currency."},"taxType":{"type":"string","description":"The engine classification of the tax, for example 'Sales' or 'VAT'."},"rateType":{"type":"string","description":"The VAT rate classification, for example 'Standard', 'Reduced' or 'Zero'."},"vatCode":{"type":"string","description":"The VAT code for this jurisdiction."},"isItemTaxable":{"type":"boolean","description":"Whether the item is taxable in this jurisdiction."},"taxTreatment":{"enum":["salesTax","domesticStandardRate","domesticReducedRate","domesticSalesZeroRated","domesticSalesExempt","vatIntraEuStandardRate","vatIntraEuReducedRate","nonEuExempt","reverseCharge"],"description":"The VAT treatment for this jurisdiction. When supplied, the built-in VAT determination is bypassed."}},"additionalProperties":false,"required":["name","amount"]},"description":"The per-jurisdiction tax for this line. You supply it, because no tax engine is called on this path. Send an empty array for a tax-exempt line."}},"additionalProperties":false,"required":["salesOrderProductLineId","plannedDate","totalPrice","taxLines"]},"description":"The lines of this invoice. Each resolves to one invoice-plan line by salesOrderProductLineId and plannedDate."}},"additionalProperties":false,"required":["invoiceDate","lines"]},"description":"The invoices to record, one entry each, exactly as the source system grouped them. Every entry yields one invoice, and the ids come back in this order.","examples":[[{"externalInvoiceId":"NS-INV-88213","invoiceDate":"2026-09-01","lines":[{"salesOrderProductLineId":"b2d7f309-6c14-4a85-9f37-0e8c5d1b7a26","plannedDate":"2026-09-01","serviceEndDate":"2026-09-30","totalPrice":"1000.00","taxAmount":"210.00","taxCode":"NL-VAT-STD","taxMode":"TaxExclusive","taxLines":[{"name":"NL VAT","amount":"210.00","rate":"0.21","taxableAmount":"1000.00","taxType":"VAT","rateType":"Standard","taxTreatment":"domesticStandardRate"}]}]}]]},"payments":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string","description":"The id of this payment in the source system, for example a Stripe PaymentIntent or Charge id. It must be unique within the request. A payment whose externalId is already recorded for the entity is rejected, and nothing from the request is recorded. Stored as the payment reference."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was received. Format YYYY-MM-DD."},"amount":{"type":"string","format":"decimal","description":"The full amount received, in the sales order's currency. It must be greater than zero and at least the sum of the applications. Any remainder stays unapplied on the payment."},"paymentType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The payment method. Defaults to creditCard."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The field name defined in the matching external identifier configuration."},"value":{"type":"string","description":"The external identifier value."},"externalUrl":{"type":"string","description":"A link to the record in the source system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to attach to the payment, for example from NetSuite or Salesforce."},"applications":{"type":"array","items":{"type":"object","properties":{"externalInvoiceId":{"type":"string","description":"The externalInvoiceId of the invoice the amount goes to: an invoice in this request, or one already on the sales order from an earlier call."},"amount":{"type":"string","format":"decimal","description":"The amount applied to that invoice, in the sales order's currency. It must be greater than zero, and the total applied to an invoice across the request may not exceed its open balance."}},"additionalProperties":false,"required":["externalInvoiceId","amount"]},"description":"How the payment is split across invoices. You state the split; it is never decided for you. At least one is required."}},"additionalProperties":false,"required":["externalId","paymentDate","amount","applications"]},"description":"Payments the source system has already collected for this sales order's invoices, recorded after the invoices in the same request. Each payment is in the sales order's currency and for its customer and entity. It is posted to the entity's Electronic Payment account, which must be configured, and its paymentDate must fall in an open accounting period. If any payment can't be recorded, nothing from the request is."}},"additionalProperties":false,"required":["salesOrderId","invoices"]},"searchSubscriptionOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the subscription."},"subscriptionNumber":{"type":"string","description":"The subscription number. Unique within the tenant. Example: 'SUB-1'."},"customerId":{"type":"string","description":"The customer this subscription belongs to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer this subscription belongs to. See name on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity that owns this subscription. See id on GET base/entities."},"currency":{"type":"string","description":"The currency of annualRecurringRevenue and monthlyRecurringRevenue. Format ISO 4217, for example 'USD'."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The length of the auto-renewal term, in the subscription's term unit."},"renewalPriceChangePercentage":{"type":"string","format":"decimal","description":"The percentage by which the price changes on renewal."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"subscriptionStatus":{"type":"string","description":"The status of the subscription, derived now from the status of its lines, strongest first: any 'active' line makes it 'active'; otherwise 'suspended', 'pendingActivation', 'notStarted', 'pendingOrderApproval'; with none of those it is 'canceled'. 'canceled' therefore also covers a subscription whose term simply ended. A cancellation itself is isCancellationEnabled with a cancellationDate; read those, not this status, for any date other than today."},"serviceStartDateBasis":{"type":"string","description":"How the service start date is determined. Possible values: 'fixedDate', 'serviceActivation'."},"serviceActivationDate":{"type":"string","format":"date","description":"The date service was activated. Set only when serviceStartDateBasis is 'serviceActivation'. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The latest service end date across all of the subscription's lines. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"submissionDate":{"type":"string","format":"date","description":"The submission date of the sales order this subscription came from. Format YYYY-MM-DD."},"cancellationDate":{"type":"string","format":"date","description":"The last day of service of a canceled subscription, which is out of service from the day after; its lines end on this date unless the cancellation set another end date for them. Absent when no cancellation has been recorded. Format YYYY-MM-DD."},"cancellationNote":{"type":"string","description":"A note about the cancellation."},"cancellationReason":{"type":"string","description":"The reason code for the cancellation. Possible values: 'noReasonGiven', 'budgetary', 'movingToCompetitors', 'lowCustomerSatisfaction', 'bankruptcy', 'acquisitionMerger'. Absent when the subscription has not been canceled."},"isCancellationEnabled":{"type":"boolean","description":"Whether the cancellation procedure has been applied to this subscription."},"suspensionDate":{"type":"string","format":"date","description":"The date from which the subscription is or will be suspended. Absent when no suspension has been recorded. Format YYYY-MM-DD."},"suspensionNote":{"type":"string","description":"A note about the suspension."},"suspensionReason":{"type":"string","description":"The reason code for the suspension. Possible values: 'unpaidBalance', 'invalidPaymentMethod'. Absent when the subscription has not been suspended."},"isSuspensionEnabled":{"type":"boolean","description":"Whether the suspension process is enabled for this subscription."},"externalSubscriptionId":{"type":"string","description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annual recurring revenue, in the subscription's currency: the sum of annualRecurringRevenue across the lines that are active or suspended now."},"monthlyRecurringRevenue":{"type":"string","format":"decimal","description":"The monthly recurring revenue, in the subscription's currency: the sum of monthlyRecurringRevenue across the lines that are active or suspended now."},"totalUserCount":{"type":"string","format":"decimal","description":"The number of active users or seats across the subscription's active lines."},"prepaidBalance":{"type":"string","format":"decimal","description":"The prepaid balance remaining for this subscription, summed across the prepaid balances linked to it. The balance is a quantity, not a currency amount."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the subscription line (a UUID) — its public identifier."},"subscriptionLineNumber":{"type":"string","description":"Unique, human-readable number of this subscription line. Absent until one has been assigned."},"productName":{"type":"string","description":"Name of the product this line covers."},"quantity":{"type":"string","format":"decimal","description":"Quantity across the line's associated sales order product lines. A count, not a currency amount."},"currency":{"type":"string","description":"ISO 4217 three-letter currency code (e.g. USD, EUR, GBP) governing this line's annualRecurringRevenue and monthlyRecurringRevenue."},"subscriptionLineStatus":{"type":"string","description":"Lifecycle status of this line. A SubscriptionLineStatus member."},"serviceStartDate":{"type":"string","format":"date","description":"Date service starts for this line (YYYY-MM-DD)."},"serviceEndDate":{"type":"string","format":"date","description":"Date service ends for this line (YYYY-MM-DD)."},"customServiceEndDate":{"type":"string","format":"date","description":"Service end date recorded against this line by a subscription update, when one has overridden the derived date (YYYY-MM-DD)."},"maxSalesOrderProductLineServiceEndDate":{"type":"string","format":"date","description":"Latest service end date across this line's sales order product lines (YYYY-MM-DD)."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"Annualized recurring revenue of this line, in the line currency (see this line's `currency`)."},"monthlyRecurringRevenue":{"type":"string","format":"decimal","description":"Monthly recurring revenue of this line, in the line currency (see this line's `currency`)."},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The sales order. See id on GET accounting/sales-orders/:id."},"orderNumber":{"type":"string","description":"The sales order number. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'. 'upsell' is a mid-term modification of a subscription: the order is stored as 'midTermModification', the name POST accounting/subscriptions/:id/modify uses, and this version reports it as 'upsell'. API version v2 reports it as 'midTermModification'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved order is booked business: an invoice run raises invoices for approved orders only. 'draft', 'pendingApproval' and 'revise' are awaiting approval and never share a total with approved orders."}},"additionalProperties":false,"required":["id"]},"description":"The sales orders that carry this line, oldest first. An empty array when no sales order carries it."}},"additionalProperties":false,"required":["id","currency","salesOrders"]},"description":"The subscription's lines, one per product on the subscription, oldest first. An empty array when the subscription has none. GET accounting/subscriptions/:id returns the same lines. GET accounting/subscriptions returns header fields only, without lines."},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The sales order. See id on GET accounting/sales-orders/:id."},"orderNumber":{"type":"string","description":"The sales order number. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'. 'upsell' is a mid-term modification of a subscription: the order is stored as 'midTermModification', the name POST accounting/subscriptions/:id/modify uses, and this version reports it as 'upsell'. API version v2 reports it as 'midTermModification'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved order is booked business: an invoice run raises invoices for approved orders only. 'draft', 'pendingApproval' and 'revise' are awaiting approval and never share a total with approved orders."}},"additionalProperties":false,"required":["id"]},"description":"The sales orders that carry this subscription, oldest first: the order that created it, then every later mid-term modification (orderType 'upsell'), renewal or replacement. An empty array when no sales order carries it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the subscription last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","currency","termType","lines","salesOrders","lastModifiedDate"]},"description":"The subscriptions that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination information for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSubscriptionInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the subscription with this identifier. The match is exact."},"subscriptionNumber":{"type":"string","description":"Limits results to the subscription with this subscription number, for example 'SUB-1'. The match is exact."},"customerId":{"type":"string","description":"Limits results to subscriptions of this customer. An id that matches no customer returns an empty page. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"Limits results to subscriptions owned by this legal entity. An id that matches no entity returns an empty page. See id on GET base/entities."},"termType":{"type":"string","description":"Limits results to subscriptions with this term structure. Possible values: 'termed', 'evergreen'. Any other value matches nothing."},"subscriptionStatus":{"type":"string","description":"Limits results to subscriptions in this status. Possible values: 'pendingActivation', 'notStarted', 'active', 'pendingOrderApproval', 'canceled', 'suspended'. Any other value matches nothing."},"autoRenew":{"type":"boolean","description":"Limits results to subscriptions set to auto-renew when true, or not when false."},"cancellationReason":{"type":"string","description":"Limits results to subscriptions canceled for this reason. Possible values: 'noReasonGiven', 'budgetary', 'movingToCompetitors', 'lowCustomerSatisfaction', 'bankruptcy', 'acquisitionMerger'. Any other value matches nothing."},"suspensionReason":{"type":"string","description":"Limits results to subscriptions suspended for this reason. Possible values: 'unpaidBalance', 'invalidPaymentMethod'. Any other value matches nothing."},"externalSubscriptionId":{"type":"string","description":"Limits results to the subscription with this external identifier. The match is exact."},"serviceStartDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest serviceStartDate to include. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest serviceStartDate to include. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to subscriptions whose derived serviceStartDate falls in this range. Both bounds are inclusive, and omitting one leaves that side open."},"serviceEndDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest serviceEndDate to include. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest serviceEndDate to include. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to subscriptions whose derived serviceEndDate falls in this range. Both bounds are inclusive, and omitting one leaves that side open."}},"additionalProperties":false,"description":"The filters to apply. A subscription must match every filter you send. Omit to return all subscriptions you may read."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of subscriptions per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"salesOrdersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales order."},"orderNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order number. Unique within the tenant. Example: 'SO-1042'."},"orderType":{"anyOf":[{"enum":["new","upsell","earlyRenewal","renewal","replacement"]},{"type":"null"}],"description":"The type of the sales order."},"approvalStatus":{"anyOf":[{"enum":["draft","pendingApproval","revise","approved","rejected"]},{"type":"null"}],"description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved order is booked business: an invoice run raises invoices for approved orders only. 'draft', 'pendingApproval' and 'revise' are awaiting approval and never share a total with approved orders."},"invoiceStatus":{"anyOf":[{"oneOf":[{"const":"notStarted","description":"Nothing invoiced yet."},{"const":"notStartedOnHold","description":"Nothing invoiced yet, and invoicing is on hold."},{"const":"inProgress","description":"Partly invoiced."},{"const":"inProgressOnHold","description":"Partly invoiced, and invoicing is on hold."},{"const":"complete","description":"Fully invoiced."},{"const":"completeModified","description":"Fully invoiced, and the order was modified since."}]},{"type":"null"}],"description":"How far the order has been invoiced, derived from its invoice plan lines: 'notStarted', 'inProgress', 'complete' or 'completeModified' (every product early-renewed and credited); the OnHold values of the type do not occur on an order. It follows the billing plan, not the amounts: an order whose service has not started reads 'notStarted' even when it was invoiced in advance, a termed order reads 'complete' once every recurring, one-time and commit plan line is invoiced or settled by a credit memo, an evergreen or pay-as-you-go order reads 'complete' only once all its subscriptions are canceled and their usage periods closed, and once its service has started, an order with billableTime, billableTravelExpense or billablePassThrough lines follows only those lines: it reads 'complete' once any of their serviceEndDate has passed, 'notStarted' while any of them has yet to start, and 'inProgress' otherwise. This is NOT approvalStatus, which says where the order sits in the approval lifecycle: an approved order is usually notStarted, and a fully invoiced one is still approved. Evaluated now, not as of a date."},"bookDate":{"type":"string","format":"date","description":"The date the sales order was booked. Format YYYY-MM-DD."},"signDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the contract was signed by customer and company (YYYY-MM-DD). One of four dates an order carries: bookDate is when it was booked into the system, signDate when it was signed, salesEffectiveDate when the contract legally takes effect, and serviceStartDate when delivery begins. A report about when business was won reads bookDate or signDate; one about when revenue or service starts reads the other two."},"salesEffectiveDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Legal effective date of the contract (YYYY-MM-DD), which can be earlier than signDate: a contract signed in May may take effect retroactively from the previous December."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the order's service period. Format YYYY-MM-DD."},"serviceEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the order's service period. Absent when isEvergreen is true. A subscription cancellation does not change it; a cancellation is read on the order's subscriptions (isCancellationEnabled, cancellationDate). Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'."},"isEvergreen":{"type":"boolean","description":"Whether the order is evergreen, meaning at least one of its subscriptions has no end date and keeps billing until it is canceled. It stays true after that cancellation; read cancellations on the subscriptions."},"isPayAsYouGoOnly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when every line on the order is pay-as-you-go usage, which is why such an order has no fixed term to invoice or recognise on a schedule."},"term":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The length of the order's term, in months. Absent when isEvergreen is true."},"totalContract":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Total contract value in the order currency (see `currency`): the sum of the products' totals less the order-level oneTimeDiscountAmount. Already net of that discount — subtracting it again double-counts it. It does not bound what an evergreen or pay-as-you-go-only order will bill, so on those totalContract minus invoicedAmount is not what remains."},"invoicedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount already invoiced against the contract value, before tax, in the order currency (see `currency`): the products' invoiced amounts plus the one-time discount lines (negative) of the order's invoices. totalContract minus invoicedAmount is what remains to be billed, unless plan lines were settled by a credit memo instead of invoiced, which invoiceStatus counts as done. Evaluated now, not as of a date."},"oneTimeDiscountAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Lump-sum discount applied to the whole order, in the order currency (see `currency`). Already deducted from totalContract."},"oneTimeDiscountAllocation":{"anyOf":[{"oneOf":[{"const":"firstInvoice","description":"Taken in full on the first invoice."},{"const":"alignToInvoiceFrequency","description":"Spread over the invoices as they are raised."},{"const":"custom","description":"Spread by a custom split."}]},{"type":"null"}],"description":"How the lump-sum discount is spread across the products."},"exchangeRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Rate from the order currency to the legal entity's functional currency, as stored on the order. Absent when no conversion is recorded; the functional figures then carry the order-currency amount unchanged."},"functionalCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity's functional currency as a 3-letter ISO 4217 code — the currency functionalTotalContract and functionalInvoicedAmount are in. The order's own amounts are in `currency` instead."},"functionalTotalContract":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Total contract value in the entity's functional currency (see `functionalCurrency`): totalContract at exchangeRate. Where no exchange rate is stored the order's own amount is carried over unchanged, so a sum across orders can mix converted and unconverted figures — check exchangeRate, or group by currency, before presenting one total across currencies."},"functionalInvoicedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount already invoiced, in the entity's functional currency (see `functionalCurrency`) — the functional twin of invoicedAmount, built the same way at each invoice's own exchange rate, with the same caution as functionalTotalContract. Because functionalTotalContract converts at the order's rate and this at each invoice's, the two do not subtract to the functional value of what remains to bill; convert totalContract minus invoicedAmount at exchangeRate instead."},"purchaseOrder":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's own purchase-order reference as recorded on the order. Free text — not validated, not unique, absent where the customer issued none. Returned only — it can be neither filtered nor sorted on, because it names a customer-owned document."},"salesChannel":{"anyOf":[{"oneOf":[{"const":"salesAssisted","description":"Sold through the sales team."},{"const":"selfServe","description":"Bought by the customer without a salesperson."}]},{"type":"null"}],"description":"How the order was sold."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer this order is for."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer this order is for. See name on GET accounting/customers/:id."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number of the customer this order is for. See customerNumber on GET accounting/customers/:id. Example: 'CUS-789012'."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that owns the order."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that owns this sales order. See entityName on GET base/entities."},"entityNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the legal entity that owns this sales order. See entityNumber on GET base/entities."},"salesArrangement":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the sales arrangement this order belongs to. No endpoint returns sales arrangements."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to product lines do not update it."}},"additionalProperties":false},"createAccountOutput":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the created account.","examples":["7d3c2b1a-9e8f-4d6c-b5a4-3e2f1d0c9b8a"]}},"additionalProperties":false,"required":["id"]},"createAccountInput":{"type":"object","properties":{"accountNumber":{"type":"string","description":"The account number, unique within its chart of accounts. Required when the chart of accounts uses manual numbering. Not allowed when it uses hierarchical numbering, where the number is derived from the parent account."},"accountName":{"type":"string","description":"The display name of the account.","examples":["Operating Bank USD"]},"accountType":{"type":"string","description":"The top-level classification of the account. Accepted values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'.","examples":["asset"]},"accountSubType":{"type":"string","description":"A finer classification within accountType, for posting accounts only. Accepted values per accountType: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset' (asset); 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability' (liability); 'equity', 'otherComprehensiveIncome' (equity); and the sub-type named like the type for 'income', 'costOfGoodsSold', 'expense', 'otherIncome' and 'otherExpense'. Required for posting accounts. 'bank' and 'creditCard' require entityId and currency.","examples":["bank"]},"description":{"type":"string","description":"A free-form description of the account."},"chartOfAccountsId":{"type":"string","description":"The chart of accounts the account belongs to. See id on GET accounting/chart-of-accounts/:id.","examples":["5c1f0e2a-7b3d-4e8a-9f61-2d4b8c0a7e13"]},"parentAccountId":{"type":"string","description":"The grouping account this account rolls up to. It must already exist and be a grouping account in the same chart of accounts with the same accountType. Required for a posting account when the chart of accounts uses hierarchical numbering. Omit for a top-level account. See id on GET accounting/accounts/:id.","examples":["a8e2c4d1-3f5b-4a7c-8e9d-1b2c3d4e5f60"]},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Defaults to false. A grouping account takes no accountSubType, entityId, currency or revaluationMode. Cannot be changed later.","examples":[false]},"entityId":{"type":"string","description":"The legal entity a bank or credit-card account is denominated for. Required for, and only allowed on, 'bank' and 'creditCard' accounts. The entity must be assigned to the chart of accounts. See id on GET base/entities.","examples":["0f9e8d7c-6b5a-4c3d-9e2f-1a0b9c8d7e6f"]},"currency":{"type":"string","description":"The account's currency. Format ISO 4217, for example 'USD'. Required for, and only allowed on, 'bank' and 'creditCard' accounts.","examples":["USD"]},"payOnBehalf":{"type":"boolean","description":"Whether this account takes part in pay-on-behalf accounting. Defaults to false. true is only allowed on 'bank' and 'creditCard' accounts of a legal entity that has subsidiaries or a parent entity."},"elimination":{"type":"boolean","description":"Whether this account is eliminated during consolidation. Defaults to false. true is not allowed on grouping, 'bank' or 'creditCard' accounts."},"revaluationMode":{"type":"string","description":"Which revaluation results this account recognizes. Accepted values: 'recognizeAll' (both unrealized gains and unrealized losses), 'recognizeAllButUnrealizedGains' (only unrealized losses), 'none' (the account is not revalued). Posting accounts only. Omit to take the default the server derives. Which modes an account can take depends on its sub-type, on a bank or credit-card account's currency against its book's currency, and on the accounting standard of the chart's book; a mode the account cannot take is rejected with INVALID_FIELD_VALUE, whose allowedValues lists the modes it can take, never replaced.","examples":["recognizeAll"]},"accountStatus":{"type":"string","description":"The account's status, posting accounts only. Accepted values: 'enabled', 'disabled'. Defaults to 'enabled'. A grouping account accepts only 'enabled', the status it reads back with."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. GET accounting/account-external-identifier-fields lists the accepted keys."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Anything else is rejected with INVALID_FIELD_VALUE."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Each fieldName must match an active account external-identifier configuration. GET accounting/account-external-identifier-fields lists them.","examples":[[{"fieldName":"netsuiteAccountId","value":"1010","externalUrl":"https://example.app.netsuite.com/app/accounting/account/account.nl?id=1010"}]]}},"additionalProperties":false,"required":["accountName","accountType","chartOfAccountsId"]},"unreleaseInvoiceMilestoneOutput":{"type":"object","properties":{},"additionalProperties":false},"unreleaseInvoiceMilestoneInput":{"type":"object","properties":{},"additionalProperties":false},"getCreditMemoOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo."},"creditMemoNumber":{"type":"string","description":"The credit memo number, for example 'CM-1'. Absent while none has been assigned."},"creditMemoDate":{"type":"string","format":"date","description":"The date the credit memo was issued. Format YYYY-MM-DD."},"creditMemoStatus":{"type":"string","description":"The application status of the credit memo. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'."},"creditMemoType":{"type":"string","description":"How the credit memo was created. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn', 'trueUp'. Only 'manual' credit memos are created through this API. The rest come from internal workflows."},"manualCreditMemoType":{"type":"string","description":"The reason for a manual credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Absent when creditMemoType is not 'manual'."},"currency":{"type":"string","description":"The currency of the credit memo. Every amount on the record, its lines and its application rows is in this currency. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"A free-form description of the credit memo."},"externalCreditMemoId":{"type":"string","description":"The identifier of this credit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"customerId":{"type":"string","description":"The customer the credit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer the credit memo is issued to."},"customerNumber":{"type":"string","description":"The customer number of the customer the credit memo is issued to."},"entityId":{"type":"string","description":"The legal entity that issued the credit memo. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that issued the credit memo."},"invoiceId":{"type":"string","description":"The invoice the credit memo was created from. Absent when it was not created from an invoice. See id on GET accounting/invoices/:id."},"invoiceNumber":{"type":"string","description":"The number of the invoice the credit memo was created from. Present whenever invoiceId is."},"subtotal":{"type":"string","format":"decimal","description":"The subtotal before tax and duties, in the credit memo currency. Absent when no subtotal has been computed."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the credit memo currency."},"totalDutiesAndCustoms":{"type":"string","format":"decimal","description":"The total duties and customs across all lines, in the credit memo currency."},"totalAmountCredited":{"type":"string","format":"decimal","description":"The total credited, including tax and duties, in the credit memo currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount applied to invoices and debit memos so far, in the credit memo currency. This is the net of the application rows below."},"unappliedAmount":{"type":"string","format":"decimal","description":"The amount still available to apply, in the credit memo currency. For an earlier date, take totalAmountCredited less the appliedAmount of its credit memo applications with appliedDate on or before it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the credit memo last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"pdf":{"type":"string","x-file":true,"description":"The credit memo PDF reflecting the credit memo as it is now, as a short-lived file handle. Exchange it at GET /public/files/{handle}. Absent when no PDF template applies to the credit memo."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo line."},"creditMemoLineNumber":{"type":"string","description":"The line number within the credit memo."},"description":{"type":"string","description":"The line description, as shown to the customer."},"productId":{"type":"string","description":"The product credited by the line. Absent on free-text lines. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The product code as it stood when the line was created. It does not follow later changes to the product."},"productDescription":{"type":"string","description":"The product description as it stood when the line was created. It does not follow later changes to the product."},"quantity":{"type":"string","format":"decimal","description":"The quantity credited."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the credit memo currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total before tax and duties, in the credit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the credit memo currency."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs on the line, in the credit memo currency."},"amountCredited":{"type":"string","format":"decimal","description":"The total credited for the line, in the credit memo currency: totalPrice + taxAmount + dutiesAndCustomsAmount."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the credit memo, each crediting one product or free-text item. An empty array when the credit memo has no lines. Every amount is in the credit memo currency."},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the application row."},"appliedAmount":{"type":"string","format":"decimal","description":"The signed amount moved by this row, in the row's currency: positive when applying, negative when unapplying. Sum the rows to reconcile against the header appliedAmount."},"appliedDate":{"type":"string","format":"date","description":"The date the allocation was recorded. Format YYYY-MM-DD."},"actionType":{"type":"string","description":"What this row did. Possible values: 'applied', 'unapplied'."},"type":{"type":"string","description":"The kind of document the credit memo was allocated against. Possible values: 'invoice', 'debitMemo'. Absent when the stored target kind is not one this version recognizes."},"targetId":{"type":"string","description":"The target document: an invoice when type is 'invoice', a debit memo when type is 'debitMemo'. Absent when the target no longer exists or its kind is unrecognized. See id on GET accounting/invoices/:id and GET accounting/debit-memos/:id."},"targetNumber":{"type":"string","description":"The number of the target document."},"currency":{"type":"string","description":"The currency of this row's appliedAmount. Matches the credit memo currency. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","appliedDate","currency"]},"description":"The application rows, each recording one allocation of the credit memo against an invoice or debit memo. Applying and unapplying both add a row, told apart by actionType and the sign of appliedAmount, so this is an append-only history rather than the current allocation. An empty array when the credit memo has never been applied."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteCreditMemoId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The credit memo's identifiers in other systems, one per configured field name. An empty array or absent when the credit memo has none."}},"additionalProperties":false,"required":["id","creditMemoDate","currency","customerId","entityId","lastModifiedDate"]},"getAccountingProductOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product."},"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant."},"productNumber":{"type":"string","description":"The product number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"description":{"type":"string","description":"A description of the product shown to customers."},"internalDescription":{"type":"string","description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"type":"string","description":"The product's identifier in an external CRM system."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The date the product is no longer available. Format YYYY-MM-DD. Absent for a product with no end date."},"productFamily":{"type":"string","description":"The product family. Possible values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"The product type. Possible values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"productStatus":{"type":"string","description":"The product's availability status, computed by the system. Possible values: 'draft', 'available', 'unavailable', 'incomplete'. It is derived from the product's lines, pricing and effective dates and cannot be set directly."},"isInventory":{"type":"boolean","description":"Whether the product is tracked as inventory."},"itemIds":{"type":"array","items":{"type":"string"},"description":"The inventory items linked to this product. Used only when isInventory is true. Absent when the product has none. See id on GET inventory/items/:id."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the product record was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug rather than the display label. It must match an active external-identifier configuration for products."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the product has none. This collection is read-only. Create and update do not accept it."}},"additionalProperties":false,"required":["id","productName","productCode","effectiveStartDate","lastModifiedDate"]},"updateDebitMemoOutput":{"type":"object","properties":{},"additionalProperties":false},"updateDebitMemoInput":{"type":"object","properties":{"customerMessage":{"type":"string","description":"A new free-text message to show the customer on the document. Pass an empty string to clear it.","examples":["Revised: covers the re-debited licence fee only."]},"purchaseOrder":{"type":"string","description":"A new purchase-order reference from the customer. Pass an empty string to clear it.","examples":["PO-88214"]},"paymentTerm":{"type":"string","description":"A new payment-term key to record on the document. When you leave out dueDate, the due date is recomputed from debitMemoDate plus this term's days. An unknown key fails with PAYMENT_TERM_NOT_FOUND. See code on GET accounting/payment-terms."},"debitMemoDate":{"type":"string","format":"date","description":"A new date for the debit memo. Use format YYYY-MM-DD. It must fall in an open accounting period, or the request fails with ACCOUNTING_PERIOD_CLOSED. On an approved debit memo it can move only while no payment or credit is applied, or the request fails with DATE_LOCKED. When you leave out dueDate and the debit memo has a payment term, the due date moves with it."},"dueDate":{"type":"string","format":"date","description":"A new due date. Use format YYYY-MM-DD. Must not be before the debit memo date, or the request fails with DUE_DATE_BEFORE_DEBIT_MEMO_DATE."},"debitGlAccountId":{"type":"string","description":"A new general ledger account for the journal entry's debit. Only on a debit memo that isn't approved yet; on an approved one the request fails with FIELD_LOCKED. See id on GET accounting/accounts/:id."},"billToAddressId":{"type":"string","description":"A new bill-to address for the document. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"A new sold-to address for the document. There is no endpoint for it."},"createLines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"A free-text line description, shown to the customer. Required on a line that names no product."},"productId":{"type":"string","description":"The product the line refers to. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line the line bills. Its product, unit of measure and tax mode apply when you leave those out. Must be a line of productId when you send both, or the request fails with PRODUCT_LINE_NOT_FOUND."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency. Required on a line that names a product."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'. An unrecognized value fails with INVALID_ENUM_VALUE."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency. Required on a line that names a product."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency. Must be greater than 0."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency. A line edit does not recalculate tax; send the new amount, or recalculate it on the debit memo page."},"taxCode":{"type":"string","description":"The tax code to apply to the line."},"taxDate":{"type":"string","format":"date","description":"The date to determine the line's tax on. Use format YYYY-MM-DD."},"taxMode":{"enum":["taxInclusive","taxExclusive"],"description":"How the line's prices are quoted for tax."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code to apply to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. Required on a line that names no product. See id on GET accounting/accounts/:id."},"vatAccountingType":{"enum":["domesticStandardRate","domesticReducedRate","domesticSalesZeroRated","domesticSalesExempt","vatIntraEuStandardRate","vatIntraEuReducedRate","nonEuExempt","reverseCharge"],"description":"The VAT type of the line. Required on every line when the legal entity has VAT enabled and no tax engine."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Use format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["totalPrice"]},"description":"Lines to add, on a standalone debit memo that isn't approved yet. They follow the same rules as the lines of a new debit memo. Identifiers for them are set afterwards through lineExternalIdentifiers."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The line to change. Must be a line of this debit memo, or the request fails with LINE_NOT_FOUND. See lines[].id on GET accounting/debit-memos/:id."},"description":{"type":"string","description":"A free-text line description, shown to the customer. Omit to leave it unchanged. Required on a line that names no product."},"productId":{"type":"string","description":"The product the line refers to. Sending it or productLineId replaces the line's product. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line the line bills. Its product, unit of measure and tax mode apply when you leave those out. Must be a line of productId when you send both, or the request fails with PRODUCT_LINE_NOT_FOUND."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency. Omit to leave it unchanged. Required on a line that names a product."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'. An unrecognized value fails with INVALID_ENUM_VALUE."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency. Omit to leave it unchanged. Required on a line that names a product."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency. Must be greater than 0. Omit to leave it unchanged."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency. A line edit does not recalculate tax; send the new amount, or recalculate it on the debit memo page."},"taxCode":{"type":"string","description":"The tax code to apply to the line."},"taxDate":{"type":"string","format":"date","description":"The date to determine the line's tax on. Use format YYYY-MM-DD."},"taxMode":{"enum":["taxInclusive","taxExclusive"],"description":"How the line's prices are quoted for tax."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code to apply to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. Omit to leave it unchanged. Required on a line that names no product. See id on GET accounting/accounts/:id."},"vatAccountingType":{"enum":["domesticStandardRate","domesticReducedRate","domesticSalesZeroRated","domesticSalesExempt","vatIntraEuStandardRate","vatIntraEuReducedRate","nonEuExempt","reverseCharge"],"description":"The VAT type of the line. Required on every line when the legal entity has VAT enabled and no tax engine."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Use format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each matched by its id. A field you leave out keeps its current value. On an approved debit memo only description can change; any other field fails with FIELD_LOCKED."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of lines to remove, on a debit memo that isn't approved yet. At least one line has to remain, or the request fails with NO_LINES. See lines[].id on GET accounting/debit-memos/:id."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The debit memo's identifiers in other systems, one per configured field name. Identifiers already stored under other field names are kept. Each fieldName must be the fieldName of an existing debit-memo external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"lineExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"lineId":{"type":"string","description":"The line to set them on. Must be a line of this debit memo, or the request fails with LINE_NOT_FOUND. See lines[].id on GET accounting/debit-memos/:id."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. Each fieldName must be the fieldName of an existing debit-memo-line external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."}},"additionalProperties":false,"required":["lineId","externalIdentifiers"]},"description":"External identifiers to set on lines of this debit memo, one entry per line. Each line keeps the identifiers it does not name."}},"additionalProperties":false},"searchAccountOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account."},"accountNumber":{"type":"string","description":"The account number, unique within its chart of accounts."},"accountName":{"type":"string","description":"The display name of the account."},"accountType":{"type":"string","description":"The top-level classification of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'."},"accountSubType":{"type":"string","description":"A finer classification within accountType. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Absent when none is assigned."},"accountStatus":{"type":"string","description":"The lifecycle status of the account. Possible values: 'enabled' (available on transactions), 'disabled' (not available for new transactions), 'draft' (created but not yet reviewed), 'draftErrors' (a draft with validation errors to resolve before it can be enabled)."},"description":{"type":"string","description":"A free-form description of the account. Absent when none was set."},"chartOfAccountsId":{"type":"string","description":"The identifier of the chart of accounts this account belongs to. An account belongs to exactly one. See id on GET accounting/chart-of-accounts/:id."},"parentAccountId":{"type":"string","description":"The identifier of the parent account this account rolls up to. Absent for a top-level account. See id on GET accounting/accounts/:id."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Balances from child accounts aggregate here, and journal entries cannot be posted to it directly."},"entityId":{"type":"string","description":"The identifier of the legal entity this account is denominated for. Set only on bank and credit-card accounts. See id on GET base/entities."},"currency":{"type":"string","description":"The account's currency. Format ISO 4217, for example 'USD'. Set only on accounts linked to a cash account, alongside entityId."},"revaluation":{"type":"boolean","description":"Whether balances on this account are revalued for exchange-rate changes."},"revaluationMode":{"type":"string","description":"Which revaluation results this account recognizes. Possible values: 'recognizeAll' (both unrealized gains and unrealized losses), 'recognizeAllButUnrealizedGains' (only unrealized losses, leaving gains unposted as the imparity principle requires), 'none' (the account is not revalued). Absent when the account has no mode set. `revaluation` is true for every value other than 'none'."},"payOnBehalf":{"type":"boolean","description":"Whether this account takes part in pay-on-behalf accounting."},"elimination":{"type":"boolean","description":"Whether this account is eliminated during consolidation."},"exchangeRateType":{"type":"string","description":"Which rate translates this account's amounts on revaluation. Possible values: 'historical', 'average', 'current'. Absent on grouping accounts."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the account record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. It is the fieldName of an existing account external-identifier configuration."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. An empty array when the account has none."}},"additionalProperties":false,"required":["id","accountNumber","accountName","accountType","chartOfAccountsId","groupingAccount","lastModifiedDate"]},"description":"The accounts that match, ordered by account number. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the account with this identifier. The match is exact."},"accountNumber":{"type":"string","description":"Limits results to the account with this number. Pair it with chartOfAccountsId, since the number is unique only within a chart of accounts."},"accountName":{"type":"string","description":"Limits results to accounts whose name contains this text. The match is case-insensitive."},"chartOfAccountsId":{"type":"string","description":"Limits results to accounts in this chart of accounts, by its identifier. An identifier that matches none returns an empty page."},"accountType":{"type":"string","description":"Limits results to accounts of this type. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'. Any other value matches nothing."},"accountSubType":{"type":"string","description":"Limits results to accounts of this sub-type. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Any other value matches nothing."},"accountStatus":{"type":"string","description":"Limits results to accounts with this status. Possible values: 'enabled', 'disabled', 'draft', 'draftErrors'. Any other value matches nothing."},"entityId":{"type":"string","description":"Limits results to accounts denominated for this legal entity, by its identifier. Only bank and credit-card accounts name an entity, so no other sub-type matches. An identifier that matches none returns an empty page."},"groupingAccount":{"type":"boolean","description":"True returns only grouping accounts, false only posting accounts. Omit for both."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. It must be the fieldName of an existing configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system holds it. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to accounts carrying this external identifier. Both fieldName and value are required. Several accounts may share a value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. An account must match every filter you send. Omit to return all accounts."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of accounts per page, between 1 and 200. Defaults to 50. A value outside that range fails with INVALID_PAGE_SIZE rather than being adjusted."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"updateTaxConfigurationOutput":{"type":"object","properties":{},"additionalProperties":false},"updateTaxConfigurationInput":{"type":"object","properties":{"status":{"enum":["Active","Inactive"],"description":"The new status. Omit to leave it unchanged.","examples":["Inactive"]},"taxRegime":{"enum":["EU_VAT","India_GST","Canada_GST","Ghana_VAT","SingleRate_GST","Mexico_IVA"],"description":"The new tax regime. Omit to leave it unchanged."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for an existing tax code line to update. Omit to create a new line. An id that does not belong to this configuration fails with LINE_NOT_FOUND."},"taxCode":{"type":"string","description":"The business tax code as printed on source documents, for example 'V19EUG' or 'U00EU'."},"title":{"type":"string","description":"The display title of the tax code. Must be unique within the configuration."},"comment":{"type":"string","description":"A free-form note on when to use this tax code."},"vatDeclarationField":{"type":"string","description":"The box or boxes on the VAT return that this code feeds, taken verbatim from the tax authority form, for example '66' or '46+47+67'. Stored as free text and not evaluated."},"percentage":{"type":"string","format":"decimal","description":"The tax rate, as a decimal fraction. For example, 0.19 is 19%. Send 0 for a zero-rated or exempt code."},"rateType":{"enum":["Standard","Reduced","SuperReduced","Zero","Exempt"],"description":"The legal rate classification of the tax code."},"scope":{"enum":["Domestic","IntraEU_B2B","IntraEU_B2C","ExtraEU_Goods","ExtraEU_Services"],"description":"The territorial scope of the transaction."},"direction":{"enum":["Input","Output"],"description":"Which side the tax sits on. 'Input' is tax paid on purchases, 'Output' is tax charged on sales."},"isReverseCharge":{"type":"boolean","description":"Whether the recipient rather than the supplier accounts for the tax. When true, every account on the line must set reverseChargeCreditAccountId."},"cashBasis":{"type":"boolean","description":"Cash basis: the tax becomes creditable only when the bill is paid. It posts to the uncollected account and moves to the collected account on payment. Input tax only. Requires components whose accounts all set collectedAccountId."},"isActive":{"type":"boolean","description":"Whether the tax code is offered for selection on new documents."},"accounts":{"type":"array","items":{"type":"object","properties":{"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount. Required on reverse-charge lines, ignored otherwise. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["chartOfAccountsId","accountId"]},"description":"The general ledger accounts this tax code books to, usually one entry for each chart of accounts the entity books in. Must not be empty, including for exempt and zero-rated codes, which book a tax line at zero."},"components":{"type":"array","items":{"type":"object","properties":{"taxComponentCode":{"type":"string","description":"The tax component code, for example 'VAT'."},"percentage":{"type":"string","format":"decimal","description":"The component's rate as a decimal fraction, for example 0.16 for 16%."},"isRecoverable":{"type":"boolean","description":"Whether the tax can be reclaimed. Every component of a cash-basis code must set true."},"accounts":{"type":"array","items":{"type":"object","properties":{"chartOfAccountsId":{"type":"string","description":"The chart of accounts this mapping applies to. See id on GET accounting/chart-of-accounts/:id."},"accountId":{"type":"string","description":"The account the tax amount is booked to. On a cash-basis code this is the uncollected account. See id on GET accounting/accounts/:id."},"reverseChargeCreditAccountId":{"type":"string","description":"The account credited with the offsetting tax amount on a reverse-charge code. See id on GET accounting/accounts/:id."},"collectedAccountId":{"type":"string","description":"Cash basis only. The account the tax moves to once the bill is paid. Required on every account of a cash-basis component, and must differ from accountId. See id on GET accounting/accounts/:id."}},"additionalProperties":false,"required":["chartOfAccountsId","accountId"]},"description":"The GL accounts for this component, one entry per chart of accounts the entity books in. Must not be empty."}},"additionalProperties":false,"required":["taxComponentCode","percentage","isRecoverable","accounts"]},"description":"The tax components of this code, for example a federal and a state part. Required when cashBasis is true. The components' percentages must add up to the line's percentage."}},"additionalProperties":false,"required":["title","percentage","rateType","scope","direction","isReverseCharge","isActive","accounts"]},"description":"The replacement set of tax codes. Omit to leave every existing tax code unchanged. When supplied it replaces the whole set: a line with an id updates that tax code, a line without one creates a tax code, and any existing line not in the array is deleted with its accounts. Must not be empty when supplied."}},"additionalProperties":false},"updateRefundOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the refund.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'.","examples":["REF-1042"]},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD.","examples":["2026-08-01"]},"approvalStatus":{"type":"string","description":"The approval status after the change. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'.","examples":["pendingApproval"]},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'.","examples":["ach"]},"currency":{"type":"string","description":"The currency of the refund. Every amount on it is in this currency. Format ISO 4217, for example 'USD'.","examples":["USD"]},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency.","examples":["175.00"]},"customerId":{"type":"string","description":"The customer receiving the refund. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"entityId":{"type":"string","description":"The legal entity issuing the refund. See id on GET base/entities.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T10:02:11.000Z"]}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"updateRefundInput":{"type":"object","properties":{"refundDate":{"type":"string","format":"date","description":"The new issue date. Use format YYYY-MM-DD. Must fall in an open accounting period. Omit to leave it unchanged."},"refundType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"The new payment method. Omit to leave it unchanged."},"refundNote":{"type":"string","description":"A new free-form note. Omit to leave it unchanged."},"amount":{"type":"string","format":"decimal","description":"The new refund amount, in the refund currency. Must be greater than 0. Omit to leave it unchanged.","examples":["175.00"]}},"additionalProperties":false},"addAccountingProductLinesOutput":{"type":"object","properties":{"createdProductLineIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the created product lines, in the same order as productLines. The 'usage' lines created alongside 'prepaid' or threshold-based lines are not included."}},"additionalProperties":false,"required":["createdProductLineIds"]},"addAccountingProductLinesInput":{"type":"object","properties":{"productLines":{"type":"array","items":{"type":"object","properties":{"lineType":{"type":"string","description":"The type of product line. Accepted values: 'recurring', 'oneTime', 'prepaid', 'billableTime', 'billableTravelExpense', 'billablePassThrough'. 'usage' is not accepted and fails with UNSUPPORTED_LINE_TYPE, because 'usage' lines are only created automatically with their parent line. 'commitWithOverage' is not supported and fails with VALIDATION_FAILED."},"priceModel":{"type":"string","description":"How the product line is priced. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"unitOfMeasure":{"type":"string","description":"The unit the product line's quantities are measured in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"name":{"type":"string","description":"A name for the product line. Omit to have one generated."},"pricingTerm":{"type":"string","description":"The pricing term of the product line. Accepted values: 'monthly', 'biMonthly', 'once', 'quarterly', 'semiAnnually', 'annually'."},"enforceListPrice":{"type":"boolean","description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"invoiceFrequency":{"type":"string","description":"How often the product line is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd', 'perCharge'. 'perCharge' invoices each billable charge on its own planned date and is accepted on billableTime, billableTravelExpense and billablePassThrough lines only."},"prepaidBalanceOverConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance. Accepted values: 'allowNegative', 'overage'. 'allowNegative' lets the balance go negative and takes the shortfall from the new prepaid amount at renewal. 'overage' stops the balance at 0 and invoices further usage at the line's overage rate. Defaults to 'allowNegative' on a 'prepaid' line."},"prepaidBalanceRolloverAtRenewal":{"type":"boolean","description":"Whether the remaining prepaid balance rolls over at renewal. Defaults to true on a 'prepaid' line."},"trueUpEstimationMethod":{"type":"string","description":"Makes a 'recurring' line a True-Up line: its quantity is an estimate, reconciled against uploaded usage each invoice period, and the difference is invoiced as an adjustment. Accepted value: 'startEstimate'. A True-Up line gets a paired 'usage' line, and pricing the True-Up line also prices that 'usage' line. The line must have a calculated invoiceFrequency ('monthly', 'biMonthly', 'quarterly', 'semiAnnually' or 'annually') and can't be priced 'thresholdBased'; otherwise the request fails with VALIDATION_FAILED."},"crmProductId":{"type":"string","description":"The product line's identifier in an external CRM system."},"dataSource":{"type":"string","description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"productLineTaxes":{"type":"array","items":{"type":"object","properties":{"taxCode":{"type":"string","description":"The tax code, as defined by the configured tax provider."},"entityId":{"type":"string","description":"The legal entity this tax record applies under. See id on GET base/entities."},"engine":{"type":"string","description":"The tax engine that computes this tax. Accepted values: 'avalara', 'anrok', 'everestTaxEngine', 'manualTax', 'none'."},"country":{"type":"string","description":"The country the tax record applies in. Format ISO 3166-1, for example 'US'."}},"additionalProperties":false,"required":["taxCode","entityId","engine"]},"description":"The tax records to attach to the product line. Provide only when a tax provider is configured."},"priceBookHeadersToCreate":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. Required when the product line is priced 'flat' or 'perUnit'."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Omit on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["unitOfMeasure"],"description":"The rate-card entry to attach. Provide only on rate-card-priced entries."}},"additionalProperties":false},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","priceBookEntries"]},"description":"The pricing headers to create for the product line."},"priceBookHeadersForUsage":{"type":"array","items":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD. Omit for a header with no end date."},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"listPrice":{"type":"string","format":"decimal","description":"The list price for this rate-card entry, in the header currency."}},"additionalProperties":false,"required":["usageType","unitOfMeasure"]},"description":"The rate-card entries on the header. Pricing of a 'usage' line is always rate-card based."}},"additionalProperties":false,"required":["priceBookId","currency","validFrom","rateCardEntries"]},"description":"The pricing for the paired 'usage' line that the API creates. Provide only when lineType is 'prepaid', or when lineType is 'recurring' and priceModel is 'thresholdBased'. On any other line the request fails with USAGE_PRICING_NOT_APPLICABLE."}},"additionalProperties":false,"required":["lineType","priceModel","unitOfMeasure"]},"description":"The product lines to create, each with optional pricing. A 'prepaid' line, a 'recurring' line whose priceModel is 'thresholdBased', or a 'recurring' line with a trueUpEstimationMethod also creates a paired 'usage' line. Provide the pricing of a 'prepaid' or 'thresholdBased' line's paired 'usage' line in priceBookHeadersForUsage. A True-Up line's paired 'usage' line is priced with the line itself, so priceBookHeadersForUsage on it fails with USAGE_PRICING_NOT_APPLICABLE."}},"additionalProperties":false,"required":["productLines"]},"createJournalEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created journal entry."}},"additionalProperties":false,"required":["id"]},"createJournalEntryInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the journal entry."},"description":{"type":"string","description":"A free-form description of the journal entry."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Use format YYYY-MM-DD. Each line takes this as its transaction date."},"reversalDate":{"type":"string","format":"date","description":"The reversal date recorded on the header. Use format YYYY-MM-DD. This does not post a reversal. To post one, use POST accounting/journal-entries/:id/reverse."},"reversalReason":{"type":"string","description":"The reason recorded on the header for a later reversal. Accepted values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'. Any other value fails with INVALID_REVERSAL_REASON."},"reversalDescription":{"type":"string","description":"A free-form reversal description recorded on the header."},"url":{"type":"string","description":"A link to the source document this entry comes from."},"bookId":{"type":"string","description":"The accounting book this entry posts to. See id on GET accounting/books/:id."},"deriveToAllBooks":{"type":"boolean","description":"Whether to replicate the entry to every accounting book. Defaults to false. Has no effect unless multi-book accounting is enabled."},"consolidationAdjustmentType":{"const":"consolidationAdjustment","description":"Marks the entry as a consolidation adjustment. Accepted value: 'consolidationAdjustment'. Omit for a regular journal entry."},"lines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"transactionalCurrency":{"type":"string","description":"The currency of this line's debit or credit amount. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"A free-form description of the line."},"intercompanyPartnerId":{"type":"string","description":"The intercompany business partner that represents the counterparty legal entity on this line. Format: UUID. Each legal entity has one intercompany business partner, created with the entity. Send that business partner's unique identifier, not the entity's id, or the request fails with REFERENCED_RECORD_NOT_FOUND. Omit this field on lines that are not intercompany."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate from the line's transactionalCurrency to the entity's functional currency. It applies only when the two currencies differ. For a same-currency line it is 1 and any value you send is ignored. When you omit it on a foreign-currency line, it defaults to the latest rate on or before the posting date."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a department record when dimensionCode is 'department'. It must be an existing, active record. For a custom dimension, send the value's modelUuid from listCustomDimensionValues, not its integer modelId."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for this line, one per reporting dimension. Each tag pairs a dimensionCode with a modelId. A line has at most one tag per dimensionCode. The referenced record must exist and be active, or the request fails with REFERENCED_RECORD_NOT_FOUND. Omit or send an empty array for an untagged line."}},"additionalProperties":false,"required":["accountId","entityId","transactionalCurrency"]},"description":"The debit and credit lines of the entry. Each line is a debit or a credit in its transactionalCurrency."}},"additionalProperties":false,"required":["name","postingDate","bookId","lines"]},"updateInvoiceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the updated invoice. Read the invoice back with GET accounting/invoices/:id to see the recalculated totals.","examples":["f3b9c1d4-2a68-4e07-8c15-9d0b7e5a3f62"]}},"additionalProperties":false,"required":["id"]},"updateInvoiceInput":{"type":"object","properties":{"invoiceDate":{"type":"string","format":"date","description":"The date the invoice was issued. Format YYYY-MM-DD. Omit to leave unchanged. Changing it re-derives the due date from the payment term and moves which tax period the invoice falls in.","examples":["2026-09-05"]},"paymentTerm":{"type":"string","description":"The payment term governing when payment falls due, as the term's configured code. Omit to leave unchanged. An empty string is ignored rather than clearing it. This field is write-only: the read endpoints publish the resolved paymentTermDays instead of the term itself."},"customerMessage":{"type":"string","description":"A free-form message printed on the invoice for the customer. Omit to leave unchanged. It cannot be cleared through this endpoint. An empty string is ignored, not stored.","examples":["Thank you for your business."]},"purchaseOrderOverride":{"type":"string","description":"A manually entered PO number that overrides the references derived from the sales order. Omit to leave unchanged. Unlike the other fields here, pass an empty string to clear it and fall back to the sales order's own PO references."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice line to edit, as returned by GET accounting/invoices/:id. It must be a line of this invoice, and may appear at most once in the request."},"description":{"type":"string","description":"The new line description, as shown to the customer. Omit to leave unchanged."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs charged on this line, in the invoice's currency. Requires the entity's Duties and Customs feature to be enabled, and setting it recalculates the invoice's journal entry. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"The line edits to apply, each addressing one existing line of this invoice by its id. Omit to leave the lines untouched. Lines cannot be added or removed here, because the set of lines comes from the sales order's invoice plan.","examples":[[{"id":"5e2a7c81-9d34-4b06-8f19-2c7e4a0d3b58","description":"Platform subscription — September 2026","dutiesAndCustomsAmount":"45.00"}]]}},"additionalProperties":false},"getRevenueSchedulingTemplateOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue scheduling template."},"revenueSchedulingTemplateNumber":{"type":"string","description":"The template number, unique within the tenant, for example 'RST-0007'. Absent while none has been assigned."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized under this template. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"revenueSchedulingEvent":{"type":"string","description":"The event that creates a revenue plan under this template. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"amortizationMethod":{"type":"string","description":"How the scheduled amount is spread over the plan's periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. Absent when the recognition pattern does not spread revenue over time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue scheduling template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","revenueSchedulingTemplateName","revenueRecognitionPattern","revenueSchedulingEvent","lastModifiedDate"]},"startInvoiceRunOutput":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created invoice run."},"invoiceRunNumber":{"type":"string","description":"The invoice run number, for example 'ISR-1042'."},"status":{"type":"string","description":"The execution status of the run. On an async call it is 'created' or 'running'. With 'sync' set to true it is settled: 'completed', 'error', or 'completeAndError' when some invoices were created and some lines failed."},"invoicesCreated":{"type":"number","description":"The number of invoices the run has created so far. Meaningful once the run has settled. 0 on an async call that has not finished."},"unresolvedRunId":{"type":"string","description":"The unique identifier for an earlier failed run, present only when this run could produce nothing because that run's failed lines are held back. Rerun that one rather than repeating this call."},"deduplicated":{"type":"boolean","description":"True when an identical run was already in flight and this call joined it instead of starting a second. The id above is that run's. Absent when this call started the run."}},"additionalProperties":false,"required":["id","invoiceRunNumber","status","invoicesCreated"],"description":"The invoice run that was started.","examples":[{"id":"1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15","invoiceRunNumber":"ISR-1042","status":"completed","invoicesCreated":3}]}},"additionalProperties":false,"required":["data"]},"startInvoiceRunInput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order to bill. Give exactly one of 'salesOrderId', 'customerId' or 'entityId'. Alone, it bills every pending line on the order. See id on GET accounting/sales-orders/:id.","examples":["8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39"]},"customerId":{"type":"string","description":"The customer to bill, across all their sales orders. Give exactly one of the three targets. Requires 'billUpTo'. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity to bill, across every approved order in it. This is the scope the scheduled nightly run uses, and the broadest this API offers. Give exactly one of the three targets. Requires 'billUpTo'. See id on GET base/entities."},"billingDates":{"type":"array","items":{"type":"string","format":"date"},"description":"The exact planned dates to bill, for sales-order runs only. Use format YYYY-MM-DD. Only planned invoicing lines on these dates are billed. Omit to bill every pending line on the order. Not accepted on a customer or entity run, which uses billUpTo instead."},"billUpTo":{"type":"string","format":"date","description":"Customer and entity runs only. Bills everything planned on or before this date, an upper bound rather than an exact match. Use format YYYY-MM-DD. Required on both. Rejected on a sales-order run, which names exact dates instead."},"invoiceDate":{"type":"string","format":"date","description":"The date stamped on the invoices created. Use format YYYY-MM-DD. Defaults to today. Must fall in an open accounting period.","examples":["2026-09-30"]},"scope":{"type":"array","items":{"enum":["all","oneTimeAndRecurring","usageInArrears","billableProducts"]},"description":"The line types to bill. Defaults to all line types. 'oneTimeAndRecurring' covers one-time, recurring and commit lines. 'billableProducts' covers billable time, travel and expense, and pass-through."},"sync":{"type":"boolean","description":"Whether to block until the run has settled and report its final status and count. Defaults to false, which returns immediately with 'status' of 'running' for you to poll. Use it for one sales order, not for a customer-wide run.","examples":[true]}},"additionalProperties":false},"updateBookEntityAssignmentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBookEntityAssignmentInput":{"type":"object","properties":{"chartOfAccountsId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The chart of accounts the entity uses in this book. Omit to leave it unchanged; send null to clear it (not on an active entity). See id on GET accounting/chart-of-accounts/:id."},"fiscalCalendarId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal calendar the entity uses in this book. Omit to leave it unchanged; send null to clear it (not on an active entity). See id on GET accounting/fiscal-calendars/:id."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the entity uses in this book. Format ISO 4217, for example 'USD'. Omit to leave it unchanged; send null to clear it (not on an active entity).","examples":["GBP"]}},"additionalProperties":false},"bankAccountsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account."},"externalAccountId":{"type":"string","description":"The identifier this account has in the bank or aggregator it was connected from. Unique within the tenant."},"externalAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account name as reported by the bank or aggregator."},"externalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account description as reported by the bank or aggregator."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The kind of account, as free-form text. For example 'checking', 'saving' or 'creditCard'."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the account is held in. Format ISO 4217, for example 'USD'. balance is in this currency."},"balance":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The current account balance, in currency."},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A masked form of the account number, for example '****1234'. Display it instead of reference where the full number is not needed."},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full account number, the IBAN or the ACH account number."},"referenceType":{"anyOf":[{"enum":["QRR","SCOR","NON"]},{"type":"null"}],"description":"How referenceNumber is structured. Possible values: 'QRR', 'SCOR', 'NON'. 'QRR' is a Swiss QR reference, 'SCOR' an ISO 11649 creditor reference, and 'NON' none."},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A structured payment reference for payments to this account, interpreted per referenceType."},"bankAccountCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank identifier, the SWIFT/BIC code or the US routing number."},"bankAccountHolderName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name the account is held in. This is personal data."},"paymentAllowed":{"type":"boolean","description":"Whether payments may be made from this account."},"receivableAccount":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this account may be used to receive money."},"payableAccount":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this account may be used to pay money out."},"isReady":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the account is fully set up and usable."},"reconciliationStartDate":{"type":"string","format":"date","description":"The date from which this account is reconciled. Format YYYY-MM-DD. Transactions before it are not reconciled."},"transactionsImportDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date from which transactions are imported for this account. Format YYYY-MM-DD."},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the linked chart-of-accounts account."},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the linked chart-of-accounts account. This is a general-ledger account number, not the bank account number, which is reference."},"bankName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the bank this account is held at."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that owns this account."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bank account last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"productLinesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the product line."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the product. See productName on GET accounting/products/:id."},"productLineNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product line number, assigned by the system and unique within the tenant. Example: 'PL-1001'."},"name":{"type":"string","description":"The name of the product line."},"lineType":{"anyOf":[{"enum":["recurring","oneTime","commitWithOverage","payAsYouGo","usage","prepaid","billableTime","billableTravelExpense","billablePassThrough"]},{"type":"null"}],"description":"The type of product line."},"priceModel":{"anyOf":[{"enum":["flat","perUnit","tiered","volume","stairstep","rateCard","thresholdBased"]},{"type":"null"}],"description":"How the product line is priced."},"pricingTerm":{"anyOf":[{"enum":["monthly","biMonthly","once","quarterly","semiAnnually","annually"]},{"type":"null"}],"description":"The pricing term of the product line."},"invoiceFrequency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How often the product line is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"unitOfMeasure":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit the product line's quantities are measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"taxMode":{"anyOf":[{"enum":["TaxInclusive","TaxExclusive"]},{"type":"null"}],"description":"How the product line's prices are quoted for tax. Absent if no tax provider was enabled in your tenant when the product line was last saved."},"enforceListPrice":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the list price of the product line is enforced. When true, the list price comes from the price book and can't be changed on a sales order, a quote, or a subscription change. An unset value counts as true."},"hasUsage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the product line has a paired 'usage' line. True for 'prepaid' lines, and for 'recurring' lines whose priceModel is 'thresholdBased' or whose commitInvoicing or trueUpEstimationMethod has a value."},"hasBeenUsed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the product line is on at least one sales order."},"commitInvoicing":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the minimum spend commit of a 'recurring' product line is invoiced. Possible values: 'advance', 'arrears'. Absent when the product line has no minimum spend commit."},"trueUpEstimationMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the estimated quantity of a True-Up 'recurring' line is set. Possible value: 'startEstimate'. Absent when the product line is not a True-Up line."},"prepaidBalanceOverConsumptionBehavior":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What happens when usage exceeds the prepaid balance. Possible values: 'allowNegative', 'overage'. Applies only when lineType is 'prepaid'."},"prepaidBalanceRolloverAtRenewal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the remaining prepaid balance rolls over at renewal. Applies only when lineType is 'prepaid'."},"parentProductLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product line this 'usage' line is paired with. See id on GET accounting/product-lines/:id. Absent when the product line is not a paired 'usage' line."},"crmProductId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The product line's identifier in an external CRM system."},"dataSource":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system or import job that produced the product line. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the product line was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the product line last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"readGeneralLedgerOutput":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"lineOrigin":{"enum":["posted","retainedEarnings","elimination","cta","ctaElimination"],"description":"What kind of line this is, and the only field always present. 'posted' is a persisted journal entry line. The rest are derived by the ledger. 'elimination', 'cta' and 'ctaElimination' appear only when consolidated is true. 'retainedEarnings' lines appear whenever a fiscal year starts after the window's first day: they carry the prior year's result to the retained-earnings account and, when consolidated is false, also zero each income-statement account. Income-statement activity excludes them."},"accountId":{"type":"string","description":"The account this line posts to. A derived line lands on the offset account configured for its accounting process, so this is always set. Resolve it in dimensions.accounts."},"entityId":{"type":"string","description":"The entity this line belongs to. Resolve it in dimensions.entities."},"postingPeriodId":{"type":"string","description":"The accounting period this line is booked into. Resolve it in dimensions.periods."},"postingDate":{"type":"string","format":"date","description":"The posting date. Format YYYY-MM-DD. For a derived line this is the date the ledger assigns it: the first day of the fiscal year for a 'retainedEarnings' line."},"bookId":{"type":"string","description":"The accounting book this line belongs to. Resolve it in dimensions.books."},"journalEntryLineId":{"type":"string","description":"The unique identifier for the posted journal entry line. Present only when lineOrigin is 'posted'."},"journalEntryId":{"type":"string","description":"The journal entry this line belongs to. Present only when lineOrigin is 'posted'. See id on GET accounting/journal-entries/:id."},"journalEntryLineReference":{"type":"string","description":"A human-readable reference to this line within its journal entry. Present only when lineOrigin is 'posted', and can be absent on some posted lines, as the INCOMPLETE_TRANSACTION_REFERENCES warning reports."},"transactionReference":{"type":"string","description":"A reference to the business transaction that produced this line. Present only when lineOrigin is 'posted', and can be absent, as INCOMPLETE_TRANSACTION_REFERENCES reports."},"lineType":{"type":"string","description":"The classification of this line within its journal entry, for example 'standard', 'tax', 'offset' or 'fxRoundingDifference'. A system-assigned value. Absent on a derived line."},"description":{"type":"string","description":"The line description."},"intercompanyPartnerId":{"type":"string","description":"The intercompany counterparty for this line. Set on an intercompany line."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this value is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'. Every custom dimension uses the code 'custom', and dimensions.reportingTagDimensions names which one a value belongs to."},"modelId":{"type":"string","description":"The dimension record this value points to, on the model that dimensionCode names."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"Every dimension value on this line, one entry each: department, business unit, value center, employee, customer, vendor and product, alongside any custom dimension. Absent when the line has no dimension, which is normal for a derived line. Resolve each entry in dimensions.reportingTagDimensions."},"transactionalCurrency":{"type":"string","description":"The currency the business event happened in. Format ISO 4217, for example 'USD'. Absent on a derived line, which has no transactional amount."},"transactionalDebit":{"type":"string","format":"decimal","description":"The debit in the transactional currency. A line has either a debit or a credit, not both."},"transactionalCredit":{"type":"string","format":"decimal","description":"The credit in the transactional currency. A line has either a debit or a credit, not both."},"transactionalAmount":{"type":"string","format":"decimal","description":"transactionalDebit minus transactionalCredit. Negative for a net credit. To read it in an account's natural direction, with revenue and expense both positive, multiply by the sign that normalBalance implies on the account in dimensions.accounts."},"functionalDebit":{"type":"string","format":"decimal","description":"The debit in the functional currency the posting entity keeps in the requested book (currency on book entity assignments)."},"functionalCredit":{"type":"string","format":"decimal","description":"The credit in the functional currency the posting entity keeps in the requested book (currency on book entity assignments)."},"functionalAmount":{"type":"string","format":"decimal","description":"functionalDebit minus functionalCredit."},"functionalExchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the transactional amount into the functional currency. Absent on a derived line, which has no transactional amount."},"consolidatedDebit":{"type":"string","format":"decimal","description":"The debit in the consolidating parent's currency. Present only when consolidated is true. The currency is consolidationCurrency at the top of this response, since it is the same for every line."},"consolidatedCredit":{"type":"string","format":"decimal","description":"The credit in the consolidating parent's currency. Present only when consolidated is true."},"consolidatedAmount":{"type":"string","format":"decimal","description":"consolidatedDebit minus consolidatedCredit. Present only when consolidated is true."},"consolidationExchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the functional amount into the consolidation currency. Which rate this is depends on the account's exchangeRateType in dimensions.accounts. Present only when consolidated is true."},"preConsolidationAccountId":{"type":"string","description":"The account this line was posted to before consolidation account mapping. Present only when consolidated is true and the account was mapped. Resolve it in dimensions.accounts, which contains both the mapped and the pre-consolidation accounts."},"preConsolidationEntityId":{"type":"string","description":"The child entity that posted this line, before it rolled into the parent. Present only when consolidated is true. Resolve it in dimensions.entities."},"preConsolidationPostingPeriodId":{"type":"string","description":"The period this line sat in before it was re-dated into the parent's fiscal calendar. Differs from postingPeriodId when the parent and child keep different calendars. Present only when consolidated is true. Resolve it in dimensions.periods."}},"additionalProperties":false,"required":["lineOrigin","accountId","entityId","postingPeriodId","postingDate","bookId"]},"description":"The ledger's movements, ordered by posting date, then journal entry, then line. The ids on each line resolve in dimensions. A posted line has journalEntryLineId and journalEntryId to reach the underlying record. A derived line is computed per request and has no id of its own."},"dimensions":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account. See id on GET accounting/accounts/:id."},"accountNumber":{"type":"string","description":"The account number."},"accountName":{"type":"string","description":"The name of the account."},"accountType":{"type":"string","description":"The top-level classification of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'."},"accountSubType":{"type":"string","description":"A finer classification within accountType. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Absent when none is assigned."},"normalBalance":{"enum":["debit","credit"],"description":"Whether the account's natural direction is a debit or a credit. Multiply a signed amount by +1 for 'debit' and -1 for 'credit' to read it with revenue and expense both positive."},"exchangeRateType":{"enum":["current","average","historical"],"description":"Which rate translates this account's functional amounts into the consolidation currency."}},"additionalProperties":false,"required":["id","accountNumber","accountName","accountType","normalBalance"]},"description":"The accounts referenced by any line, including pre-consolidation source accounts. The field names follow the accounts endpoint, so you can join the two without a mapping table."},"entities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entity. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the entity."},"functionalCurrency":{"type":"string","description":"The entity's default currency (currency on GET base/entities). Format ISO 4217, for example 'USD'. The functional amounts on its lines are in the currency the entity keeps in the requested book (currency on book entity assignments), which can differ."}},"additionalProperties":false,"required":["id","entityName"]},"description":"The entities referenced by any line, including pre-consolidation child entities."},"periods":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the accounting period. See accountingPeriodId on GET accounting/accounting-periods."},"periodName":{"type":"string","description":"The period name, as its fiscal calendar defines it."},"fiscalYear":{"type":"string","description":"The fiscal year this period belongs to."},"startDate":{"type":"string","format":"date","description":"The first day of the period. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id","periodName","fiscalYear","startDate","endDate"]},"description":"The accounting periods referenced by any line, including pre-consolidation periods."},"books":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the accounting book. See id on GET accounting/books/:id."},"name":{"type":"string","description":"The name of the book."},"bookType":{"enum":["full","adjustment"],"description":"Whether this book is a full book or an adjustment book. An adjustment book has only the deltas layered over its base book, so read it together with its base and add the two rather than read either alone."},"accountingStandard":{"type":"string","description":"The accounting standard this book reports under, by name, for example 'IFRS', 'US GAAP' or a local standard. A tenant defines its own standards, so treat an unrecognized value as data rather than an error. Absent on a book that declares none."}},"additionalProperties":false,"required":["id","name","bookType"]},"description":"The books referenced by any line: the requested book, and its base book when an adjustment book was requested."},"reportingTagDimensions":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this record is for, matching the dimensionCode on the lines' reportingTags. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this entry describes, matching the modelId on the lines' reportingTags. The pair (dimensionCode, modelId) is the key."},"code":{"type":"string","description":"The record's own business code, such as a department number, a customer number or a value center code. Absent for a dimension that keeps no code."},"name":{"type":"string","description":"The display name of the dimension record."},"customDimensionId":{"type":"string","description":"The custom dimension this record belongs to. Present only for a 'custom' value, where several dimensions share one model and are told apart only by this. See id on GET base/custom-dimensions."}},"additionalProperties":false,"required":["dimensionCode","modelId","name"]},"description":"Every dimension record referenced by a reportingTags entry on any line, named once however many lines reference it. One list for every dimension: department, business unit, value center, employee, customer, vendor, product, team, location, region and the custom dimensions all resolve here, so adding a dimension adds entries rather than a collection. A record that has since been deactivated is still named, because a posted line legitimately references one."}},"additionalProperties":false,"description":"Display values for the ids on the lines, each appearing once however many lines reference it. A collection is present only when its name was in the dimensions input, which defaults to all of them. Accounts, entities and periods contain both the consolidated and the pre-consolidation records, so every id on every line resolves."},"consolidationCurrency":{"type":"string","description":"The consolidating parent's currency, the currency of every consolidated amount in this response. Stated once because it is the same for every line. Format ISO 4217, for example 'USD'. Present only when consolidated is true."}},"additionalProperties":false,"required":["lines","dimensions"]},"readGeneralLedgerInput":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book to read. Exactly one book per request. An adjustment book automatically includes its base book. See id on GET accounting/books/:id."},"entityId":{"type":"string","description":"The entity to read. When consolidated is false, this is the posting entity. When true, this is the consolidating parent, and the response covers its whole hierarchy, with each line also carrying preConsolidationEntityId naming the child that posted it. Exactly one entity per request. See id on GET base/entities."},"consolidated":{"type":"boolean","description":"Whether to return the consolidated ledger for entityId and its hierarchy. When true, amounts are also translated into the parent's currency and elimination and CTA lines appear. When false, this returns the entity's own ledger with no translation, elimination or CTA."},"postingDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive start of the window. Use format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive end of the window. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["start","end"],"description":"A window on the posting date, the date a line was booked. Supply exactly one of postingDate or accountingPeriod. Both bounds are inclusive. The window may span at most 366 days."},"accountingPeriod":{"type":"object","properties":{"startPeriodId":{"type":"string","description":"The first accounting period in the window. See accountingPeriodId on GET accounting/accounting-periods."},"endPeriodId":{"type":"string","description":"The last accounting period in the window, read the same way."}},"additionalProperties":false,"required":["startPeriodId","endPeriodId"],"description":"A window on the accounting period, the period a line was booked into. Supply exactly one of postingDate or accountingPeriod. Both bounds are inclusive. The resolved period dates may span at most 366 days."},"filters":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"},"description":"Restrict to these accounts. Naming a derived line's offset account returns that line with its amount computed across all accounts. Omitting it drops the line, so a partial CTA is never returned. See id on GET accounting/accounts/:id."},"lineOrigins":{"type":"array","items":{"enum":["posted","retainedEarnings","elimination","cta","ctaElimination"]},"description":"Restrict to these kinds of line. Omit for all kinds. Pass ['posted'] for posted journal entry lines only, excluding everything the ledger derives."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this filter is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this filter points to, on the model that dimensionCode names."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"Restrict to lines carrying all of these dimension values. This is the one dimension filter: every dimension is filtered here, whether the ledger stores it as a column, such as department, business unit, value center, employee, customer or vendor, or as a tag, such as a custom dimension, product, team, location or region. Naming two values of the same dimension matches nothing, since a line has one value per dimension. A value that does not exist matches nothing rather than failing."}},"additionalProperties":false,"description":"Narrows which lines are returned, pushed down into the ledger computation wherever the ledger can express it. Derived amounts stay honest: a filter naming a derived line's offset account, such as CTA, translation elimination or retained earnings, is computed across every line in scope, and a filter that excludes those accounts drops those lines rather than returning a partial figure. Because derived lines carry almost no dimensions, any dimension filter drops nearly every retained-earnings, elimination and CTA line, so the returned lines no longer sum to a balanced ledger and the response carries a RESULT_DOES_NOT_TIE_OUT warning. lineOrigins is applied to the computed result rather than pushed down, as are tags on a dimension the ledger does not index."},"dimensions":{"type":"array","items":{"enum":["accounts","entities","periods","books","reportingTagDimensions"]},"description":"Which dimension dictionaries to return in dimensions. Omit for all of them, or pass an empty array for none. This never changes the lines: every id is always present on every line. An unrecognized name fails input validation."}},"additionalProperties":false,"required":["bookId","entityId","consolidated"]},"deleteAccountingProductLinePricingOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePriceBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the updated price book."}},"additionalProperties":false,"required":["id"]},"updatePriceBookInput":{"type":"object","properties":{"priceBookName":{"type":"string","description":"A new display name. Omit to leave it unchanged. It must stay unique within the tenant, compared case-insensitively. The price book's own current name is not a collision."},"active":{"type":"boolean","description":"A new active flag. Omit to leave it unchanged."},"description":{"type":"string","description":"A new description. Omit to leave it unchanged."},"dataSource":{"type":"string","description":"A new data source. Omit to leave it unchanged."}},"additionalProperties":false},"accountingPeriodsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this entity-book accounting period row. This identifies the (entity, book, period) combination, not the shared accounting period."},"accountingPeriodId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the underlying accounting period, shared by every entity that uses this fiscal calendar. See id on GET accounting/accounting-periods/:id."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the legal entity this status belongs to. See id on GET base/entities. Absent only when the entity-book link is broken."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this status belongs to."},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the accounting book this status belongs to. A period is opened and closed per book. See id on GET accounting/books/:id."},"bookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the accounting book this status belongs to."},"fiscalCalendarId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the fiscal calendar this period belongs to. See id on GET accounting/fiscal-calendars/:id. Absent when the period was deleted from under its status row."},"fiscalCalendarName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the fiscal calendar this period belongs to."},"periodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the period as its fiscal calendar defines it, for example 'Jan 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"fiscalYear":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal year label this period belongs to, for example 'FY2024'. Set by the calendar, so it need not match the calendar year of startDate. It is a label, not a number: a filter must match its spelling exactly, so read the distinct values first. A fiscal year runs from the earliest startDate to the latest endDate of its periods for one entity and book."},"fiscalQuarter":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal quarter label this period belongs to, for example 'Q1 2026'."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period, inclusive. Format YYYY-MM-DD. Absent only when the underlying period was deleted."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period, inclusive. Format YYYY-MM-DD."},"status":{"enum":["open","closed","created","reopened"],"description":"The status this entity and book have put the period in. Possible values: 'created' (generated, not yet opened), 'open', 'closed', 'reopened'. Only 'open' and 'reopened' accept postings."},"reopeningReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The free-text reason recorded when the period was reopened. Set only when status is 'reopened'."},"reopenedByCascade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this period was reopened as a side effect of reopening a later one, rather than directly."},"durationDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days the period spans, both bounds inclusive. Absent when startDate or endDate is."},"hasTransactions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether at least one journal entry line has been posted into the underlying period, by any entity."},"postable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the period currently accepts postings for this entity and book, true when its status is 'open' or 'reopened'. This does not account for journal-type-specific locks."},"postableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the period does not accept postings, for example 'status is closed'. Empty when it is postable."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this status row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It changes when the period is opened, closed or reopened for this entity and book."}},"additionalProperties":false},"bulkCreateInvoiceMilestonesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created invoice milestone."}},"additionalProperties":false,"required":["id"]},"description":"The created milestones, in the same order as the input. Match rows to inputs by index.","examples":[[{"id":"4b8f2d61-0c3e-4f7a-9a15-6e2d8c90b7a4"},{"id":"7a1c3e95-5d20-4b6f-8e34-0f9b2d6c1a87"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateInvoiceMilestonesInput":{"type":"object","properties":{"invoiceMilestones":{"type":"array","items":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"The sales order whose product lines the milestone bills."},"description":{"type":"string","description":"What the milestone stands for, as it appears on the invoice line."},"orderSequence":{"type":"number","description":"The milestone's position among the sales order's milestones."},"percentage":{"type":"string","format":"decimal","description":"The share of the sales order the milestone bills, in percent. A number, not an amount; it is stored as given."},"projectedDate":{"type":"string","format":"date","description":"When the milestone is expected to be reached. Format YYYY-MM-DD."},"amount":{"type":"string","format":"decimal","description":"The amount the milestone bills, in the sales order currency. Must be greater than zero."},"salesOrderProductLineIds":{"type":"array","items":{"type":"string"},"description":"The Milestone-invoiced product lines of the sales order the milestone bills. At least one."}},"additionalProperties":false,"required":["salesOrderId","amount","salesOrderProductLineIds"]},"description":"The milestones to create. If any row is invalid, or an order's milestones would not add up, nothing is created.","examples":[[{"salesOrderId":"0e6a7c15-93d2-4b48-8f61-2c5b9a3d7e10","description":"Kick-off","orderSequence":1,"percentage":"60","projectedDate":"2026-11-15","amount":"6000.00","salesOrderProductLineIds":["9d1f6b34-2e7a-4c58-b0a9-71c3e5f28d46"]},{"salesOrderId":"0e6a7c15-93d2-4b48-8f61-2c5b9a3d7e10","description":"Go-live","orderSequence":2,"percentage":"40","projectedDate":"2026-12-01","amount":"4000.00","salesOrderProductLineIds":["9d1f6b34-2e7a-4c58-b0a9-71c3e5f28d46"]}]]}},"additionalProperties":false,"required":["invoiceMilestones"]},"creditMemosRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo."},"creditMemoNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The credit memo number, for example 'CM-1'. Absent while none has been assigned."},"creditMemoDate":{"type":"string","format":"date","description":"The date the credit memo was issued. Format YYYY-MM-DD."},"creditMemoStatus":{"anyOf":[{"enum":["appliedInFull","partiallyApplied","unapplied"]},{"type":"null"}],"description":"The application status of the credit memo."},"creditMemoType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the credit memo was created. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn', 'trueUp'. Only 'manual' credit memos are created through this API. The rest come from internal workflows."},"manualCreditMemoType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason for a manual credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Absent when creditMemoType is not 'manual'."},"currency":{"type":"string","description":"The currency of the credit memo. Every amount on the record, its lines and its application rows is in this currency. Format ISO 4217, for example 'USD'."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the credit memo."},"externalCreditMemoId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this credit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer the credit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer the credit memo is issued to."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number of the customer the credit memo is issued to."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that issued the credit memo. See id on GET base/entities."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that issued the credit memo."},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice the credit memo was created from. Absent when it was not created from an invoice. See id on GET accounting/invoices/:id."},"invoiceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the invoice the credit memo was created from. Present whenever invoiceId is."},"subtotal":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The subtotal before tax and duties, in the credit memo currency. Absent when no subtotal has been computed."},"totalTax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total tax across all lines, in the credit memo currency."},"totalDutiesAndCustoms":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total duties and customs across all lines, in the credit memo currency."},"totalAmountCredited":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total credited, including tax and duties, in the credit memo currency."},"appliedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount applied to invoices and debit memos so far, in the credit memo currency. This is the net of the application rows below."},"unappliedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount still available to apply, in the credit memo currency. For an earlier date, take totalAmountCredited less the appliedAmount of its credit memo applications with appliedDate on or before it."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the credit memo last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createBankEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bank entry.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createBankEntryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the entry is posted under. See id on GET base/entities.","examples":["e8dc29b9-7e79-4709-bb32-95938bcb1bd1"]},"bankAccountId":{"type":"string","description":"The general-ledger account behind the bank account this entry posts against. See id on GET accounting/accounts/:id.","examples":["f50164c3-85e3-4dab-986e-3fdb39f8ecc1"]},"transactionDate":{"type":"string","format":"date","description":"The date the transaction took place. Use format YYYY-MM-DD. It decides the posting period.","examples":["2026-02-14"]},"currency":{"type":"string","description":"The currency of the entry. Format ISO 4217, for example 'USD'. It governs every amount on the entry. Omit to use the account's own currency. When supplied it must match the account's currency.","examples":["USD"]},"status":{"type":"string","description":"The reconciliation status. Accepted values: 'matched', 'unmatched', 'voided', 'integrated'. Defaults to 'unmatched'.","examples":["unmatched"]},"name":{"type":"string","description":"A short name for the entry.","examples":["February bank fees"]},"description":{"type":"string","description":"A free-form description of the entry."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD."},"origin":{"type":"string","description":"The system or process the entry originated from."},"externalUrl":{"type":"string","description":"A link to the entry in the originating system."},"lines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage or taxCodeId is supplied. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The line's cost moves to that entity through an intercompany cross charge journal entry. It must differ from entityId, cross charging must be set up for both entities, and the line must not be prepaid, or the request fails with CROSS_CHARGE_INVALID."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. Supplying it requires businessPartnerId. It must match exactly one active tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. It fills the VAT rate, VAT account and reverse-charge account the line does not state. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a region record when dimensionCode is 'region'."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for this line, at most one per reporting dimension. Each tag pairs a dimensionCode with a modelId, and the referenced record must exist. A department or businessUnit tag must agree with departmentId or businessUnitId when both are sent. Omit or send an empty array for a line tagged only by departmentId and businessUnitId."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Required, because the schedule lines are created from it when the entry's journal entry is posted."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. Only a prepaid line may carry them: on any other line they are refused with AMORTIZATION_NOT_ALLOWED_ON_LINE. Because lineType is derived from the account's sub-type when omitted, a line that resolves to a non-prepaid account is refused the same way."}},"additionalProperties":false,"required":["accountId","amount"]},"description":"The lines of the entry, in the order they appear. At least one is required. No line may be zero, and the lines may not sum to zero.","examples":[[{"accountId":"9994c3ed-f812-44c1-9454-7f36b2bfb0fb","amount":"-125.00","description":"Account maintenance fee","lineType":"oneTime"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createBankEntry` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createBankEntry, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the entry, each an uploaded file sent as `file` (see `file` below). Required on a tenant configured to require an attachment."}},"additionalProperties":false,"required":["entityId","bankAccountId","transactionDate","lines"]},"getBankAccountOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account."},"externalAccountId":{"type":"string","description":"The identifier this account has in the bank or aggregator it was connected from. Unique within the tenant."},"externalAccountName":{"type":"string","description":"The account name as reported by the bank or aggregator."},"externalDescription":{"type":"string","description":"The account description as reported by the bank or aggregator."},"type":{"type":"string","description":"The kind of account, as free-form text. For example 'checking', 'saving' or 'creditCard'."},"currency":{"type":"string","description":"The currency the account is held in. Format ISO 4217, for example 'USD'. balance is in this currency."},"balance":{"type":"string","format":"decimal","description":"The current account balance, in currency."},"mask":{"type":"string","description":"A masked form of the account number, for example '****1234'. Display it instead of reference where the full number is not needed."},"reference":{"type":"string","description":"The full account number, the IBAN or the ACH account number."},"referenceType":{"type":"string","description":"How referenceNumber is structured. Possible values: 'QRR', 'SCOR', 'NON'. 'QRR' is a Swiss QR reference, 'SCOR' an ISO 11649 creditor reference, and 'NON' none."},"referenceNumber":{"type":"string","description":"A structured payment reference for payments to this account, interpreted per referenceType."},"bankAccountCode":{"type":"string","description":"The bank identifier, the SWIFT/BIC code or the US routing number."},"bankAccountHolderName":{"type":"string","description":"The name the account is held in. This is personal data."},"paymentAllowed":{"type":"boolean","description":"Whether payments may be made from this account."},"receivableAccount":{"type":"boolean","description":"Whether this account may be used to receive money."},"payableAccount":{"type":"boolean","description":"Whether this account may be used to pay money out."},"isReady":{"type":"boolean","description":"Whether the account is fully set up and usable."},"reconciliationStartDate":{"type":"string","format":"date","description":"The date from which this account is reconciled. Format YYYY-MM-DD. Transactions before it are not reconciled."},"transactionsImportDate":{"type":"string","format":"date","description":"The date from which transactions are imported for this account. Format YYYY-MM-DD."},"accountId":{"type":"string","description":"The chart-of-accounts account this bank account is linked to. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the linked chart-of-accounts account."},"accountNumber":{"type":"string","description":"The number of the linked chart-of-accounts account. This is a general-ledger account number, not the bank account number, which is reference."},"bankName":{"type":"string","description":"The name of the bank this account is held at."},"financialInstitutionId":{"type":"string","description":"The financial institution this account is held at. There is no endpoint for it."},"entityId":{"type":"string","description":"The legal entity that owns this account. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this account."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank account last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","externalAccountId","paymentAllowed","reconciliationStartDate","lastModifiedDate"]},"voidBankEntryOutput":{"type":"object","properties":{},"additionalProperties":false},"voidBankEntryInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the entry is being voided. It is stored on the entry for the audit trail. An empty or whitespace-only string is refused.","examples":["Duplicate of BE-4471"]}},"additionalProperties":false,"required":["voidReason"]},"updateChartOfAccountsOutput":{"type":"object","properties":{},"additionalProperties":false},"updateChartOfAccountsInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the chart of accounts. Must not be empty. Omit to leave unchanged.","examples":["US GAAP Chart of Accounts (2026)"]},"description":{"type":"string","description":"A free-form description of the chart of accounts. Omit to leave unchanged. Send an empty string to clear it."},"accountNumbering":{"type":"string","description":"How account numbers are assigned within this chart of accounts. Accepted values: 'hierarchical', 'manual'. Can change only while the chart of accounts has no accounts, draft accounts included; after that a different value fails with FIELD_NOT_UPDATABLE. Omit to leave unchanged."},"accountNumberingDigits":{"type":"string","description":"The total width of an account number. Accepted values: 'sixDigits', 'sevenDigits', 'eightDigits', 'nineDigits', 'tenDigits'. Applies only to hierarchical numbering; a value other than the current one is not accepted when accountNumbering is, or stays, 'manual'. Can change only while the chart of accounts has no accounts, draft accounts included; after that a different value fails with FIELD_NOT_UPDATABLE. Omit to leave unchanged."}},"additionalProperties":false},"fiscalCalendarsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fiscal calendar."},"calendarName":{"type":"string","description":"The name of the fiscal calendar, unique within the tenant."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the fiscal calendar. Absent when none has been set."},"periodFormat":{"oneOf":[{"const":"calendarMonths","description":"Twelve monthly periods."},{"const":"4-4-5","description":"Retail quarters of thirteen weeks, split into periods of 4, 4 and 5 weeks."},{"const":"4-5-4","description":"Retail quarters of thirteen weeks, split into periods of 4, 5 and 4 weeks."},{"const":"5-4-4","description":"Retail quarters of thirteen weeks, split into periods of 5, 4 and 4 weeks."}],"description":"How the fiscal calendar divides a fiscal year into periods."},"status":{"anyOf":[{"enum":["new","active","deactivated"]},{"type":"null"}],"description":"The lifecycle status of the fiscal calendar. Absent when none has been set."},"fiscalYearsCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of distinct fiscal years on this calendar. Absent until the first fiscal year exists."},"anchorDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The anchor reference date, set only for retail calendars (a '4-4-5', '4-5-4' or '5-4-4' periodFormat). It is the last day of the month before the first period starts. Format YYYY-MM-DD. Absent on a calendarMonths calendar."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fiscal calendar last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the accounting book."},"name":{"type":"string","description":"The display name of the accounting book."},"type":{"type":"string","description":"The kind of accounting book. Possible values: 'full', 'adjustment'. An adjustment book adjusts the full book named in baseBookId."},"accountingStandard":{"type":"string","description":"The accounting standard the book follows, for example 'IFRS' or 'US GAAP'. Absent when none is set."},"consolidation":{"type":"boolean","description":"Whether the book consolidates other books or entities."},"description":{"type":"string","description":"A free-form description of the accounting book. Absent when none is set."},"baseBookId":{"type":"string","description":"The full book this adjustment book adjusts. Absent for a full book. See id on GET accounting/books/:id."},"allEntities":{"type":"boolean","description":"Whether the book is marked as assigned to all legal entities: none of its legal entities can be removed from it. The flag assigns no legal entity by itself. A book created with allEntities: true starts with every legal entity assigned; one switched on later keeps the legal entities it had. The assignments are listed by GET accounting/books/entity-assignments."},"exchangeRateGroupId":{"type":"string","description":"The exchange rate group the book takes its exchange rates from. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the accounting book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","type","consolidation","lastModifiedDate"]},"createDebitMemoOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created debit memo.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"debitMemoNumber":{"type":"string","description":"The debit memo number, for example 'DM-1'. A standalone debit memo that isn't approved yet carries a placeholder such as 'DRAFT-3' instead, and gets its number when it's approved. Absent while none has been assigned.","examples":["DM-1042"]},"creditMemoId":{"type":"string","description":"The source credit memo this debit memo settles. See id on GET accounting/credit-memos/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"creditMemoNumber":{"type":"string","description":"The number of the source credit memo. Present whenever creditMemoId is."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo was issued. Format YYYY-MM-DD.","examples":["2026-08-01"]},"dueDate":{"type":"string","format":"date","description":"The date the debit memo falls due. Format YYYY-MM-DD. As supplied, or computed from debitMemoDate plus the payment term's days.","examples":["2026-08-31"]},"taxDate":{"type":"string","format":"date","description":"The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate."},"approvalStatus":{"type":"string","description":"The approval status of the new debit memo: 'approved' for a debit memo from a credit memo, which is approved as it's created, and 'draft' for a standalone one.","examples":["approved"]},"debitMemoStatus":{"type":"string","description":"The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull'. Absent before approval. Not refreshed daily: it is recomputed on approval, when an approved debit memo's date or due date changes, and whenever a payment or credit is applied to it or unapplied. So a partly covered debit memo stays 'partiallyPaid' past its due date, and 'isOverdue' appears on an uncovered one only once a recompute runs after the due date."},"debitMemoType":{"type":"string","description":"The reason key for the charge, as supplied or inherited from the source credit memo, for example 'orderEntryError'. Always 'standaloneCharge' on a standalone debit memo.","examples":["orderEntryError"]},"currency":{"type":"string","description":"The currency of the debit memo, taken from the source credit memo or, on a standalone debit memo, from the customer. Format ISO 4217, for example 'USD'. It governs every amount on the record.","examples":["USD"]},"customerId":{"type":"string","description":"The customer the debit memo is issued to: the source credit memo's, or the one sent for a standalone debit memo. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"customerName":{"type":"string","description":"The display name of the customer."},"customerNumber":{"type":"string","description":"The customer number."},"entityId":{"type":"string","description":"The legal entity that issued the debit memo, taken from the source credit memo or, on a standalone debit memo, from the customer. See id on GET base/entities.","examples":["1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45"]},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"paymentTerm":{"type":"string","description":"The payment-term key applied to the debit memo. See code on GET accounting/payment-terms.","examples":["net30"]},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"customerMessage":{"type":"string","description":"A free-text message shown to the customer on the document."},"externalDebitMemoId":{"type":"string","description":"The identifier of this debit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"isMigrated":{"type":"boolean","description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed."},"debitGlAccountId":{"type":"string","description":"The general ledger account the journal entry debits for the debit memo's full amount. Absent when you didn't send one. The journal entry then uses the entity's customer receivables account. See id on GET accounting/accounts/:id."},"billToAddressId":{"type":"string","description":"The bill-to address on the document. There is no endpoint for it.","examples":["9f3e6d81-b7d0-4aec-8c3f-2e8f70b13a45"]},"soldToAddressId":{"type":"string","description":"The sold-to address on the document. There is no endpoint for it.","examples":["b7d0aec3-9f3e-4d81-8c3f-6d81b7d0aec3"]},"subtotal":{"type":"string","format":"decimal","description":"The sum of the lines' pre-discount totals, in the debit memo currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total including tax, in the debit memo currency.","examples":["500.00"]},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the debit memo currency."},"totalAmountDebited":{"type":"string","format":"decimal","description":"The gross amount debited, in the debit memo currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of the prorated discount amounts across all lines, in the debit memo currency."},"unappliedCreditAmount":{"type":"string","format":"decimal","description":"The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T09:12:44.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo line."},"lineNumber":{"type":"string","description":"The sequential line number within the debit memo."},"description":{"type":"string","description":"A free-text line description, shown to the customer."},"productId":{"type":"string","description":"The debited product. Absent on a free-text line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line the line bills. Absent unless a standalone line names one."},"creditMemoLineId":{"type":"string","description":"The source credit memo line this line debits. Absent on a standalone debit memo. See lines[].id on GET accounting/credit-memos/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit as it stood on the source credit memo line, in the debit memo currency."},"listPriceTotal":{"type":"string","format":"decimal","description":"The pre-discount line total, in the debit memo currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount from the source credit memo line, in the debit memo currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount as a percentage of the list price. A percentage, not an amount, so it has no currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency."},"amountDebited":{"type":"string","format":"decimal","description":"The amount debited for the line, in the debit memo currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount of the source credit memo line still available to debit, in the debit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"taxMode":{"type":"string","description":"How the line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code applied to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. See id on GET accounting/accounts/:id."},"vatAccountingType":{"enum":["domesticStandardRate","domesticReducedRate","domesticSalesZeroRated","domesticSalesExempt","vatIntraEuStandardRate","vatIntraEuReducedRate","nonEuExempt","reverseCharge"],"description":"The VAT type of the line. Absent unless a standalone line carries one."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array or absent when the line has none."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the created debit memo, each with its assigned id and line number."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The debit memo's identifiers in other systems, one per configured field name. An empty array or absent when the debit memo has none."}},"additionalProperties":false,"required":["id","debitMemoDate","debitMemoType","currency","customerId","entityId","paymentTerm","billToAddressId","soldToAddressId","lastModifiedDate"]},"createDebitMemoInput":{"type":"object","properties":{"creditMemoId":{"type":"string","description":"The source credit memo this debit memo settles. The customer, legal entity and currency come from this credit memo, not the request. Omit it to create a standalone debit memo, and send customerId instead. See id on GET accounting/credit-memos/:id.","examples":["5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34"]},"customerId":{"type":"string","description":"The customer a standalone debit memo is issued to. Required when creditMemoId is omitted; the legal entity, currency and default addresses come from this customer. Sending it together with creditMemoId fails with FIELD_NOT_ALLOWED. See id on GET accounting/customers/:id."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo is issued. Use format YYYY-MM-DD. Unless isMigrated is true, it must fall in an open accounting period, or the request fails with ACCOUNTING_PERIOD_CLOSED, or ACCOUNTING_PERIOD_NOT_FOUND when no period covers it.","examples":["2026-08-01"]},"paymentTerm":{"type":"string","description":"The payment-term key to apply. When dueDate is omitted, it is computed from debitMemoDate plus this term's days. An unknown key fails with PAYMENT_TERM_NOT_FOUND. See code on GET accounting/payment-terms.","examples":["net30"]},"debitMemoType":{"type":"string","description":"The reason key for the charge, for example 'orderEntryError'. Omit to inherit the source credit memo's reason key; when neither supplies one the call fails with MISSING_REQUIRED_FIELD. The accepted keys are configured per tenant. A standalone debit memo is always 'standaloneCharge', and any other value fails with INVALID_ENUM_VALUE.","examples":["orderEntryError"]},"dueDate":{"type":"string","format":"date","description":"The date the debit memo falls due. Use format YYYY-MM-DD. Omit to compute it from debitMemoDate plus the payment term's days. Must not be before debitMemoDate, or the request fails with DUE_DATE_BEFORE_DEBIT_MEMO_DATE."},"taxDate":{"type":"string","format":"date","description":"The date to determine tax on. Use format YYYY-MM-DD. Omit to use debitMemoDate."},"billToAddressId":{"type":"string","description":"The bill-to address for the document. Omit to inherit the source credit memo's, or the customer's default bill-to address on a standalone debit memo. When neither supplies one the call fails with MISSING_REQUIRED_FIELD. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address for the document. Omit to inherit the source credit memo's, or the customer's default sold-to address on a standalone debit memo. When neither supplies one the call fails with MISSING_REQUIRED_FIELD. There is no endpoint for it."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference to record on the document.","examples":["PO-88213"]},"customerMessage":{"type":"string","description":"A free-text message to show the customer on the document."},"debitGlAccountId":{"type":"string","description":"The general ledger account the journal entry debits for the debit memo's full amount. Omit to use the entity's customer receivables account. See id on GET accounting/accounts/:id."},"isMigrated":{"type":"boolean","description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning, its journal entries are auto-reversed, and the open-accounting-period check on debitMemoDate is skipped. Defaults to false."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The debit memo's identifiers in other systems, one per configured field name. Each fieldName must be the fieldName of an existing debit-memo external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"lines":{"type":"array","items":{"type":"object","properties":{"creditMemoLineId":{"type":"string","description":"The source credit memo line this line debits. Required on a debit memo from a credit memo, and must be a line of the credit memo named by creditMemoId, or the request fails with CREDIT_MEMO_LINE_NOT_FOUND. The debit memo line inherits its tax-exclusion state from that source line. Not accepted on a standalone debit memo. See lines[].id on GET accounting/credit-memos/:id."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency (see currency). Must be greater than 0."},"description":{"type":"string","description":"A free-text line description, shown to the customer. Required on a standalone line that names no product."},"productId":{"type":"string","description":"The product the line refers to. Omit on a free-text line, or on a standalone line that names its productLineId. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line the line bills, on a standalone debit memo only. Its product, unit of measure and tax mode apply when you leave those out. Must be a line of productId when you send both, or the request fails with PRODUCT_LINE_NOT_FOUND."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency. Required on a standalone line that names a product."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'. An unrecognized value fails with INVALID_ENUM_VALUE. Defaults to the product line's on a standalone line that names one."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency (see currency). Required on a standalone line that names a product."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency (see currency)."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency (see currency). Omit to have the tax engine determine it."},"taxCode":{"type":"string","description":"The tax code to apply to the line."},"taxDate":{"type":"string","format":"date","description":"The date to determine the line's tax on. Use format YYYY-MM-DD."},"taxMode":{"enum":["taxInclusive","taxExclusive"],"description":"How the line's prices are quoted for tax. Defaults to the product line's on a standalone line that names one."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code to apply to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. Required on a standalone line that names no product. See id on GET accounting/accounts/:id."},"vatAccountingType":{"enum":["domesticStandardRate","domesticReducedRate","domesticSalesZeroRated","domesticSalesExempt","vatIntraEuStandardRate","vatIntraEuReducedRate","nonEuExempt","reverseCharge"],"description":"The VAT type of the line, on a standalone debit memo only. Required on every standalone line when the legal entity has VAT enabled and no tax engine."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Use format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Use format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. Each fieldName must be the fieldName of an existing debit-memo-line external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."}},"additionalProperties":false,"required":["totalPrice"]},"description":"The lines of the debit memo. At least one is required, or the request fails with NO_LINES. Every amount is in the debit memo's currency: the source credit memo's, or the customer's on a standalone debit memo.","examples":[[{"creditMemoLineId":"7d34c8e9-b21f-4a5c-9f3e-6d81b7d0aec3","description":"Re-debit of over-credited licence fee","quantity":"2","unitOfMeasure":"license","unitPrice":"250.00","totalPrice":"500.00"}]]}},"additionalProperties":false,"required":["debitMemoDate","paymentTerm","lines"]},"searchVendorOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor."},"vendorName":{"type":"string","description":"The legal or trading name of the vendor."},"vendorNumber":{"type":"string","description":"The vendor number, for example 'V-2041'. Absent until one has been assigned."},"vendorType":{"type":"string","description":"The kind of vendor. Possible values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'."},"vendorSubType":{"type":"string","description":"A finer classification within the vendor type. Possible values: 'direct', 'indirect'."},"status":{"type":"string","description":"The lifecycle status of the vendor. Possible values: 'active', 'inactive'. An inactive vendor stays readable so historical documents still resolve, and is not offered for new ones."},"paymentTerms":{"type":"string","description":"The default payment-terms key applied to this vendor's bills, for example 'net30' or 'dueOnReceipt'. Stored as supplied."},"preferredCurrency":{"type":"string","description":"The currency the vendor prefers to be paid in. Format ISO 4217, for example 'USD'."},"preferredLanguage":{"type":"string","description":"The language the vendor prefers for messages."},"independentContractor":{"type":"string","description":"Whether the vendor is an independent contractor. Possible values: 'yes', 'no', 'unsure'."},"externalVendorId":{"type":"string","description":"The identifier this vendor has in an external system. It is not unique."},"origin":{"type":"string","description":"The source system that created the vendor, for example 'app'."},"mainContactName":{"type":"string","description":"The name of the vendor's main contact."},"mainContactEmail":{"type":"string","description":"The email address of the vendor's main contact."},"mainContactPhone":{"type":"string","description":"The phone number of the vendor's main contact."},"billingEmail":{"type":"string","description":"The email address invoices and remittance advice are sent to."},"entityId":{"type":"string","description":"The legal entity the vendor is registered under. See id on GET base/entities."},"defaultAccountId":{"type":"string","description":"The general ledger account this vendor's spend defaults to. See id on GET accounting/accounts/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","vendorName","vendorType","status","paymentTerms","lastModifiedDate"]},"description":"The vendors on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchVendorInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the vendor with this identifier."},"vendorName":{"type":"string","description":"Limits results to vendors with this exact name. The match is case-sensitive."},"vendorNumber":{"type":"string","description":"Limits results to vendors with this vendor number. It is not guaranteed unique, so this can return several vendors."},"vendorType":{"type":"string","description":"Limits results to vendors of this kind. Accepted values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'. Any other value matches no vendor."},"vendorSubType":{"type":"string","description":"Limits results to vendors of this sub-type. Accepted values: 'direct', 'indirect'. Any other value matches no vendor."},"status":{"type":"string","description":"Limits results to vendors in this lifecycle status. Accepted values: 'active', 'inactive'. Any other value matches no vendor."},"entityId":{"type":"string","description":"Limits results to vendors registered under this legal entity. An id that matches no entity returns no vendor. See id on GET base/entities."},"mainContactEmail":{"type":"string","description":"Limits results to vendors whose main contact has this email address. Useful for finding a duplicate before creating another vendor."},"externalVendorId":{"type":"string","description":"Limits results to vendors with this external identifier. It is not unique, so this can return several vendors."}},"additionalProperties":false,"description":"The filters to apply. A vendor must match every filter you send. Omit to return all vendors.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of vendors per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"rejectExpenseReportOutput":{"type":"object","properties":{"status":{"type":"string","description":"The approval status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"rejectExpenseReportInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the report is being rejected. It is recorded against the decision and shown to the submitter.","examples":["Missing receipt for the hotel line"]}},"additionalProperties":false,"required":["reviewMessage"]},"searchVendorCreditOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor credit."},"vendorCreditNumber":{"type":"string","description":"The vendor credit number. Absent until a number has been assigned."},"referenceNumber":{"type":"string","description":"The vendor's credit memo reference number, as printed on the vendor's document."},"creditDate":{"type":"string","format":"date","description":"The date on the vendor's credit memo. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the credit is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"status":{"type":"string","description":"The application status, how much of the credit has been set against vendor bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalAmount":{"type":"string","format":"decimal","description":"The total credit amount, in currency."},"externalId":{"type":"string","description":"The identifier this credit has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this credit is from. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this credit is from."},"entityId":{"type":"string","description":"The legal entity this credit is booked under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this credit is booked under."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor credit last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line item number."},"description":{"type":"string","description":"A description of the credit line item."},"lineType":{"type":"string","description":"The type of line item. Possible values: 'expense', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The line credit amount, in the credit currency."},"currency":{"type":"string","description":"The currency for the line. It always matches the credit currency. Format ISO 4217, for example 'USD'."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the credit currency."},"vatAmount":{"type":"string","format":"decimal","description":"The computed VAT amount on the line, in the credit currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted credit reads 'notStarted' until the credit posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in the credit currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The credit line items, in their order on the credit. An empty array when the credit has none."}},"additionalProperties":false,"required":["id","referenceNumber","creditDate","currency","lastModifiedDate"]},"description":"The vendor credits that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more credits remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchVendorCreditInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the vendor credit with this identifier."},"vendorCreditNumber":{"type":"string","description":"Limits results to the vendor credit with this number."},"referenceNumber":{"type":"string","description":"Limits results to credits with this vendor reference number. It is not unique, so this can match several credits."},"vendorId":{"type":"string","description":"Limits results to credits from this vendor. See id on GET accounting/vendors/:id."},"entityId":{"type":"string","description":"Limits results to credits booked under this legal entity. See id on GET base/entities."},"vendorName":{"type":"string","description":"Limits results to credits from a vendor with this name."},"entityName":{"type":"string","description":"Limits results to credits booked under a legal entity with this name."},"status":{"type":"string","description":"Limits results to credits in this application status. Values include 'unapplied', 'partiallyApplied' and 'applied'. Any other value matches no credit."},"externalId":{"type":"string","description":"Limits results to credits with this upstream identifier. It is not unique, so this can match several credits."}},"additionalProperties":false,"description":"The filters to apply. A vendor credit must match every filter you send. Omit to return all vendor credits.","examples":[{"status":"unapplied"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of vendor credits per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"getExpenseReportOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense report."},"expenseNumber":{"type":"string","description":"The expense number. Absent until one has been assigned."},"status":{"type":"string","description":"The approval status of the report. Values include 'draft', 'pendingApproval', 'approved', 'rejected' and 'paid'."},"paymentStatus":{"type":"string","description":"The payment status of the report. Absent until a payment run has touched it."},"submittedDate":{"type":"string","format":"date","description":"The date the employee submitted the report for approval. Format YYYY-MM-DD. Absent while the report is still a draft."},"reimbursementCurrency":{"type":"string","description":"The currency the report is reimbursed in. Format ISO 4217, for example 'USD'. Governs every header total below."},"reimbursableTotal":{"type":"string","format":"decimal","description":"The total reimbursable amount across the report's items, in reimbursementCurrency."},"reimbursableTotalNetAmount":{"type":"string","format":"decimal","description":"The total reimbursable amount excluding VAT, in reimbursementCurrency."},"amountPaid":{"type":"string","format":"decimal","description":"The amount already reimbursed to the employee, in reimbursementCurrency."},"openAmount":{"type":"string","format":"decimal","description":"The amount still owed to the employee, reimbursableTotal minus amountPaid, in reimbursementCurrency."},"pendingAmount":{"type":"string","format":"decimal","description":"The amount committed to an in-flight payment run but not yet paid, in reimbursementCurrency."},"containsBillableItem":{"type":"boolean","description":"Whether at least one item on the report is marked billable to a customer."},"markAsPaid":{"type":"boolean","description":"Whether the report was flagged as paid without going through a payment run."},"pendingPayment":{"type":"boolean","description":"Whether a payment for this report is in flight."},"skipJournalEntry":{"type":"boolean","description":"Whether the report is configured not to post a journal entry."},"reviewMessage":{"type":"string","description":"The reviewer's note left on approval or rejection."},"externalUrl":{"type":"string","description":"A link to the report in the upstream system that produced it."},"externalExpenseReportId":{"type":"string","description":"The identifier this report has in the upstream system that produced it. It is not unique."},"origin":{"type":"string","description":"The source system this report came from, as free-form text."},"employeeId":{"type":"string","description":"The employee the report belongs to. See id on GET people/person/:id."},"employeeName":{"type":"string","description":"The name of the employee the report belongs to."},"entityId":{"type":"string","description":"The legal entity the report is posted under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the report is posted under."},"departmentId":{"type":"string","description":"The department the report is charged to. See id on GET people/departments/:id."},"offsetAccountId":{"type":"string","description":"The GL offset account for the reimbursement. See id on GET accounting/accounts/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the expense report last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"approvals":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","description":"What was decided. Values include 'approve' and 'reject'."},"employeeName":{"type":"string","description":"The name of the employee who decided."},"message":{"type":"string","description":"The reviewer's note, where one was given."},"decidedAt":{"type":"string","format":"date-time","description":"The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["decision","decidedAt"]},"description":"The approval decisions on this report, oldest first. An empty array when no approval policy has matched the report."},"expenseItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense item."},"itemNumber":{"type":"string","description":"The expense item number."},"merchant":{"type":"string","description":"The merchant the expense was incurred with."},"billDate":{"type":"string","format":"date","description":"The date the expense was incurred. Format YYYY-MM-DD."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense item."},"amount":{"type":"string","format":"decimal","description":"The amount of the expense item, as a decimal in the item's own currency."},"currency":{"type":"string","description":"The currency this item's amount is in. Format ISO 4217, for example 'USD'. May differ from the report's reimbursementCurrency."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursable to the employee."},"categoryId":{"type":"string","description":"The expense category the item is booked to. See id on GET accounting/expense-categories/:id."},"crossChargeEntityId":{"type":"string","description":"The legal entity this item is cross charged to (Charge to). See id on GET base/entities. Absent when the item is not cross charged."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the attachment record."},"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the stored file. There is no endpoint for it."}},"additionalProperties":false,"required":["id"]},"description":"The receipts on this item."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted report reads 'notStarted' until the report posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in this item's currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this item is deferred over, one per accounting book. Absent when the item is not amortized. An expense item has no line type, so what makes it amortizable is its account: the category or account it books to must be a prepaid-expenses account. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The expense items on the report, in their order on it. An empty array when the report has none."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the attachment. Send it in attachments[].id on PATCH accounting/expense-reports/:id to keep the file."},"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the stored file. There is no endpoint for it."}},"additionalProperties":false,"required":["id"]},"description":"Files on the whole report rather than one item, such as a summary or an approval email. Each item's receipts are in its own attachments. An empty array when the report has none."}},"additionalProperties":false,"required":["id","status","reimbursementCurrency","lastModifiedDate"]},"payrollTemplatesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll template."},"name":{"type":"string","description":"The name of the payroll template. Unique across payroll templates."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the payroll template."},"groupBy":{"enum":["Employee","Department","Multi-level"],"description":"The level at which payroll amounts are entered."},"journalEntryDate":{"enum":["payrollDate","endDate"],"description":"The date the generated journal entry is posted on."},"journalEntryGroupBy":{"enum":["account","accountAndPayrollCategory","payrollCategory","payrollCategoryByEmployee"],"description":"The default consolidation level for generated journal lines."},"deductionsType":{"enum":["positive","negative"],"description":"Whether deduction amounts in imported data arrive positive or negative."},"source":{"anyOf":[{"enum":["datev","datevEmployeePayroll","datevEmployeePayrollPersonLevel","rippling","lexware","briars","gusto","adpGLReport","adpPayrollHistory","sage","tress","adpPayrollDetails","none"]},{"type":"null"}],"description":"The payroll system this template imports from."},"status":{"anyOf":[{"enum":["create","active","inactive"]},{"type":"null"}],"description":"The lifecycle status of the payroll template. It is computed from the template's categories, not set through the API."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the payroll template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchPurchaseRequestOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase request."},"purchaseRequestNumber":{"type":"string","description":"The purchase request number, for example 'PR-1', unique across purchase requests. Absent until one has been assigned."},"description":{"type":"string","description":"A description of what is being requested. It is shown to the vendor."},"internalDescription":{"type":"string","description":"Internal notes on the request, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo intended for the vendor."},"status":{"type":"string","description":"The lifecycle and approval state, in one field. Possible values: 'pendingApproval', 'approved', 'rejected', 'closed'. This resource has no separate approvalStatus."},"currency":{"type":"string","description":"The currency the request is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"totalAmount":{"type":"string","format":"decimal","description":"The total requested amount, the sum of the line totals, in the request currency."},"startDate":{"type":"string","format":"date","description":"The first day of the period the request covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the request covers. Format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment-terms key requested for the resulting order, for example 'net30'."},"externalId":{"type":"string","description":"The identifier this request has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this request is directed at. See id on GET accounting/vendors/:id. Absent when no vendor has been chosen yet."},"vendorName":{"type":"string","description":"The name of the vendor this request is directed at."},"entityId":{"type":"string","description":"The legal entity this request belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this request belongs to."},"departmentId":{"type":"string","description":"The department raising the request. See id on GET people/departments/:id."},"departmentName":{"type":"string","description":"The name of the department raising the request."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase request last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line number, for example 'PRL-1'. Unique across purchase request lines."},"description":{"type":"string","description":"A description of the line item."},"isItem":{"type":"boolean","description":"Whether the line references an inventory item. True for an item line, false for a free-text expense line. It is the item-versus-expense discriminator. There is no itemType field on this resource."},"quantity":{"type":"string","format":"decimal","description":"The quantity requested, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the request currency. Set on item lines. On expense lines the amount is on editableAmount instead."},"editableAmount":{"type":"string","format":"decimal","description":"The directly entered line amount, in the request currency. Used on expense lines, where there is no unit price to multiply."},"total":{"type":"string","format":"decimal","description":"The line total, in the request currency. price times quantity on an item line, editableAmount on an expense line."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. Always the request currency, on each line so the line is self-describing."},"status":{"type":"string","description":"The delivery state of the line. Possible values: 'undelivered', 'delivering', 'delivered'. It is a delivery status, not an approval status."},"priority":{"type":"string","description":"The requested priority of the line. Possible values: 'high', 'medium', 'low'."},"needByDate":{"type":"string","format":"date","description":"The date this line is needed by, when it differs from the header. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date this line was delivered. Format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Format YYYY-MM-DD."},"startDate":{"type":"string","format":"date","description":"The first day of the period this line covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period this line covers. Format YYYY-MM-DD."},"unitOfMeasure":{"type":"string","description":"The name of the unit of measure for the quantity."},"unitOfMeasureId":{"type":"string","description":"The unit of measure for the quantity. See id on GET inventory/unit-of-measures/:id."},"itemId":{"type":"string","description":"The item this line orders. See id on GET inventory/items/:id. Present only on an item line."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."}},"additionalProperties":false,"required":["id"]},"description":"The request line items, in their order on the request. An empty array when the request has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The purchase requests on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPurchaseRequestInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the purchase request with this id. GET accounting/purchase-requests/:id does the same more cheaply."},"purchaseRequestNumber":{"type":"string","description":"Limits results to the request with this number, for example 'PR-1'. The match is exact. It is unique, so this returns at most one."},"status":{"type":"string","description":"Limits results to requests in this state. Accepted values: 'pendingApproval', 'approved', 'rejected', 'closed'. Any other value matches no request."},"currency":{"type":"string","description":"Limits results to requests denominated in this currency. Format ISO 4217, for example 'USD'."},"paymentTerms":{"type":"string","description":"Limits results to requests with this payment-terms key, for example 'net30'. The match is exact."},"externalId":{"type":"string","description":"Limits results to requests with this external identifier. The match is exact. It is not unique, so this can return several requests."},"vendorId":{"type":"string","description":"Limits results to requests directed at this vendor. See id on GET accounting/vendors/:id. An id that matches no vendor returns an empty page, not an error."},"entityId":{"type":"string","description":"Limits results to requests of this legal entity. See id on GET base/entities. An id that matches no entity returns an empty page, not an error."},"departmentId":{"type":"string","description":"Limits results to requests raised by this department. See id on GET people/departments/:id. An id that matches no department returns an empty page, not an error."},"vendorName":{"type":"string","description":"Limits results to requests whose vendor has this name. The match is exact and case-sensitive. Use vendorId when you already have the id."},"entityName":{"type":"string","description":"Limits results to requests whose legal entity has this name. The match is exact and case-sensitive."}},"additionalProperties":false,"description":"The filters to apply. A purchase request must match every filter you send. Omit to return all purchase requests.","examples":[{"status":"pendingApproval"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of purchase requests per page. Defaults to 50, capped at 200. The server may return fewer, never more."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"activateVendorOutput":{"type":"object","properties":{},"additionalProperties":false},"activateVendorInput":{"type":"object","properties":{},"additionalProperties":false},"invoiceFrequencyTemplatesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice frequency template."},"name":{"type":"string","description":"The name of the invoice frequency template. Example: 'Twice Monthly'."},"rule":{"type":"string","description":"The rule that sets the template's invoice dates. Format RFC 5545 RRULE. BYMONTHDAY=-1 means the last day of the month, whatever its length. Example: 'FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=15,-1', for the 15th and the last day of every month."},"isEvenInvoicing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the amount for a billing period is split evenly across the period's invoices. When false, the amount is split by the number of days each invoice covers. A partial period is split by days either way. The setting applies to recurring product lines, not usage lines."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the invoice frequency template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getEntityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entity. Other resources reference it as entityId.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"entityName":{"type":"string","description":"The name of the entity, for example 'Acme Inc.'. Unique within the tenant.","examples":["Acme GmbH"]},"entityNumber":{"type":"string","description":"The entity's business number, assigned by the system. Absent until one is assigned.","examples":["ENT-00012"]},"currency":{"type":"string","description":"The entity's functional currency. Format ISO 4217, for example 'USD'. Entity-only: a book's currency for the entity is set on the book's entity assignment. Absent when none has been set.","examples":["EUR"]},"timeZone":{"type":"string","description":"The time zone the entity operates in. Format IANA time-zone name, for example 'Europe/Berlin'. Absent when none has been set.","examples":["Europe/Berlin"]},"status":{"type":"string","description":"The lifecycle status of the entity. Possible values: 'active', 'inactive', 'created'. A new entity starts as 'created'.","examples":["active"]},"entityType":{"type":"string","description":"Whether the entity is a legal entity or a non-legal reporting entity. Possible values: 'LegalEntity', 'NonLegalReportingEntity'.","examples":["LegalEntity"]},"country":{"type":"string","description":"The country the entity is registered in. Format ISO 3166-1 alpha-2, for example 'US'. Absent when none has been set.","examples":["DE"]},"entityCode":{"type":"string","description":"A short code for the entity, separate from its entityNumber. Absent until one is assigned."},"localeCode":{"type":"string","description":"The locale for documents sent from this entity. Format BCP 47, for example 'en-US'. Absent when none has been set."},"startDate":{"type":"string","format":"date","description":"The date the entity became effective. Format YYYY-MM-DD. Absent when none has been set.","examples":["2025-01-01"]},"endDate":{"type":"string","format":"date","description":"The date the entity stops being effective. Format YYYY-MM-DD. Absent when the entity has no scheduled end."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the entity last changed, in UTC. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ).","examples":["2026-05-12T09:30:00.000Z"]},"parentEntityId":{"type":"string","description":"The parent entity in the entity hierarchy, which a consolidation rolls this entity up to. See id on GET base/entities/:id. Absent on the top-level entity.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"registeredAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The entity's registered address. Absent when none has been set.","examples":[{"line1":"Friedrichstrasse 68","city":"Berlin","country":"DE","zipCode":"10117"}]},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteSubsidiaryId'."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent or empty when the entity has none.","examples":[[{"fieldName":"netsuiteSubsidiaryId","value":"12"}]]}},"additionalProperties":false,"required":["id","entityName","lastModifiedDate"]},"executeAccountingPeriodTaskOutput":{"type":"object","properties":{},"additionalProperties":false},"executeAccountingPeriodTaskInput":{"type":"object","properties":{"task":{"type":"string","description":"The close task to run. Possible values: 'open', 'close', 'reopen', 'lockAR', 'unlockAR', 'lockAP', 'unlockAP', 'lockJournals', 'unlockJournals', 'lockRevenue', 'unlockRevenue', 'runRevaluation', 'calculateConsolidationRates'. These are the taskCode values on closeTasks. An unrecognized code fails with UNKNOWN_TASK. A recognized code that cannot run now fails with TASK_NOT_EXECUTABLE."},"reopeningReason":{"type":"string","description":"A free-text reason recorded against the period. Used only by the 'reopen' task, which stores it as the period's reopeningReason and shows it on both read routes. Other tasks ignore it. Supply it when reopening a closed period, since it is the only record of why the close was undone."}},"additionalProperties":false,"required":["task"]},"getRevenueContractOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract."},"revenueContractNumber":{"type":"string","description":"The revenue contract number, unique within the tenant."},"approvalStatus":{"type":"string","description":"The approval status of the contract: 'pendingApproval' when it is created and 'approved' once approved; the other values of the vocabulary ('draft', 'revise', 'rejected') do not occur on a contract. Only an approved contract is recognized: a contract pending approval has a plan but no revenue, and filtering the sales order's approvalStatus instead still includes contracts pending approval."},"generalStatus":{"type":"string","description":"The overall status of the contract, combining approval and any active revenue hold. Possible values: 'approved', 'approvedOnHold', 'pendingApproval', 'pendingApprovalOnHold'."},"revenueStatus":{"type":"string","description":"The revenue-recognition progress across the contract's lines. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isContractClosed":{"type":"boolean","description":"Whether the contract has been closed, with its open revenue moved to a new combined revenue contract."},"isContractCombined":{"type":"boolean","description":"Whether the contract is the combination target that absorbed a closed contract's open revenue."},"isLongTermContract":{"type":"boolean","description":"Whether the recognition window from revenueStartDate to revenueEndDate exceeds 366 days."},"sspCompliant":{"type":"boolean","description":"Whether every line not excluded from allocation is standalone-selling-price compliant. Absent when every line is excluded from allocation."},"currency":{"type":"string","description":"The currency the contract is denominated in. Every amount on the contract is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"type":"string","description":"The owning entity's functional currency. Present only when it differs from the contract currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the contract currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"entityId":{"type":"string","description":"The legal entity that owns this contract. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this contract."},"customerId":{"type":"string","description":"The customer this contract is with. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer this contract is with."},"salesOrderId":{"type":"string","description":"The sales order this contract was created from. See id on GET accounting/sales-orders/:id."},"salesOrderNumber":{"type":"string","description":"The number of the sales order this contract was created from."},"modifiedRevenueContractId":{"type":"string","description":"The revenue contract this one was combined or modified into. Absent when there is no such successor. See id on GET accounting/revenue-contracts/:id."},"closeContractDate":{"type":"string","format":"date-time","description":"The date and time the contract was closed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent on an open contract."},"migrationDate":{"type":"string","format":"date","description":"The date this contract's opening balances were migrated from a prior system. Format YYYY-MM-DD. Absent on a contract created natively."},"revenueStartDate":{"type":"string","format":"date","description":"The earliest revenue-recognition start date across the contract's lines. Format YYYY-MM-DD."},"revenueEndDate":{"type":"string","format":"date","description":"The latest revenue-recognition end date across the contract's lines. Format YYYY-MM-DD."},"salesEffectiveDate":{"type":"string","format":"date","description":"The book date of the sales order this contract was created from. Format YYYY-MM-DD."},"totalContractValue":{"type":"string","format":"decimal","description":"The total contract value, in the contract currency. It is the total price of the sales order this contract was created from, less the contract's cost-of-contract-value."},"totalContractAmount":{"type":"string","format":"decimal","description":"The total contract amount across the contract's open lines, in the contract currency."},"totalCostOfContractValue":{"type":"string","format":"decimal","description":"The total cost-of-contract-value excluded from the revenue calculation, in the contract currency."},"totalCostOfRevenue":{"type":"string","format":"decimal","description":"The total cost of revenue recognized, in the contract currency."},"totalEstimatedTransactionPrice":{"type":"string","format":"decimal","description":"The total estimated transaction price used in allocation, in the contract currency."},"totalFairValueAmount":{"type":"string","format":"decimal","description":"The total fair value used in allocation, in the contract currency."},"totalVariableConsideration":{"type":"string","format":"decimal","description":"The total variable consideration across the contract's lines, in the contract currency."},"deferredRevenue":{"type":"string","format":"decimal","description":"The deferred revenue not yet recognized, in the contract currency, as of today. Zero once the contract is closed. A subledger figure: it sums only the journal entry lines linked to the contract, plus balances migrated onto the contract, so it need not equal the deferred-revenue accounts in the ledger."},"revenueAmount":{"type":"string","format":"decimal","description":"The total revenue across the contract's lines, in the contract currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The cumulative revenue recognized to date, in the contract currency, as of today; revenue recognized as of an earlier date comes from posted journal entry lines. On a combined contract (isContractCombined) it is the revenue recognized in the related contracts."},"revenueRemaining":{"type":"string","format":"decimal","description":"The revenue remaining to be recognized, billed or not, in the contract currency, as of today: the revenue amount of the contract's lines less what they have recognized."},"remainingPerformanceObligation":{"type":"string","format":"decimal","description":"The remaining performance obligation, in the contract currency. It is contract value plus returns and variable consideration, less committed recognized revenue. Zero once the contract is closed."},"unbilledReceivables":{"type":"string","format":"decimal","description":"The sum of unbilled journal entries for this contract, in the contract currency."},"returnedAmount":{"type":"string","format":"decimal","description":"The amount returned against the contract's revenue plan, in the contract currency."},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"The one-time discount allocated across the contract's lines, in the contract currency."},"pctRevenueRecognized":{"type":"string","format":"decimal","description":"The fraction of total contract value recognized to date, from 0 to 1. 1 once the contract is closed. A ratio, not an amount, with no currency of its own."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteRevenueContractId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The contract's identifiers in other systems, one per configured field name. An empty array or absent when the contract has none."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue contract line."},"revenueContractLineNumber":{"type":"string","description":"The revenue contract line number, unique within the contract."},"type":{"type":"string","description":"The kind of line. Possible values: 'standard', 'thresholdIncrement', 'overage'."},"currency":{"type":"string","description":"The currency the line is denominated in. Every amount on the line and its revenue plan is in this currency. Format ISO 4217, for example 'USD'."},"functionalCurrency":{"type":"string","description":"The owning entity's functional currency. Present only when it differs from the line currency. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the line currency to the functional currency. A ratio, not an amount, with no currency of its own."},"generalStatus":{"type":"string","description":"The overall status of the line, combining approval and any active revenue hold. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"revenueStatus":{"type":"string","description":"The revenue-recognition progress for the line. Possible values: 'notStarted', 'notStartedOnHold', 'inProgress', 'inProgressOnHold', 'complete', 'completeModified'."},"isClosed":{"type":"boolean","description":"Whether the line has been closed, with its open revenue moved to a combined contract."},"isLongTerm":{"type":"boolean","description":"Whether the line's recognition window exceeds 366 days."},"isEvergreen":{"type":"boolean","description":"Whether the line has no fixed end date and recognizes indefinitely."},"sspCompliant":{"type":"boolean","description":"Whether the line is standalone-selling-price compliant."},"isAllocationExcluded":{"type":"boolean","description":"Whether the line is excluded from the contract's revenue allocation."},"productCode":{"type":"string","description":"The code of the product the line covers, as it stood when the line was created."},"unitOfMeasure":{"type":"string","description":"The unit the line's quantity is measured in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"performanceObligationName":{"type":"string","description":"The name of the performance obligation the line satisfies."},"operationalPerformanceObligationNumber":{"type":"string","description":"The number of the operational performance obligation the line is tracked under."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template that generated the line's plan."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized over the line's term. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"amortizationMethod":{"type":"string","description":"How the line's amount is spread across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"revenueSchedulingEvent":{"type":"string","description":"The event that starts recognition on the line. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"revenueAccount":{"type":"string","description":"The name of the revenue account the line recognizes into."},"deferredRevenueAccount":{"type":"string","description":"The name of the deferred-revenue account the line defers into."},"revRecStartDate":{"type":"string","format":"date","description":"The first day of the line's revenue-recognition window. Format YYYY-MM-DD."},"revRecEndDate":{"type":"string","format":"date","description":"The last day of the line's revenue-recognition window, inclusive. Format YYYY-MM-DD."},"salesOrderBookingDate":{"type":"string","format":"date","description":"The book date of the sales order line this line was created from. Format YYYY-MM-DD."},"revenueTerm":{"type":"string","format":"decimal","description":"The length of the line's revenue term, in the line's scheduling unit. A count, not an amount."},"salesOrderProductLine":{"type":"string","description":"The number of the sales order product line this line was created from."},"contractAmount":{"type":"string","format":"decimal","description":"The contract amount booked on the line, in the line currency."},"adjustedContractAmount":{"type":"string","format":"decimal","description":"The contract amount after modifications, in the line currency."},"listPrice":{"type":"string","format":"decimal","description":"The undiscounted list price of the line, in the line currency."},"totalContractValue":{"type":"string","format":"decimal","description":"The total contract value attributed to the line, in the line currency."},"totalCostOfContractValue":{"type":"string","format":"decimal","description":"The cost-of-contract-value excluded from the line's revenue calculation, in the line currency."},"costOfRevenueAmount":{"type":"string","format":"decimal","description":"The cost of revenue booked on the line, in the line currency."},"costOfRevenueRecognized":{"type":"string","format":"decimal","description":"The cost of revenue recognized to date on the line, in the line currency."},"estimatedTransactionPrice":{"type":"string","format":"decimal","description":"The estimated transaction price used for the line in allocation, in the line currency."},"fairValueAmount":{"type":"string","format":"decimal","description":"The fair value used for the line in allocation, in the line currency."},"variableConsideration":{"type":"string","format":"decimal","description":"The variable consideration on the line, in the line currency."},"extendedSSP":{"type":"string","format":"decimal","description":"The extended standalone selling price of the line, unit standalone selling price times quantity, in the line currency."},"revenueAmount":{"type":"string","format":"decimal","description":"The revenue allocated to the line, in the line currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The revenue recognized to date on the line, in the line currency."},"revenueRemaining":{"type":"string","format":"decimal","description":"The revenue still to be recognized on the line, in the line currency."},"deferredRevenueAmount":{"type":"string","format":"decimal","description":"The deferred revenue outstanding on the line, in the line currency."},"remainingPerformanceObligation":{"type":"string","format":"decimal","description":"The remaining performance obligation on the line, in the line currency."},"unbilledReceivables":{"type":"string","format":"decimal","description":"The unbilled receivables on the line, in the line currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The revenue on the line not yet scheduled into a plan period, in the line currency."},"totalInvoicedAmount":{"type":"string","format":"decimal","description":"The total invoiced against the line to date, in the line currency."},"oneTimeDiscountAllocationAmount":{"type":"string","format":"decimal","description":"The one-time discount allocated to the line, in the line currency."},"fvAllocationRatio":{"type":"string","format":"decimal","description":"The share of the contract's fair value allocated to the line, from 0 to 1. A ratio, not an amount, with no currency of its own."},"revenuePlanHeader":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue plan header."},"revenuePlanHeaderNumber":{"type":"string","description":"The revenue plan header number."},"status":{"type":"string","description":"The status of the plan. Possible values: 'notStarted', 'pendingRecognition', 'inProgress', 'complete', 'completeModified'."},"currency":{"type":"string","description":"The currency the plan is denominated in. Every amount on the plan and its plan lines is in this currency. Format ISO 4217, for example 'USD'."},"amortizationMethod":{"type":"string","description":"How the plan spreads its amount across periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'."},"revenueSchedulingEvent":{"type":"string","description":"The event that starts recognition on the plan. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"isContractClosed":{"type":"boolean","description":"Whether the contract behind the plan has been closed."},"revRecStartDate":{"type":"string","format":"date","description":"The first day of the plan's recognition window. Format YYYY-MM-DD."},"revRecEndDate":{"type":"string","format":"date","description":"The last day of the plan's recognition window, inclusive. Format YYYY-MM-DD."},"comments":{"type":"string","description":"Free-form comments recorded on the plan."},"amount":{"type":"string","format":"decimal","description":"The total amount the plan schedules, in the plan currency."},"totalRecognized":{"type":"string","format":"decimal","description":"The total recognized across the plan's lines to date, in the plan currency."},"remainingDeferred":{"type":"string","format":"decimal","description":"The amount still deferred on the plan, in the plan currency."},"returnedAmount":{"type":"string","format":"decimal","description":"The amount returned against the plan, in the plan currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The plan amount not yet scheduled into a period, in the plan currency."},"revenuePlanLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue plan line."},"lineId":{"type":"string","description":"The line identifier within the plan."},"revenuePlanType":{"type":"string","description":"What the plan line schedules. Possible values: 'revenueRecognition', 'returnRevenueRecognition', 'unCommittedRevenueRecognition', 'modificationDeferredRevenueAdjustment', 'allowance', 'overage', 'usageExpiration', 'costOfRevenue', 'unholdRevenuePeriod', 'retrospectiveAdjustment'."},"currency":{"type":"string","description":"The currency the plan line is denominated in. Format ISO 4217, for example 'USD'."},"plannedPeriod":{"type":"string","description":"The name of the accounting period this row is planned for."},"plannedPeriodDate":{"type":"string","format":"date","description":"The start date of the planned accounting period. Format YYYY-MM-DD. Plan lines are returned in ascending order of this date."},"postingPeriod":{"type":"string","description":"The name of the accounting period the row was posted in, when it differs from the planned one."},"isPosted":{"type":"boolean","description":"Whether the row has been posted to the general ledger."},"holdStatus":{"type":"string","description":"Whether revenue on the row is held back. Possible values: 'notHold', 'holdPlaced', 'holdRemoved'."},"releaseUnit":{"type":"string","description":"The unit the release amount is expressed in. Possible values: 'quantity', 'percent', 'amount'."},"releaseAmount":{"type":"string","format":"decimal","description":"The amount or quantity released in this period, in the unit given by releaseUnit."},"pctRecognizedInPeriod":{"type":"string","format":"decimal","description":"The fraction of the plan recognized in this period, from 0 to 1. A ratio, not an amount, with no currency of its own."},"cumulativePercentage":{"type":"string","format":"decimal","description":"The fraction of the plan recognized cumulatively through this period, from 0 to 1. A ratio, not an amount, with no currency of its own."},"revenueAccount":{"type":"string","description":"The name of the revenue account this row recognizes into."},"deferredRevenueAccount":{"type":"string","description":"The name of the deferred-revenue account this row releases from."},"journalEntry":{"type":"string","description":"The number of the journal entry this row posted through, once posted."},"amount":{"type":"string","format":"decimal","description":"The amount scheduled for this period, in the plan line currency."},"revenueAmount":{"type":"string","format":"decimal","description":"The revenue scheduled for this period, in the plan line currency."},"revenueRecognized":{"type":"string","format":"decimal","description":"The revenue recognized in this period, in the plan line currency."},"cumulativeRecognition":{"type":"string","format":"decimal","description":"The revenue recognized cumulatively through this period, in the plan line currency."},"unscheduledRevenue":{"type":"string","format":"decimal","description":"The amount on this row not yet scheduled, in the plan line currency."},"postedAmount":{"type":"string","format":"decimal","description":"The amount actually posted to the ledger for this row, in the plan line currency."}},"additionalProperties":false,"required":["id","revenuePlanType","currency"]},"description":"The plan's period rows, the recognition schedule, one entry per planned period, earliest planned period first. An empty array when the plan has not been scheduled yet."}},"additionalProperties":false,"required":["id","currency","revenueSchedulingEvent","isContractClosed"],"description":"The line's revenue plan, the schedule revenue is recognized against. At most one per line. Absent when no plan has been generated for the line yet."}},"additionalProperties":false,"required":["id","type","currency","isClosed","revenueSchedulingEvent"]},"description":"The contract's revenue lines, in line order, each with its revenue plan nested. An empty array when the contract has no lines."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue contract last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","approvalStatus","isContractClosed","isContractCombined","currency","exchangeRate","lastModifiedDate"]},"deleteBookEntityAssignmentOutput":{"type":"object","properties":{},"additionalProperties":false},"createCustomerOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created customer.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]}},"additionalProperties":false,"required":["id"]},"createCustomerInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the customer, as it appears on invoices.","examples":["Example Robotics Inc"]},"entityId":{"type":"string","description":"The legal entity that invoices this customer. To move the customer to another legal entity later, use PATCH accounting/customers/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"customerType":{"type":"string","description":"The customer type. Accepted values: 'default', 'partner'. Defaults to 'default'. 'endCustomer' is not supported and fails with END_CUSTOMER_NOT_SUPPORTED.","examples":["default"]},"partnerType":{"type":"string","description":"The partner type, for a customer whose customerType is 'partner'. Accepted values: 'reseller', 'thirdPartyPayer'."},"businessType":{"type":"string","description":"The business type of the customer. Accepted values: 'company', 'individual'. Defaults to 'company'.","examples":["company"]},"invoiceEmail":{"type":"string","description":"The email address invoices are sent to.","examples":["billing@example-robotics.com"]},"mainEmail":{"type":"string","description":"The email address of the customer's main contact."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax. Defaults to false."},"defaultCurrency":{"type":"string","description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code. Defaults to the legal entity's currency.","examples":["USD"]},"segment":{"type":"string","description":"The market segment of the customer. Accepted values: 'SMB', 'MidMarket', 'Enterprise'. Ignored when businessType is 'individual'."},"exemptionNumber":{"type":"string","description":"The tax-exemption certificate number. Accepted only when taxExempt is true. Otherwise the request fails with EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT."},"paymentTermCode":{"type":"string","description":"The code of a payment term on the customer's legal entity's list. A code that is not on the list fails with UNKNOWN_REFERENCE. See code on GET accounting/payment-terms."},"parentId":{"type":"string","description":"The id of the parent customer. An unknown id fails with UNKNOWN_REFERENCE."},"partnerId":{"type":"string","description":"The id of the partner this customer buys through. An unknown id fails with UNKNOWN_REFERENCE."},"salesChannel":{"type":"string","description":"The sales channel for this customer. Accepted values: 'salesAssisted' (sold through a salesperson), 'selfServe'."},"additionalContactEmail":{"type":"string","description":"Another email address for the customer, besides invoiceEmail and mainEmail."},"mainContactName":{"type":"string","description":"The name of the customer's main contact."},"preferredLanguage":{"type":"string","description":"The customer's preferred language. Accepted values: 'english'."},"crmCustomerId":{"type":"string","description":"The customer's identifier in an external CRM system."},"businessIdentificationNumber":{"type":"string","description":"The customer's business registration number."},"invoiceConsolidation":{"type":"string","description":"How the customer's invoices are consolidated. Accepted values: 'customer', 'purchaseOrderNumber', 'salesArrangement'."},"invoiceDeliveryMode":{"type":"string","description":"How invoices are delivered to the customer. Accepted values: 'manual', 'automated'."},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether the customer is exempt from credit-card fees. Defaults to false."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel and expense items appear on invoices. Accepted values: 'detailed', 'consolidated'. Defaults to 'detailed'."},"status":{"type":"string","description":"The status of the customer. Accepted values: 'active', 'inactive'. Defaults to 'active'."},"taxExemptCode":{"type":"string","description":"The tax-exemption reason code. Cleared when taxExempt is false."},"taxRegistrations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"The country the registration applies in, as an ISO 3166-1 code."},"taxNumber":{"type":"string","description":"The tax identification number issued by the tax authority."},"type":{"type":"string","description":"The kind of tax registration. Accepted values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'."},"effectiveDate":{"type":"string","format":"date","description":"The date the registration takes effect. Use format YYYY-MM-DD."},"isActive":{"type":"boolean","description":"Whether the registration is active. Only one active registration is allowed per country and tax type. Defaults to true."}},"additionalProperties":false,"required":["country","taxNumber","type"]},"description":"The customer's tax registrations."},"payment":{"type":"object","properties":{"provider":{"type":"string","description":"The name of a payment provider connected to your tenant. An unknown name fails with UNKNOWN_PAYMENT_PROVIDER, which lists the connected providers. Required when any other payment field is sent. Example: 'Stripe'."},"externalCustomerId":{"type":"string","description":"The customer's identifier in the payment provider's system."},"externalPaymentMethodId":{"type":"string","description":"The customer's default payment method in the payment provider's system."}},"additionalProperties":false,"description":"The customer's link to a payment provider. `externalPaymentMethodId` requires `externalCustomerId` in the same request."},"addresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Accepted values: 'billTo', 'soldTo'."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"isDefault":{"type":"boolean","description":"Whether this entry is the default address of its type."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","line1","city","country","zipCode"]},"description":"The customer's addresses. Mark at most one entry per type as the default with isDefault. When a type has none marked, its first entry is the default.","examples":[[{"type":"billTo","line1":"500 Market St","city":"San Francisco","stateProvince":"CA","country":"US","zipCode":"94105","isDefault":true}]]},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The customer's identifiers in other systems, one per configured field name. A field name not configured for your tenant fails with UNKNOWN_EXTERNAL_IDENTIFIER."}},"additionalProperties":false,"required":["name","entityId"]},"updateJournalEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the updated journal entry."}},"additionalProperties":false,"required":["id"]},"updateJournalEntryInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the journal entry."},"description":{"type":"string","description":"A free-form description of the journal entry."},"postingDate":{"type":"string","format":"date","description":"The date the entry posts to the general ledger. Use format YYYY-MM-DD."},"reversalDate":{"type":"string","format":"date","description":"The reversal date recorded on the header. Use format YYYY-MM-DD."},"reversalReason":{"type":"string","description":"The reason recorded on the header for a later reversal. Accepted values: 'accrualReversal', 'revaluationReversal', 'estimate', 'rebook', 'reversingSFD', 'other'. Any other value fails with INVALID_REVERSAL_REASON."},"reversalDescription":{"type":"string","description":"A free-form reversal description recorded on the header."},"url":{"type":"string","description":"A link to the source document this entry comes from."},"createJournalEntryLines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"transactionalCurrency":{"type":"string","description":"The currency of this line's amount. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"A free-form description of the line."},"intercompanyPartnerId":{"type":"string","description":"The intercompany business partner that represents the counterparty legal entity on this line. Format: UUID. Each legal entity has one intercompany business partner, created with the entity. Send that business partner's unique identifier, not the entity's id, or the request fails with REFERENCED_RECORD_NOT_FOUND. Omit this field on lines that are not intercompany."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate from the line's transactionalCurrency to the entity's functional currency. It applies only when the two currencies differ. For a same-currency line it is 1 and any value you send is ignored."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a department record when dimensionCode is 'department'. It must be an existing, active record. For a custom dimension, send the value's modelUuid from listCustomDimensionValues, not its integer modelId."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for this new line, one per reporting dimension. Each tag pairs a dimensionCode with a modelId, and the referenced record must exist and be active. A line has at most one tag per dimensionCode. Omit or send an empty array for an untagged line."}},"additionalProperties":false,"required":["accountId","entityId","transactionalCurrency"]},"description":"The lines to add to the entry. Each is a new line with no id."},"updateJournalEntryLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The line to change. It must belong to this entry."},"accountId":{"type":"string","description":"The general ledger account this line posts to. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"The legal entity this line posts to. See id on GET base/entities."},"intercompanyPartnerId":{"type":"string","description":"The intercompany business partner that represents the counterparty legal entity on this line. Format: UUID. Each legal entity has one intercompany business partner, created with the entity. Send that business partner's unique identifier, not the entity's id, or the request fails with REFERENCED_RECORD_NOT_FOUND. Omit this field on lines that are not intercompany."},"description":{"type":"string","description":"A free-form description of the line."},"debit":{"type":"string","format":"decimal","description":"The debit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"credit":{"type":"string","format":"decimal","description":"The credit amount for this line, in its transactionalCurrency. A line sets either debit or credit, not both."},"transactionalCurrency":{"type":"string","description":"The currency of this line's amount. Format ISO 4217, for example 'USD'."},"exchangeRate":{"type":"string","format":"decimal","description":"The exchange rate from the line's transactionalCurrency to the entity's functional currency. It applies only when the two currencies differ. For a same-currency line it is 1 and any value you send is ignored."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a department record when dimensionCode is 'department'. It must be an existing, active record. For a custom dimension, send the value's modelUuid from listCustomDimensionValues, not its integer modelId."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for the line, one per reporting dimension. Each tag pairs a dimensionCode with a modelId referencing an existing, active record, at most one per dimensionCode. Omit to keep the current tags. Send an empty array to clear them. Send a list to replace them."}},"additionalProperties":false,"required":["id"]},"description":"The existing lines to change, each matched by its id. Only the fields you send on a line change."},"deleteJournalEntryLines":{"type":"array","items":{"type":"string"},"description":"The lines to delete from the entry, each by its id. Deleting a line also deletes its reporting tags."}},"additionalProperties":false},"bankEntriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank entry."},"bankEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank entry number. Absent until one has been assigned."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the bank entry."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the entry."},"transactionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the transaction this entry records. Format YYYY-MM-DD."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services were delivered. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the entry is denominated in. Format ISO 4217, for example 'USD'. It governs every line amount."},"status":{"anyOf":[{"enum":["matched","unmatched","voided","integrated"]},{"type":"null"}],"description":"The reconciliation status of the entry."},"journalEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the journal entry this entry posted to, when it has been posted."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A label for the source system the entry was created from."},"bankAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the bank general-ledger account."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bank entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getAccountingSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"salesReturnNumber":{"type":"string","description":"The RMA number, for example 'SR-1'. Absent while none has been assigned."},"status":{"type":"string","description":"The lifecycle status of the sales return. Possible values: 'draft', 'submitted', 'received', 'approved', 'completed', 'cancelled', 'rejected'."},"returnType":{"type":"string","description":"The resolution path for the return. Possible values: 'credit', 'replacement'. It cannot be changed once status moves past 'draft'."},"returnDate":{"type":"string","description":"The transaction date for the return. Format YYYY-MM-DD."},"salesOrderId":{"type":"string","description":"The sales order this return is against. A sales return is always against exactly one sales order. See id on GET accounting/sales-orders/:id."},"currency":{"type":"string","description":"The currency of every amount on this record and its lines. Format ISO 4217, for example 'USD'."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return. Possible values: 'defectiveItem', 'wrongItemShipped', 'damagedInTransit', 'customerRequest', 'duplicateOrder', 'notAsDescribed', 'other'. It is for reporting and does not affect how the return is resolved."},"notes":{"type":"string","description":"Free-form notes for the return."},"returnTrackingNumber":{"type":"string","description":"The carrier tracking number for the inbound return shipment."},"totalReturnAmount":{"type":"string","format":"decimal","description":"The total return amount, the sum of every line's totalPrice, in the return currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund, such as a restocking fee, in the return currency. Credit returns only. It is set either here or on the lines, never both."},"shippingRefundAmount":{"type":"string","format":"decimal","description":"The shipping charge refunded to the customer, in the return currency. Credit returns only."},"totalRevenueImpact":{"type":"string","format":"decimal","description":"The revenue reversed to the customer, the product-line revenue impact plus the shipping refund, in the return currency. Always 0 for the replacement path."},"revenueStatus":{"type":"string","description":"The revenue reversal status. Possible values: 'notApplicable', 'notStarted', 'reversed'. 'notApplicable' is the replacement path, and 'reversed' is a completed credit return."},"inventoryReturnNumber":{"type":"string","description":"The document number of the linked inventory sales return. Absent until one has been created."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the sales return last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this return line."},"salesOrderProductLineId":{"type":"string","description":"The sales order product line this line returns. See salesOrderProductLineId on GET accounting/sales-orders/:id."},"lineType":{"type":"string","description":"The product line type, copied from the sales order line at creation."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned."},"unitOfMeasure":{"type":"string","description":"The unit of measure, copied from the sales order line."},"currency":{"type":"string","description":"The currency of unitPrice, totalPrice and returnFeeAmount on this line, copied from the sales return. Format ISO 4217, for example 'USD'."},"unitPrice":{"type":"string","format":"decimal","description":"The unit price, copied from the sales order line at creation, in this line's currency."},"totalPrice":{"type":"string","format":"decimal","description":"The total price for the line, quantity times unitPrice, in this line's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee deducted from the customer refund for this line, in this line's currency. Credit returns only. Set only when fees are tracked per line rather than on the header."},"revenueImpactAmount":{"type":"string","format":"decimal","description":"The revenue reversed for this line, in this line's currency. 0 for the replacement path."},"lineStatus":{"type":"string","description":"The lifecycle status of this line. Possible values: 'pending', 'received', 'approved', 'completed', 'cancelled', 'rejected'."}},"additionalProperties":false,"required":["id","salesOrderProductLineId","lineType","quantity","unitOfMeasure","currency","unitPrice","lineStatus"]},"description":"The product lines being returned."}},"additionalProperties":false,"required":["id","status","returnType","returnDate","salesOrderId","currency","lastModifiedDate","lines"]},"accounting_journalEntries_updatedPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"getAccountOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the account."},"accountNumber":{"type":"string","description":"The account number, unique within its chart of accounts."},"accountName":{"type":"string","description":"The display name of the account."},"accountType":{"type":"string","description":"The top-level classification of the account. Possible values: 'asset', 'liability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense'."},"accountSubType":{"type":"string","description":"A finer classification within accountType. Possible values: 'bank', 'accountsReceivable', 'fixedAsset', 'cip', 'prepaidExpenses', 'deferredExpenses', 'otherCurrentAsset', 'otherAsset', 'unbilledReceivable', 'longTermAsset', 'accountsPayable', 'creditCard', 'deferredRevenue', 'otherCurrentLiability', 'longTermLiability', 'equity', 'income', 'costOfGoodsSold', 'expense', 'otherIncome', 'otherExpense', 'otherComprehensiveIncome'. Absent when none is assigned."},"accountStatus":{"type":"string","description":"The lifecycle status of the account. Possible values: 'enabled' (available on transactions), 'disabled' (not available for new transactions), 'draft' (created but not yet reviewed), 'draftErrors' (a draft with validation errors to resolve before it can be enabled)."},"description":{"type":"string","description":"A free-form description of the account. Absent when none was set."},"chartOfAccountsId":{"type":"string","description":"The identifier of the chart of accounts this account belongs to. An account belongs to exactly one. See id on GET accounting/chart-of-accounts/:id."},"parentAccountId":{"type":"string","description":"The identifier of the parent account this account rolls up to. Absent for a top-level account. See id on GET accounting/accounts/:id."},"groupingAccount":{"type":"boolean","description":"Whether this is a grouping (rollup) account. Balances from child accounts aggregate here, and journal entries cannot be posted to it directly."},"entityId":{"type":"string","description":"The identifier of the legal entity this account is denominated for. Set only on bank and credit-card accounts. See id on GET base/entities."},"currency":{"type":"string","description":"The account's currency. Format ISO 4217, for example 'USD'. Set only on accounts linked to a cash account, alongside entityId."},"revaluation":{"type":"boolean","description":"Whether balances on this account are revalued for exchange-rate changes."},"revaluationMode":{"type":"string","description":"Which revaluation results this account recognizes. Possible values: 'recognizeAll' (both unrealized gains and unrealized losses), 'recognizeAllButUnrealizedGains' (only unrealized losses, leaving gains unposted as the imparity principle requires), 'none' (the account is not revalued). Absent when the account has no mode set. `revaluation` is true for every value other than 'none'."},"payOnBehalf":{"type":"boolean","description":"Whether this account takes part in pay-on-behalf accounting."},"elimination":{"type":"boolean","description":"Whether this account is eliminated during consolidation."},"exchangeRateType":{"type":"string","description":"Which rate translates this account's amounts on revaluation. Possible values: 'historical', 'average', 'current'. Absent on grouping accounts."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the account record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteAccountId'. It is the fieldName of an existing account external-identifier configuration."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. An empty array when the account has none."}},"additionalProperties":false,"required":["id","accountNumber","accountName","accountType","chartOfAccountsId","groupingAccount","lastModifiedDate"]},"fundTransfersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fund transfer."},"fundTransferNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fund transfer number, for example 'FT-71122'. Absent while none has been assigned."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the fund transfer."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the transfer."},"transferDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the money moved. Format YYYY-MM-DD."},"transferAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount moved, in the transfer currency."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transfer currency. Format ISO 4217, for example 'USD'. transferAmount is in this currency."},"isVoided":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the transfer has been voided. A voided transfer is kept for audit rather than deleted."},"isIntercompany":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the transfer moves money between two legal entities rather than between two accounts of one entity. When true, toEntityId names the receiving entity."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system or process the transfer came from."},"externalPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this payment in the external system that initiated the transfer. It is not unique."},"fromAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the account the money left."},"toAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the account the money arrived in."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the transfer is posted under."},"toEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the receiving legal entity on an intercompany transfer."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the fund transfer last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"performanceObligationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the performance obligation."},"performanceObligationNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The performance obligation number. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the performance obligation, as it appears on revenue contracts and schedules."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of what the obligation covers. Absent when none is set."},"effectiveStartDate":{"type":"string","format":"date","description":"The first date this obligation is in effect. Format YYYY-MM-DD."},"effectiveEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last date this obligation is in effect. Format YYYY-MM-DD. Absent when the obligation is open-ended."},"allocationStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date from which revenue for this obligation takes part in allocation. Format YYYY-MM-DD. Absent when none is set."},"isAllocationExcluded":{"type":"boolean","description":"Whether the revenue contract lines of this obligation are left out of fair-value allocation."},"isNetAccounting":{"type":"boolean","description":"Whether the obligation is accounted net rather than gross."},"defaultAmortizationMethod":{"anyOf":[{"enum":["exactDays","pointInTime","straightLineProRateFirstLast","straightLine","usageBased"]},{"type":"null"}],"description":"The default amortization method used when scheduling this obligation's revenue."},"standaloneSellingPriceRangeType":{"anyOf":[{"enum":["percentage","amount"]},{"type":"null"}],"description":"How the obligation's standalone selling price ranges are expressed."},"revenueSchedulingTemplateName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the revenue scheduling template that schedules this obligation's revenue."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the performance obligation last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment."},"paymentNumber":{"type":"string","description":"The payment number, unique within the tenant. A human-readable reference used for reconciliation."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"The payment method. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'."},"paymentAccountCurrency":{"type":"string","description":"The currency of the bank account the payment was received into. Present only when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The amount paid, in the payment currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The portion applied so far, in the payment currency: the sum of the payment's applications to invoices, debit memos and manual taxable documents, whatever their appliedDate. For an earlier date, sum only the applications dated on or before it."},"unappliedAmount":{"type":"string","format":"decimal","description":"The portion not yet applied, in the payment currency. unappliedAmount = amount - appliedAmount - refundAmount. For an earlier date, subtract only the payment applications and the approved refunds (listRefunds) dated on or before it."},"refundAmount":{"type":"string","format":"decimal","description":"The portion refunded through approved refunds, in the payment currency."},"bankFeeAmount":{"type":"string","format":"decimal","description":"The bank fee deducted from the payment, in the payment currency."},"smallBalanceWriteOffAmount":{"type":"string","format":"decimal","description":"The total written off as a small residual balance across the payment's applications, in the payment currency."},"totalEarlyPaymentDiscount":{"type":"string","format":"decimal","description":"The total early-payment discount granted across the payment's applications, in the payment currency."},"exchangeRate":{"type":"string","format":"decimal","description":"The rate used to convert the payment currency to the entity's functional currency. A ratio, not an amount, with no currency of its own."},"customerPaymentStatus":{"type":"string","description":"The derived lifecycle status of the payment; the first match wins: 'disputed' or 'chargedBack' (from its dispute status); then, with nothing left unapplied, 'appliedInFull' (some of it was applied) or 'refunded' (none applied, some refunded); otherwise 'partiallyApplied' (some applied), 'partiallyRefunded' (none applied, some refunded) or 'unapplied'."},"disputeStatus":{"type":"string","description":"The dispute state of the payment. Possible values: 'disputed', 'chargedBack'. Absent on an undisputed payment."},"paymentReference":{"type":"string","description":"The reference the payer supplied with the payment, for example a remittance or wire reference. Absent when none was supplied."},"paymentNote":{"type":"string","description":"A free-form note recorded on the payment. Absent when none was set."},"customerId":{"type":"string","description":"The customer the payment came from. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer the payment came from."},"thirdPartyPayerId":{"type":"string","description":"The customer who actually paid, when a third party paid on the invoiced customer's behalf. Absent when the invoiced customer paid. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity that received the payment. See id on GET base/entities."},"accountId":{"type":"string","description":"The ledger account the payment was posted to. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the ledger account the payment was posted to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","paymentDate","paymentType","currency","lastModifiedDate"]},"updateAccountingProductLinePricingOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingProductLinePricingInput":{"type":"object","properties":{"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Use format YYYY-MM-DD."},"priceBookEntriesToCreate":{"type":"array","items":{"type":"object","properties":{"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. Required when the product line is priced 'flat' or 'perUnit'."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Omit on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["unitOfMeasure"],"description":"The rate-card entry to attach. Provide only on rate-card-priced entries."}},"additionalProperties":false},"description":"The price book entries to add to the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry."},"priceBookEntriesToUpdate":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","description":"The unique identifier of the price book entry you want to update. The entry must belong to this pricing header, or the request fails with UNKNOWN_PRICE_BOOK_ENTRY_IDS."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Use only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Use only on a tier. Accepted values: 'flat', 'perUnit'."},"rateCardEntry":{"type":"object","properties":{"rateCardEntryId":{"type":"string","description":"The unique identifier of the rate-card entry you want to update. The rate-card entry must belong to this price book entry, or the request fails with UNKNOWN_RATE_CARD_ENTRY_IDS."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Accepted values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Accepted values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Accepted values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Accepted values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."}},"additionalProperties":false,"required":["rateCardEntryId"],"description":"Changes to the entry's rate-card entry. Provide only on rate-card-priced entries."}},"additionalProperties":false,"required":["entryId"]},"description":"Changes to existing price book entries of the pricing header. Only the fields you send change."},"priceBookEntriesToDelete":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the price book entries to delete from the pricing header. Deleting an entry also deletes its rate-card entry. Each entry must belong to this pricing header, or the request fails with UNKNOWN_PRICE_BOOK_ENTRY_IDS."}},"additionalProperties":false},"getInvoiceMilestoneOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice milestone.","examples":["4b8f2d61-0c3e-4f7a-9a15-6e2d8c90b7a4"]},"salesOrderId":{"type":"string","description":"The sales order whose product lines the milestone bills. Absent when the milestone bills no product line.","examples":["0e6a7c15-93d2-4b48-8f61-2c5b9a3d7e10"]},"description":{"type":"string","description":"What the milestone stands for, as it appears on the invoice line.","examples":["Go-live"]},"orderSequence":{"type":"number","description":"The milestone's position among the sales order's milestones.","examples":[2]},"percentage":{"type":"string","format":"decimal","description":"The share of the sales order the milestone bills, in percent. A number, not an amount.","examples":["40"]},"projectedDate":{"type":"string","format":"date","description":"When the milestone is expected to be reached. Format YYYY-MM-DD.","examples":["2026-12-01"]},"currency":{"type":"string","description":"The currency of the milestone amounts, as a 3-letter ISO 4217 code. It governs amount and every allocatedAmount. Absent when the milestone bills no product line.","examples":["USD"]},"amount":{"type":"string","format":"decimal","description":"The amount the milestone bills, in the milestone currency (see currency). Absent when the milestone bills no product line.","examples":["4000.00"]},"status":{"oneOf":[{"const":"open","description":"Not released for invoicing. The milestone can be changed."},{"const":"released","description":"Released for invoicing on invoiceDate; the invoice is not created yet. The milestone can't be changed until it is unreleased."},{"const":"invoiced","description":"Invoiced. The milestone can't be changed or unreleased."}],"description":"Where the milestone is in invoicing.","examples":["released"]},"invoiceDate":{"type":"string","format":"date","description":"The planned invoice date of a released milestone, or the invoice date of an invoiced one. Absent while the milestone is open. Format YYYY-MM-DD.","examples":["2026-12-15"]},"invoiceId":{"type":"string","description":"The invoice that billed the milestone. Present only when status is 'invoiced'."},"invoiceNumber":{"type":"string","description":"The number of the invoice that billed the milestone. Present only when status is 'invoiced'."},"productLines":{"type":"array","items":{"type":"object","properties":{"salesOrderProductLineId":{"type":"string","description":"The sales order product line."},"allocatedAmount":{"type":"string","format":"decimal","description":"The part of the milestone amount billed on this line, in the milestone currency (see currency)."}},"additionalProperties":false,"required":["salesOrderProductLineId","allocatedAmount"]},"description":"The sales order product lines the milestone bills, each with the part of amount it carries.","examples":[[{"salesOrderProductLineId":"9d1f6b34-2e7a-4c58-b0a9-71c3e5f28d46","allocatedAmount":"4000.00"}]]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the milestone last changed, in UTC. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ).","examples":["2026-11-16T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","status","productLines","lastModifiedDate"]},"invoiceRunsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice run.","examples":["1c9d6b73-4a20-4e58-8f31-7b2e0c4a9d15"]},"invoiceRunNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice run number, for example 'ISR-1042'.","examples":["ISR-1042"]},"status":{"anyOf":[{"enum":["completeAndError","running","completed","created","error"]},{"type":"null"}],"description":"The execution status of the run, as stored rather than corrected, so a run whose worker was killed or lost reads 'running' without end. GET accounting/invoice-runs/:id reports 'error' for such a run instead.","examples":["completed"]},"invoicesCreated":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of invoices the run created.","examples":[3]},"trigger":{"anyOf":[{"enum":["immediately","daily","monthly"]},{"type":"null"}],"description":"What started the run.","examples":["immediately"]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The line types billed, as the raw stored text: the billed line types joined by semicolons into one string, such as 'all'. GET accounting/invoice-runs/:id publishes this as an array instead.","examples":["all"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity billed. See id on GET base/entities.","examples":["6f1b2a84-3d97-4c25-8e60-9a4f0b7d1c53"]},"salesOrderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order billed. Absent on a customer- or entity-scoped run. See id on GET accounting/sales-orders/:id.","examples":["8f14e45f-ceea-467a-9f6b-2c1d0e5a7b39"]},"startedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the run was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-09-30T08:14:22.000Z"]},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the run finished, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent while the run is still working, and on a run whose worker stopped without recording one.","examples":["2026-09-30T08:14:41.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the invoice run record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-09-30T08:14:41.000Z"]}},"additionalProperties":false},"approveSalesOrderOutput":{"type":"object","properties":{},"additionalProperties":false},"approveSalesOrderInput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingProductOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountingProductInput":{"type":"object","properties":{"productName":{"type":"string","description":"The product's display name."},"productCode":{"type":"string","description":"The product's code, unique within the tenant. A code another product already uses fails with DUPLICATE_PRODUCT_CODE."},"effectiveStartDate":{"type":"string","format":"date","description":"The date the product becomes available. Use format YYYY-MM-DD."},"effectiveEndDate":{"type":"string","format":"date","description":"The date the product is no longer available. Use format YYYY-MM-DD."},"productFamily":{"type":"string","description":"The product family. Accepted values: 'software', 'services', 'physicalProducts'."},"productType":{"type":"string","description":"The product type. Accepted values: 'sub', 'termLicense', 'support', 'professionalServices', 'training', 'usage', 'billableTravelExpense', 'bundle', 'hardwareConsumables', 'billablePassThrough', 'merchandise', 'shipping'."},"description":{"type":"string","description":"A description of the product shown to customers."},"internalDescription":{"type":"string","description":"A description of the product for internal use, not shown to customers."},"crmProductId":{"type":"string","description":"The product's identifier in an external CRM system."},"isInventory":{"type":"boolean","description":"Whether the product is tracked as inventory."},"itemIds":{"type":"array","items":{"type":"string"},"description":"The full set of inventory items linked to the product. This array replaces the whole set. Pass every item that should stay linked, and send an empty array to unlink every item. See id on GET inventory/items/:id."}},"additionalProperties":false},"getAccountingPricingOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the pricing header."},"headerNumber":{"type":"string","description":"The pricing header number, assigned by the system and unique within the tenant. Absent while none has been assigned."},"productLineId":{"type":"string","description":"The product line this pricing header prices. See id on GET accounting/product-lines/:id."},"productLineName":{"type":"string","description":"The name of the product line. See name on GET accounting/product-lines/:id."},"productLineNumber":{"type":"string","description":"The product line number. See productLineNumber on GET accounting/product-lines/:id."},"productId":{"type":"string","description":"The product the product line belongs to. See id on GET accounting/products/:id."},"productName":{"type":"string","description":"The display name of the product. See productName on GET accounting/products/:id."},"priceBookId":{"type":"string","description":"The price book this header belongs to. See id on GET accounting/price-books/:id."},"priceBookName":{"type":"string","description":"The display name of the price book. See priceBookName on GET accounting/price-books/:id."},"currency":{"type":"string","description":"The currency the header's prices are in. Format ISO 4217, for example 'USD'."},"validFrom":{"type":"string","format":"date","description":"The first date the header's prices are effective, inclusive. Format YYYY-MM-DD."},"validTo":{"type":"string","format":"date","description":"The last date the header's prices are effective, inclusive. Format YYYY-MM-DD. Absent for a header with no end date."},"dataSource":{"type":"string","description":"The source system or import job that produced the pricing header. Examples: 'Salesforce', 'NetSuite', 'Stripe'."},"hasBeenUsed":{"type":"boolean","description":"Whether at least one sales order line uses this pricing header."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the pricing header was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the pricing header last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"priceBookEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the price book entry."},"priceBookEntryNumber":{"type":"string","description":"The price book entry number, assigned by the system."},"listPrice":{"type":"string","format":"decimal","description":"The list price, in the header currency. On a rate-card entry, the list price is the rate."},"fromQuantity":{"type":"string","format":"decimal","description":"The lowest quantity in the tier, inclusive. Used only when the product line is priced 'tiered', 'volume', 'stairstep', or 'thresholdBased'."},"toQuantity":{"type":"string","format":"decimal","description":"The highest quantity in the tier, inclusive. Absent on the top tier, which has no upper limit."},"priceModel":{"type":"string","description":"How the tier prices its quantity. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'."},"rateCardEntry":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rate-card entry."},"billableComponentId":{"type":"string","description":"The unique identifier of the billable component this rate-card entry prices. No endpoint returns billable components."},"unitOfMeasure":{"type":"string","description":"The unit the rate is quoted in. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"description":{"type":"string","description":"A description of the rate-card entry. The description distinguishes the entry from other rate-card entries on the same billable component."},"usageType":{"type":"string","description":"How usage is measured against this entry. Possible values: 'consumption', 'overage', 'thresholdCounter', 'payg'."},"billableUnitOfMeasure":{"type":"string","description":"The unit used when billing this entry. Possible values: 'instance', 'gigabyte', 'terabyte', 'user', 'seat', 'minute', 'hour', 'day', 'month', 'each', 'license', 'activeUser', 'megabyte', 'message', 'text', 'platform', 'employee', 'personnel', 'credit', 'currency', 'package', 'case', 'word', 'record'."},"conversion":{"type":"string","format":"decimal","description":"The multiplier that converts unitOfMeasure quantities into billableUnitOfMeasure quantities."},"invoiceFrequency":{"type":"string","description":"How often usage on this entry is invoiced. Possible values: 'monthly', 'biMonthly', 'quarterly', 'semiAnnually', 'annually', 'once', 'custom', 'template', 'milestone', 'allAtOnce', 'termEnd'."},"priceModel":{"type":"string","description":"How the rate-card entry's price is calculated. Possible values: 'flat', 'perUnit', 'tiered', 'volume', 'stairstep', 'rateCard', 'thresholdBased'. Absent when no price model was set on the rate-card entry."}},"additionalProperties":false,"required":["id","unitOfMeasure"],"description":"The rate-card entry attached to this price book entry. Absent when the entry is not rate-card priced."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the external identifier, not its display label."},"value":{"type":"string","description":"The identifier's value in the source system."},"externalUrl":{"type":"string","description":"An absolute http or https link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent when the price book entry has none."}},"additionalProperties":false,"required":["id"]},"description":"The price book entries of the pricing header. For a product line priced 'tiered', 'volume', 'stairstep', or 'thresholdBased', each entry is one tier: a quantity range with its own price. A 'flat' or 'perUnit' line has one entry, and a 'rateCard' line has one entry per rate-card entry. An empty array when the header has none."}},"additionalProperties":false,"required":["id","productLineId","priceBookId","currency","validFrom","lastModifiedDate","priceBookEntries"]},"searchDebitMemoOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo."},"debitMemoNumber":{"type":"string","description":"The debit memo number, for example 'DM-1'. A standalone debit memo that isn't approved yet carries a placeholder such as 'DRAFT-3' instead, and gets its number when it's approved. Absent while none has been assigned."},"creditMemoId":{"type":"string","description":"The source credit memo this debit memo settles. Absent on a standalone debit memo. See id on GET accounting/credit-memos/:id."},"creditMemoNumber":{"type":"string","description":"The number of the source credit memo. Present whenever creditMemoId is."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo was issued. Format YYYY-MM-DD."},"dueDate":{"type":"string","format":"date","description":"The date the debit memo falls due. Format YYYY-MM-DD. Computed from debitMemoDate plus the payment term's days."},"taxDate":{"type":"string","format":"date","description":"The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate."},"approvalStatus":{"type":"string","description":"The approval status of the debit memo. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved debit memo has financial effect."},"debitMemoStatus":{"type":"string","description":"The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull'. Absent before approval. Not refreshed daily: it is recomputed on approval, when an approved debit memo's date or due date changes, and whenever a payment or credit is applied to it or unapplied. So a partly covered debit memo stays 'partiallyPaid' past its due date, and 'isOverdue' appears on an uncovered one only once a recompute runs after the due date."},"debitMemoType":{"type":"string","description":"The reason key for the charge, for example 'orderEntryError'. The accepted keys are configured per tenant."},"currency":{"type":"string","description":"The currency of the debit memo. Format ISO 4217, for example 'USD'. It governs every amount on the record."},"customerId":{"type":"string","description":"The customer the debit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The display name of the customer."},"customerNumber":{"type":"string","description":"The customer number."},"entityId":{"type":"string","description":"The legal entity that issued the debit memo. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the issuing legal entity."},"paymentTerm":{"type":"string","description":"The payment-term key applied to the debit memo. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order reference."},"customerMessage":{"type":"string","description":"A free-text message shown to the customer on the document."},"externalDebitMemoId":{"type":"string","description":"The identifier of this debit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"isMigrated":{"type":"boolean","description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed."},"debitGlAccountId":{"type":"string","description":"The general ledger account the journal entry debits for the debit memo's full amount. See id on GET accounting/accounts/:id."},"billToAddressId":{"type":"string","description":"The bill-to address on the document. There is no endpoint for it."},"soldToAddressId":{"type":"string","description":"The sold-to address on the document. There is no endpoint for it."},"subtotal":{"type":"string","format":"decimal","description":"The sum of the lines' pre-discount totals, in the debit memo currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total including tax, in the debit memo currency."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the debit memo currency."},"totalAmountDebited":{"type":"string","format":"decimal","description":"The gross amount debited, in the debit memo currency."},"lineDiscounts":{"type":"string","format":"decimal","description":"The sum of the prorated discount amounts across all lines, in the debit memo currency."},"unappliedCreditAmount":{"type":"string","format":"decimal","description":"The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo line."},"lineNumber":{"type":"string","description":"The sequential line number within the debit memo."},"description":{"type":"string","description":"A free-text line description, shown to the customer."},"productId":{"type":"string","description":"The debited product. Absent on a free-text line. See id on GET accounting/products/:id."},"productLineId":{"type":"string","description":"The product line the line bills. Absent unless a standalone line names one."},"creditMemoLineId":{"type":"string","description":"The source credit memo line this line debits. Absent on a standalone debit memo. See lines[].id on GET accounting/credit-memos/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity debited. A count, not an amount, so it has no currency."},"unitOfMeasure":{"type":"string","description":"The unit-of-measure key, for example 'each'."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the debit memo currency."},"adjustedUnitPrice":{"type":"string","format":"decimal","description":"The price per unit after adjustment, in the debit memo currency."},"listPrice":{"type":"string","format":"decimal","description":"The list price per unit as it stood on the source credit memo line, in the debit memo currency."},"listPriceTotal":{"type":"string","format":"decimal","description":"The pre-discount line total, in the debit memo currency."},"discountAmount":{"type":"string","format":"decimal","description":"The discount from the source credit memo line, in the debit memo currency."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount as a percentage of the list price. A percentage, not an amount, so it has no currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total excluding tax, in the debit memo currency."},"amountDebited":{"type":"string","format":"decimal","description":"The amount debited for the line, in the debit memo currency."},"totalAmountDue":{"type":"string","format":"decimal","description":"The amount of the source credit memo line still available to debit, in the debit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the debit memo currency."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined on. Format YYYY-MM-DD."},"taxMode":{"type":"string","description":"How the line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'."},"taxExemptCode":{"type":"string","description":"The customer-level tax-exempt code applied to the line."},"creditGlAccountId":{"type":"string","description":"The line's credit general ledger account, the credit side of the journal entry. See id on GET accounting/accounts/:id."},"vatAccountingType":{"enum":["domesticStandardRate","domesticReducedRate","domesticSalesZeroRated","domesticSalesExempt","vatIntraEuStandardRate","vatIntraEuReducedRate","nonEuExempt","reverseCharge"],"description":"The VAT type of the line. Absent unless a standalone line carries one."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The line's identifiers in other systems, one per configured field name. An empty array or absent when the line has none."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the debit memo, each debiting one line of the source credit memo. An empty array when the debit memo has no lines. All line amounts are in the debit memo currency."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The debit memo's identifiers in other systems, one per configured field name. An empty array or absent when the debit memo has none."}},"additionalProperties":false,"required":["id","debitMemoDate","debitMemoType","currency","customerId","entityId","paymentTerm","billToAddressId","soldToAddressId","lastModifiedDate"]},"description":"The debit memos on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchDebitMemoInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the debit memo with this identifier."},"debitMemoNumber":{"type":"string","description":"Limits results to the debit memo with this number, for example 'DM-1'. The match is exact."},"creditMemoId":{"type":"string","description":"Limits results to debit memos settling this credit memo. See id on GET accounting/credit-memos/:id."},"creditMemoNumber":{"type":"string","description":"Limits results to debit memos settling the credit memo with this number. The match is exact."},"customerId":{"type":"string","description":"Limits results to debit memos issued to this customer. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"Limits results to debit memos whose customer name contains this text. The match is case-insensitive."},"customerNumber":{"type":"string","description":"Limits results to debit memos with this customer number. The match is exact."},"entityId":{"type":"string","description":"Limits results to debit memos issued by this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to debit memos whose legal entity name contains this text. The match is case-insensitive."},"approvalStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to debit memos in any of these approval statuses. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Any other value matches no debit memo."},"debitMemoStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to debit memos in any of these coverage statuses. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'disputed'. Any other value matches no debit memo."},"debitMemoType":{"type":"array","items":{"type":"string"},"description":"Limits results to debit memos carrying any of these reason keys, for example 'orderEntryError'. The accepted keys are configured per tenant."},"currency":{"type":"string","description":"Limits results to debit memos in this currency. Format ISO 4217, for example 'USD'. The match is exact."},"paymentTerm":{"type":"string","description":"Limits results to debit memos with this payment-term key. The match is exact. See code on GET accounting/payment-terms."},"purchaseOrder":{"type":"string","description":"Limits results to debit memos whose purchase-order reference contains this text. The match is case-insensitive."},"customerMessage":{"type":"string","description":"Limits results to debit memos whose customer message contains this text. The match is case-insensitive."},"externalDebitMemoId":{"type":"string","description":"Limits results to the debit memo with this external system identifier. The match is exact."},"isMigrated":{"type":"boolean","description":"Limits results by whether the debit memo was loaded from a previous system. Omit to return both."},"debitMemoDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to debit memos issued in this date range. Omit either bound to leave that side open."},"dueDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to debit memos falling due in this date range. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results to debit memos last changed in this range. Omit either bound to leave that side open."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'Maxio Invoice Key'. It must be the fieldName of an existing debit-memo external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier value to match, exactly as the other system stores it."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to debit memos with this external identifier. Both fieldName and value are required. Several debit memos may share a value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. A debit memo must match every filter you send. Omit to return all debit memos."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of debit memos per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false},"accountingPeriodStatusesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this entity-book period status row. This identifies the (entity, book, period) combination, not the shared accounting period."},"accountingPeriodId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the underlying accounting period, shared by every entity that uses this fiscal calendar. See id on GET accounting/accounting-periods/:id."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the legal entity this status belongs to. See id on GET base/entities. Absent only when the entity-book link is broken."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this status belongs to."},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the accounting book this status belongs to. A period is opened and closed per book. See id on GET accounting/books/:id."},"bookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the accounting book this status belongs to."},"periodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the period as its fiscal calendar defines it, for example 'Jan 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"fiscalYear":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal year label this period belongs to, for example 'FY2024'. Set by the calendar, so it need not match the calendar year of startDate. It is a label, not a number: a filter must match its spelling exactly, so read the distinct values first. A fiscal year runs from the earliest startDate to the latest endDate of its periods for one entity and book."},"fiscalQuarter":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fiscal quarter label this period belongs to, for example 'Q1 2026'."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period, inclusive. Format YYYY-MM-DD. Absent only when the underlying period was deleted."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period, inclusive. Format YYYY-MM-DD."},"status":{"enum":["open","closed","created","reopened"],"description":"The status this entity and book have put the period in. Possible values: 'created' (generated, not yet opened), 'open', 'closed', 'reopened'. Only 'open' and 'reopened' accept postings."},"reopeningReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The free-text reason recorded when the period was reopened. Set only when status is 'reopened'."},"reopenedByCascade":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this period was reopened as a side effect of reopening a later one, rather than directly."},"postable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the period currently accepts postings for this entity and book, true when its status is 'open' or 'reopened'. This does not account for journal-type-specific locks."},"postableReason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the period does not accept postings, for example 'status is closed'. Empty when it is postable."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this status row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It changes when the period is opened, closed or reopened for this entity and book."}},"additionalProperties":false},"booksRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the accounting book."},"name":{"type":"string","description":"The display name of the accounting book."},"type":{"enum":["full","adjustment"],"description":"The kind of accounting book. An adjustment book adjusts the full book named in baseBookId."},"accountingStandard":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting standard the book follows, for example 'IFRS' or 'US GAAP'. Absent when none is set."},"consolidation":{"type":"boolean","description":"Whether the book consolidates other books or entities."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the accounting book. Absent when none is set."},"baseBookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full book this adjustment book adjusts. Absent for a full book. See id on GET accounting/books/:id."},"allEntities":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the book is marked as assigned to all legal entities: none of its legal entities can be removed from it. The flag assigns no legal entity by itself. A book created with allEntities: true starts with every legal entity assigned; one switched on later keeps the legal entities it had. The assignments are listed by GET accounting/books/entity-assignments."},"exchangeRateGroupId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The exchange rate group the book takes its exchange rates from. Absent when none is set."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the accounting book record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"accounting_journalEntries_deletedPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"payInvoiceOutput":{"type":"object","properties":{"paymentId":{"type":"string","description":"The unique identifier for the payment created. Read it back with GET accounting/payments/:id, or re-read the invoice for its updated balance.","examples":["7d41e9b2-58c6-4a03-9e17-2b8f0c5d6a39"]}},"additionalProperties":false,"required":["paymentId"]},"payInvoiceInput":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount paid, in the invoice's currency. Must be greater than zero and may not exceed the amount still due.","examples":["1210.00"]},"paymentDate":{"type":"string","format":"date","description":"The date the payment was received or settled. Format YYYY-MM-DD. It drives the ledger posting and the reporting period.","examples":["2026-09-15"]},"paymentType":{"enum":["check","ach","wire","creditCard","directDebit","sepaCreditTransfer"],"description":"How the payment was tendered.","examples":["wire"]},"paymentNote":{"type":"string","description":"A free-text note recorded on the payment, for example a bank reference or check number.","examples":["Remittance ref 88213"]},"bankFeeAmount":{"type":"string","format":"decimal","description":"The fee the bank or processor deducted, in the invoice's currency. Recorded on the payment rather than subtracted from it. Send the gross amount in amount.","examples":["12.50"]}},"additionalProperties":false,"required":["amount","paymentDate","paymentType"]},"getSubscriptionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the subscription."},"subscriptionNumber":{"type":"string","description":"The subscription number. Unique within the tenant. Example: 'SUB-1'."},"customerId":{"type":"string","description":"The customer this subscription belongs to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer this subscription belongs to. See name on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The legal entity that owns this subscription. See id on GET base/entities."},"currency":{"type":"string","description":"The currency of annualRecurringRevenue and monthlyRecurringRevenue. Format ISO 4217, for example 'USD'."},"autoRenew":{"type":"boolean","description":"Whether the subscription renews automatically at the end of its term."},"renewalTerm":{"type":"number","description":"The length of the auto-renewal term, in the subscription's term unit."},"renewalPriceChangePercentage":{"type":"string","format":"decimal","description":"The percentage by which the price changes on renewal."},"termType":{"type":"string","description":"The term type of the subscription. Possible values: 'termed', 'evergreen'."},"subscriptionStatus":{"type":"string","description":"The status of the subscription, derived now from the status of its lines, strongest first: any 'active' line makes it 'active'; otherwise 'suspended', 'pendingActivation', 'notStarted', 'pendingOrderApproval'; with none of those it is 'canceled'. 'canceled' therefore also covers a subscription whose term simply ended. A cancellation itself is isCancellationEnabled with a cancellationDate; read those, not this status, for any date other than today."},"serviceStartDateBasis":{"type":"string","description":"How the service start date is determined. Possible values: 'fixedDate', 'serviceActivation'."},"serviceActivationDate":{"type":"string","format":"date","description":"The date service was activated. Set only when serviceStartDateBasis is 'serviceActivation'. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The earliest service start date across the subscription's lines. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The latest service end date across all of the subscription's lines. Format YYYY-MM-DD. Usually absent when the subscription is evergreen, but present once it is canceled or suspended."},"submissionDate":{"type":"string","format":"date","description":"The submission date of the sales order this subscription came from. Format YYYY-MM-DD."},"cancellationDate":{"type":"string","format":"date","description":"The last day of service of a canceled subscription, which is out of service from the day after; its lines end on this date unless the cancellation set another end date for them. Absent when no cancellation has been recorded. Format YYYY-MM-DD."},"cancellationNote":{"type":"string","description":"A note about the cancellation."},"cancellationReason":{"type":"string","description":"The reason code for the cancellation. Possible values: 'noReasonGiven', 'budgetary', 'movingToCompetitors', 'lowCustomerSatisfaction', 'bankruptcy', 'acquisitionMerger'. Absent when the subscription has not been canceled."},"isCancellationEnabled":{"type":"boolean","description":"Whether the cancellation procedure has been applied to this subscription."},"suspensionDate":{"type":"string","format":"date","description":"The date from which the subscription is or will be suspended. Absent when no suspension has been recorded. Format YYYY-MM-DD."},"suspensionNote":{"type":"string","description":"A note about the suspension."},"suspensionReason":{"type":"string","description":"The reason code for the suspension. Possible values: 'unpaidBalance', 'invalidPaymentMethod'. Absent when the subscription has not been suspended."},"isSuspensionEnabled":{"type":"boolean","description":"Whether the suspension process is enabled for this subscription."},"externalSubscriptionId":{"type":"string","description":"The subscription's identifier in an external system. Absent when none was recorded at creation."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annual recurring revenue, in the subscription's currency: the sum of annualRecurringRevenue across the lines that are active or suspended now."},"monthlyRecurringRevenue":{"type":"string","format":"decimal","description":"The monthly recurring revenue, in the subscription's currency: the sum of monthlyRecurringRevenue across the lines that are active or suspended now."},"totalUserCount":{"type":"string","format":"decimal","description":"The number of active users or seats across the subscription's active lines."},"prepaidBalance":{"type":"string","format":"decimal","description":"The prepaid balance remaining for this subscription, summed across the prepaid balances linked to it. The balance is a quantity, not a currency amount."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the subscription line."},"subscriptionLineNumber":{"type":"string","description":"The subscription line number. Unique within the tenant."},"productName":{"type":"string","description":"The name of the product this line covers."},"quantity":{"type":"string","format":"decimal","description":"The quantity currently on this line, summed across its sales order product lines."},"currency":{"type":"string","description":"The currency of annualRecurringRevenue and monthlyRecurringRevenue on this line. Format ISO 4217, for example 'USD'."},"subscriptionLineStatus":{"type":"string","description":"The status of this line. Possible values: 'pendingActivation', 'notStarted', 'active', 'pendingOrderApproval', 'canceled', 'suspended'."},"serviceStartDate":{"type":"string","format":"date","description":"The date service starts for this line. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The date service ends for this line: the later of customServiceEndDate and maxSalesOrderProductLineServiceEndDate. When the subscription is cancelable and has a cancellationDate, serviceEndDate is maxSalesOrderProductLineServiceEndDate. Format YYYY-MM-DD."},"customServiceEndDate":{"type":"string","format":"date","description":"The service end date set on this line by a subscription modification, such as extending the term or ending the line. Absent when no modification has set one. Format YYYY-MM-DD."},"maxSalesOrderProductLineServiceEndDate":{"type":"string","format":"date","description":"The latest service end date across this line's sales order product lines. Format YYYY-MM-DD."},"annualRecurringRevenue":{"type":"string","format":"decimal","description":"The annual recurring revenue of this line, in the line's currency. The value counts only while subscriptionLineStatus is 'active' or 'suspended', and is 0 otherwise."},"monthlyRecurringRevenue":{"type":"string","format":"decimal","description":"The monthly recurring revenue of this line, in the line's currency. monthlyRecurringRevenue = annualRecurringRevenue / 12."},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The sales order. See id on GET accounting/sales-orders/:id."},"orderNumber":{"type":"string","description":"The sales order number. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'. 'upsell' is a mid-term modification of a subscription: the order is stored as 'midTermModification', the name POST accounting/subscriptions/:id/modify uses, and this version reports it as 'upsell'. API version v2 reports it as 'midTermModification'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved order is booked business: an invoice run raises invoices for approved orders only. 'draft', 'pendingApproval' and 'revise' are awaiting approval and never share a total with approved orders."}},"additionalProperties":false,"required":["id"]},"description":"The sales orders that carry this line, oldest first. An empty array when no sales order carries it."}},"additionalProperties":false,"required":["id","currency","salesOrders"]},"description":"The subscription's lines, one for each product on the subscription, oldest first. An empty array when the subscription has none."},"salesOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The sales order. See id on GET accounting/sales-orders/:id."},"orderNumber":{"type":"string","description":"The sales order number. Example: 'SO-1042'."},"orderType":{"type":"string","description":"The type of the sales order. Possible values: 'new', 'upsell', 'earlyRenewal', 'renewal', 'replacement'. 'upsell' is a mid-term modification of a subscription: the order is stored as 'midTermModification', the name POST accounting/subscriptions/:id/modify uses, and this version reports it as 'upsell'. API version v2 reports it as 'midTermModification'."},"approvalStatus":{"type":"string","description":"The approval status of the sales order. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved order is booked business: an invoice run raises invoices for approved orders only. 'draft', 'pendingApproval' and 'revise' are awaiting approval and never share a total with approved orders."}},"additionalProperties":false,"required":["id"]},"description":"The sales orders that carry this subscription, oldest first: the order that created it, then every later mid-term modification (orderType 'upsell'), renewal or replacement. An empty array when no sales order carries it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the subscription last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","currency","termType","lines","salesOrders","lastModifiedDate"]},"debitMemosRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the debit memo."},"debitMemoNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The debit memo number, for example 'DM-1'. A standalone debit memo that isn't approved yet carries a placeholder such as 'DRAFT-3' instead, and gets its number when it's approved. Absent while none has been assigned."},"creditMemoId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source credit memo this debit memo settles. Absent on a standalone debit memo. See id on GET accounting/credit-memos/:id."},"creditMemoNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the source credit memo. Present whenever creditMemoId is."},"debitMemoDate":{"type":"string","format":"date","description":"The date the debit memo was issued. Format YYYY-MM-DD."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the debit memo falls due. Format YYYY-MM-DD. Computed from debitMemoDate plus the payment term's days."},"taxDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate."},"approvalStatus":{"anyOf":[{"enum":["draft","pendingApproval","revise","approved","rejected"]},{"type":"null"}],"description":"The approval status of the debit memo. Only an approved debit memo has financial effect."},"debitMemoStatus":{"anyOf":[{"enum":["unpaid","isOverdue","partiallyPaid","paidInFull","creditedInFull","disputed"]},{"type":"null"}],"description":"The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull'. Absent before approval. Not refreshed daily: it is recomputed on approval, when an approved debit memo's date or due date changes, and whenever a payment or credit is applied to it or unapplied. So a partly covered debit memo stays 'partiallyPaid' past its due date, and 'isOverdue' appears on an uncovered one only once a recompute runs after the due date."},"debitMemoType":{"type":"string","description":"The reason key for the charge, for example 'orderEntryError'. The accepted keys are configured per tenant."},"currency":{"type":"string","description":"The currency of the debit memo. Format ISO 4217, for example 'USD'. It governs every amount on the record."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer the debit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the customer."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer number."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that issued the debit memo. See id on GET base/entities."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the issuing legal entity."},"paymentTerm":{"type":"string","description":"The payment-term key applied to the debit memo. See code on GET accounting/payment-terms."},"purchaseOrder":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's own purchase-order reference."},"customerMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-text message shown to the customer on the document."},"externalDebitMemoId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of this debit memo in an external source system."},"isMigrated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed."},"debitGlAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The general ledger account the journal entry debits for the debit memo's full amount. See id on GET accounting/accounts/:id."},"billToAddressId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bill-to address on the document. There is no endpoint for it."},"soldToAddressId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sold-to address on the document. There is no endpoint for it."},"subtotal":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of the lines' pre-discount totals, in the debit memo currency."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total including tax, in the debit memo currency."},"totalTax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total tax across all lines, in the debit memo currency."},"totalAmountDebited":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The gross amount debited, in the debit memo currency."},"lineDiscounts":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of the prorated discount amounts across all lines, in the debit memo currency."},"unappliedCreditAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"approveRevenueContractOutput":{"type":"object","properties":{},"additionalProperties":false},"approveRevenueContractInput":{"type":"object","properties":{},"additionalProperties":false},"searchRevenueSchedulingTemplateOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revenue scheduling template."},"revenueSchedulingTemplateNumber":{"type":"string","description":"The template number, unique within the tenant, for example 'RST-0007'. Absent while none has been assigned."},"revenueSchedulingTemplateName":{"type":"string","description":"The name of the revenue scheduling template."},"revenueRecognitionPattern":{"type":"string","description":"How revenue is recognized under this template. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'."},"revenueSchedulingEvent":{"type":"string","description":"The event that creates a revenue plan under this template. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'."},"amortizationMethod":{"type":"string","description":"How the scheduled amount is spread over the plan's periods. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. Absent when the recognition pattern does not spread revenue over time."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revenue scheduling template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","revenueSchedulingTemplateName","revenueRecognitionPattern","revenueSchedulingEvent","lastModifiedDate"]},"description":"The revenue scheduling templates that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchRevenueSchedulingTemplateInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the revenue scheduling template with this identifier. The match is exact."},"revenueSchedulingTemplateNumber":{"type":"string","description":"Limits results to the template with this template number. The match is exact."},"revenueSchedulingTemplateName":{"type":"string","description":"Limits results to the template with this exact name. The match is case-sensitive. Takes precedence over nameContains when both are sent."},"nameContains":{"type":"string","description":"Limits results to templates whose name contains this text. The match is case-insensitive. Ignored when revenueSchedulingTemplateName is also sent."},"revenueRecognitionPattern":{"type":"string","description":"Limits results to templates with this recognition pattern. Possible values: 'upfront', 'overTime', 'asDelivered', 'asConsumed'. Any other value matches nothing."},"revenueSchedulingEvent":{"type":"string","description":"Limits results to templates triggered by this event. Possible values: 'revenueArrangementCreation', 'uponInvoicing', 'uponUsageConsumption', 'manualRelease', 'uponInvoicingPercentInvoiced', 'uponInvoicingFullAmount', 'serviceActivation'. Any other value matches nothing."},"amortizationMethod":{"type":"string","description":"Limits results to templates with this amortization method. Possible values: 'exactDays', 'pointInTime', 'straightLineProRateFirstLast', 'straightLine', 'usageBased'. Any other value matches nothing."}},"additionalProperties":false,"description":"The filters to apply. A revenue scheduling template must match every filter you send. Omit to return all revenue scheduling templates."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of templates per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"searchCreditMemoOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo."},"creditMemoNumber":{"type":"string","description":"The credit memo number, for example 'CM-1'. Absent while none has been assigned."},"creditMemoDate":{"type":"string","format":"date","description":"The date the credit memo was issued. Format YYYY-MM-DD."},"creditMemoStatus":{"type":"string","description":"The application status of the credit memo. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'."},"creditMemoType":{"type":"string","description":"How the credit memo was created. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn', 'trueUp'. Only 'manual' credit memos are created through this API. The rest come from internal workflows."},"manualCreditMemoType":{"type":"string","description":"The reason for a manual credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Absent when creditMemoType is not 'manual'."},"currency":{"type":"string","description":"The currency of the credit memo. Every amount on the record, its lines and its application rows is in this currency. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"A free-form description of the credit memo."},"externalCreditMemoId":{"type":"string","description":"The identifier of this credit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below."},"customerId":{"type":"string","description":"The customer the credit memo is issued to. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer the credit memo is issued to."},"customerNumber":{"type":"string","description":"The customer number of the customer the credit memo is issued to."},"entityId":{"type":"string","description":"The legal entity that issued the credit memo. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that issued the credit memo."},"invoiceId":{"type":"string","description":"The invoice the credit memo was created from. Absent when it was not created from an invoice. See id on GET accounting/invoices/:id."},"invoiceNumber":{"type":"string","description":"The number of the invoice the credit memo was created from. Present whenever invoiceId is."},"subtotal":{"type":"string","format":"decimal","description":"The subtotal before tax and duties, in the credit memo currency. Absent when no subtotal has been computed."},"totalTax":{"type":"string","format":"decimal","description":"The total tax across all lines, in the credit memo currency."},"totalDutiesAndCustoms":{"type":"string","format":"decimal","description":"The total duties and customs across all lines, in the credit memo currency."},"totalAmountCredited":{"type":"string","format":"decimal","description":"The total credited, including tax and duties, in the credit memo currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The amount applied to invoices and debit memos so far, in the credit memo currency. This is the net of the application rows below."},"unappliedAmount":{"type":"string","format":"decimal","description":"The amount still available to apply, in the credit memo currency. For an earlier date, take totalAmountCredited less the appliedAmount of its credit memo applications with appliedDate on or before it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the credit memo last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the credit memo line."},"creditMemoLineNumber":{"type":"string","description":"The line number within the credit memo."},"description":{"type":"string","description":"The line description, as shown to the customer."},"productId":{"type":"string","description":"The product credited by the line. Absent on free-text lines. See id on GET accounting/products/:id."},"productCode":{"type":"string","description":"The product code as it stood when the line was created. It does not follow later changes to the product."},"productDescription":{"type":"string","description":"The product description as it stood when the line was created. It does not follow later changes to the product."},"quantity":{"type":"string","format":"decimal","description":"The quantity credited."},"unitPrice":{"type":"string","format":"decimal","description":"The price per unit, in the credit memo currency."},"totalPrice":{"type":"string","format":"decimal","description":"The line total before tax and duties, in the credit memo currency."},"taxAmount":{"type":"string","format":"decimal","description":"The tax on the line, in the credit memo currency."},"dutiesAndCustomsAmount":{"type":"string","format":"decimal","description":"The duties and customs on the line, in the credit memo currency."},"amountCredited":{"type":"string","format":"decimal","description":"The total credited for the line, in the credit memo currency: totalPrice + taxAmount + dutiesAndCustomsAmount."},"taxCode":{"type":"string","description":"The tax code applied to the line."},"taxDate":{"type":"string","format":"date","description":"The date the line's tax was determined. Format YYYY-MM-DD."},"serviceStartDate":{"type":"string","format":"date","description":"The first day of the service period the line covers. Format YYYY-MM-DD."},"serviceEndDate":{"type":"string","format":"date","description":"The last day of the service period the line covers, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the credit memo, each crediting one product or free-text item. An empty array when the credit memo has no lines. Every amount is in the credit memo currency."},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the application row."},"appliedAmount":{"type":"string","format":"decimal","description":"The signed amount moved by this row, in the row's currency: positive when applying, negative when unapplying. Sum the rows to reconcile against the header appliedAmount."},"appliedDate":{"type":"string","format":"date","description":"The date the allocation was recorded. Format YYYY-MM-DD."},"actionType":{"type":"string","description":"What this row did. Possible values: 'applied', 'unapplied'."},"type":{"type":"string","description":"The kind of document the credit memo was allocated against. Possible values: 'invoice', 'debitMemo'. Absent when the stored target kind is not one this version recognizes."},"targetId":{"type":"string","description":"The target document: an invoice when type is 'invoice', a debit memo when type is 'debitMemo'. Absent when the target no longer exists or its kind is unrecognized. See id on GET accounting/invoices/:id and GET accounting/debit-memos/:id."},"targetNumber":{"type":"string","description":"The number of the target document."},"currency":{"type":"string","description":"The currency of this row's appliedAmount. Matches the credit memo currency. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["id","appliedDate","currency"]},"description":"The application rows, each recording one allocation of the credit memo against an invoice or debit memo. Applying and unapplying both add a row, told apart by actionType and the sign of appliedAmount, so this is an append-only history rather than the current allocation. An empty array when the credit memo has never been applied."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteCreditMemoId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The credit memo's identifiers in other systems, one per configured field name. An empty array or absent when the credit memo has none."}},"additionalProperties":false,"required":["id","creditMemoDate","currency","customerId","entityId","lastModifiedDate"]},"description":"The matching credit memos for this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchCreditMemoInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the credit memo with this id."},"creditMemoNumber":{"type":"string","description":"Limits results to the credit memo with this number, for example 'CM-1'. The match is exact."},"customerId":{"type":"string","description":"Limits results to credit memos issued to this customer. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"Limits results to credit memos whose customer name contains this text. The match is case-insensitive."},"customerNumber":{"type":"string","description":"Limits results to credit memos with this customer number. The match is exact."},"entityId":{"type":"string","description":"Limits results to credit memos issued by this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to credit memos whose entity name contains this text. The match is case-insensitive."},"creditMemoStatus":{"type":"array","items":{"type":"string"},"description":"Limits results to credit memos in any of these application statuses. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'. Any other value matches no credit memo. An empty array does not constrain."},"creditMemoType":{"type":"array","items":{"type":"string"},"description":"Limits results to credit memos of any of these types. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn', 'trueUp'. Any other value matches no credit memo. An empty array does not constrain."},"description":{"type":"string","description":"Limits results to credit memos whose description contains this text. The match is case-insensitive."},"externalCreditMemoId":{"type":"string","description":"Limits results to the credit memo with this external source system identifier. The match is exact."},"invoiceNumber":{"type":"string","description":"Limits results to credit memos created from the invoice with this number. The match is exact."},"creditMemoDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The inclusive lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The inclusive upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to credit memos issued between the given bounds. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"Limits results by when the credit memo last changed, the window to poll for an incremental sync. Omit either bound to leave that side open."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteCreditMemoId'. It must be the fieldName of an existing credit-memo external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier value to match, exactly as the other system stores it."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to credit memos with this external identifier. Both fieldName and value are required. Several credit memos may share a value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. A credit memo must match every filter you send. Omit to return all credit memos."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of credit memos per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit on the first request."}},"additionalProperties":false},"accounting_journalEntries_createdPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"cancelSubscriptionOutput":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"Id of the canceled subscription (a UUID); echoes the :id path segment."},"status":{"type":"string","description":"Status of the subscription after the call. Always 'cancelled'."},"cancellationDate":{"type":"string","format":"date","description":"Effective date the service ends (ISO 8601, YYYY-MM-DD); echoes the validated cancellationDate."}},"additionalProperties":false,"required":["subscriptionId","status","cancellationDate"]},"cancelSubscriptionInput":{"type":"object","properties":{"cancellationDate":{"type":"string","format":"date","description":"Date the service ends (ISO 8601, YYYY-MM-DD). For evergreen subscriptions this must fall on a billing-period boundary and on/after the end of the last invoiced period."},"submissionDate":{"type":"string","format":"date","description":"Date the customer requested the cancellation (ISO 8601, YYYY-MM-DD). Recorded on the cancellation for audit."},"reasonCode":{"enum":["noReasonGiven","budgetary","movingToCompetitors","lowCustomerSatisfaction","bankruptcy","acquisitionMerger"],"description":"Reason for the cancellation. Defaults to noReasonGiven."},"note":{"type":"string","description":"Free-text note recorded on the cancellation"},"invoiceImmediately":{"type":"boolean","description":"Evergreen subscriptions only: immediately invoice the final prorated period up to the cancellation date. Defaults to false."},"externalOrderId":{"type":"string","description":"Upstream order reference, recorded on the cancellation note for audit. Cancellation is naturally idempotent: a repeat call returns ALREADY_CANCELLED."}},"additionalProperties":false,"required":["cancellationDate"]},"deleteBookOutput":{"type":"object","properties":{},"additionalProperties":false},"searchEntitiesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entity. Other resources reference it as entityId."},"entityName":{"type":"string","description":"The name of the entity, for example 'Acme Inc.'. Unique within the tenant."},"entityNumber":{"type":"string","description":"The entity's business number, assigned by the system. Absent until one is assigned."},"currency":{"type":"string","description":"The entity's functional currency. Format ISO 4217, for example 'USD'. Entity-only: a book's currency for the entity is set on the book's entity assignment. Absent when none has been set."},"timeZone":{"type":"string","description":"The time zone the entity operates in. Format IANA time-zone name, for example 'Europe/Berlin'. Absent when none has been set."},"status":{"type":"string","description":"The lifecycle status of the entity. Possible values: 'active', 'inactive', 'created'. A new entity starts as 'created'."},"entityType":{"type":"string","description":"Whether the entity is a legal entity or a non-legal reporting entity. Possible values: 'LegalEntity', 'NonLegalReportingEntity'."},"country":{"type":"string","description":"The country the entity is registered in. Format ISO 3166-1 alpha-2, for example 'US'. Absent when none has been set."},"entityCode":{"type":"string","description":"A short code for the entity, separate from its entityNumber. Absent until one is assigned."},"localeCode":{"type":"string","description":"The locale for documents sent from this entity. Format BCP 47, for example 'en-US'. Absent when none has been set."},"startDate":{"type":"string","format":"date","description":"The date the entity became effective. Format YYYY-MM-DD. Absent when none has been set."},"endDate":{"type":"string","format":"date","description":"The date the entity stops being effective. Format YYYY-MM-DD. Absent when the entity has no scheduled end."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the entity last changed, in UTC. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."},"parentEntityId":{"type":"string","description":"The parent entity in the entity hierarchy, which a consolidation rolls this entity up to. See id on GET base/entities/:id. Absent on the top-level entity."},"registeredAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'US'."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The entity's registered address. Absent when none has been set."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteSubsidiaryId'."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers owned by other systems, at most one per fieldName. Absent or empty when the entity has none."}},"additionalProperties":false,"required":["id","entityName","lastModifiedDate"]},"description":"The matching entities.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","entityName":"Acme GmbH","status":"active","entityType":"LegalEntity","lastModifiedDate":"2026-05-12T09:30:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchEntitiesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"entityName":{"type":"string","description":"Limits results to entities whose name contains this text. The match is case-insensitive."},"entityNumber":{"type":"string","description":"Limits results to the entity with this number. The match is exact."},"status":{"enum":["active","inactive","created"],"description":"Limits results to entities with this status."},"entityType":{"enum":["LegalEntity","NonLegalReportingEntity"],"description":"Limits results to entities of this type. Omit to return both types."},"parentEntityId":{"type":"string","description":"Limits results to the direct children of this entity. An identifier that matches no entity returns an empty page."},"country":{"type":"string","description":"Limits results to entities registered in this country. Format ISO 3166-1 alpha-2, for example 'US'."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier. A fieldName with no configuration fails with UNKNOWN_EXTERNAL_IDENTIFIER. List the configured fieldNames on GET base/entity-external-identifier-fields."},"value":{"type":"string","description":"The identifier as the source system holds it. The match is exact and case-sensitive."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to entities carrying this external identifier. Both members are required. Several entities may share a value, so this returns the items array."}},"additionalProperties":false,"description":"The filters to apply. An entity must match every filter you send. Omit to return all entities.","examples":[{"entityName":"acme","status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor returned by the previous response as pagination.nextCursor. Do not construct it manually. Omit for the first page."},"size":{"type":"number","description":"The number of entities per page. Defaults to 50. Values above 200 are treated as 200, values below 1 as 1."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"getIngestionStatusOutput":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"dataExtractionId":{"type":"number","description":"The identifier of the ingestion job, returned unchanged."},"name":{"type":"string","description":"The name recorded for this ingestion, usually the original file name. Absent when none is set."},"mapping":{"type":"string","description":"The column mapping applied to this ingestion. An empty string when the default schema was used."},"extractedData":{"type":"array","items":{"type":"object","properties":{"everestId":{"type":"number","description":"The internal identifier assigned to the row once it is processed. Absent until then."},"status":{"type":"string","description":"The processing status of this row, for example 'PENDING', 'Staged', 'Integrated' or 'FAILED'."},"isActive":{"type":"boolean","description":"Whether this row is currently active. An inactive row stays visible for audit but is left out of downstream billing."},"error":{"type":"string","description":"The reason the row failed. Present only when status is a failure."},"trackId":{"type":"string","description":"The trackId you supplied for this row at ingestion. Absent when you supplied none."}},"additionalProperties":false,"required":["status","isActive"]},"description":"The per-record outcomes, one entry for each row of the ingested payload."}},"additionalProperties":false,"required":["dataExtractionId","mapping","extractedData"]},{"type":"null"}],"description":"The status of the ingestion job. Null when no job matches dataExtractionId."}},"additionalProperties":false},"updateCustomerOutput":{"type":"object","properties":{},"additionalProperties":false},"updateCustomerInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The id of the legal entity to move the customer to. Documents created afterward use this legal entity, and existing ones keep theirs."},"name":{"type":"string","description":"The name of the customer, as it appears on invoices."},"customerType":{"type":"string","description":"The customer type. Accepted values: 'default', 'partner'. Cannot be changed once the customer appears on a sales order. That change fails with CUSTOMER_TYPE_CHANGE_NOT_ALLOWED. Setting 'endCustomer' is not supported and fails with END_CUSTOMER_NOT_SUPPORTED; an existing end customer can be updated and keeps its partner."},"partnerType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The partner type, for a customer whose customerType is 'partner'. Accepted values: 'reseller', 'thirdPartyPayer'."},"businessType":{"type":"string","description":"The business type of the customer. Accepted values: 'company', 'individual'."},"invoiceEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address invoices are sent to.","examples":["ap@example-robotics.com"]},"mainEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address of the customer's main contact."},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax. Setting it to false also clears exemptionNumber and taxExemptCode."},"defaultCurrency":{"type":"string","description":"The default currency for the customer's transactions, as a 3-letter ISO 4217 code."},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The market segment of the customer. Accepted values: 'SMB', 'MidMarket', 'Enterprise'. Ignored when businessType is 'individual', in this request or already set.","examples":["MidMarket"]},"exemptionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax-exemption certificate number. Accepted only when taxExempt is true, in this request or already set. Otherwise the request fails with EXEMPTION_NUMBER_REQUIRES_TAX_EXEMPT."},"paymentTermCode":{"type":"string","description":"The code of a payment term on the customer's legal entity's list. When the request also changes entityId, the code must be on the new legal entity's list. A code that is not on the list fails with UNKNOWN_REFERENCE. See code on GET accounting/payment-terms."},"parentId":{"type":"string","description":"The id of the parent customer. An unknown id fails with UNKNOWN_REFERENCE."},"partnerId":{"type":"string","description":"The id of the partner this customer buys through. An unknown id fails with UNKNOWN_REFERENCE."},"salesChannel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales channel for this customer. Accepted values: 'salesAssisted' (sold through a salesperson), 'selfServe'."},"additionalContactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Another email address for the customer, besides invoiceEmail and mainEmail."},"mainContactName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer's main contact."},"preferredLanguage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's preferred language. Accepted values: 'english'."},"crmCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's identifier in an external CRM system."},"businessIdentificationNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's business registration number."},"invoiceConsolidation":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the customer's invoices are consolidated. Accepted values: 'customer', 'purchaseOrderNumber', 'salesArrangement'."},"invoiceDeliveryMode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How invoices are delivered to the customer. Accepted values: 'manual', 'automated'."},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether the customer is exempt from credit-card fees."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel and expense items appear on invoices. Accepted values: 'detailed', 'consolidated'."},"status":{"type":"string","description":"The status of the customer. Accepted values: 'active', 'inactive'."},"taxExemptCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax-exemption reason code. Cleared when taxExempt is false."},"taxRegistrations":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","description":"The country the registration applies in, as an ISO 3166-1 code."},"taxNumber":{"type":"string","description":"The tax identification number issued by the tax authority."},"type":{"type":"string","description":"The kind of tax registration. Accepted values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'."},"effectiveDate":{"type":"string","format":"date","description":"The date the registration takes effect. Use format YYYY-MM-DD."},"isActive":{"type":"boolean","description":"Whether the registration is active. Only one active registration is allowed per country and tax type. Defaults to true."}},"additionalProperties":false,"required":["country","taxNumber","type"]},"description":"The customer's tax registrations. This array replaces the customer's whole set of registrations. An entry matching an existing registration on country and type updates it. Any other entry is added. A registration not in the array is deleted. Send an empty array to remove them all."},"payment":{"type":"object","properties":{"provider":{"type":"string","description":"The name of a payment provider connected to your tenant. An unknown name fails with UNKNOWN_PAYMENT_PROVIDER, which lists the connected providers. Required when any other payment field is sent. Example: 'Stripe'."},"externalCustomerId":{"type":"string","description":"The customer's identifier in the payment provider's system."},"externalPaymentMethodId":{"type":"string","description":"The customer's default payment method in the payment provider's system."}},"additionalProperties":false,"description":"The customer's link to a payment provider. `externalPaymentMethodId` requires `externalCustomerId`, in this request or already set."},"addresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Accepted values: 'billTo', 'soldTo'."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"isDefault":{"type":"boolean","description":"Whether this entry is the default address of its type."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","line1","city","country","zipCode"]},"description":"The customer's addresses. This array replaces the customer's whole address set, both types, and every address gets a new addressId. Send an empty array to remove every address."},"createAddresses":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The address type. Accepted values: 'billTo', 'soldTo'."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"isDefault":{"type":"boolean","description":"Whether this entry is the default address of its type."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["type","line1","city","country","zipCode"]},"description":"Addresses to add to the customer, alongside its existing ones. Mark at most one entry per type as the default with isDefault. Cannot be combined with `addresses`. That combination fails with INVALID_FIELD_VALUE."},"updateAddresses":{"type":"array","items":{"type":"object","properties":{"addressId":{"type":"string","description":"The address to update. See addressId on GET accounting/customers/:id."},"type":{"type":"string","description":"The address type. Accepted values: 'billTo', 'soldTo'. A different value moves the address to that type."},"attention":{"type":"string","description":"The person or department that mail to this address is for."},"isDefault":{"type":"boolean","description":"Whether this entry is the default address of its type."},"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building, or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province, or region."},"country":{"type":"string","description":"The country, as a name or ISO 3166-1 code."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["addressId"]},"description":"Changes to existing addresses of the customer, each named by its addressId. A field you omit keeps its current value. Each address keeps its addressId. An addressId the customer does not have fails with ADDRESS_NOT_FOUND. Cannot be combined with `addresses`. That combination fails with INVALID_FIELD_VALUE."},"deleteAddresses":{"type":"array","items":{"type":"string"},"description":"The addressIds of the addresses to remove from the customer. An addressId the customer does not have fails with ADDRESS_NOT_FOUND. When you remove the default address of a type, another address of that type becomes the default. Cannot be combined with `addresses`. That combination fails with INVALID_FIELD_VALUE. See addressId on GET accounting/customers/:id."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. A fieldName the customer already has fails with DUPLICATE_EXTERNAL_IDENTIFIER."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier. Example: 'netsuiteCustomerId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to replace, matched by fieldName. A fieldName the customer does not have fails with EXTERNAL_IDENTIFIER_NOT_FOUND."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove. A fieldName the customer does not have fails with EXTERNAL_IDENTIFIER_NOT_FOUND."}},"additionalProperties":false},"createPriceBookOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created price book."}},"additionalProperties":false,"required":["id"]},"createPriceBookInput":{"type":"object","properties":{"priceBookName":{"type":"string","description":"The display name of the price book. Required, and must be unique within the tenant, compared case-insensitively."},"active":{"type":"boolean","description":"Whether the price book is active and usable in transactions. Omit to use the default."},"description":{"type":"string","description":"A free-form description of the price book."},"dataSource":{"type":"string","description":"The source system that provided the price book data."}},"additionalProperties":false,"required":["priceBookName"]},"rerunInvoiceRunOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoice run retried. It is the same run, not a new one.","examples":["3f8b2d47-1c69-4a05-9e83-7d4a0f6b2e91"]},"status":{"type":"string","description":"The status the run settled at after the retry. Possible values: 'completed', 'error', 'completeAndError'. 'error' or 'completeAndError' means the retry hit the same problem, and the run can be rerun again once the cause is fixed.","examples":["completed"]},"invoicesCreated":{"type":"number","description":"The total number of invoices the run has created, including those from before the retry.","examples":[2]}},"additionalProperties":false,"required":["id","status","invoicesCreated"]},"rerunInvoiceRunInput":{"type":"object","properties":{},"additionalProperties":false},"deleteAccountingProductLineOutput":{"type":"object","properties":{},"additionalProperties":false},"amortizationScheduleLinesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for this amortization schedule line."},"amortizationScheduleHeaderId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the amortization schedule this line belongs to. Several lines, one per period, share it. There is no endpoint for the schedule itself."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this schedule line belongs to. See id on GET base/entities. Absent when the schedule's source journal entry line is missing. Such a schedule line is still returned, but doesn't match an entityId filter."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this schedule line belongs to."},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the accounting book this schedule posts into. See id on GET accounting/books/:id."},"bookName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the accounting book this schedule posts into."},"scheduledPeriodId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting period this schedule line is scheduled in. See accountingPeriodId on GET accounting/accounting-periods. To check whether a period close is blocked, filter on scheduledPeriodEndDate instead, because this filter misses earlier schedule lines that aren't posted."},"scheduledPeriodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the scheduled period as its fiscal calendar defines it, for example 'Aug 2026'. The format varies by calendar, so do not parse it. Match on dates instead."},"scheduledPeriodStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the scheduled period, inclusive. Format YYYY-MM-DD."},"scheduledPeriodEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the scheduled period, inclusive. Format YYYY-MM-DD. For a period-close check, filter on this date: it finds every schedule line due on or before the period being closed."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount of this schedule line, in the currency given by transactionCurrency."},"transactionCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency that denominates amount, taken from the schedule's source journal entry line. Format ISO 4217, for example 'USD'. Absent on a row whose header or source document was deleted. A query that does not filter by book can return rows in several currencies."},"amortizationMethod":{"anyOf":[{"enum":["exactDays","pointInTime","straightLineProRateFirstLast","straightLine","usageBased"]},{"type":"null"}],"description":"How the schedule spreads its total, from the header."},"amortizationStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the amortization schedule. Format YYYY-MM-DD. This is the schedule's start, not this schedule line's period."},"amortizationEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day the schedule amortizes over, from the header. Format YYYY-MM-DD."},"isJournalEntryPosted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this schedule line's journal entry has been posted. To find schedule lines still to post, filter on outstanding instead."},"isConfirmedZero":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this schedule line was confirmed as zero, so no journal entry is needed. Absent means not confirmed. To find schedule lines still to post, filter on outstanding."},"outstanding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this schedule line still needs a journal entry: true when its journal entry isn't posted and it isn't confirmed as zero. Filter on this for a period-close check."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time this schedule line last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. It tracks the line itself, so a change to the header or the joined entity, book or period does not advance it."}},"additionalProperties":false},"createCreditCardEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created credit card entry.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createCreditCardEntryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the entry is posted under. See id on GET base/entities.","examples":["e8dc29b9-7e79-4709-bb32-95938bcb1bd1"]},"creditCardAccountId":{"type":"string","description":"The general-ledger account behind the credit card account this entry posts against. See id on GET accounting/accounts/:id.","examples":["f50164c3-85e3-4dab-986e-3fdb39f8ecc1"]},"transactionDate":{"type":"string","format":"date","description":"The date the transaction took place. Use format YYYY-MM-DD. It decides the posting period.","examples":["2026-02-14"]},"currency":{"type":"string","description":"The currency of the entry. Format ISO 4217, for example 'USD'. It governs every amount on the entry. Omit to use the account's own currency. When supplied it must match the account's currency.","examples":["USD"]},"status":{"type":"string","description":"The reconciliation status. Accepted values: 'Matched', 'Unmatched', 'Posted', 'Voided', 'Integrated'. Defaults to 'Unmatched'.","examples":["unmatched"]},"name":{"type":"string","description":"A short name for the entry.","examples":["February bank fees"]},"description":{"type":"string","description":"A free-form description of the entry."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD."},"origin":{"type":"string","description":"The system or process the entry originated from."},"externalUrl":{"type":"string","description":"A link to the entry in the originating system."},"lines":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","description":"The general-ledger account this line posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"amount":{"type":"string","format":"decimal","description":"The line amount, as a decimal in the entry currency. It must be non-zero."},"description":{"type":"string","description":"A free-form description of the line."},"departmentId":{"type":"string","description":"The department this line is attributed to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is attributed to. There is no endpoint for it."},"businessPartnerId":{"type":"string","description":"The business partner this line is attributed to. Required when vatPercentage or taxCodeId is supplied. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The line's cost moves to that entity through an intercompany cross charge journal entry. It must differ from entityId, cross charging must be set up for both entities, and the line must not be prepaid, or the request fails with CROSS_CHARGE_INVALID."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'oneTime', 'prepaid'. Derived from the account's sub-type when omitted."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. Supplying it requires businessPartnerId. It must match exactly one active tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. It fills the VAT rate, VAT account and reverse-charge account the line does not state. Supplying it requires businessPartnerId."},"vatAccountId":{"type":"string","description":"The general-ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general-ledger account the reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The VAT amount, as a decimal in the entry currency. Omit to derive it from vatPercentage."},"netAmount":{"type":"string","format":"decimal","description":"The net amount, as a decimal in the entry currency. Omit to derive it from amount less VAT."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. It determines which model modelId points to. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The uuid of the dimension record this tag points to, on the model that dimensionCode names. For example, a region record when dimensionCode is 'region'."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"The reporting tags for this line, at most one per reporting dimension. Each tag pairs a dimensionCode with a modelId, and the referenced record must exist. A department or businessUnit tag must agree with departmentId or businessUnitId when both are sent. Omit or send an empty array for a line tagged only by departmentId and businessUnitId."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account where each schedule line recognizes the expense. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Required, because the schedule lines are created from it when the entry's journal entry is posted."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. Only a prepaid line may carry them: on any other line they are refused with AMORTIZATION_NOT_ALLOWED_ON_LINE. Because lineType is derived from the account's sub-type when omitted, a line that resolves to a non-prepaid account is refused the same way."}},"additionalProperties":false,"required":["accountId","amount"]},"description":"The lines of the entry, in the order they appear. At least one is required. No line may be zero, and the lines may not sum to zero.","examples":[[{"accountId":"9994c3ed-f812-44c1-9454-7f36b2bfb0fb","amount":"-125.00","description":"Account maintenance fee","lineType":"oneTime"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createCreditCardEntry` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createCreditCardEntry, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the entry, each an uploaded file sent as `file` (see `file` below). Required on a tenant configured to require an attachment."}},"additionalProperties":false,"required":["entityId","creditCardAccountId","transactionDate","lines"]},"searchRefundsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the refund."},"refundNumber":{"type":"string","description":"The refund number, unique within the tenant, for example 'REF-1042'."},"refundDate":{"type":"string","format":"date","description":"The date the refund was issued. Format YYYY-MM-DD."},"approvalStatus":{"type":"string","description":"The approval status. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'."},"refundType":{"type":"string","description":"The payment method used for the refund. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'."},"currency":{"type":"string","description":"The currency of the refund. Every amount on it is in this currency. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The refund amount, in the refund currency."},"unappliedAmount":{"type":"string","format":"decimal","description":"The unapplied balance remaining on the source payment, in the refund currency."},"refundNote":{"type":"string","description":"A free-form note attached to the refund. Absent when none was set."},"customerId":{"type":"string","description":"The customer receiving the refund. See id on GET accounting/customers/:id."},"customerName":{"type":"string","description":"The name of the customer receiving the refund."},"entityId":{"type":"string","description":"The legal entity issuing the refund. See id on GET base/entities."},"paymentId":{"type":"string","description":"The source payment being refunded. See id on GET accounting/payments/:id."},"paymentNumber":{"type":"string","description":"The number of the source payment being refunded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the refund last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","refundDate","refundType","currency","amount","customerId","entityId","paymentId","lastModifiedDate"]},"description":"The refunds that match, most recently created first. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","refundNumber":"REF-1042","refundDate":"2026-08-01","approvalStatus":"approved","refundType":"ach","currency":"USD","amount":"150.00","unappliedAmount":"0.00","customerId":"9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7","customerName":"Northwind Traders","entityId":"1a24d5e9-3b7d-4f80-9c6d-2e8f70b13a45","paymentId":"5a0f3e6d-81b7-4c8e-9b21-9c2a6a107d34","paymentNumber":"PMT-7781","lastModifiedDate":"2026-08-01T09:12:44.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchRefundsInput":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the refund with this identifier."},"status":{"type":"array","items":{"enum":["draft","pendingApproval","revise","approved","rejected"]},"description":"Limits results to refunds in any of these approval states. Omit or pass an empty array to return every state.","examples":[["pendingApproval","revise"]]},"paymentId":{"type":"string","description":"Limits results to refunds against this source payment. See id on GET accounting/payments/:id."},"customerId":{"type":"string","description":"Limits results to refunds for this customer. See id on GET accounting/customers/:id.","examples":["9c2a6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"refundDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"The earliest refundDate to include, inclusive. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"The latest refundDate to include, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Limits results to refunds whose refundDate falls in this range. Both bounds are inclusive. Omit either bound to leave that side open."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"The earliest change time to include, inclusive."},"end":{"type":"string","description":"The latest change time to include, inclusive."}},"additionalProperties":false,"description":"Limits results to refunds whose lastModifiedDate falls in this range, in UTC. Both bounds are inclusive. Omit either bound to leave that side open. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of refunds per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"deactivateVendorOutput":{"type":"object","properties":{},"additionalProperties":false},"deactivateVendorInput":{"type":"object","properties":{},"additionalProperties":false},"createVendorOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created vendor.","examples":["a17c3e58-4b62-4d19-8f70-2c5d9e1a6b34"]}},"additionalProperties":false,"required":["id"]},"createVendorInput":{"type":"object","properties":{"vendorName":{"type":"string","description":"The name of the vendor.","examples":["Acme GmbH"]},"vendorType":{"type":"string","description":"The kind of vendor. Accepted values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'.","examples":["supplier"]},"status":{"type":"string","description":"The lifecycle status. Accepted values: 'active', 'inactive'.","examples":["active"]},"paymentTerms":{"type":"string","description":"The default payment-terms key, for example 'net30', 'net60' or 'dueOnReceipt'. Stored as supplied.","examples":["net30"]},"vendorSubType":{"type":"string","description":"A finer classification, used when vendorType is 'supplier'. Accepted values: 'direct', 'indirect'."},"mainContactName":{"type":"string","description":"The full name of the primary contact.","examples":["Dana Fischer"]},"mainContactEmail":{"type":"string","description":"The email address of the primary contact."},"mainContactPhone":{"type":"string","description":"The phone number of the primary contact."},"billingEmail":{"type":"string","description":"The email address invoices and billing messages are sent to."},"preferredCurrency":{"type":"string","description":"The preferred transaction currency. Format ISO 4217, for example 'USD'.","examples":["EUR"]},"preferredLanguage":{"type":"string","description":"The language the vendor prefers for messages."},"independentContractor":{"type":"string","description":"Whether the vendor is an independent contractor. Accepted values: 'yes', 'no', 'unsure'."},"externalVendorId":{"type":"string","description":"The identifier this vendor has in an external system. It is not unique."},"origin":{"type":"string","description":"The source system this record came from."},"defaultAccountId":{"type":"string","description":"The general ledger account expenses for this vendor default to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department costs for this vendor default to. See id on GET people/departments/:id."},"vendorEntityId":{"type":"string","description":"The legal entity this vendor belongs to. See id on GET base/entities."},"bankDetails":{"type":"object","properties":{"bankAccountNumber":{"type":"string","description":"The vendor's bank account number, or IBAN."},"bankAccountType":{"type":"string","description":"The kind of bank account, as your tenant's account-type list spells it."},"bankAccountHolderName":{"type":"string","description":"The name the account is held in."},"bankAccountNumberType":{"type":"string","description":"How to read bankAccountNumber. Accepted values: 'iban', 'achOrWire', 'other'."},"financialInstitutionId":{"type":"string","description":"The bank's identifier, a BIC, SWIFT or routing number."},"financialInstitutionIdType":{"type":"string","description":"How to read financialInstitutionId."}},"additionalProperties":false,"description":"The bank account the vendor is paid into. Optional. You can add it later with PATCH accounting/vendors/:id."},"remittanceAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code such as 'DE', or its name. A value matching neither fails with INVALID_COUNTRY."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","zipCode","country"],"description":"The address remittance advice is sent to. Optional. You can add it later with PATCH accounting/vendors/:id."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createVendor` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createVendor, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"The files to attach to the vendor. Upload each file first and send its reference as `file`."}},"additionalProperties":false,"required":["vendorName","vendorType","status","paymentTerms"]},"deleteVendorCreditOutput":{"type":"object","properties":{},"additionalProperties":false},"rejectVendorBillOutput":{"type":"object","properties":{"status":{"type":"string","description":"The bill status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"rejectVendorBillInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the bill is being rejected, recorded against the approval decision. Omit for none.","examples":["Amount does not match the purchase order"]}},"additionalProperties":false},"updateVendorOutput":{"type":"object","properties":{},"additionalProperties":false},"updateVendorInput":{"type":"object","properties":{"vendorName":{"type":"string","description":"The new name of the vendor. Omit to leave it unchanged."},"status":{"type":"string","description":"The new lifecycle status. Accepted values: 'active', 'inactive'. Setting 'inactive' retires a vendor with history without deleting it."},"paymentTerms":{"type":"string","description":"The new default payment-terms key. Omit to leave it unchanged. Stored as supplied.","examples":["net60"]},"vendorSubType":{"type":"string","description":"The new sub-type. Accepted values: 'direct', 'indirect'. Omit to leave it unchanged."},"mainContactName":{"type":"string","description":"The new primary contact name. Omit to leave it unchanged.","examples":["Dana Fischer-Weiss"]},"mainContactEmail":{"type":"string","description":"The new primary contact email. Omit to leave it unchanged."},"mainContactPhone":{"type":"string","description":"The new primary contact phone. Omit to leave it unchanged."},"billingEmail":{"type":"string","description":"The new billing email. Omit to leave it unchanged."},"preferredCurrency":{"type":"string","description":"The new preferred currency. Format ISO 4217, for example 'USD'. Omit to leave it unchanged."},"preferredLanguage":{"type":"string","description":"The new preferred language. Omit to leave it unchanged."},"independentContractor":{"type":"string","description":"The new independent-contractor value. Accepted values: 'yes', 'no', 'unsure'. Omit to leave it unchanged."},"origin":{"type":"string","description":"The new source system. Omit to leave it unchanged."},"defaultAccountId":{"type":"string","description":"The new default general ledger account. Omit to leave it unchanged. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The new default department. Omit to leave it unchanged. See id on GET people/departments/:id."},"vendorEntityId":{"type":"string","description":"The new legal entity. Omit to leave it unchanged. See id on GET base/entities."},"bankDetails":{"type":"object","properties":{"bankAccountNumber":{"type":"string","description":"The vendor's bank account number, or IBAN."},"bankAccountType":{"type":"string","description":"The kind of bank account, as your tenant's account-type list spells it."},"bankAccountHolderName":{"type":"string","description":"The name the account is held in."},"bankAccountNumberType":{"type":"string","description":"How to read bankAccountNumber. Accepted values: 'iban', 'achOrWire', 'other'."},"financialInstitutionId":{"type":"string","description":"The bank's identifier, a BIC, SWIFT or routing number."},"financialInstitutionIdType":{"type":"string","description":"How to read financialInstitutionId."}},"additionalProperties":false,"description":"The bank account the vendor is paid into. Sending this replaces the bank-detail fields. Omit it to leave the bank details unchanged."},"remittanceAddress":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"zipCode":{"type":"string","description":"The postal or ZIP code."},"country":{"type":"string","description":"The country, as an ISO 3166-1 alpha-2 code such as 'DE', or its name. A value matching neither fails with INVALID_COUNTRY."},"attention":{"type":"string","description":"The person or department that mail to this address is for."}},"additionalProperties":false,"required":["line1","city","zipCode","country"],"description":"The address remittance advice is sent to. Sending this replaces the address fields. Omit it to leave the address unchanged."},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/updateVendor` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for updateVendor, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false}},{"type":"null"}],"description":"The files attached to the vendor. Omit to keep the current files. Send null or an empty array to remove them all. A list you send replaces the whole list."}},"additionalProperties":false},"approveEmployeeAdvanceRequestOutput":{"type":"object","properties":{"status":{"type":"string","description":"Status after the operation. The workflow decides it, so it is read back rather than assumed.","examples":["approved"]}},"additionalProperties":false,"required":["status"]},"approveEmployeeAdvanceRequestInput":{"type":"object","properties":{},"additionalProperties":false},"updatePurchaseOrderOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePurchaseOrderInput":{"type":"object","properties":{"vendorId":{"type":"string","description":"The vendor the order is placed with. See id on GET accounting/vendors/:id. Omit to leave unchanged."},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'. Governs every line amount. Omit to leave unchanged."},"description":{"type":"string","description":"The description of the order, shown to the vendor. Omit to leave unchanged."},"internalDescription":{"type":"string","description":"An internal description of the order, not shown to the vendor. Omit to leave unchanged."},"externalMemo":{"type":"string","description":"A memo printed on vendor-facing documents. Omit to leave unchanged."},"externalPONumber":{"type":"string","description":"The reference number this order has in the upstream system. Omit to leave unchanged."},"paymentTerms":{"type":"string","description":"The payment-terms code agreed with the vendor, for example 'net30'. Omit to leave unchanged."},"startDate":{"type":"string","format":"date","description":"The date the order starts. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","format":"date","description":"The date the order ends. Use format YYYY-MM-DD. Omit to leave unchanged."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are required by. Use format YYYY-MM-DD. Omit to leave unchanged.","examples":["2026-11-01"]},"requestedById":{"type":"string","description":"The employee who requested the order. There is no endpoint for it. Omit to leave unchanged."},"purchaseTypeId":{"type":"string","description":"The purchase type of the order. Must be an active type, unless the order already has it. Omit to leave unchanged. A purchase type cannot be cleared through this endpoint. See id on GET accounting/purchase-types/:id."},"createLines":{"type":"array","items":{"type":"object","properties":{"isItem":{"type":"boolean","description":"Whether this is an item line. True for an item line, priced by quantity times price. False for an expense line, priced by editableAmount."},"description":{"type":"string","description":"A description of what is being ordered."},"itemId":{"type":"string","description":"The item being ordered. Expected on an item line."},"accountId":{"type":"string","description":"The ledger account the line is booked to. See id on GET accounting/accounts/:id. Expected on an expense line."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. Expected on an item line."},"departmentId":{"type":"string","description":"The department the cost is allocated to. See id on GET people/departments/:id."},"quantity":{"type":"string","format":"decimal","description":"The ordered quantity, as a decimal. Expected on an item line."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency, as a decimal. Expected on an item line."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, in the order currency, as a decimal. Expected on an expense line."},"startDate":{"type":"string","format":"date","description":"The date this line starts. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The date this line ends. Use format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["isItem"]},"description":"Lines to add to this order, in the same shape as on create but with no id. Omit for no additions."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this order."},"isItem":{"type":"boolean","description":"Whether this is an item line. Omit to leave unchanged."},"description":{"type":"string","description":"A description of what is being ordered. Omit to leave unchanged."},"itemId":{"type":"string","description":"The item being ordered. Omit to leave unchanged."},"accountId":{"type":"string","description":"The ledger account the line is booked to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. Omit to leave unchanged."},"departmentId":{"type":"string","description":"The department the cost is allocated to. See id on GET people/departments/:id. Omit to leave unchanged."},"quantity":{"type":"string","format":"decimal","description":"The ordered quantity, as a decimal. Omit to leave unchanged."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency, as a decimal. Omit to leave unchanged."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, in the order currency, as a decimal. Omit to leave unchanged."},"startDate":{"type":"string","format":"date","description":"The date this line starts. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","format":"date","description":"The date this line ends. Use format YYYY-MM-DD. Omit to leave unchanged."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Use format YYYY-MM-DD. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by the id the order publishes. Every field but the id is optional and omit leaves it unchanged. Omit for no changes.","examples":[[{"id":"7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9","editableAmount":"520.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of the lines to remove, applied before the updates and creates. Each must belong to this order. Removing them all is refused, so delete the order instead."}},"additionalProperties":false},"searchPayrollPaymentOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment."},"payrollPaymentNumber":{"type":"string","description":"The payment number. Absent until a number has been assigned."},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is made in. Format ISO 4217, for example 'USD'. Governs totalPaid and every application amount."},"paymentType":{"type":"string","description":"How the payment was made: the instrument, not the origin. Values include 'manual' and 'bank'."},"status":{"type":"string","description":"The status of the payment. Values include 'successful', 'rejected', 'cancelled', 'processing', 'partiallySuccessful', 'unknown', 'unsigned', 'manuallyRecorded', 'scheduled' and 'voided'."},"approvalStatus":{"type":"string","description":"The approval status of the payment."},"description":{"type":"string","description":"A description recorded on the payment."},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid, in paymentCurrency."},"externalId":{"type":"string","description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"paymentAccountId":{"type":"string","description":"The general ledger account the payment is booked against. See id on GET accounting/accounts/:id."},"paymentAccountName":{"type":"string","description":"The name of the general ledger account the payment is booked against."},"entityId":{"type":"string","description":"The legal entity that made the payment. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment application."},"applicationNumber":{"type":"string","description":"The application number."},"description":{"type":"string","description":"A description of the application."},"amountPaid":{"type":"string","format":"decimal","description":"The amount paid by this application, as a decimal in currency."},"currency":{"type":"string","description":"The currency governing amountPaid, the payroll run's currency. Format ISO 4217, for example 'USD'."},"paymentStatus":{"type":"string","description":"The status of the paying payment item, mirrored onto the application. It uses the same values as the payment's status."},"payrollDetailId":{"type":"string","description":"The payroll detail this application settles. See id on GET accounting/payroll-details/:id."},"accountId":{"type":"string","description":"The general ledger account this application is booked against. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the general ledger account this application is booked against."},"accountNumber":{"type":"string","description":"The number of the general ledger account this application is booked against."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration, for example 'employee' or 'taxOffice'."},"payeeLabel":{"type":"string","description":"The display label for the payee."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a vendor. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor being paid."},"employeeId":{"type":"string","description":"The employee being paid, when the payee is an employee. There is no endpoint for it."},"employeeName":{"type":"string","description":"The name of the employee being paid."}},"additionalProperties":false,"required":["id"]},"description":"The payroll payment applications, each tying part of this payment to one payroll detail and one payee. An empty array when the payment has none."}},"additionalProperties":false,"required":["id","paymentDate","paymentCurrency","paymentType","status","lastModifiedDate"]},"description":"The payroll payments that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more payments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPayrollPaymentInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the payroll payment with this identifier."},"payrollPaymentNumber":{"type":"string","description":"Limits results to the payroll payment with this number."},"entityId":{"type":"string","description":"Limits results to payments made by this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to payments made by a legal entity with this name. The match is exact and case-sensitive."},"paymentAccountId":{"type":"string","description":"Limits results to payments booked against this general ledger account. See id on GET accounting/accounts/:id."},"paymentType":{"type":"string","description":"Limits results to payments made this way. Values include 'manual' and 'bank'. Any other value matches no payment."},"paymentCurrency":{"type":"string","description":"Limits results to payments in this currency. Format ISO 4217, for example 'USD'."},"status":{"type":"string","description":"Limits results to payments in this status. Values include 'successful', 'rejected', 'cancelled', 'processing', 'partiallySuccessful', 'unknown', 'unsigned', 'manuallyRecorded', 'scheduled' and 'voided'. Any other value matches no payment."},"approvalStatus":{"type":"string","description":"Limits results to payments in this approval status."},"externalId":{"type":"string","description":"Limits results to payments with this upstream identifier. It is not unique, so this can match several payments."}},"additionalProperties":false,"description":"The filters to apply. A payroll payment must match every filter you send. Omit to return all payroll payments.","examples":[{"status":"successful"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of payroll payments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"deletePayrollTemplateOutput":{"type":"object","properties":{},"additionalProperties":false},"voidVendorBillOutput":{"type":"object","properties":{},"additionalProperties":false},"voidVendorBillInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the bill is being voided. Stored on the bill and shown in the audit trail. An empty or whitespace-only string is refused.","examples":["Duplicate of VB-295012"]}},"additionalProperties":false,"required":["voidReason"]},"searchEmployeeAdvanceRequestsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"advanceRequestNumber":{"type":"string"},"employeeId":{"type":"string"},"employeeName":{"type":"string"},"entityId":{"type":"string"},"categoryId":{"type":"string"},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["amount","currency"]},"purpose":{"type":"string"},"tripStart":{"type":"string","format":"date"},"tripEnd":{"type":"string","format":"date"},"notes":{"type":"string"},"status":{"type":"string"},"requestDate":{"type":"string","format":"date"},"decisionNote":{"type":"string"},"outboundPaymentId":{"type":"string"},"outboundPaymentHeaderNumber":{"type":"string"},"outboundPaymentApplicationStatus":{"type":"string"}},"additionalProperties":false,"required":["id","employeeId","entityId","categoryId","amount","purpose","status","requestDate"]},"description":"Matching advance requests for this page, newest first."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as page.cursor for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchEmployeeAdvanceRequestsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"status":{"type":"string","description":"Restrict to requests in this lifecycle status: draft, pendingApproval, approved, rejected or issued."},"employeeId":{"type":"string","description":"Restrict to requests from this employee (a UUID). A uuid that matches no employee returns an empty page, not an error."},"entityId":{"type":"string","description":"Restrict to requests in this entity (a UUID). A uuid that matches no entity returns an empty page, not an error."},"categoryId":{"type":"string","description":"Restrict to requests drawing from this AdvancePaymentCategory (a UUID). A uuid that matches no category returns an empty page, not an error."},"advanceRequestNumber":{"type":"string","description":"Exact match on the request's document number (ADV-...)."}},"additionalProperties":false,"description":"Search filters, nested as one object. All are optional and are ANDed; omit the whole object to match every request.","examples":[{"status":"pendingApproval"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page."},"size":{"type":"number","description":"Maximum number of requests to return. Defaults to 50, capped at 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"advancePaymentCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the advance payment category — the public identifier used by GET accounting/advance-payment-categories/:id. Filter e.g. filter[id][in]=<id1>,<id2>."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the legal entity this category belongs to. An entity has at most one advance payment category, so filter[entityId][eq]=<entityUuid> is the way to find 'the' category for an entity."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the category. Filter target: filter[name][like]=Standard, or filter[name][eq]=Standard Advance."},"allowManualPayment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an employee may be paid this advance manually (outside the standard payment run). Filter target: filter[allowManualPayment][eq]=true."},"status":{"anyOf":[{"enum":["active","inactive"]},{"type":"null"}],"description":"Lifecycle status. Filter target: filter[status][eq]=active."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Instant the advance payment category last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). filter[lastModifiedDate][gte]=… plus sort=lastModifiedDate is a complete incremental-sync cursor."}},"additionalProperties":false},"expenseReportsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense report."},"expenseNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The expense number."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status of the report. Values include 'draft', 'pendingApproval', 'approved', 'rejected' and 'paid'."},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment status of the report."},"submittedDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the employee submitted the report. Format YYYY-MM-DD."},"reimbursementCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the report is reimbursed in. Format ISO 4217, for example 'USD'. Governs every header total below."},"reimbursableTotal":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total reimbursable amount across the report's items, in reimbursementCurrency."},"reimbursableTotalNetAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total reimbursable amount excluding VAT, in reimbursementCurrency."},"amountPaid":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount already reimbursed to the employee, in reimbursementCurrency."},"openAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount still owed to the employee, reimbursableTotal minus amountPaid, in reimbursementCurrency."},"pendingAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount committed to an in-flight payment run but not yet paid, in reimbursementCurrency."},"containsBillableItem":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether at least one item on the report is marked billable to a customer."},"pendingPayment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether a payment for this report is in flight."},"externalExpenseReportId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this report has in the upstream system that produced it. It is not unique."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system this report came from, as free-form text."},"employeeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the employee the report belongs to."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the report is posted under."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the expense report last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getEmployeeAdvanceRequestOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id of the advance request (a UUID)."},"advanceRequestNumber":{"type":"string","description":"System-generated document number (ADV-...)."},"employeeId":{"type":"string","description":"Id (a UUID) of the requesting employee."},"employeeName":{"type":"string","description":"Display name of the requesting employee."},"entityId":{"type":"string","description":"Id (a UUID) of the entity the request belongs to."},"categoryId":{"type":"string","description":"Id (a UUID) of the AdvancePaymentCategory this request draws from."},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["amount","currency"],"description":"Requested amount: the total of the request's purpose lines."},"purpose":{"type":"string","description":"What the advance is for. A request split across several purposes lists them comma-separated, e.g. 'Travel, Per Diem'."},"tripStart":{"type":"string","format":"date","description":"First day of the trip the advance covers."},"tripEnd":{"type":"string","format":"date","description":"Last day of the trip the advance covers."},"notes":{"type":"string","description":"Free-text notes from the requester."},"status":{"type":"string","description":"Lifecycle status: draft, pendingApproval, approved, rejected or issued."},"requestDate":{"type":"string","format":"date","description":"Date the request was submitted."},"decisionNote":{"type":"string","description":"Approver note recorded on approval or rejection."},"outboundPaymentId":{"type":"string","description":"Id (a UUID) of the OutboundPaymentHeaderBase created when this request was issued, if any."},"outboundPaymentHeaderNumber":{"type":"string","description":"Document number of the issued payment, if any."},"outboundPaymentApplicationStatus":{"type":"string","description":"Application status of the issued payment (unapplied/partiallyApplied/applied), if any."}},"additionalProperties":false,"required":["id","employeeId","entityId","categoryId","amount","purpose","status","requestDate"]},"vendorsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor."},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal or trading name of the vendor."},"vendorNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor number, for example 'V-2041'. Absent until one has been assigned."},"vendorType":{"anyOf":[{"enum":["supplier","contractor","tax","benefits","payrollProvider","healthInsurance"]},{"type":"null"}],"description":"The kind of vendor."},"vendorSubType":{"anyOf":[{"enum":["direct","indirect"]},{"type":"null"}],"description":"A finer classification within the vendor type."},"status":{"anyOf":[{"enum":["active","inactive"]},{"type":"null"}],"description":"The lifecycle status of the vendor. An inactive vendor stays readable so historical documents still resolve, and is not offered for new ones."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The default payment-terms key applied to this vendor's bills, for example 'net30' or 'dueOnReceipt'. Stored as supplied."},"preferredCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the vendor prefers to be paid in. Format ISO 4217, for example 'USD'."},"independentContractor":{"anyOf":[{"enum":["yes","no","unsure"]},{"type":"null"}],"description":"Whether the vendor is an independent contractor."},"externalVendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this vendor has in an external system. It is not unique."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system that created the vendor, for example 'app'."},"mainContactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The email address of the vendor's main contact."},"mainContactName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor's main contact."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the vendor last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateVendorCreditOutput":{"type":"object","properties":{},"additionalProperties":false},"updateVendorCreditInput":{"type":"object","properties":{"referenceNumber":{"type":"string","description":"The vendor's credit memo reference number, as printed on the document. Omit to leave unchanged.","examples":["CN-4471-A"]},"creditDate":{"type":"string","format":"date","description":"The date on the vendor's credit memo. Use format YYYY-MM-DD. Omit to leave unchanged."},"currency":{"type":"string","description":"The currency of the credit. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"createLines":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The gross credit amount for the line, as a decimal in the credit currency."},"description":{"type":"string","description":"A description of the credit line."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is allocated to. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. It must differ from the credit's entity, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. It must match exactly one active purchase tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. Sent without vatPercentage, the line takes the code's rate."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the credit currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'expense' (a one-time credit) or 'prepaid' (a credit spread over several periods). Defaults to 'expense'."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. A new line has nothing to change or remove, so this is a plain array, the same shape POST accounting/vendor-credits takes."}},"additionalProperties":false,"required":["amount"]},"description":"Lines to add to the credit, each with the same shape as on create and no id. Omit for no additions."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this credit."},"amount":{"type":"string","format":"decimal","description":"The gross credit amount for the line, as a decimal in the credit currency. Omit to leave unchanged."},"description":{"type":"string","description":"A description of the credit line. Omit to leave unchanged."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id. Omit to leave unchanged."},"businessUnitId":{"type":"string","description":"The business unit this line is allocated to. There is no endpoint for it. Omit to leave unchanged."},"crossChargeEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Omit to leave unchanged, or send null to clear it. It must differ from the credit's entity, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. It must match exactly one active purchase tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. Sent without vatPercentage, the line takes the code's rate."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the credit currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it. Omit to leave unchanged."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'expense' (a one-time credit) or 'prepaid' (a credit spread over several periods). Omit to leave unchanged."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the accountId sent on this updateLines item. If that item doesn't send accountId, send deferredAccountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this line, each with no id. Omit for no additions. Send none of the three amortization arrays to leave this line's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the schedule to change. It must be one this line already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit to leave unchanged."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Omit to leave unchanged, unless this updateLines item also sends accountId, in which case it is set to that account."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'. Omit to leave unchanged."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. Omit to leave unchanged."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD. Omit to leave unchanged."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Omit to leave unchanged."},"description":{"type":"string","description":"A note to record against the schedule. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by the id the credit publishes. A schedule that has already started recognizing is refused with AMORTIZATION_SCHEDULE_POSTED. Omit for no changes."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this line. Each must be one this line carries, and one that has not started recognizing. Removing a schedule leaves this line's other books untouched."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by the id the credit publishes. Every field but the id is optional and left unchanged when omitted. Omit for no changes.","examples":[[{"id":"6b2a9f18-7c3d-4e5a-8b19-2d4e6f8a0c31","amount":"350.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove, applied before the updates and creates. Each must belong to this credit. Removing a line also removes the amortization schedules it carried."}},"additionalProperties":false},"accounting_invoices_createdPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"getVendorOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor."},"vendorName":{"type":"string","description":"The legal or trading name of the vendor."},"vendorNumber":{"type":"string","description":"The vendor number, for example 'V-2041'. Absent until one has been assigned."},"vendorType":{"type":"string","description":"The kind of vendor. Possible values: 'supplier', 'contractor', 'tax', 'benefits', 'payrollProvider', 'healthInsurance'."},"vendorSubType":{"type":"string","description":"A finer classification within the vendor type. Possible values: 'direct', 'indirect'."},"status":{"type":"string","description":"The lifecycle status of the vendor. Possible values: 'active', 'inactive'. An inactive vendor stays readable so historical documents still resolve, and is not offered for new ones."},"paymentTerms":{"type":"string","description":"The default payment-terms key applied to this vendor's bills, for example 'net30' or 'dueOnReceipt'. Stored as supplied."},"preferredCurrency":{"type":"string","description":"The currency the vendor prefers to be paid in. Format ISO 4217, for example 'USD'."},"preferredLanguage":{"type":"string","description":"The language the vendor prefers for messages."},"independentContractor":{"type":"string","description":"Whether the vendor is an independent contractor. Possible values: 'yes', 'no', 'unsure'."},"externalVendorId":{"type":"string","description":"The identifier this vendor has in an external system. It is not unique."},"origin":{"type":"string","description":"The source system that created the vendor, for example 'app'."},"mainContactName":{"type":"string","description":"The name of the vendor's main contact."},"mainContactEmail":{"type":"string","description":"The email address of the vendor's main contact."},"mainContactPhone":{"type":"string","description":"The phone number of the vendor's main contact."},"billingEmail":{"type":"string","description":"The email address invoices and remittance advice are sent to."},"entityId":{"type":"string","description":"The legal entity the vendor is registered under. See id on GET base/entities."},"defaultAccountId":{"type":"string","description":"The general ledger account this vendor's spend defaults to. See id on GET accounting/accounts/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","vendorName","vendorType","status","paymentTerms","lastModifiedDate"]},"payrollDetailsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll run."},"payrollDetailNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payroll run number. Absent until a number has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the payroll run."},"periodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the payroll period this run covers, for example '2026-08'."},"payrollDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the payroll is dated. Format YYYY-MM-DD."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period the run covers. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period the run covers. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the run is denominated in. Format ISO 4217, for example 'USD'."},"grouping":{"anyOf":[{"enum":["Employee","Department","Multi-level"]},{"type":"null"}],"description":"How the payroll run is grouped. Values include 'Employee', 'Department' and 'Multi-level'."},"paymentStatus":{"anyOf":[{"enum":["unpaid","partiallyPaid","fullyPaid","pending","notApplicable","voided"]},{"type":"null"}],"description":"The payment status of the run. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"isImported":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the run was imported from a payroll provider rather than entered by hand."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the run belongs to."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the payroll run last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"voidOutboundPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"voidOutboundPaymentInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the payment is being voided. It is stored on the payment and shown in the audit trail, and an empty or whitespace-only string is refused.","examples":["Paid the wrong vendor"]}},"additionalProperties":false,"required":["voidReason"]},"updateEmployeeAdvanceRequestOutput":{"type":"object","properties":{},"additionalProperties":false},"updateEmployeeAdvanceRequestInput":{"type":"object","properties":{"categoryId":{"type":"string","description":"Id (a UUID) of the AdvancePaymentCategory this request draws from. Must belong to the calling employee's own entity.","examples":["5c8e2f14-9a3b-4d67-8e21-1b4c6a9d3e02"]},"amount":{"type":"string","format":"decimal","description":"Requested amount, in the calling employee's entity functional currency. Must be greater than zero. Stored as the request's single purpose line.","examples":["900.00"]},"purpose":{"type":"string","description":"What the advance is for. Required, non-blank. Stored as the request's single purpose line.","examples":["Client site visit — flights, hotel and ground transport"]},"tripStart":{"type":"string","format":"date","description":"First day of the trip the advance covers. Optional."},"tripEnd":{"type":"string","format":"date","description":"Last day of the trip the advance covers. Must not be before tripStart. Optional."},"notes":{"type":"string","description":"Free-text notes from the requester. Optional."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/updateEmployeeAdvanceRequest` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for updateEmployeeAdvanceRequest, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the request. Replaces the stored set entirely (this is a full replace, not a partial patch). A tenant may require at least one; see ATTACHMENT_REQUIRED.","examples":[[{"fileName":"itinerary.pdf","file":"u1.fIrOBkgwx7mXZLV3PekHTg.1nIoVCd"}]]}},"additionalProperties":false,"required":["categoryId","amount","purpose"]},"getPurchaseRequestOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase request."},"purchaseRequestNumber":{"type":"string","description":"The purchase request number, for example 'PR-1', unique across purchase requests. Absent until one has been assigned."},"description":{"type":"string","description":"A description of what is being requested. It is shown to the vendor."},"internalDescription":{"type":"string","description":"Internal notes on the request, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo intended for the vendor."},"status":{"type":"string","description":"The lifecycle and approval state, in one field. Possible values: 'pendingApproval', 'approved', 'rejected', 'closed'. This resource has no separate approvalStatus."},"currency":{"type":"string","description":"The currency the request is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"totalAmount":{"type":"string","format":"decimal","description":"The total requested amount, the sum of the line totals, in the request currency."},"startDate":{"type":"string","format":"date","description":"The first day of the period the request covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the request covers. Format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment-terms key requested for the resulting order, for example 'net30'."},"externalId":{"type":"string","description":"The identifier this request has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this request is directed at. See id on GET accounting/vendors/:id. Absent when no vendor has been chosen yet."},"vendorName":{"type":"string","description":"The name of the vendor this request is directed at."},"entityId":{"type":"string","description":"The legal entity this request belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this request belongs to."},"departmentId":{"type":"string","description":"The department raising the request. See id on GET people/departments/:id."},"departmentName":{"type":"string","description":"The name of the department raising the request."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase request last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"approvals":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","description":"What was decided. Values include 'approve' and 'reject'."},"employeeName":{"type":"string","description":"The name of the employee who decided."},"message":{"type":"string","description":"The reviewer's note, where one was given."},"decidedAt":{"type":"string","format":"date-time","description":"The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["decision","decidedAt"]},"description":"The approval decisions on this request, oldest first. An empty array when no approval policy has matched the request."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line number, for example 'PRL-1'. Unique across purchase request lines."},"description":{"type":"string","description":"A description of the line item."},"isItem":{"type":"boolean","description":"Whether the line references an inventory item. True for an item line, false for a free-text expense line. It is the item-versus-expense discriminator. There is no itemType field on this resource."},"quantity":{"type":"string","format":"decimal","description":"The quantity requested, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the request currency. Set on item lines. On expense lines the amount is on editableAmount instead."},"editableAmount":{"type":"string","format":"decimal","description":"The directly entered line amount, in the request currency. Used on expense lines, where there is no unit price to multiply."},"total":{"type":"string","format":"decimal","description":"The line total, in the request currency. price times quantity on an item line, editableAmount on an expense line."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. Always the request currency, on each line so the line is self-describing."},"status":{"type":"string","description":"The delivery state of the line. Possible values: 'undelivered', 'delivering', 'delivered'. It is a delivery status, not an approval status."},"priority":{"type":"string","description":"The requested priority of the line. Possible values: 'high', 'medium', 'low'."},"needByDate":{"type":"string","format":"date","description":"The date this line is needed by, when it differs from the header. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date this line was delivered. Format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Format YYYY-MM-DD."},"startDate":{"type":"string","format":"date","description":"The first day of the period this line covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period this line covers. Format YYYY-MM-DD."},"unitOfMeasure":{"type":"string","description":"The name of the unit of measure for the quantity."},"unitOfMeasureId":{"type":"string","description":"The unit of measure for the quantity. See id on GET inventory/unit-of-measures/:id."},"itemId":{"type":"string","description":"The item this line orders. See id on GET inventory/items/:id. Present only on an item line."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."}},"additionalProperties":false,"required":["id"]},"description":"The request line items, in their order on the request. An empty array when the request has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"createPayrollPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payroll payment.","examples":["3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84"]}},"additionalProperties":false,"required":["id"]},"createPayrollPaymentInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity the payment is posted under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Use format YYYY-MM-DD.","examples":["2026-08-31"]},"paymentCurrency":{"type":"string","description":"The currency of the payment. Format ISO 4217, for example 'USD'. Governs every application amount.","examples":["EUR"]},"paymentStatus":{"type":"string","description":"The status to record the payment with, for example 'manuallyRecorded' or 'scheduled'.","examples":["manuallyRecorded"]},"paymentType":{"type":"string","description":"How the payment is made. Values include 'manual' and 'bank'. Defaults to 'manual'.","examples":["manual"]},"accountId":{"type":"string","description":"The bank or cash account the payment is drawn from. See id on GET accounting/accounts/:id."},"commonDescription":{"type":"string","description":"A description applied to the payment as a whole."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"applications":{"type":"array","items":{"type":"object","properties":{"payrollDetailId":{"type":"string","description":"The payroll detail being paid. See id on GET accounting/payroll-details/:id."},"accountId":{"type":"string","description":"The account the payment is booked against. See id on GET accounting/accounts/:id."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration, for example 'employee' or 'taxOffice'."},"amountPaid":{"type":"string","format":"decimal","description":"The amount applied to this payroll detail, as a decimal in the payment's currency."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a third party. See id on GET accounting/vendors/:id."},"employeeId":{"type":"string","description":"The employee being paid. There is no endpoint for it."},"description":{"type":"string","description":"A description for this application."}},"additionalProperties":false,"required":["payrollDetailId","accountId","payeeCode","amountPaid"]},"description":"The payroll runs this payment settles, one application per payroll detail. At least one is required.","examples":[[{"payrollDetailId":"b7e4c1a9-3f52-4d86-9017-5a2c8e0b4d61","accountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24","payeeCode":"employee","amountPaid":"12500.00"}]]}},"additionalProperties":false,"required":["entityId","paymentDate","paymentCurrency","paymentStatus","applications"]},"searchOutboundPaymentOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the outbound payment."},"outboundPaymentNumber":{"type":"string","description":"The outbound payment number. Absent until a number has been assigned."},"description":{"type":"string","description":"A description of the payment."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is denominated in. Format ISO 4217, for example 'USD'. Governs totalPaid, appliedAmount and unappliedAmount."},"paymentType":{"type":"string","description":"How the money was sent, for example 'ach', 'wire' or 'check'."},"status":{"type":"string","description":"The processing status of the payment."},"approvalStatus":{"type":"string","description":"Where the payment sits in the approval workflow."},"applicationStatus":{"type":"string","description":"How much of the payment has been applied to bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid, in the payment currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The portion already applied against vendor bills, in the payment currency."},"unappliedAmount":{"type":"string","format":"decimal","description":"The portion not yet applied to any bill, in the payment currency."},"bankCurrency":{"type":"string","description":"The currency of the bank account the money left, when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"paymentId":{"type":"string","description":"The payment reference assigned by the bank or payment provider."},"externalId":{"type":"string","description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"externalUrl":{"type":"string","description":"A link to the payment in an external system, when one is stored."},"origin":{"type":"string","description":"The source system this payment came from. Recorded when an integration created the payment."},"singlePayment":{"type":"boolean","description":"Whether the payment covers a single bill rather than a batch."},"paymentAccountId":{"type":"string","description":"The bank general ledger account the money left. See id on GET accounting/accounts/:id."},"paymentAccountName":{"type":"string","description":"The name of the bank general ledger account the money left."},"entityId":{"type":"string","description":"The legal entity that made the payment. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A description of the line."},"amount":{"type":"string","format":"decimal","description":"The amount paid on this line, in the line currency."},"currency":{"type":"string","description":"The currency for the line. Format ISO 4217, for example 'USD'."},"paymentDate":{"type":"string","format":"date","description":"The date this line was paid, when it differs from the header. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"How this line was sent, for example 'ach', 'wire' or 'check'."},"receiverName":{"type":"string","description":"The name of the payee."},"receiverAccount":{"type":"string","description":"The payee bank account number. It is returned here and on search but never on the collection endpoint and never filterable."},"receiverBankCode":{"type":"string","description":"The payee sort or routing code. It is returned here and on search but never on the collection endpoint and never filterable."},"customReference":{"type":"string","description":"A reference you supplied, carried on the line."}},"additionalProperties":false,"required":["id","description","currency","receiverName"]},"description":"The payment lines, one per payee or bill covered. An empty array when the payment has none."}},"additionalProperties":false,"required":["id","paymentDate","paymentCurrency","paymentType","status","lastModifiedDate"]},"description":"The outbound payments on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchOutboundPaymentInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the outbound payment with this identifier."},"outboundPaymentNumber":{"type":"string","description":"Limits results to the payment with this number."},"paymentId":{"type":"string","description":"Limits results to payments with this bank or provider reference."},"status":{"type":"string","description":"Limits results to payments in this processing status. Any other value matches no payment."},"approvalStatus":{"type":"string","description":"Limits results to payments in this approval state. Any other value matches no payment."},"applicationStatus":{"type":"string","description":"Limits results by how much of the payment has been applied. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"paymentType":{"type":"string","description":"Limits results to payments sent this way, for example 'ach', 'wire' or 'check'."},"paymentCurrency":{"type":"string","description":"Limits results to payments denominated in this currency. Format ISO 4217, for example 'USD'."},"paymentAccountId":{"type":"string","description":"Limits results to payments made from this bank general ledger account. See id on GET accounting/accounts/:id."},"entityId":{"type":"string","description":"Limits results to payments made by this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to payments made by the legal entity with this name. The match is exact. Use entityId when you already have the id."},"origin":{"type":"string","description":"Limits results to payments created by this source system. The match is exact."},"externalId":{"type":"string","description":"Limits results to payments with this upstream identifier. It is not unique, so this can match several payments."}},"additionalProperties":false,"description":"The filters to apply. An outbound payment must match every filter you send. Omit to return all outbound payments.","examples":[{"applicationStatus":"unapplied"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of payments per page. Defaults to 50, and a value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"getPurchaseTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase type."},"name":{"type":"string","description":"The name of the purchase type, for example 'New purchase'. Unique within the tenant, ignoring case."},"description":{"type":"string","description":"What the purchase type is for."},"status":{"type":"string","description":"The lifecycle status of the purchase type. Possible values: 'active', 'inactive'. Only an active type can be chosen for a new purchase order. An inactive type stays readable so orders that carry it still resolve."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase type last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","status","lastModifiedDate"]},"updateExpenseCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateExpenseCategoryInput":{"type":"object","properties":{"category":{"type":"string","description":"The new name. Omit to leave it unchanged. It must stay unique across the tenant. The category's own current name is not a collision."},"categoryType":{"type":"string","description":"The new kind of expense. Accepted values: 'Pur', 'Dis', 'PerDiem'. Omit to leave it unchanged."},"status":{"type":"string","description":"The new lifecycle status. Accepted values: 'active', 'inactive'. Setting 'inactive' retires a category that is in use without deleting it.","examples":["inactive"]},"reimbursable":{"type":"boolean","description":"Whether expenses in this category are reimbursed to the employee. Omit to leave it unchanged."},"requireAttachment":{"type":"boolean","description":"Whether an expense in this category must have a receipt attachment. Omit to leave it unchanged."},"requireAttendees":{"type":"boolean","description":"Whether an expense in this category must list attendees. Omit to leave it unchanged.","examples":[true]},"entityIds":{"type":"array","items":{"type":"string"},"description":"The legal entities this category is available in. This array replaces the whole set. Omit to leave it unchanged. Send an empty array to clear it. See id on GET base/entities."},"accountIds":{"type":"array","items":{"type":"string"},"description":"The general ledger accounts that journal entries for this category's expense items use. This array replaces the whole set. Omit to leave it unchanged. See id on GET accounting/accounts/:id."}},"additionalProperties":false},"payrollPaymentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment."},"payrollPaymentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment number. Absent until a number has been assigned."},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is made in. Format ISO 4217, for example 'USD'. Governs totalPaid."},"paymentType":{"type":"string","description":"How the payment was made: the instrument, not the origin. Values include 'manual' and 'bank'."},"status":{"enum":["successful","rejected","cancelled","processing","partiallySuccessful","unknown","unsigned","manuallyRecorded","scheduled","voided"],"description":"The status of the payment. Values include 'successful', 'rejected', 'cancelled', 'processing', 'partiallySuccessful', 'unknown', 'unsigned', 'manuallyRecorded', 'scheduled' and 'voided'."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status of the payment."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description recorded on the payment."},"totalPaid":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total amount paid, in paymentCurrency."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"paymentAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the general ledger account the payment is booked against."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the payroll payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"applyVendorCreditOutput":{"type":"object","properties":{"appliedCount":{"type":"number","description":"The number of applications recorded. Read the credit with GET accounting/vendor-credits/:id for its remaining balance.","examples":[1]}},"additionalProperties":false,"required":["appliedCount"]},"applyVendorCreditInput":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"vendorBillId":{"type":"string","description":"The vendor bill the credit is applied to. See id on GET accounting/vendor-bills/:id."},"amount":{"type":"string","format":"decimal","description":"The amount applied to this bill, as a decimal in the bill's currency. It cannot exceed the bill's open amount or the credit's remaining balance."},"appliedDate":{"type":"string","format":"date","description":"The date the application is recorded on. Use format YYYY-MM-DD. It must be on or after both the bill date and the credit date. Defaults to today in the owning entity's time zone."}},"additionalProperties":false,"required":["vendorBillId","amount"]},"description":"The bills this credit is applied to, and how much goes to each. At least one is required.","examples":[[{"vendorBillId":"9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95","amount":"300.00","appliedDate":"2026-08-20"}]]}},"additionalProperties":false,"required":["applications"]},"searchPayrollDetailOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll run."},"payrollDetailNumber":{"type":"string","description":"The payroll run number. Absent until a number has been assigned."},"description":{"type":"string","description":"A description of the payroll run."},"periodName":{"type":"string","description":"The name of the payroll period this run covers, for example '2026-08'."},"payrollDate":{"type":"string","format":"date","description":"The date the payroll is dated. Format YYYY-MM-DD."},"startDate":{"type":"string","format":"date","description":"The first day of the period the run covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the run covers. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the run is denominated in. Format ISO 4217, for example 'USD'. Governs openAmount and every line amount."},"grouping":{"type":"string","description":"How the payroll run is grouped. Values include 'Employee', 'Department' and 'Multi-level'."},"paymentStatus":{"type":"string","description":"The payment status of the run. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"openAmount":{"type":"string","format":"decimal","description":"The amount still unpaid on this run, in currency."},"isImported":{"type":"boolean","description":"Whether the run was imported from a payroll provider rather than entered by hand."},"entityId":{"type":"string","description":"The legal entity the run belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the run belongs to."},"templateId":{"type":"string","description":"The payroll template this run was created from. See id on GET accounting/payroll-templates/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll run last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"lineLevel":{"type":"string","description":"The level this line sits at."},"employeeName":{"type":"string","description":"The name of the employee this line pays."},"unmatchedEmployeeName":{"type":"string","description":"The employee name as it arrived from the payroll provider when it matched no employee on file."},"departmentName":{"type":"string","description":"The name of the department this line is charged to."},"departmentCode":{"type":"string","description":"The code of that department."},"departmentNumber":{"type":"string","description":"The number of that department."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The cost of the line's cross charged categories moves to that entity through an intercompany cross charge journal entry. Absent when the line is not cross charged."},"totalAmount":{"type":"string","format":"decimal","description":"The total amount on the line, in the run currency."},"totalGrossAmount":{"type":"string","format":"decimal","description":"The gross pay on the line, in the run currency."},"totalNetAmount":{"type":"string","format":"decimal","description":"The net pay on the line, in the run currency."},"totalEmployerAmount":{"type":"string","format":"decimal","description":"The employer-side contributions on the line, in the run currency."},"errorMessage":{"type":"string","description":"Why this line could not be processed, when it failed."}},"additionalProperties":false,"required":["id"]},"description":"The payroll lines, one per employee or department depending on grouping. An empty array when the run has none."}},"additionalProperties":false,"required":["id","payrollDate","currency","lastModifiedDate"]},"description":"The payroll runs that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more runs remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPayrollDetailInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the payroll run with this identifier."},"payrollDetailNumber":{"type":"string","description":"Limits results to the payroll run with this number."},"periodName":{"type":"string","description":"Limits results to runs whose payroll period has this name."},"currency":{"type":"string","description":"Limits results to runs in this currency. Format ISO 4217, for example 'USD'."},"grouping":{"type":"string","description":"Limits results to runs grouped this way. Values include 'Employee', 'Department' and 'Multi-level'. Any other value matches no run."},"paymentStatus":{"type":"string","description":"Limits results to runs in this payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'. Any other value matches no run."},"isImported":{"type":"boolean","description":"Limits results to runs that were imported (true) or entered by hand (false)."},"entityId":{"type":"string","description":"Limits results to runs for this legal entity. See id on GET base/entities."},"entityName":{"type":"string","description":"Limits results to runs for a legal entity with this name."},"templateId":{"type":"string","description":"Limits results to runs created from this payroll template. See id on GET accounting/payroll-templates/:id."}},"additionalProperties":false,"description":"The filters to apply. A payroll run must match every filter you send. Omit to return all payroll runs.","examples":[{"paymentStatus":"unpaid"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of payroll runs per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"createAdvancePaymentCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the newly created advance payment category. This is the only field a write returns; read the record back with GET accounting/advance-payment-categories/{id} if you need its stored state.","examples":["b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"]}},"additionalProperties":false,"required":["id"]},"createAdvancePaymentCategoryInput":{"type":"object","properties":{"entityId":{"type":"string","description":"Id (a UUID) of the legal entity this category belongs to. An entity has at most one advance payment category.","examples":["7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"]},"name":{"type":"string","description":"Display name of the category. Required.","examples":["Standard Advance"]},"allowManualPayment":{"type":"boolean","description":"Whether an employee may be paid this advance manually (outside the standard payment run). Omit to default to true.","examples":[true]},"status":{"type":"string","description":"Lifecycle status. Accepted values: 'active', 'inactive'. Omit to default to 'active'.","examples":["active"]}},"additionalProperties":false,"required":["entityId","name"]},"createSalesOrderOutput":{"type":"object","properties":{"salesOrderId":{"type":"string","description":"UUID of the new sales order — what every other sales-order route addresses it by.","examples":["b71c04e9-3a5d-4f28-9106-d8e5fa27c3b1"]}},"additionalProperties":false,"required":["salesOrderId"]},"createSalesOrderInput":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"Send `approved` to have the order approved as soon as it is created. The order is always written as `pendingApproval` first and only then transitioned, so every approval side-effect — invoice-plan generation above all — runs against a complete order. Any other value leaves it pending approval.","examples":["approved"]},"bookDate":{"type":"string","format":"date","description":"Day the order is booked. Defaults to today, and is the date the entity's active invoice policy is resolved for.","examples":["2026-01-15"]},"currency":{"type":"string","description":"ISO 4217 code every price on the order is denominated in — header, lines, tiers and rate-card rows alike.","examples":["EUR"]},"customer":{"$ref":"#/components/schemas/InlineCustomer","description":"A new customer to create alongside the order. Provide exactly one of `customerId` and `customer`. It is created through the same path as the Customer create endpoint, so anything that path rejects fails the whole request and leaves no order behind."},"customerId":{"type":"string","description":"UUID of the existing Customer the order is raised for. Provide exactly one of `customerId` and `customer`; sending both, or neither, is rejected.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]},"dataSource":{"type":"string","description":"The system the order came from, for example 'Salesforce' or 'NetSuite'. Omit it when the order doesn't come from another system.","examples":["Salesforce"]},"effectiveDate":{"type":"string","format":"date","description":"Day the order becomes commercially effective.","examples":["2026-02-01"]},"entityId":{"type":"string","description":"UUID of the legal Entity the order belongs to.","examples":["1c9e5f38-7b04-4a26-8d31-5f60e2ab7c95"]},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the order is kept out of the tax engine, so no tax is calculated for it."},"externalIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdentifier"},"description":"Identifiers the order carries in other systems, upserted by `fieldName`."},"externalizedInvoicing":{"type":"boolean","description":"Whether invoicing for this order is handled in another system. Defaults to false."},"nonSubscriptionProducts":{"type":"array","items":{"$ref":"#/components/schemas/ProductLine"},"description":"One-time product lines, sitting on the order itself rather than under a subscription. Line types that are not subscription-based belong here — putting one under a subscription is rejected with `INVALID_SUBSCRIPTION_PRODUCT`."},"oneTimeDiscountAllocation":{"type":"string","description":"How the one-time discount is spread across the order's invoices: `firstInvoice` puts all of it on the first, `alignToInvoiceFrequency` spreads it over the invoicing schedule, `custom` leaves the allocation to be set by hand.","examples":["firstInvoice"]},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-off discount on the order as a whole, in the order currency. Independent of the per-line discount fields.","examples":["500.00"]},"opportunityId":{"type":"string","description":"Id of the originating opportunity in the CRM, kept as text.","examples":["0065f00000ABCDEfg"]},"opportunityName":{"type":"string","description":"Name of the opportunity the order came out of.","examples":["Contoso — 2026 renewal"]},"paymentTermCode":{"type":"string","description":"The order's payment term, named by its code. Defaults to the term on the entity's invoice policy active at `bookDate`.","examples":["net30"]},"priceBookId":{"type":"string","description":"UUID of the PriceBook the lines take their list prices from. Defaults to the standard price book.","examples":["72fd1a08-6c39-4e5b-83a0-9d4127be6f5c"]},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order number for this order.","examples":["PO-2026-0042"]},"salesArrangementId":{"type":"string","description":"UUID of an existing SalesArrangement to file the order under. Omit it and a new arrangement is created for the customer in the order currency.","examples":["e30a76b5-c284-4d91-a7f3-2b508c6de194"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the order's service period. Once the lines are built the order takes the earliest line start instead, so this is what governs an order whose lines carry no dates of their own.","examples":["2026-01-01"]},"signDate":{"type":"string","format":"date","description":"Day the order was signed.","examples":["2026-01-10"]},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"},"description":"The recurring part of the order. Each subscription carries its own term and its own product lines."}},"additionalProperties":false,"required":["currency","entityId","serviceStartDate"]},"deleteExpenseReportOutput":{"type":"object","properties":{},"additionalProperties":false},"vendorCreditsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor credit."},"vendorCreditNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor credit number. Absent until a number has been assigned."},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor's credit memo reference number, as printed on the vendor's document."},"creditDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date on the vendor's credit memo. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the credit is denominated in. Format ISO 4217, for example 'USD'."},"status":{"anyOf":[{"enum":["unapplied","partiallyApplied","applied"]},{"type":"null"}],"description":"The application status, how much of the credit has been set against vendor bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total credit amount, in currency."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this credit has in the upstream system that produced it. It is not unique."},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor this credit is from."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this credit is booked under."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the vendor credit last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"approvePurchaseRequestOutput":{"type":"object","properties":{"status":{"type":"string","description":"The status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"approvePurchaseRequestInput":{"type":"object","properties":{},"additionalProperties":false},"createPayrollTemplateOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payroll template.","examples":["d4a1c7e0-2b93-4f56-8071-9e3a5c8b1d42"]}},"additionalProperties":false,"required":["id"]},"createPayrollTemplateInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the payroll template. Unique across all payroll templates.","examples":["Germany monthly payroll"]},"groupBy":{"type":"string","description":"How payroll lines are entered. Accepted values: 'Employee', 'Department', 'Multi-level'.","examples":["Employee"]},"journalEntryDate":{"type":"string","description":"The date the journal entry uses. Accepted values: 'payrollDate', 'endDate'.","examples":["payrollDate"]},"journalEntryGroupBy":{"type":"string","description":"How journal lines are aggregated by default. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'.","examples":["account"]},"description":{"type":"string","description":"A free-form description of the template."},"clearingAccountId":{"type":"string","description":"The clearing account used when posting. See id on GET accounting/accounts/:id."},"source":{"type":"string","description":"The payroll system the template imports from. Accepted values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'."},"entityIds":{"type":"array","items":{"type":"string"},"description":"The complete set of legal entities this template serves. At least one is required. See id on GET base/entities.","examples":[["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]]},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the category. Unique within the template."},"subType":{"type":"string","description":"What the category represents. Accepted values: 'grossPay', 'deduction', 'netPay', 'employer'. At most one netPay category per template."},"status":{"type":"string","description":"Whether the category is usable. Accepted values: 'active', 'inactive'. Defaults to 'active'."},"payee":{"type":"string","description":"Who gets paid, as a payee code from your tenant's configured payee list, for example 'employee', 'payrollProvider', 'benefitsProvider' or 'taxOffice'."},"isManagedFromPayroll":{"type":"boolean","description":"Whether payment for this category is managed from payroll. Required, the category model has no default."},"crossCharge":{"type":"boolean","description":"Whether the category is cross charged: on payroll lines charged to another entity (crossChargeEntityId), its P&L side moves to that entity through an intercompany cross charge journal entry. Defaults to false."},"debitAccountId":{"type":"string","description":"The account debited for this category. See id on GET accounting/accounts/:id."},"creditAccountId":{"type":"string","description":"The account credited for this category. See id on GET accounting/accounts/:id."},"debitJournalAggregation":{"type":"string","description":"How debit journal lines are aggregated. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'. Defaults to the template's setting. 'payrollCategoryByEmployee' requires groupBy 'Employee'."},"creditJournalAggregation":{"type":"string","description":"How credit journal lines are aggregated. The same values and rule as the debit side apply."},"debitTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension. Accepted values: 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category debits, at most one per dimension. Supported dimension: 'vendor'. Requires debitJournalAggregation to be above 'account'."},"creditTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension. Accepted values: 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category credits. The same values and rules as the debit side apply."}},"additionalProperties":false,"required":["name","subType","isManagedFromPayroll"]},"description":"The categories this template defines. At least one is required. Category names must be unique, and at most one category may be netPay.","examples":[[{"name":"Gross Pay","subType":"grossPay","payee":"employee","isManagedFromPayroll":false,"debitAccountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"},{"name":"Net Pay","subType":"netPay","payee":"employee","isManagedFromPayroll":false,"creditAccountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"}]]}},"additionalProperties":false,"required":["name","groupBy","journalEntryDate","journalEntryGroupBy","entityIds","categories"]},"activatePurchaseTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"activatePurchaseTypeInput":{"type":"object","properties":{},"additionalProperties":false},"deletePurchaseOrderOutput":{"type":"object","properties":{},"additionalProperties":false},"issueEmployeeAdvanceRequestOutput":{"type":"object","properties":{"outboundPaymentId":{"type":"string","description":"Id (a UUID) of the OutboundPaymentHeaderBase created for this issuance.","examples":["c3d8f4a1-7e2b-4c95-9a03-5f1d8e6b2c47"]}},"additionalProperties":false,"required":["outboundPaymentId"]},"issueEmployeeAdvanceRequestInput":{"type":"object","properties":{"paymentDate":{"type":"string","format":"date","description":"Payment execution date. Omit to default to the appserver's current day.","examples":["2026-09-05"]}},"additionalProperties":false},"expenseCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense category."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the expense category, for example 'Meals'. Unique within the tenant."},"categoryType":{"anyOf":[{"enum":["Pur","Dis","PerDiem"]},{"type":"null"}],"description":"The kind of expense. Possible values: 'Pur', 'Dis', 'PerDiem'. 'Dis' is distance traveled."},"reimbursable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether expenses in this category are reimbursed to the employee."},"status":{"anyOf":[{"enum":["active","inactive"]},{"type":"null"}],"description":"The lifecycle status of the expense category. An inactive category stays readable so historical expense items still resolve, and is not offered for new ones."},"requireAttachment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an expense in this category must have a receipt attachment."},"requireAttendees":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an expense in this category must list attendees."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this category has in an external system. It is not unique."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the expense category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getAdvancePaymentCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id of the advance payment category (a UUID) — the public identifier used by this route."},"entityId":{"type":"string","description":"Id (a UUID) of the legal entity this category belongs to. An entity has at most one advance payment category."},"name":{"type":"string","description":"Display name of the category. Renaming an existing category is done by calling upsert again with the same entityId and a new name — the underlying write is a rename in place, not a new record."},"allowManualPayment":{"type":"boolean","description":"Whether an employee may be paid this advance manually (outside the standard payment run). Defaults to true."},"status":{"type":"string","description":"Lifecycle status. Possible values: 'active', 'inactive'. Defaults to 'active'."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the advance payment category last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Poll on this to sync incrementally rather than re-reading the whole collection."}},"additionalProperties":false,"required":["id","entityId","name","lastModifiedDate"]},"createExpenseCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created expense category.","examples":["b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"]}},"additionalProperties":false,"required":["id"]},"createExpenseCategoryInput":{"type":"object","properties":{"category":{"type":"string","description":"The name of the expense category, for example 'Client Entertainment'. Must be unique across the tenant.","examples":["Client Entertainment"]},"categoryType":{"type":"string","description":"The kind of expense. Accepted values: 'Pur', 'Dis', 'PerDiem'. 'Dis' is distance traveled. Omit to leave it unset.","examples":["Pur"]},"status":{"type":"string","description":"The lifecycle status. Accepted values: 'active', 'inactive'. Defaults to 'active'."},"reimbursable":{"type":"boolean","description":"Whether expenses in this category are reimbursed to the employee. Defaults to true. A reimbursable category must have at least one accountId.","examples":[true]},"requireAttachment":{"type":"boolean","description":"Whether an expense in this category must have a receipt attachment.","examples":[true]},"requireAttendees":{"type":"boolean","description":"Whether an expense in this category must list attendees."},"entityIds":{"type":"array","items":{"type":"string"},"description":"The legal entities this category is available in. This array replaces the whole set. Omit to leave it unchanged. Send an empty array to remove every entity. See id on GET base/entities."},"accountIds":{"type":"array","items":{"type":"string"},"description":"The general ledger accounts that journal entries for this category's expense items use. This array replaces the whole set. Required unless the category is not reimbursable. See id on GET accounting/accounts/:id.","examples":[["7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"]]}},"additionalProperties":false,"required":["category"]},"updateSalesOrderOutput":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"The order's approval status after the update: `draft`, `pendingApproval`, `revise` or `approved`.","examples":["pendingApproval"]},"id":{"type":"string","description":"UUID of the sales order that was updated.","examples":["b71c04e9-3a5d-4f28-9106-d8e5fa27c3b1"]}},"additionalProperties":false,"required":["approvalStatus","id"]},"updateSalesOrderInput":{"type":"object","properties":{"billToAddressId":{"type":"string","description":"UUID of the Address invoices for this order go to. An address that does not exist fails with `INVALID_ADDRESS`. Stays editable after the order is approved.","examples":["5b8c31f6-04ad-472e-9f81-63a0d7e295cb"]},"createProducts":{"type":"array","items":{"type":"object","properties":{"allowance":{"$ref":"#/components/schemas/LineAllowance","description":"The Allowance & Overage terms of a Commit with Overage line. Required for that line type and rejected on any other; omitted fields default from the product catalog."},"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice`, in the order currency. Used when no `unitPrice` is given, and then drives the other two.","examples":["120.00"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice` on a 0–100 scale, so `10` means ten percent. Stored as a 0–1 fraction. The lowest precedence of the three — used only when neither `unitPrice` nor `discountAmount` is given.","examples":["10"]},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"externalUrl":{"type":"string","description":"Deep link to the record in the owning system, shown beside the id.","examples":["https://netsuite.example.com/app/accounting/transactions/salesord.nl?id=10042"]},"fieldName":{"type":"string","description":"Names the ExternalIdentifierConfiguration this id belongs to, as that configuration spells it. It must already be configured for the tenant; an unknown name is rejected. Identifiers are upserted by this name, so sending it again overwrites the stored value.","examples":["netsuiteInternalId"]},"value":{"type":"string","description":"The identifier as the owning system spells it.","examples":["SO-10042"]}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers this line carries in other systems, upserted by `fieldName`."},"invoiceFrequency":{"type":"string","description":"How often the line invoices — an InvoiceFrequency member: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually`, `once`, `custom`, `template`, `milestone`, `allAtOnce` or `termEnd`. Defaults to the product line's own setting.","examples":["monthly"]},"invoiceTiming":{"type":"string","description":"Whether the line invoices `advance` (at the start of the service period) or `arrears` (after it). Defaults from the entity's active invoice policy for this line type.","examples":["advance"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the line invoices on: `anniversary`, `first`, `last` or `specific`. Defaults from the entity's active invoice policy.","examples":["anniversary"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price per unit, in the order currency. Defaults to the list price the order's price book holds for this product line, and is the figure the other pricing fields are reconciled against.","examples":["1200.00"]},"priceModel":{"type":"string","description":"How the line is priced: `flat`, `perUnit`, `tiered`, `volume`, `stairstep` or `rateCard`. Defaults to the product line's own model. `tiered`, `volume` and `stairstep` take their prices from `tiers` and `rateCard` from `rateCardEntries`, so for those the line-level discount fields are not reconciled. `thresholdBased` is rejected: it needs a base line plus a metered usage child, which this endpoint does not build.","examples":["perUnit"]},"pricingTerm":{"type":"string","description":"The period the price is quoted for: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually` or `once`. Defaults to the product line's own term.","examples":["annually"]},"productLineId":{"type":"string","description":"UUID of the ProductLine being added. It settles the product, the line type and the billing rules every omitted field defaults from.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]},"quantity":{"type":"string","format":"decimal","description":"Number of units ordered. Required unless the line takes its quantity from somewhere else: usage-metered line types (PayAsYouGo, Usage, Billable*) meter it from usage records, so for those it must be omitted or 0 (a non-zero value is rejected, matching the Sales Order screen); tier-priced models (`tiered`, `volume`, `stairstep`, `thresholdBased`) derive it from the tier structure, so for those it defaults to zero. Anywhere else, omitting it fails the request.","examples":["10"]},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"UUID of the BillableComponent this row meters. Optional — a row may price a unit of measure without naming a component — but a UUID that does not resolve rejects the whole request.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"conversion":{"type":"string","format":"decimal","description":"Factor converting the billable unit into the reporting unit — 1000 when usage is metered per call but reported per thousand.","examples":["1000"]},"description":{"type":"string","description":"Free-text label for the row, carried through to the stored rate-card entry.","examples":["API calls beyond the included volume"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted rate per `unitOfMeasure`, in the order currency. Honored only while the product line's `enforceListPrice` is false; otherwise the product line's own list price wins.","examples":["0.005"]},"unitOfMeasure":{"type":"string","description":"The unit this row is priced in.","examples":["record"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated rate per `unitOfMeasure`, in the order currency.","examples":["0.004"]}},"additionalProperties":false,"required":["unitOfMeasure","unitPrice"]},"description":"Per-unit rates for a `rateCard`-priced line. Supplying any entry moves pricing onto the rate card, so the line-level discount fields stop being reconciled."},"serviceEndDate":{"type":"string","format":"date","description":"Last day of the line's service period. The order's own service end is the latest across all its lines, and is left open on an evergreen order.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the line's service period. The order's own service start is the earliest across all its lines.","examples":["2026-01-01"]},"subscriptionId":{"type":"string","description":"UUID of a subscription already on this order to hang the line under. Omit it to add the line to the order itself as a one-time line. A subscription that is not on the order fails with `INVALID_SUBSCRIPTION`.","examples":["c8402e17-95bf-4a63-8d20-71ec3f6a0b48"]},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"Name of the value-accounting dimension, as configured for the tenant. Resolved by name, not by id.","examples":["Department"]},"value":{"type":"string","description":"Name of the value within that dimension. The pair must resolve to an existing tag and the dimension must be enabled for sales orders; an unknown pair rejects the whole request.","examples":["Engineering"]}},"additionalProperties":false,"required":["dimension","value"]},"description":"Value-accounting tags to allocate this line by. Requires value-allocation tagging to be enabled for sales orders."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of the tier's quantity range, inclusive.","examples":["0"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price for this tier, in the order currency. Defaults to `unitPrice`, i.e. no discount on the tier.","examples":["15.00"]},"priceModel":{"type":"string","description":"How `unitPrice` applies within the tier: `perUnit` (the default) charges it for every unit in the range, `flat` charges it once for the whole tier.","examples":["perUnit"]},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of the tier's quantity range. Omit it on the last tier to leave the range open-ended.","examples":["100"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price for this tier, in the order currency. Charged per unit in the range when `priceModel` is `perUnit`, or once for the whole tier when it is `flat`.","examples":["12.50"]}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"The pricing tiers of a `tiered`, `volume` or `stairstep` line. The ranges must be contiguous, and the last tier is left open-ended by omitting its `toQuantity`."},"totalPrice":{"type":"string","format":"decimal","description":"Total for the line, in the order currency. Persisted exactly as supplied rather than recomputed — omit it and the line's own pricing drives the total. Rejected unless omitted or 0 on usage-metered line types (PayAsYouGo, Usage, Billable*), which have no fixed contract value.","examples":["12960.00"]},"unitOfMeasure":{"type":"string","description":"The unit the line is priced and metered in. Defaults to the product line's own unit.","examples":["seat"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price per unit, in the order currency. The highest precedence of the three pricing inputs — supply it and `discountAmount` and `discountPercentage` are recomputed from it (discountAmount = listPrice − unitPrice).","examples":["1080.00"]}},"additionalProperties":false,"required":["productLineId"]},"description":"Product lines to add to the order. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`."},"createSubscriptions":{"type":"array","items":{"type":"object","properties":{"autoRenew":{"type":"boolean","description":"Whether the subscription renews itself at the end of its term."},"products":{"type":"array","items":{"$ref":"#/components/schemas/ProductLine"},"description":"The recurring product lines of the new subscription. Every one must be a subscription-based product line, or the request fails with `INVALID_SUBSCRIPTION_PRODUCT`."},"serviceEndDate":{"type":"string","format":"date","description":"Last day the subscription is in service. Omit it on an evergreen subscription.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day the subscription is in service.","examples":["2026-01-01"]},"term":{"type":"string","format":"decimal","description":"Intended length of a `termed` subscription in months. What actually bounds the subscription is `serviceStartDate` and `serviceEndDate`, so supply the end date to fix when it ends.","examples":["12"]},"termType":{"type":"string","description":"`termed` for a subscription of fixed length, `evergreen` for an open-ended one that keeps renewing.","examples":["termed"]}},"additionalProperties":false,"required":["products","serviceStartDate","termType"]},"description":"New subscriptions to add to the order, each bringing its own product lines. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`."},"deleteProducts":{"type":"array","items":{"type":"string"},"description":"UUIDs of product lines to remove from the order. Each must belong to it, or the request fails with `INVALID_LINE`. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`."},"effectiveDate":{"type":"string","format":"date","description":"Day the order becomes commercially effective. Stays editable after the order is approved.","examples":["2026-02-01"]},"excludeFromTaxEngine":{"type":"boolean","description":"Whether the order is kept out of the tax engine, so no tax is calculated for it. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`."},"oneTimeDiscountAllocation":{"type":"string","description":"How the one-time discount is spread across the order's invoices: `firstInvoice` puts all of it on the first, `alignToInvoiceFrequency` spreads it over the invoicing schedule, `custom` leaves the allocation to be set by hand. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`.","examples":["firstInvoice"]},"oneTimeDiscountAmount":{"type":"string","format":"decimal","description":"A one-off discount on the order as a whole, in the order currency. Independent of the per-line discount fields. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`.","examples":["500.00"]},"opportunityName":{"type":"string","description":"Name of the opportunity the order came out of. Stays editable after the order is approved.","examples":["Contoso — 2026 renewal"]},"paymentTermCode":{"type":"string","description":"The order's payment term, named by its code. Stays editable after the order is approved.","examples":["net30"]},"purchaseOrder":{"type":"string","description":"The customer's own purchase-order number for this order. Stays editable after the order is approved.","examples":["PO-2026-0042"]},"serviceEndDate":{"type":"string","format":"date","description":"Last day of the order's service period. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the order's service period. Locked once the order is approved: sending it then fails with `APPROVED_FIELD_LOCKED`.","examples":["2026-01-01"]},"signDate":{"type":"string","format":"date","description":"Day the order was signed. Stays editable after the order is approved.","examples":["2026-01-10"]},"soldToAddressId":{"type":"string","description":"UUID of the Address of the contracting party. An address that does not exist fails with `INVALID_ADDRESS`. Stays editable after the order is approved.","examples":["5b8c31f6-04ad-472e-9f81-63a0d7e295cb"]},"updateProducts":{"type":"array","items":{"type":"object","properties":{"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice`, in the order currency. This endpoint has no `unitPrice` field, so the discount is what drives it: unitPrice = listPrice − discountAmount. Takes precedence over `discountPercentage`.","examples":["120.00"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice` on a 0–100 scale, so `10` means ten percent. Stored as a 0–1 fraction. Used only when `discountAmount` is absent.","examples":["10"]},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"externalUrl":{"type":"string","description":"Deep link to the record in the owning system, shown beside the id.","examples":["https://netsuite.example.com/app/accounting/transactions/salesord.nl?id=10042"]},"fieldName":{"type":"string","description":"Names the ExternalIdentifierConfiguration this id belongs to, as that configuration spells it. It must already be configured for the tenant; an unknown name is rejected. Identifiers are upserted by this name, so sending it again overwrites the stored value.","examples":["netsuiteInternalId"]},"value":{"type":"string","description":"The identifier as the owning system spells it.","examples":["SO-10042"]}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers to set on the line, upserted by `fieldName`. Names not listed are left as they are — there is no way to remove one."},"invoiceFrequency":{"type":"string","description":"New invoicing frequency for the line — an InvoiceFrequency member: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually`, `once`, `custom`, `template`, `milestone`, `allAtOnce` or `termEnd`. Omit it to leave the frequency as it stands.","examples":["monthly"]},"invoiceTiming":{"type":"string","description":"Whether the line invoices `advance` (at the start of the service period) or `arrears` (after it). Omit it to leave the timing as it stands.","examples":["advance"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the line invoices on: `anniversary`, `first`, `last` or `specific`. Omit it to leave the day as it stands.","examples":["anniversary"]},"listPrice":{"type":"string","format":"decimal","description":"New undiscounted price per unit, in the order currency. Changing it on its own still re-reconciles the line: the existing discount amount is held fixed and `unitPrice` and `discountPercentage` are re-derived against the new list price.","examples":["1200.00"]},"quantity":{"type":"string","format":"decimal","description":"New number of units for the line. Omit it to leave the quantity as it stands. Usage-metered line types (PayAsYouGo, Usage, Billable*) meter it from usage records, so for those only 0 is accepted; a non-zero value is rejected, matching the Sales Order screen.","examples":["10"]},"rateCardEntries":{"type":"array","items":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"UUID of the BillableComponent this row meters. Optional — a row may price a unit of measure without naming a component — but a UUID that does not resolve rejects the whole request.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"conversion":{"type":"string","format":"decimal","description":"Factor converting the billable unit into the reporting unit — 1000 when usage is metered per call but reported per thousand.","examples":["1000"]},"description":{"type":"string","description":"Free-text label for the row, carried through to the stored rate-card entry.","examples":["API calls beyond the included volume"]},"id":{"type":"string","description":"UUID of a rate-card row already on this line, to change it in place. Leave it out to add a new row. An id that is not on the line fails the request and nothing is applied.","examples":["3f7b9a52-0c1d-48e6-b934-a5d720e8146f"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted rate per `unitOfMeasure`, in the order currency. Honored only while the product line's `enforceListPrice` is false; otherwise the product line's own list price wins.","examples":["0.005"]},"unitOfMeasure":{"type":"string","description":"The unit this row is priced in.","examples":["record"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated rate per `unitOfMeasure`, in the order currency.","examples":["0.004"]}},"additionalProperties":false,"required":["unitOfMeasure","unitPrice"]},"description":"Replaces the line's rate-card rows: a row carrying an `id` is updated, one without is added, and any existing row whose id is not in the list is deleted. Omit the field entirely to leave the line's rows untouched."},"salesOrderProductLineId":{"type":"string","description":"UUID of the order's product line to change. It must belong to this order, or the request fails with `INVALID_LINE`.","examples":["a05e7d13-8f62-4b90-bc47-1e63d0592a8f"]},"serviceEndDate":{"type":"string","format":"date","description":"New last day of the line's service period.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"New first day of the line's service period.","examples":["2026-01-01"]},"tags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"Name of the value-accounting dimension, as configured for the tenant. Resolved by name, not by id.","examples":["Department"]},"value":{"type":"string","description":"Name of the value within that dimension. The pair must resolve to an existing tag and the dimension must be enabled for sales orders; an unknown pair rejects the whole request.","examples":["Engineering"]}},"additionalProperties":false,"required":["dimension","value"]},"description":"Replaces the line's value-accounting tags wholesale. Send `[]` to clear them; omit the field to leave them untouched. Lines that share one product (ramp deals) share their tags, so all of them must be sent the same set. Stays editable after the order is approved."},"tiers":{"type":"array","items":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of the tier's quantity range, inclusive.","examples":["0"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price for this tier, in the order currency. Defaults to `unitPrice`, i.e. no discount on the tier.","examples":["15.00"]},"priceModel":{"type":"string","description":"How `unitPrice` applies within the tier: `perUnit` (the default) charges it for every unit in the range, `flat` charges it once for the whole tier.","examples":["perUnit"]},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of the tier's quantity range. Omit it on the last tier to leave the range open-ended.","examples":["100"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price for this tier, in the order currency. Charged per unit in the range when `priceModel` is `perUnit`, or once for the whole tier when it is `flat`.","examples":["12.50"]}},"additionalProperties":false,"required":["fromQuantity","unitPrice"]},"description":"Replaces the line's pricing tiers wholesale. Omit the field to leave them untouched."},"totalPrice":{"type":"string","format":"decimal","description":"New total for the line, in the order currency. Persisted exactly as supplied rather than recomputed. Rejected unless 0 on usage-metered line types (PayAsYouGo, Usage, Billable*), which have no fixed contract value.","examples":["12960.00"]}},"additionalProperties":false,"required":["salesOrderProductLineId"]},"description":"Changes to product lines already on the order, each matched by its `salesOrderProductLineId`. Fields left out of an entry keep their current values. Once the order is approved an entry may carry only `salesOrderProductLineId` and `tags`; any other field then fails with `APPROVED_FIELD_LOCKED`."}},"additionalProperties":false},"rejectPurchaseRequestOutput":{"type":"object","properties":{"status":{"type":"string","description":"The status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"rejectPurchaseRequestInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the request is being rejected, recorded against the approval decision. Omit for none.","examples":["Not needed this quarter"]}},"additionalProperties":false},"updateVendorBillOutput":{"type":"object","properties":{},"additionalProperties":false},"updateVendorBillInput":{"type":"object","properties":{"billNumber":{"type":"string","description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors. Omit to leave unchanged."},"billDate":{"type":"string","format":"date","description":"The date printed on the vendor's invoice. Use format YYYY-MM-DD. Omit to leave unchanged."},"dueDate":{"type":"string","format":"date","description":"The date payment is due. Use format YYYY-MM-DD. Omit to leave unchanged.","examples":["2026-09-15"]},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD. Omit to leave unchanged."},"taxReportingDate":{"type":"string","format":"date","description":"The date that decides which tax return the bill is reported in. Use format YYYY-MM-DD. A date sent here is kept only when taxReportingDateOverridden is true and the entity allows overriding it; otherwise it is calculated. Omit to leave it to its current rule: a calculated date is recalculated when billDate, serviceDate, postingPeriodId or entityId changes; a manually entered one is kept while the entity allows overriding it, and recalculated otherwise."},"taxReportingDateOverridden":{"type":"boolean","description":"Send true with taxReportingDate to keep it as entered manually. Send false to hand the date back to the calculation. A taxReportingDate sent without it is calculated."},"currency":{"type":"string","description":"The currency of the bill. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"paymentTerms":{"type":"string","description":"The payment-terms key, for example 'net30', 'net60' or 'dueOnReceipt'. Omit to leave unchanged."},"vendorId":{"type":"string","description":"The vendor the bill is from. See id on GET accounting/vendors/:id. Omit to leave unchanged."},"entityId":{"type":"string","description":"The legal entity the bill is posted under. See id on GET base/entities. Omit to leave unchanged."},"markAsPaid":{"type":"boolean","description":"Whether the bill is marked paid. Omit to leave unchanged."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"createLines":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, including VAT where applicable, as a decimal in the bill currency."},"description":{"type":"string","description":"A description of the line item, typically copied from the vendor's invoice."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is charged to. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. It must differ from the bill's entity, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"customerId":{"type":"string","description":"The customer this expense is rebilled to. See id on GET accounting/customers/:id. It is only meaningful alongside billableExpense."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. It must match exactly one active purchase tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. Sent without vatPercentage, the line takes the code's rate."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the bill currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it."},"purchaseOrderLineId":{"type":"string","description":"The purchase-order line this line is matched against. There is no endpoint for it."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'."},"lineType":{"type":"string","description":"The kind of line. Values include 'expense' (a one-time cost) and 'prepaidExpense' (an upfront cost spread over several periods). Defaults to 'expense'."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. A new line has nothing to change or remove, so this is a plain array, the same shape POST accounting/vendor-bills takes."}},"additionalProperties":false,"required":["amount"]},"description":"Lines to add to the bill, each with the same shape as on create and no id. Omit for no additions."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this bill."},"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, as a decimal in the bill currency. Omit to leave unchanged."},"description":{"type":"string","description":"A description of the line item. Omit to leave unchanged."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id. Omit to leave unchanged."},"businessUnitId":{"type":"string","description":"The business unit this line is charged to. There is no endpoint for it. Omit to leave unchanged."},"crossChargeEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Omit to leave unchanged, or send null to clear it. It must differ from the bill's entity, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"customerId":{"type":"string","description":"The customer this expense is rebilled to. See id on GET accounting/customers/:id. Omit to leave unchanged."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. It must match exactly one active purchase tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. Sent without vatPercentage, the line takes the code's rate."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the bill currency. Omit to leave unchanged."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it. Omit to leave unchanged."},"purchaseOrderLineId":{"type":"string","description":"The purchase-order line this line is matched against. There is no endpoint for it. Omit to leave unchanged."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'. Omit to leave unchanged."},"lineType":{"type":"string","description":"The kind of line. Values include 'expense' and 'prepaidExpense'. Omit to leave unchanged."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the accountId sent on this updateLines item. If that item doesn't send accountId, send deferredAccountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this line, each with no id. Omit for no additions. Send none of the three amortization arrays to leave this line's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the schedule to change. It must be one this line already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit to leave unchanged."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Omit to leave unchanged, unless this updateLines item also sends accountId, in which case it is set to that account."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'. Omit to leave unchanged."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. Omit to leave unchanged."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD. Omit to leave unchanged."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Omit to leave unchanged."},"description":{"type":"string","description":"A note to record against the schedule. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by the id the bill publishes. A schedule that has already started recognizing is refused with AMORTIZATION_SCHEDULE_POSTED. Omit for no changes."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this line. Each must be one this line carries, and one that has not started recognizing. Removing a schedule leaves this line's other books untouched."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by the id the bill publishes. Every field but the id is optional and left unchanged when omitted. Omit for no changes.","examples":[[{"id":"7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9","amount":"1350.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove, applied before the updates and creates. Each must belong to this bill. Removing a line also removes the amortization schedules it carried.","examples":[["1f2e3d4c-5b6a-7089-9a8b-7c6d5e4f3a2b"]]},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"An attachment the bill already has, to keep. See attachments[].id on GET accounting/vendor-bills/:id."},"fileName":{"type":"string","description":"The display name of a new file. Defaults to the uploaded file's name. Not accepted with `id`: a kept attachment keeps its name."},"file":{"type":"string","x-file":true,"description":"A new file: the upload reference returned by `POST /public/files/{namespace}/updateVendorBill`, for example `u1.fIrOBkgwx7…`. Send exactly one of `id` or `file`. Any other value is refused with 400."}},"additionalProperties":false}},{"type":"null"}],"description":"The bill's attachments. Omit to keep them. A list you send **replaces the whole set**: keep an existing attachment by its `id`, add a new file as `file`. Send `null` or `[]` to remove them all.\n\n**Attach a file in two steps:**\n\n1. **Upload** it: `POST /public/files/{namespace}/updateVendorBill` with a `multipart/form-data` body and the `Api-Version` header. The response returns an upload reference (`u1.…`).\n2. **Send** that reference as `file` in this request.\n\n`{namespace}` is the segment after `/public/api/` in your base URL, as in the request example. A reference works only for updateVendorBill, only for you, and for a few minutes, so upload right before this call.\n\nAccepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif. Up to 10 MB each, the same limit as the bill page. The upload route itself accepts up to 15 MB."}},"additionalProperties":false},"getPayrollPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment. The same record is also readable as an outbound payment under this id."},"payrollPaymentNumber":{"type":"string","description":"The payment number. Absent until a number has been assigned."},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is made in. Format ISO 4217, for example 'USD'. Governs totalPaid and every application amount."},"paymentType":{"type":"string","description":"How the payment was made: the instrument, not the origin. Values include 'manual' and 'bank'."},"status":{"type":"string","description":"The status of the payment. Values include 'successful', 'rejected', 'cancelled', 'processing', 'partiallySuccessful', 'unknown', 'unsigned', 'manuallyRecorded', 'scheduled' and 'voided'."},"approvalStatus":{"type":"string","description":"The approval status of the payment."},"description":{"type":"string","description":"A description recorded on the payment."},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid, in paymentCurrency."},"externalId":{"type":"string","description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"paymentAccountId":{"type":"string","description":"The general ledger account the payment is booked against. See id on GET accounting/accounts/:id."},"paymentAccountName":{"type":"string","description":"The name of the general ledger account the payment is booked against."},"entityId":{"type":"string","description":"The legal entity that made the payment. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll payment application."},"applicationNumber":{"type":"string","description":"The application number."},"description":{"type":"string","description":"A description of the application."},"amountPaid":{"type":"string","format":"decimal","description":"The amount paid by this application, as a decimal in currency."},"currency":{"type":"string","description":"The currency governing amountPaid, the payroll run's currency. Format ISO 4217, for example 'USD'."},"paymentStatus":{"type":"string","description":"The status of the paying payment item, mirrored onto the application. It uses the same values as the payment's status."},"payrollDetailId":{"type":"string","description":"The payroll detail this application settles. See id on GET accounting/payroll-details/:id."},"accountId":{"type":"string","description":"The general ledger account this application is booked against. See id on GET accounting/accounts/:id."},"accountName":{"type":"string","description":"The name of the general ledger account this application is booked against."},"accountNumber":{"type":"string","description":"The number of the general ledger account this application is booked against."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration, for example 'employee' or 'taxOffice'."},"payeeLabel":{"type":"string","description":"The display label for the payee."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a vendor. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor being paid."},"employeeId":{"type":"string","description":"The employee being paid, when the payee is an employee. There is no endpoint for it."},"employeeName":{"type":"string","description":"The name of the employee being paid."}},"additionalProperties":false,"required":["id"]},"description":"The payroll payment applications, each tying part of this payment to one payroll detail and one payee. An empty array when the payment has none."}},"additionalProperties":false,"required":["id","paymentDate","paymentCurrency","paymentType","status","lastModifiedDate"]},"searchAdvancePaymentCategoriesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entityId":{"type":"string"},"name":{"type":"string"},"allowManualPayment":{"type":"boolean"},"status":{"type":"string"},"lastModifiedDate":{"type":"string","format":"date-time"}},"additionalProperties":false,"required":["id","entityId","name","lastModifiedDate"]},"description":"Matching advance payment categories for this page, newest first."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as page.cursor for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAdvancePaymentCategoriesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"entityId":{"type":"string","description":"Restrict to the category belonging to this entity (a UUID). An entity has at most one category, so this matches at most one item. A uuid that matches no entity returns an empty page, not an error."},"name":{"type":"string","description":"Exact match on the category's display name."},"status":{"type":"string","description":"Restrict to categories in this lifecycle status: active or inactive."}},"additionalProperties":false,"description":"Search filters, nested as one object. All are optional and are ANDed; omit the whole object to match every category.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page."},"size":{"type":"number","description":"Maximum number of categories to return. Defaults to 50, capped at 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchPayrollTemplateOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll template."},"name":{"type":"string","description":"The name of the payroll template. Unique across payroll templates."},"description":{"type":"string","description":"A free-form description of the payroll template."},"groupBy":{"type":"string","description":"The level at which payroll amounts are entered. Possible values: 'Employee', 'Department', 'Multi-level'."},"journalEntryDate":{"type":"string","description":"The date the generated journal entry is posted on. Possible values: 'payrollDate', 'endDate'."},"journalEntryGroupBy":{"type":"string","description":"The default consolidation level for generated journal lines. Possible values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'."},"deductionsType":{"type":"string","description":"Whether deduction amounts in imported data arrive positive or negative. Possible values: 'positive', 'negative'."},"source":{"type":"string","description":"The payroll system this template imports from. Possible values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'."},"status":{"type":"string","description":"The lifecycle status of the payroll template. Possible values: 'create', 'active', 'inactive'. It is computed from the template's categories, not set through the API."},"clearingAccountId":{"type":"string","description":"The general ledger account payroll amounts are cleared through. See id on GET accounting/accounts/:id."},"entities":{"type":"array","items":{"type":"string"},"description":"The names of the legal entities this template is mapped to. An empty array when it is mapped to none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll category."},"name":{"type":"string","description":"The name of the category, for example 'Gross Salary'. Unique within the template."},"subType":{"type":"string","description":"The kind of payroll amount this category represents. Possible values: 'grossPay', 'deduction', 'netPay', 'employer'."},"status":{"type":"string","description":"The lifecycle status of the category. Possible values: 'active', 'inactive'."},"payee":{"type":"string","description":"Who the amount is paid to, as a payee code from your tenant's configured payee list, for example 'employee', 'payrollProvider', 'benefitsProvider' or 'taxOffice'."},"isManagedFromPayroll":{"type":"boolean","description":"Whether payments for this category are recorded through payroll rather than separately."},"crossCharge":{"type":"boolean","description":"Whether the category is cross charged: on payroll lines charged to another entity (crossChargeEntityId), its P&L side moves to that entity through an intercompany cross charge journal entry."},"debitAccountId":{"type":"string","description":"The general ledger account this category debits. See id on GET accounting/accounts/:id."},"debitJournalAggregation":{"type":"string","description":"The consolidation level for journal lines posted to the debit account. Absent means the template default applies."},"creditAccountId":{"type":"string","description":"The general ledger account this category credits. See id on GET accounting/accounts/:id."},"creditJournalAggregation":{"type":"string","description":"The consolidation level for journal lines posted to the credit account. Absent means the template default applies."},"debitTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension, e.g. 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category debits, one per dimension. Absent when none."},"creditTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension, e.g. 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category credits, one per dimension. Absent when none."}},"additionalProperties":false,"required":["id","name","subType"]},"description":"The payroll categories defined on this template, each mapping one payroll line type onto a debit and a credit account. An empty array when the template has none."}},"additionalProperties":false,"required":["id","name","groupBy","journalEntryDate","journalEntryGroupBy","deductionsType","entities","lastModifiedDate"]},"description":"The payroll templates on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPayrollTemplateInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the template with this identifier."},"name":{"type":"string","description":"Limits results to the template with this exact name. The name is unique across payroll templates, so this returns at most one template."},"groupBy":{"type":"string","description":"Limits results to templates that enter amounts at this level. Accepted values: 'Employee', 'Department', 'Multi-level'. Any other value matches no template."},"status":{"type":"string","description":"Limits results to templates in this lifecycle status. Accepted values: 'create', 'active', 'inactive'. Any other value matches no template."},"source":{"type":"string","description":"Limits results to templates importing from this payroll system. Accepted values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'. Any other value matches no template."},"journalEntryGroupBy":{"type":"string","description":"Limits results to templates with this default journal consolidation level. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'. Any other value matches no template."},"entityId":{"type":"string","description":"Limits results to templates mapped to this legal entity. An id that matches no entity returns no template. See id on GET base/entities."}},"additionalProperties":false,"description":"The filters to apply. A template must match every filter you send. Omit to return all payroll templates.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of payroll templates per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"accounting_invoices_updatedPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"getVendorBillOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor bill."},"vendorBillNumber":{"type":"string","description":"The vendor bill number. Stable across edits."},"billNumber":{"type":"string","description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors."},"billDate":{"type":"string","format":"date","description":"The date printed on the vendor's invoice. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD. Absent when not recorded."},"taxReportingDate":{"type":"string","format":"date","description":"The date that decides which tax return the bill is reported in. Format YYYY-MM-DD. Calculated from billDate, the posting period and, depending on the entity setting, serviceDate, unless entered manually."},"taxReportingDateOverridden":{"type":"boolean","description":"True when taxReportingDate was entered manually; it is then kept instead of recalculated while the entity allows overriding it."},"dueDate":{"type":"string","format":"date","description":"The date payment is due. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the bill is denominated in. Format ISO 4217, for example 'USD'. Governs total, amountPaid, openAmount and every line amount."},"status":{"type":"string","description":"The approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'."},"paymentStatus":{"type":"string","description":"The payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"postingStatus":{"type":"string","description":"The accounting posting status, defined by the accounting subsystem, for example 'notPosted', 'posted' or 'postingFailed'."},"paymentTerms":{"type":"string","description":"The payment-terms key applied to this bill, for example 'net30', 'net60' or 'dueOnReceipt'. Inherited from the vendor unless overridden."},"total":{"type":"string","format":"decimal","description":"The total bill amount, gross, in the bill currency."},"amountPaid":{"type":"string","format":"decimal","description":"The cumulative amount paid against this bill so far, in the bill currency."},"openAmount":{"type":"string","format":"decimal","description":"The outstanding amount still owed, total minus amountPaid, in the bill currency."},"externalVendorBillId":{"type":"string","description":"The identifier this bill has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this bill is from. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this bill is from."},"entityId":{"type":"string","description":"The legal entity this bill is posted under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this bill is posted under."},"purchaseOrderId":{"type":"string","description":"The purchase order this bill is matched to. See id on GET accounting/purchase-orders/:id. The match is line-level, so it is absent when the bill is matched to no purchase order."},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order."},"externalPurchaseOrderNumber":{"type":"string","description":"The external reference of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order, or when that purchase order has no external reference."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"approvals":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","description":"What was decided. Values include 'approve' and 'reject'."},"employeeName":{"type":"string","description":"The name of the employee who decided."},"message":{"type":"string","description":"The reviewer's note, where one was given."},"decidedAt":{"type":"string","format":"date-time","description":"The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["decision","decidedAt"]},"description":"The approval decisions on this bill, oldest first. An empty array when no approval policy has matched the bill."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line item number."},"description":{"type":"string","description":"A description of the line item, typically copied from the vendor's invoice."},"lineType":{"type":"string","description":"The type of line item. Values include 'expense' and 'prepaidExpense'."},"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, in the bill currency."},"currency":{"type":"string","description":"The currency for the line. It always matches the bill currency. Format ISO 4217, for example 'USD'."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the bill currency."},"vatAmount":{"type":"string","format":"decimal","description":"The computed VAT amount on the line, in the bill currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.21 is 21%."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'."},"externalVendorBillItemId":{"type":"string","description":"The identifier this line has in the upstream system that produced it."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted bill reads 'notStarted' until the bill posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in the bill currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaidExpense'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The bill line items, in their order on the bill. An empty array when the bill has none."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the attachment. Send it in attachments[].id on PATCH accounting/vendor-bills/:id to keep the file."},"fileName":{"type":"string","description":"The display name of the attached file."}},"additionalProperties":false,"required":["id","fileName"]},"description":"The files attached to the bill, such as the invoice PDF. Empty when it has none."}},"additionalProperties":false,"required":["id","vendorBillNumber","billNumber","billDate","dueDate","currency","status","lastModifiedDate","attachments"]},"updatePayrollDetailOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePayrollDetailInput":{"type":"object","properties":{"templateId":{"type":"string","description":"The payroll template this run uses. See id on GET accounting/payroll-templates/:id. Omit to leave unchanged."},"grouping":{"type":"string","description":"How the payroll is grouped. Values include 'Employee', 'Department' and 'Multi-level'. Omit to leave unchanged."},"status":{"type":"string","description":"The status of the payroll. Omit to leave unchanged."},"payrollDate":{"type":"string","format":"date","description":"The issue date of the payroll. Use format YYYY-MM-DD. Omit to leave unchanged."},"startDate":{"type":"string","format":"date","description":"The first day of the payroll period. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","format":"date","description":"The last day of the payroll period. Use format YYYY-MM-DD. Omit to leave unchanged."},"currency":{"type":"string","description":"The currency the payroll is denominated in. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"description":{"type":"string","description":"A description of the payroll. Omit to leave unchanged.","examples":["August 2026 payroll (revised)"]},"isNetPayCategoryMapped":{"type":"boolean","description":"Whether the net-pay category is matched in the account mapping. Omit to leave unchanged."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"lines":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee this line is for. There is no endpoint for it. With grouping 'Employee', a line that names an employee but no department has the department backfilled from that employee's primary job."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"crossChargeEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The cost of the line's cross charged categories moves to that entity through an intercompany cross charge journal entry. Omit it to default it from the employee's legal entity when that entity can be charged; send null for no charge. It must differ from entityId, cross charging must be set up for both entities, and the template needs a cross charged category, or the request fails with CROSS_CHARGE_INVALID."},"lineItems":{"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","description":"The payroll category this amount belongs to. There is no endpoint for it. It must be an active category of the payroll's template, or one the payroll already uses."},"amount":{"type":"string","format":"decimal","description":"The amount for this category, as a decimal in the payroll's currency."}},"additionalProperties":false,"required":["categoryId","amount"]},"description":"The amounts on this line, one per payroll category. Each category must be reachable from the payroll's template. An item whose amount is null is dropped before the payroll is saved."}},"additionalProperties":false,"required":["lineItems"]},"description":"The complete replacement set of lines. Omit to keep the stored lines. Send an empty array to clear them. Child ids are neither published nor preserved.","examples":[[{"employeeId":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84","lineItems":[{"categoryId":"9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95","amount":"5200.00"},{"categoryId":"e5c7a390-1d64-4b28-9a07-2f8b6d4c1e53","amount":"5200.00"}]}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/updatePayrollDetail` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for updatePayrollDetail, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the payroll, as a complete replacement set. Omit to keep the stored attachments. Send an empty array to clear them."}},"additionalProperties":false},"deletePurchaseTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"approveVendorBillOutput":{"type":"object","properties":{"status":{"type":"string","description":"The bill status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"approveVendorBillInput":{"type":"object","properties":{},"additionalProperties":false},"createOutboundPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payment.","examples":["e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12"]}},"additionalProperties":false,"required":["id"]},"createOutboundPaymentInput":{"type":"object","properties":{"accountId":{"type":"string","description":"The bank or cash account the payment is made from. See id on GET accounting/accounts/:id.","examples":["6d1e4b27-8a90-4c31-b5f2-7e8a9c0d1b23"]},"entityId":{"type":"string","description":"The legal entity the payment is posted under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Use format YYYY-MM-DD.","examples":["2026-08-27"]},"paymentCurrency":{"type":"string","description":"The currency of the payment. Format ISO 4217, for example 'USD'. Governs each item's amount unless the item names its own currency.","examples":["USD"]},"documentType":{"type":"string","description":"The one kind of document every item pays, either 'VendorBillHeaderBase' or 'ExpenseReportBase'. A payment pays one kind, not a mixture.","examples":["VendorBillHeaderBase"]},"singlePayment":{"type":"boolean","description":"Whether this is a single payment rather than a batch."},"commonDescription":{"type":"string","description":"A description applied to the payment as a whole."},"skipJournalEntry":{"type":"boolean","description":"Whether to skip journal-entry creation for this payment. Defaults to false."},"externalUrl":{"type":"string","description":"A link back to the payment in the upstream system."},"origin":{"type":"string","description":"The source system this payment came from."},"senderAccountId":{"type":"string","description":"A bank account identifier for the sender, supplied by an integration. It is free-form text, not a reference to an account record."},"actualExchangeRate":{"type":"string","format":"decimal","description":"The exchange rate the bank actually applied, as a decimal."},"systemExchangeRate":{"type":"string","format":"decimal","description":"The exchange rate the system derived, as a decimal."},"paymentItems":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","description":"The vendor bill or expense report being paid, of the kind named by documentType. See id on GET accounting/vendor-bills/:id or GET accounting/expense-reports/:id."},"entityId":{"type":"string","description":"The legal entity the document is posted under. See id on GET base/entities."},"amount":{"type":"string","format":"decimal","description":"The amount applied to this document, as a decimal."},"currency":{"type":"string","description":"The currency for this item. Format ISO 4217, for example 'USD'. Omit to use the payment's currency."},"description":{"type":"string","description":"What this item pays for. Required."}},"additionalProperties":false,"required":["documentId","entityId","amount","description"]},"description":"The documents this payment settles. At least one is required.","examples":[[{"documentId":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6","entityId":"8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e","amount":"1200.00","description":"Invoice 5512"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createOutboundPayment` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createOutboundPayment, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the payment. Upload each file first and send its reference as `file`."}},"additionalProperties":false,"required":["accountId","entityId","paymentDate","paymentCurrency","documentType","paymentItems"]},"outboundPaymentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the outbound payment."},"outboundPaymentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The outbound payment number. Absent until a number has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the payment."},"paymentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the payment was made. Format YYYY-MM-DD."},"paymentCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the payment is denominated in. Format ISO 4217, for example 'USD'."},"paymentType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the money was sent, for example 'ach', 'wire' or 'check'."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The processing status of the payment."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Where the payment sits in the approval workflow."},"applicationStatus":{"anyOf":[{"enum":["unapplied","partiallyApplied","applied"]},{"type":"null"}],"description":"How much of the payment has been applied to bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"paymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment reference assigned by the bank or payment provider. It is not filterable. Match on it through POST accounting/outbound-payments/search."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source system this payment came from. Recorded when an integration created the payment."},"singlePayment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the payment covers a single bill rather than a batch."},"paymentAccountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the bank general ledger account the money left. It is not filterable. To scope by account, use paymentAccountId on POST accounting/outbound-payments/search."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that made the payment. It is not filterable. To scope by entity, use entityId on POST accounting/outbound-payments/search."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchWarehousesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the warehouse."},"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. It is unique within the tenant."},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that owns this warehouse."},"warehouseTypeId":{"type":"string","description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Absent when the warehouse allows every type. There is no endpoint for it."},"warehouseTypeName":{"type":"string","description":"The name of the warehouse type. Absent when the warehouse allows every document type."},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'."},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location. Always WAREHOUSE; the other values are kept for compatibility with existing integrations and are never returned. API version v2 declares WAREHOUSE only."},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. When false, existing stock and history keep pointing at it and new documents cannot select it."},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse. Open purchase-order on-order quantity for the entity is attributed here for replenishment. At most one warehouse per entity is the primary receiving warehouse."},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box. Absent when unset."},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor. Absent when unset."},"city":{"type":"string","description":"The city or locality. Absent when unset."},"stateProvince":{"type":"string","description":"The state, province or region. Absent when unset."},"postalCode":{"type":"string","description":"The postal or ZIP code. Absent when unset."},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. Absent when unset."},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state. Absent when unset."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the warehouse record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","locationCode","entityId","name","inventoryLocationType","isActive"]},"description":"The warehouses on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","entityId":"81e8beb1-1415-4012-9012-8138580f43dc","entityName":"Acme GmbH","name":"Rotterdam Distribution Centre","inventoryLocationType":"WAREHOUSE","isActive":true,"isPrimaryReceiving":true,"addressLine1":"Waalhaven 12","city":"Rotterdam","postalCode":"3087 BM","countryCode":"NL","region":"Benelux","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more warehouses remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchWarehousesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"locationCode":{"type":"string","description":"Limits results to the warehouse with this location code. The match is exact. Codes are unique, so this matches at most one warehouse."},"name":{"type":"string","description":"Limits results to the warehouse with this site name. The match is exact. This filter is available only here, not on the collection."},"entityId":{"type":"string","description":"Limits results to the warehouses owned by the legal entity with this identifier. An identifier matching no entity returns an empty page, not an error. See id on GET base/entities."},"warehouseTypeId":{"type":"string","description":"Limits results to the warehouses assigned to the warehouse type with this identifier. An identifier matching no warehouse type returns an empty page. There is no endpoint for it."},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"Limits results to warehouses of this kind of location. WAREHOUSE is the only stored value, so any other value matches no warehouse; the other values are kept for compatibility with existing integrations. It is also available as filter[inventoryLocationType] on the collection."},"isActive":{"type":"boolean","description":"Limits results to warehouses that can be selected on new documents when true, or to retired ones when false. Omit to match both."},"isPrimaryReceiving":{"type":"boolean","description":"Limits results to each entity's primary receiving warehouse when true, or excludes it when false. Omit to match both."},"city":{"type":"string","description":"Limits results to warehouses in this city. The match is exact. This filter is available only here, not on the collection."},"countryCode":{"type":"string","description":"Limits results to warehouses in this country. Format ISO 3166-1 alpha-2, for example 'NL'. The match is exact. This filter is available only here, not on the collection."},"region":{"type":"string","description":"Limits results to warehouses in this business region grouping. The match is exact. This filter is available only here, not on the collection."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to warehouses changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A warehouse must match every filter you send. Send an empty object to return all warehouses.","examples":[{"entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","isActive":true,"inventoryLocationType":"WAREHOUSE"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of warehouses per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"positionSkillRequirementsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the requirement."},"positionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The position that needs the skill."},"skillId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The skill the position needs."},"skillLevelId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The skill level the position needs."},"minimumSeniorityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lowest position seniority the requirement applies from. Absent when it applies to every seniority."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status: 'Active', 'Inactive' or 'Deprecated'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the requirement last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"employeeSkillAssignmentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the assignment."},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employee who has the skill. See id on GET people/person."},"skillId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The skill. See id on GET people/skills."},"skillLevelId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The level the employee has the skill at. See id on GET people/skill-levels."},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The approval status: 'Approved', 'Pending' or 'Rejected'."},"recordStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"'Active' for the employee's current approved assignment of the skill; 'Inactive' for older versions and for assignments not approved."},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the assignment was suggested by AI."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the assignment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getSboContextOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context. Position skill requirements reference this identifier in sboContextIds."},"contextTypeId":{"type":"string","description":"The identifier of the SBO context type.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextTypeListEndpointV1","dataSetName":"sboContextTypes","fieldName":"id"}},"contextValueId":{"type":"string","description":"The identifier of the SBO context value.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextValueListEndpointV1","dataSetName":"sboContextValues","fieldName":"id"}},"contextValueName":{"type":"string","description":"The SBO context value, for example 'Engineering'. Absent when the value has no name."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the SBO context last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","contextTypeId","contextValueId","lastModifiedDate"]},"getSboContextValueOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context value."},"contextValue":{"type":"string","description":"The SBO context value, for example 'Engineering'."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the SBO context value last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","contextValue","lastModifiedDate"]},"updateShipmentCarrierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment carrier.","examples":["5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"]}},"additionalProperties":false,"required":["id"]},"updateShipmentCarrierInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. It cannot be cleared and is not checked for uniqueness."},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments.","examples":[false]},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the vendor this carrier bills through. Send a vendor's identifier to set or repoint the link, or send null to clear it. An identifier matching no vendor fails the call with VENDOR_NOT_FOUND. See id on GET accounting/vendors/:id."}},"additionalProperties":false},"landedCostsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The landed cost number, for example 'LC-1007'.","examples":["LC-1007"]},"documentStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the landed cost. Possible values: 'DRAFT', 'COMMITTED'.","examples":["DRAFT"]},"documentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the landed cost. Format: YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["7039b992-696a-40c7-a181-51759304ef83"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity in `entityId`.","examples":["Flow UK"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the landed cost.","examples":["Sea freight on the August container"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the landed cost is active.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the landed cost was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:02:11.004Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the landed cost last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"getPositionSkillRequirementOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the requirement."},"positionId":{"type":"string","description":"The position that needs the skill. See id on GET people/positions.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PositionListEndpointV1","dataSetName":"positions","fieldName":"id"}},"skillId":{"type":"string","description":"The skill the position needs. See id on GET people/skills.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"The skill level the position needs.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"minimumSeniorityId":{"type":"string","description":"The lowest position seniority the requirement applies from. See id on GET people/position-seniorities. Absent when it applies to every seniority.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"PositionSeniorityListEndpointV1","dataSetName":"positionSeniorities","fieldName":"id"}},"sboContextIds":{"type":"array","items":{"type":"string"},"description":"The SBO context lines the requirement is limited to. An empty array when it applies in every context.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextListEndpointV1","dataSetName":"sboContexts","fieldName":"id"}},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the requirement."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the requirement last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","positionId","skillId","skillLevelId","sboContextIds","status","lastModifiedDate"]},"getBatchNumberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch number. Format: UUID.","examples":["7a4e91c3-2b58-4d06-9f31-c85e207a4b19"]},"batchNumber":{"type":"string","description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse.","examples":["LOT-2026-0448"]},"manufacturerBatchNumber":{"type":"string","description":"The manufacturer's batch number.","examples":["MFG-8842-C"]},"itemId":{"type":"string","description":"The unique identifier of the item this batch belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse the batch is in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-02"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"quantity":{"type":"string","format":"decimal","description":"The total quantity received into the batch, in the item's stocking unit. When a receipt, inventory increase, or inventory count creates the batch, it is 0 until the document that brings in the stock is committed. For a batch created by a production order, it does not show the quantity received, so use `inStock` instead. Unlike `inStock`, it does not change when stock leaves the batch or comes back on a sales return. Only canceling a receipt, inventory increase, or warehouse transfer that brought stock into the batch lowers it.","examples":["400"]},"inStock":{"type":"string","format":"decimal","description":"The quantity of the batch currently in stock, in the item's stocking unit. It counts all of the batch's stock, whatever its `batchStatus`, so quarantined, expired, and disposed stock are included. To take stock out, create and commit a document that moves it out, such as an inventory decrease.","examples":["260"]},"cost":{"type":"string","format":"decimal","description":"The cost of one unit of the batch. When more stock comes into the batch, the cost becomes the average of the existing and new stock, weighted by quantity.","examples":["12.5"]},"originalCost":{"type":"string","format":"decimal","description":"The cost of one unit of the batch when the stock was first received. Landed costs added later, such as freight or customs duty, raise it, and other revaluations can raise or lower it. When the batch is refilled after running out, it is reset to the new stock's cost.","examples":["12"]},"currency":{"type":"string","description":"The currency of `cost` and `originalCost`. Format: ISO 4217, for example 'USD'.","examples":["GBP"]},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD.","examples":["2027-03-31"]},"manufactureDate":{"type":"string","format":"date","description":"The date the manufacturer made the batch. Format: YYYY-MM-DD."},"bestBeforeDate":{"type":"string","format":"date","description":"The best-before date of the batch. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the batch's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase creates the batch, it is the date entered for the batch on that document, or the document's date when none was entered. When a warehouse transfer creates the batch, it is the `entryDate` of the batch in the sending warehouse. Each later receipt or inventory increase for the batch sets a new date. The age of all the batch's stock is then counted from the new date, including stock received earlier. A warehouse transfer that adds stock to an existing batch does not change the date."},"batchStatus":{"type":"string","description":"The status of the batch. Changing the status does not change the batch's `quantity`, `inStock`, or `cost`. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'.","examples":["ACTIVE"]},"temperatureBreach":{"type":"boolean","description":"Whether the batch has been outside its storage temperature range.","examples":[false]},"qcStatus":{"type":"string","description":"The quality-control status of the batch, as free text."},"active":{"type":"boolean","description":"Whether the batch is active.","examples":[true]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the batch record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the batch record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"getSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you.","examples":["SR-1042"]},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The name of that customer.","examples":["Bakker Retail B.V."]},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line.","examples":["55120"]},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'.","examples":["SalesDelivery"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number.","examples":["RMA-2026-0087"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back.","examples":["3SABCD1234567"]},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency.","examples":["144.00"]},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency.","examples":["0.00"]},"notes":{"type":"string","description":"Free text on the document.","examples":["Customer reports transit damage"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this finding is about, as batchNumberId in batches. Tells apart two batches that share a number."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this finding is about, as serialNumberId in serials."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"reactivateSkillCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"reactivateSkillCategoryInput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeletePurchaseReturnsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted purchase returns, in the order you sent them. Format: UUID.","examples":[["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeletePurchaseReturnsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the purchase returns you want to delete. Format: UUID. Send at least one.","examples":[["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"deleteSkillCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"deleteUnitOfMeasureOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"type":"string","description":"The short code the deleted unit of measure held.","examples":["KG"]}},"additionalProperties":false,"required":["id","unitCode"]},"deleteShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]}},"additionalProperties":false,"required":["id"]},"bulkDeleteBinsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the removed bin."}},"additionalProperties":false,"required":["id"]},"description":"The removed bins, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteBinsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the bins to remove. If any identifier matches nothing or its bin still holds stock, nothing is removed and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"deleteReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]}},"additionalProperties":false,"required":["id"]},"bulkCreateUnitOfMeasuresOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created unit of measure."}},"additionalProperties":false,"required":["id"]},"description":"The created units of measure, in the same order as the input. Match entries to inputs by index. Read a record with GET inventory/unit-of-measures/:id when you need its stored state.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateUnitOfMeasuresInput":{"type":"object","properties":{"unitOfMeasures":{"type":"array","items":{"type":"object","properties":{"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. Required. It must be unique within the tenant and within this request."},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'."}},"additionalProperties":false,"required":["unitCode","unitName"]},"description":"The units of measure to create. If any entry is invalid, nothing is written and the whole call fails.","examples":[[{"unitCode":"KG","unitName":"Kilogram"},{"unitCode":"G","unitName":"Gram"}]]}},"additionalProperties":false,"required":["unitOfMeasures"]},"getWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'.","examples":["WTR-2291"]},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"locationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"targetLocationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer line. updateLines and deleteLines address lines by it."},"itemId":{"type":"string","description":"The item being moved. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from, the document's warehouse applied to every line. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much moves, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"transferCost":{"type":"string","format":"decimal","description":"What one unit left the source warehouse at, in the transfer's currency. The valuation method sets it at commit. Absent on a draft."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit on an intercompany transfer, in the contractual currency. Supplied on create."},"totalTransferValue":{"type":"string","format":"decimal","description":"The line's total on an intercompany transfer, in the contractual currency: totalTransferValue = unitTransferValue x quantity. Written by the platform."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this line has come back on an intercompany return."},"status":{"type":"string","description":"The status of the line."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number. See id on GET inventory/batch-numbers/:id."},"batchNumber":{"type":"string","description":"The batch number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"What this batch moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The batches that make up the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number. See id on GET inventory/serial-numbers/:id."},"serialNumber":{"type":"string","description":"The serial number."},"quantity":{"type":"string","format":"decimal","description":"Always one, for a serialized unit."},"unitCost":{"type":"string","format":"decimal","description":"What this unit moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The serialized units that move."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"fromBinLocationCode":{"type":"string","description":"The code of that bin."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"toBinLocationCode":{"type":"string","description":"The code of that bin."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer. The collection GET inventory/warehouse-transfers returns lineCount in place of these.","examples":[[{"id":"7d2b48e1-95c3-4a06-8f17-3e5a9c06b2d4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","unitCode":"EA","quantity":"24","inventoryQuantity":"24"}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"searchPurchaseReturnsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID."},"documentNumber":{"type":"string","description":"The purchase return number, for example 'PRTR-1043'."},"documentStatus":{"type":"string","description":"The status of the purchase return. Possible values: 'DRAFT', 'APPROVED', 'PREPARED', 'SHIPPED', 'COMMITTED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', 'COMPLETED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"shippedDate":{"type":"string","format":"date","description":"The date the goods left for the vendor, as given when the purchase return was shipped with POST inventory/purchase-returns/:id/ship. Format: YYYY-MM-DD. Absent until the purchase return is shipped. It does not set the date of the inventory transaction or of the journal entry."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"Deprecated, and always empty. A purchase return is created from a purchase order. Use `purchaseOrderId`."},"purchaseOrderId":{"type":"string","description":"The unique identifier of the purchase order the purchase return was created from. Format: UUID. See `id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order the purchase return was created from."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the purchase order line that this line returns goods from. Format: UUID. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'PurchaseOrderLine'."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of one stocking unit of the batch, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return."},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The matching purchase returns in this response, with their lines. When more purchase returns match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"PRTR-1043","documentStatus":"COMMITTED","documentDate":"2026-08-20","returnType":"NORMAL","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","currency":"EUR","totalAmount":"96.00","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","quantity":"30.00"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchPurchaseReturnsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the purchase return with this document number. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to purchase returns with this status. The match is exact. Accepted values: 'DRAFT', 'APPROVED', 'PREPARED', 'SHIPPED', 'COMMITTED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', 'COMPLETED', 'CANCELLED'."},"returnType":{"type":"string","description":"Limits results to purchase returns of this type. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"Limits results to purchase returns for the legal entity with this unique identifier. Format: UUID. See `id` on GET base/entities (entities)."},"businessPartnerId":{"type":"string","description":"Limits results to purchase returns for the vendor with this unique identifier. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"locationId":{"type":"string","description":"Limits results to purchase returns with at least one line for the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"itemId":{"type":"string","description":"Limits results to purchase returns with at least one line for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"referenceNumber":{"type":"string","description":"Limits results to purchase returns with this reference. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to purchase returns whose `documentDate` is on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to purchase returns whose `documentDate` is on or before this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to purchase returns changed on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A purchase return must match every filter you send. Send an empty object to return all purchase returns.","examples":[{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentStatus":"COMMITTED","fromDate":"2026-08-01"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of purchase returns per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"searchPositionSenioritiesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position seniority."},"levelName":{"type":"string","description":"The name of the seniority level, for example 'Senior'."},"levelOrder":{"type":"number","description":"The rank of the level on the career ladder. A higher number is more senior."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the position seniority. A deleted position seniority is 'Deprecated' and can be reactivated."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the position seniority last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","levelName","levelOrder","status","lastModifiedDate"]},"description":"The records on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPositionSenioritiesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the records with these identifiers."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key, for example 'apposeId'. A key that is not configured fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier in the other system. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to records that carry this external identifier. Several records can share one value."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"Limits results to records with this status."},"levelName":{"type":"string","description":"Limits results to the record with exactly this name."}},"additionalProperties":false,"description":"The filters to apply. A record must match every filter you send. Omit to return all records."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of records per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"updateTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6"]},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'.","examples":["WTO-1044"]},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order.","examples":[1]},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T11:20:04.219Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. updateLines and deleteLines address a line by it."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from. See id on GET inventory/warehouses/:id. Absent while no source warehouse has been resolved, and such a line blocks the conversion."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Always greater than zero."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line is still to be transferred."},"processedQuantity":{"type":"string","format":"decimal","description":"How much of the line a transfer has already taken."},"status":{"type":"string","description":"The state of the line. 'NEEDS_SOURCE' means no source warehouse has been resolved, and the transfer order cannot be converted until it is."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer order as it now stands.","examples":[[{"id":"9a4e2c76-1b38-4f05-8d92-6c7a3e15b204","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"12","inventoryQuantity":"12","openQuantity":"12","status":"NEEDS_SOURCE"}]]}},"additionalProperties":false,"required":["id","documentStatus","lines"]},"updateTransferOrderInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Use format YYYY-MM-DD."},"locationId":{"type":"string","description":"The warehouse the goods leave, for the transfer order as a whole. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to, for the transfer order as a whole. See id on GET inventory/warehouses/:id."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"notes":{"type":"string","description":"Free text on the document."},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse to draw from. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse to deliver to. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line’s unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["itemId","targetLocationId","quantity"]},"description":"The lines to add. The same shape as on create."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The line to change, by the id the transfer order publishes."},"itemId":{"type":"string","description":"A different item to move. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse to draw from. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse to deliver to. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, addressed by the id the transfer order publishes. Everything but the id is optional.","examples":[[{"id":"9a4e2c76-1b38-4f05-8d92-6c7a3e15b204","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The lines to remove, by the id the transfer order publishes. Applied before the updates and creates."}},"additionalProperties":false},"createPositionSeniorityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created position seniority."}},"additionalProperties":false,"required":["id"]},"createPositionSeniorityInput":{"type":"object","properties":{"levelName":{"type":"string","description":"The name of the seniority level, for example 'Senior'. Must be unique across all records."},"levelOrder":{"type":"number","description":"The rank of the level on the career ladder. A higher number is more senior."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers other systems use for the record. At most one entry per fieldName."}},"additionalProperties":false,"required":["levelName","levelOrder"]},"updatePositionSeniorityOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePositionSeniorityInput":{"type":"object","properties":{"levelName":{"type":"string","description":"The new name. Must be unique across all records."},"levelOrder":{"type":"number","description":"The rank of the level on the career ladder. A higher number is more senior."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. Fails if the record already carries the fieldName."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to change, matched by fieldName. Fails if the record does not carry the fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove."}},"additionalProperties":false},"updateBatchNumberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch number. Format: UUID.","examples":["7a4e91c3-2b58-4d06-9f31-c85e207a4b19"]},"batchStatus":{"type":"string","description":"The status of the batch after the update. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'.","examples":["QUARANTINED"]}},"additionalProperties":false,"required":["id"]},"updateBatchNumberInput":{"type":"object","properties":{"manufacturerBatchNumber":{"type":"string","description":"The manufacturer's batch number."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD."},"manufactureDate":{"type":"string","format":"date","description":"The date the manufacturer made the batch. Format: YYYY-MM-DD."},"bestBeforeDate":{"type":"string","format":"date","description":"The best-before date of the batch. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the batch's age is counted from. Format: YYYY-MM-DD. The date you send applies to all of the batch's stock. If a receipt or inventory increase for the batch comes after your update, it sets a new date and replaces the date you sent."},"batchStatus":{"type":"string","description":"The status of the batch. Changing the status does not change the batch's `quantity`, `inStock`, or `cost`. Accepted values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'.","examples":["QUARANTINED"]},"temperatureBreach":{"type":"boolean","description":"Whether the batch has been outside its storage temperature range."},"qcStatus":{"type":"string","description":"The quality-control status of the batch, as free text.","examples":["Awaiting lab result"]},"active":{"type":"boolean","description":"Whether the batch is active."}},"additionalProperties":false},"reactivateSkillOutput":{"type":"object","properties":{},"additionalProperties":false},"reactivateSkillInput":{"type":"object","properties":{},"additionalProperties":false},"createShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned.","examples":["SD-8841"]},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD.","examples":["2026-08-19"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The display name of that customer.","examples":["Bakker Retail B.V."]},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"shipmentCarrierName":{"type":"string","description":"The name of that carrier.","examples":["PostNL"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods.","examples":["3SABCD1234567"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment.","examples":["PO-BAKKER-4417"]},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it.","examples":["OPEN"]},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency.","examples":["960.00"]},"notes":{"type":"string","description":"Free text on the shipment.","examples":["Palletised"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createShipmentInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Required. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it and the first line's warehouse decides it. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The planned delivery date. Use format YYYY-MM-DD.","examples":["2026-08-19"]},"currency":{"type":"string","description":"The currency for every amount on the shipment. Format ISO 4217, for example 'EUR'. Omit it to use the currency of the legal entity's default accounting book, and creation fails when the entity has no default book.","examples":["EUR"]},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number.","examples":["3SABCD1234567"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment.","examples":["PO-BAKKER-4417"]},"notes":{"type":"string","description":"Free text on the shipment.","examples":["Palletised"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line must use the same warehouse. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to ship, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency. Omit it to take the price from the sales order line."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id. Naming it links the shipment to the order it fulfills."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch going out. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line ships from. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to ship, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches going out on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit going out. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line ships from. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units going out, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the goods from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines of the shipment. At least one is required.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","notes":"Ship complete"}]]}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"bulkDeleteItemsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted item."}},"additionalProperties":false,"required":["id"]},"description":"The deleted items, in the same order as the input."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteItemsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the items to delete. If any id is unknown, or its item still has stock or history, the whole call fails and nothing is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkCreateUnitOfMeasureGroupsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created unit of measure group."}},"additionalProperties":false,"required":["id"]},"description":"The created unit of measure groups, in the same order as the input. Match entries to inputs by index. Read a group with GET inventory/unit-of-measure-groups/:id to learn the ids assigned to its lines.","examples":[[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"},{"id":"5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateUnitOfMeasureGroupsInput":{"type":"object","properties":{"unitOfMeasureGroups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the unit of measure group. Required. It is not checked for uniqueness."},"description":{"type":"string","description":"A free-form description of what the group covers. Omit for none."},"baseUnitOfMeasureId":{"type":"string","description":"The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Required. It is fixed for the life of the group and gets its own line automatically with a factor of 1, so do not list it in lines. See id on GET inventory/unit-of-measures/:id."},"lines":{"type":"array","items":{"type":"object","properties":{"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It must be greater than zero."}},"additionalProperties":false,"required":["unitOfMeasureId","conversionFactor"]},"description":"The conversion lines for this group, beyond the base unit's automatic one. Each unit of measure may appear at most once within this entry."}},"additionalProperties":false,"required":["name","baseUnitOfMeasureId"]},"description":"The unit of measure groups to create, each with its own conversion lines. If any entry is invalid, nothing is created and the whole call fails.","examples":[[{"name":"Packaging","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","lines":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"12.00"}]},{"name":"Weight","baseUnitOfMeasureId":"e57a0d34-9f62-4b18-bc25-71a6e8039d4b"}]]}},"additionalProperties":false,"required":["unitOfMeasureGroups"]},"deletePurchaseReturnOutput":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Whether the purchase return was deleted. It is always true, because the request fails when the purchase return cannot be deleted.","examples":[true]}},"additionalProperties":false,"required":["deleted"]},"getPositionSeniorityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position seniority."},"levelName":{"type":"string","description":"The name of the seniority level, for example 'Senior'."},"levelOrder":{"type":"number","description":"The rank of the level on the career ladder. A higher number is more senior."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the position seniority. A deleted position seniority is 'Deprecated' and can be reactivated."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the position seniority last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","levelName","levelOrder","status","lastModifiedDate"]},"deleteSboContextValueOutput":{"type":"object","properties":{},"additionalProperties":false},"reactivatePositionSeniorityOutput":{"type":"object","properties":{},"additionalProperties":false},"reactivatePositionSeniorityInput":{"type":"object","properties":{},"additionalProperties":false},"deleteLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]}},"additionalProperties":false,"required":["id"]},"deletePositionSkillRequirementOutput":{"type":"object","properties":{},"additionalProperties":false},"getSerialNumberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial number. Format: UUID.","examples":["c3f80a41-6d29-4b57-8e10-92a4d7b05f63"]},"serialNumber":{"type":"string","description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity.","examples":["SN-000418"]},"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number.","examples":["MFG-77-000418"]},"itemId":{"type":"string","description":"The unique identifier of the item this serial number belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["afb4492d-52fc-44c5-ab10-71ad4a615496"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["SERIAL-01"]},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse the unit is in, or was last in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-02"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the unit belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"inStock":{"type":"string","format":"decimal","description":"The current quantity of the unit in stock. It is 1 when the unit is in stock and 0 when it is not, including before the unit is received.","examples":["1"]},"isSold":{"type":"boolean","description":"Whether the unit has been sold.","examples":[false]},"cost":{"type":"string","format":"decimal","description":"The cost of the unit. Cost changes made after the unit is sold are in `afterSaleCost`.","examples":["250"]},"originalCost":{"type":"string","format":"decimal","description":"The cost of the unit when it was first received. While the unit is in stock, landed costs added later, such as freight or customs duty, raise it, and other revaluations can raise or lower it. When the unit is received again on a receipt or inventory increase after it left stock, it is reset to the cost on that document. A sales return or a canceled shipment does not reset it.","examples":["250"]},"afterSaleCost":{"type":"string","format":"decimal","description":"The total of the cost changes made to the unit after it was sold, such as a landed cost added later. Absent when the unit has had no cost changes since it was sold."},"currency":{"type":"string","description":"The currency of `cost`, `originalCost`, and `afterSaleCost`. Format: ISO 4217, for example 'USD'.","examples":["GBP"]},"lastCostChangeDate":{"type":"string","format":"date","description":"The date the `cost` or `afterSaleCost` of the unit last changed. It is the date the change was committed, not the date of the document. Format: YYYY-MM-DD."},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase receives the unit, it is the date entered for the unit on that document, or the document's date when none was entered. Each later receipt or inventory increase for the unit sets a new date. A warehouse transfer does not change the date, including a transfer between legal entities."},"active":{"type":"boolean","description":"Whether the serial number is active.","examples":[true]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the serial number record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the serial number record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"getInventoryLevelOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory level.","examples":["0b6d4c93-71ea-4f28-9c05-83a1e7f6204d"]},"itemId":{"type":"string","description":"The unique identifier for the item this level is for. See id on GET inventory/items/:id.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The item's short code.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The item's name.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier for the location this level is at. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The location's short code.","examples":["WH-01"]},"locationName":{"type":"string","description":"The location's name.","examples":["Rotterdam Distribution Centre"]},"onHandQuantity":{"type":"string","format":"decimal","description":"The total physical quantity on hand at this location, in the item's stocking unit of measure.","examples":["1200.00"]},"availableQuantity":{"type":"string","format":"decimal","description":"The quantity free to allocate: onHandQuantity minus allocatedQuantity and reservedQuantity.","examples":["1150.00"]},"allocatedQuantity":{"type":"string","format":"decimal","description":"The quantity allocated to outbound demand.","examples":["50.00"]},"reservedQuantity":{"type":"string","format":"decimal","description":"The quantity reserved."},"inTransitQuantity":{"type":"string","format":"decimal","description":"The quantity in transit to this location."},"damagedQuantity":{"type":"string","format":"decimal","description":"The quantity flagged as damaged."},"qualityHoldQuantity":{"type":"string","format":"decimal","description":"The quantity on quality hold."},"averageCost":{"type":"string","format":"decimal","description":"The moving-average unit cost, in the currency given by currency.","examples":["3.75"]},"onHandValue":{"type":"string","format":"decimal","description":"The value of the stock on hand, in the currency given by currency.","examples":["4500.00"]},"currency":{"type":"string","description":"The currency of averageCost and onHandValue. Format ISO 4217, for example 'EUR'. Absent when the level has no valuation yet.","examples":["EUR"]},"lastTransactionTimestamp":{"type":"string","format":"date-time","description":"The date and time a stock movement last touched this level. Format YYYY-MM-DDTHH:mm:ss. Unlike lastModifiedDate, it changes only when stock moves.","examples":["2026-08-03T11:15:00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory-level record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false,"required":["id","itemId","locationId","availableQuantity"]},"createEmployeeSkillAssignmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created assignment."}},"additionalProperties":false,"required":["id"]},"createEmployeeSkillAssignmentInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee who has the skill. See id on GET people/person.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PeopleListEndpointV1","dataSetName":"people","fieldName":"id"}},"skillId":{"type":"string","description":"The skill. See id on GET people/skills.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"The level the employee has the skill at. See id on GET people/skill-levels.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"approvalStatus":{"enum":["Approved","Pending","Rejected"],"description":"The approval status. 'Approved' makes the assignment the employee's current one for the skill."},"reasoning":{"type":"string","description":"Why the assignment was made, approved or rejected."},"employeeNotes":{"type":"string","description":"The employee's own notes on the skill."}},"additionalProperties":false,"required":["employeeId","skillId","skillLevelId","approvalStatus"]},"searchWarehouseTransfersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer."},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'."},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed."},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'."},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer line. updateLines and deleteLines address lines by it."},"itemId":{"type":"string","description":"The item being moved. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from, the document's warehouse applied to every line. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much moves, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"transferCost":{"type":"string","format":"decimal","description":"What one unit left the source warehouse at, in the transfer's currency. The valuation method sets it at commit. Absent on a draft."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit on an intercompany transfer, in the contractual currency. Supplied on create."},"totalTransferValue":{"type":"string","format":"decimal","description":"The line's total on an intercompany transfer, in the contractual currency: totalTransferValue = unitTransferValue x quantity. Written by the platform."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this line has come back on an intercompany return."},"status":{"type":"string","description":"The status of the line."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number. See id on GET inventory/batch-numbers/:id."},"batchNumber":{"type":"string","description":"The batch number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"What this batch moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The batches that make up the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number. See id on GET inventory/serial-numbers/:id."},"serialNumber":{"type":"string","description":"The serial number."},"quantity":{"type":"string","format":"decimal","description":"Always one, for a serialized unit."},"unitCost":{"type":"string","format":"decimal","description":"What this unit moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The serialized units that move."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"fromBinLocationCode":{"type":"string","description":"The code of that bin."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"toBinLocationCode":{"type":"string","description":"The code of that bin."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer. The collection GET inventory/warehouse-transfers returns lineCount in place of these."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The transfers on this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279","documentNumber":"WTR-2292","documentStatus":"COMMITTED","transferType":"INTERCOMPANY","billingStatus":"NOT_BILLED","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more transfers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchWarehouseTransfersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the transfer with this number, for example 'WTR-2291'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to transfers with this status. Accepted values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"transferType":{"type":"string","description":"Limits results to transfers of this type. Accepted values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'."},"billingStatus":{"type":"string","description":"Limits results to transfers with this billing status. Accepted values: 'NOT_BILLED', 'BILLED'."},"entityId":{"type":"string","description":"Limits results to transfers whose goods leave this legal entity. See id on GET base/entities."},"toEntityId":{"type":"string","description":"Limits results to transfers whose goods go to this legal entity, on an intercompany transfer. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to transfers whose goods leave this warehouse. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"Limits results to transfers whose goods go to this warehouse. See id on GET inventory/warehouses/:id."},"itemId":{"type":"string","description":"Limits results to transfers with a line for this item. See id on GET inventory/items/:id."},"referenceNumber":{"type":"string","description":"Limits results to transfers with this reference. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to transfers dated on or after this date. Use format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to transfers dated on or before this date. Use format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to transfers changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A transfer must match every filter you send. Send an empty object to return all transfers.","examples":[{"transferType":"INTERCOMPANY","billingStatus":"NOT_BILLED"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of transfers per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkDeleteInventoryIncreasesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted inventory increases, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteInventoryIncreasesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the inventory increases to delete. All or nothing: if any is missing or committed, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"createInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned.","examples":["INC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory increase.","examples":["August cycle count"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth and unitPrice does not apply. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit, when one was recorded. Format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"createInventoryIncreaseInput":{"type":"object","properties":{"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase, and every line is added to it. Required. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it to use the warehouse's owning entity. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. Defaults to today. It sets the posting period. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code explaining the adjustment. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"notes":{"type":"string","description":"Free text on the inventory increase.","examples":["August cycle count"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency. Greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the batch."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Use format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch, in the line's unit. The batch quantities of a line must add up to the line's quantity."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches making up this line's quantity. Required for a batch-tracked item, and the quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the unit."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit. Use format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false},"description":"The serialized units, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity lands in. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number not on the line is rejected."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity","unitPrice"]},"description":"The lines of the inventory increase. At least one is required.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["locationId","lines"]},"getWarehouseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the warehouse.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. It is unique within the tenant.","examples":["WH-01"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. See id on GET base/entities.","examples":["81e8beb1-1415-4012-9012-8138580f43dc"]},"entityName":{"type":"string","description":"The name of the legal entity that owns this warehouse.","examples":["Acme GmbH"]},"warehouseTypeId":{"type":"string","description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Absent when the warehouse allows every type. There is no endpoint for it."},"warehouseTypeName":{"type":"string","description":"The name of the warehouse type. Absent when the warehouse allows every document type."},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'.","examples":["Rotterdam Distribution Centre"]},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location. Always WAREHOUSE; the other values are kept for compatibility with existing integrations and are never returned. API version v2 declares WAREHOUSE only.","examples":["WAREHOUSE"]},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. When false, existing stock and history keep pointing at it and new documents cannot select it.","examples":[true]},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse. Open purchase-order on-order quantity for the entity is attributed here for replenishment. At most one warehouse per entity is the primary receiving warehouse.","examples":[true]},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box. Absent when unset.","examples":["Waalhaven 12"]},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor. Absent when unset."},"city":{"type":"string","description":"The city or locality. Absent when unset.","examples":["Rotterdam"]},"stateProvince":{"type":"string","description":"The state, province or region. Absent when unset."},"postalCode":{"type":"string","description":"The postal or ZIP code. Absent when unset.","examples":["3087 BM"]},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. Absent when unset.","examples":["NL"]},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state. Absent when unset.","examples":["Benelux"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the warehouse record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","locationCode","entityId","name","inventoryLocationType","isActive"]},"searchUnitOfMeasuresOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure."},"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. It is unique within the tenant."},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the unit of measure record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","unitCode","unitName"]},"description":"The units of measure on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"KG","unitName":"Kilogram","lastModifiedDate":"2026-05-12T09:30:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more units of measure remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchUnitOfMeasuresInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"unitCode":{"type":"string","description":"Limits results to the unit of measure with this code. The match is exact. Codes are unique, so this matches at most one unit of measure."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to units of measure changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A unit of measure must match every filter you send. Send an empty object to return all units of measure.","examples":[{"unitCode":"KG"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of units of measure per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkUpdateSkillsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkUpdateSkillsInput":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill."},"skillName":{"type":"string","description":"The new English name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new English description. Send null to clear it."},"isCanonical":{"type":"boolean","description":"Whether the skill is a canonical catalogue entry."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of active categories. Replaces the full set.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillCategoryListEndpointV1","dataSetName":"skillCategories","fieldName":"id"}},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to change, matched by fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove."}},"additionalProperties":false,"required":["id"]},"description":"The changes, one row per skill. If any row is invalid, the whole call is rejected."}},"additionalProperties":false,"required":["skills"]},"getInventoryTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory transaction. Format: UUID.","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The name of the item in `itemId`.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"unitId":{"type":"string","description":"The unique identifier of the unit of measure the inventory transaction was recorded in. Format: UUID. For receipts, shipments, and warehouse transfers, it is the unit on the document line. For inventory increases, inventory decreases, and inventory revaluations, it is the item's stocking unit. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure).","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"type":"string","description":"The code of the unit of measure in `unitId`.","examples":["EA"]},"unitName":{"type":"string","description":"The name of the unit of measure in `unitId`.","examples":["Each"]},"transactionDate":{"type":"string","format":"date","description":"The date the stock came in or went out, or its value changed. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the item's stocking unit. It is 0 when the inventory transaction takes stock out or changes only the value of the stock.","examples":["500.00"]},"outQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction took out of stock, in the item's stocking unit. It is 0 when the inventory transaction brings stock in or changes only the value of the stock.","examples":["0.00"]},"unitInQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit.","examples":["500.00"]},"unitOutQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction took out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item, in the item's stocking unit and in the currency named by `currency`. When stock goes out, it is the item's cost at that time, from its valuation method.","examples":["3.75"]},"totalCost":{"type":"string","format":"decimal","description":"The total cost of the stock that this inventory transaction brought in or took out, in the currency named by `currency`. It is positive whichever way the stock moved, so use `inQuantity` and `outQuantity` to tell the direction. On an inventory revaluation, it is the change in the value of the stock: a positive amount raises the value and a negative amount lowers it.","examples":["1875.00"]},"salesAmount":{"type":"string","format":"decimal","description":"The total selling price of the stock on the shipment line, in the currency named by `currency`. It is the line's unit price multiplied by the quantity. Only inventory transactions created by shipments have it."},"currency":{"type":"string","description":"The currency that `unitCost`, `totalCost`, and `salesAmount` are in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"sourceDocumentId":{"type":"string","description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"isReturn":{"type":"boolean","description":"Whether the inventory transaction comes from a sales return or a purchase return, including the inventory transactions created when a return is canceled.","examples":[false]},"isPriceDiff":{"type":"boolean","description":"Whether the inventory transaction changes only the value of stock, without moving any, such as an inventory revaluation or a landed cost.","examples":[false]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the item, warehouse, or unit of measure do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false,"required":["id","itemId","locationId","transactionDate","inQuantity"]},"itemCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item category.","examples":["a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"]},"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not unique: two categories can share a name, so use id to address one.","examples":["Hardware"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of what the category covers. Absent when none was set.","examples":["Fasteners, fittings and tooling"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the category can be chosen on new items. When false the category is retired: existing items keep it and new ones cannot be assigned to it.","examples":[true]},"idealTurnoverRatio":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency.","examples":["6.50"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"inventoryLevelsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory level.","examples":["0b6d4c93-71ea-4f28-9c05-83a1e7f6204d"]},"itemId":{"type":"string","description":"The unique identifier for the item this level is for. See id on GET inventory/items/:id.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The item's short code.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The item's name.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier for the location this level is at. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The location's short code.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The location's name.","examples":["Rotterdam Distribution Centre"]},"onHandQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total physical quantity on hand at this location, in the item's stocking unit of measure.","examples":["1200.00"]},"availableQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity free to allocate: onHandQuantity minus allocatedQuantity and reservedQuantity.","examples":["1150.00"]},"allocatedQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity allocated to outbound demand.","examples":["50.00"]},"reservedQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity reserved."},"inTransitQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity in transit to this location."},"damagedQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity flagged as damaged."},"qualityHoldQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity on quality hold."},"averageCost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The moving-average unit cost, in the currency given by currency.","examples":["3.75"]},"onHandValue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value of the stock on hand, in the currency given by currency.","examples":["4500.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of averageCost and onHandValue. Format ISO 4217, for example 'EUR'. Absent when the level has no valuation yet.","examples":["EUR"]},"lastTransactionTimestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time a stock movement last touched this level. Format YYYY-MM-DDTHH:mm:ss. Unlike lastModifiedDate, it changes only when stock moves.","examples":["2026-08-03T11:15:00"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory-level record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false},"searchPositionSkillRequirementsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the requirement."},"positionId":{"type":"string","description":"The position that needs the skill. See id on GET people/positions.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PositionListEndpointV1","dataSetName":"positions","fieldName":"id"}},"skillId":{"type":"string","description":"The skill the position needs. See id on GET people/skills.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"The skill level the position needs.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"minimumSeniorityId":{"type":"string","description":"The lowest position seniority the requirement applies from. See id on GET people/position-seniorities. Absent when it applies to every seniority.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"PositionSeniorityListEndpointV1","dataSetName":"positionSeniorities","fieldName":"id"}},"sboContextIds":{"type":"array","items":{"type":"string"},"description":"The SBO context lines the requirement is limited to. An empty array when it applies in every context.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextListEndpointV1","dataSetName":"sboContexts","fieldName":"id"}},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the requirement."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the requirement last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","positionId","skillId","skillLevelId","sboContextIds","status","lastModifiedDate"]},"description":"The requirements on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPositionSkillRequirementsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the requirements with these identifiers."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key, for example 'apposeId'. A key that is not configured fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier in the other system. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to requirements that carry this external identifier. Several records can share one value."},"positionId":{"type":"string","description":"Limits results to this position's requirements.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PositionListEndpointV1","dataSetName":"positions","fieldName":"id"}},"skillId":{"type":"string","description":"Limits results to requirements for this skill.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"Limits results to requirements at this skill level.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"minimumSeniorityId":{"type":"string","description":"Limits results to requirements from this seniority.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"PositionSeniorityListEndpointV1","dataSetName":"positionSeniorities","fieldName":"id"}},"status":{"enum":["Active","Inactive","Deprecated"],"description":"Limits results to requirements with this status."}},"additionalProperties":false,"description":"The filters to apply. A requirement must match every filter you send. Omit to return all requirements."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of requirements per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"deletePositionSeniorityOutput":{"type":"object","properties":{},"additionalProperties":false},"searchUnitOfMeasureGroupsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure group."},"name":{"type":"string","description":"The display name of the unit of measure group. Names are not unique."},"description":{"type":"string","description":"A free-form description of what the group covers. Absent when none was given."},"baseUnitOfMeasureId":{"type":"string","description":"The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Absent when the group has no lines. See id on GET inventory/unit-of-measures/:id."},"baseUnitCode":{"type":"string","description":"The code of the base unit of measure. Absent when the group has no lines."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the conversion line. This is what updateLines and deleteLines address on PATCH inventory/unit-of-measure-groups/:id, not the unit."},"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit of measure."},"unitName":{"type":"string","description":"The display name of that unit of measure."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It is always greater than zero, and 1 on the base unit's own line."},"isBaseUnit":{"type":"boolean","description":"Whether this line is for the group's own base unit of measure. Exactly one line has it, and its conversionFactor is 1."}},"additionalProperties":false,"required":["id","unitOfMeasureId","unitCode","unitName","conversionFactor","isBaseUnit"]},"description":"The group's conversion lines, ordered by line id. An empty array when the group has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the unit of measure group or its conversion lines last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","lines"]},"description":"The unit of measure groups on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"2c7e5a91-6d38-4b04-8f72-1e9c03d5b846","name":"Packaging","description":"Eaches, boxes and pallets","baseUnitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","baseUnitCode":"EA","lines":[{"id":"9f1b60d4-27ac-4e53-b8f1-05d3e79a2c68","unitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","conversionFactor":"1.00","isBaseUnit":true},{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"BOX","unitName":"Box","conversionFactor":"12.00","isBaseUnit":false}],"lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more unit of measure groups remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchUnitOfMeasureGroupsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Limits results to unit of measure groups with this name. The match is exact. Names are not unique, so this may match several groups."},"unitOfMeasureId":{"type":"string","description":"Limits results to unit of measure groups with a conversion line for this unit of measure, including groups where it is the base unit. See id on GET inventory/unit-of-measures/:id."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to unit of measure groups changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding, changing or removing a conversion line counts as a change to the group."}},"additionalProperties":false,"description":"The filters to apply. A unit of measure group must match every filter you send. Send an empty object to return all unit of measure groups.","examples":[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of unit of measure groups per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"accountDeterminationRulesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique.","examples":["Finished goods — receipts"]},"priority":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used. A rule with no `priority` counts as 0.","examples":[10]},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the rule is active.","examples":[true]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the rule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Requests that change only the reason-code overrides do not update this field.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"skillLevelsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill level."},"skillLevelName":{"type":"string","description":"The name of the skill level, for example 'Expert'."},"skillLevelOrder":{"type":"number","description":"The rank of the level. A higher number is more proficient."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status: 'Active', 'Inactive' or 'Deprecated'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the skill level last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createSkillCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created skill category."}},"additionalProperties":false,"required":["id"]},"createSkillCategoryInput":{"type":"object","properties":{"categoryName":{"type":"string","description":"The name of the skill category. Must be unique across all records."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers other systems use for the record. At most one entry per fieldName."}},"additionalProperties":false,"required":["categoryName"]},"reasonCodesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the reason code.","examples":["7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"]},"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. It is unique within the tenant.","examples":["DAMAGE"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of what the reason code means. Absent when none was given.","examples":["Stock damaged in the warehouse"]},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the reason code can be selected on new documents. When false, existing documents keep it and new ones cannot select it.","examples":[true]},"requiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether documents using this reason code require approval before they take effect.","examples":[true]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the reason code record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change it.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"searchInventoryTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory transaction. Format: UUID."},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure the inventory transaction was recorded in. Format: UUID. For receipts, shipments, and warehouse transfers, it is the unit on the document line. For inventory increases, inventory decreases, and inventory revaluations, it is the item's stocking unit. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure in `unitId`."},"unitName":{"type":"string","description":"The name of the unit of measure in `unitId`."},"transactionDate":{"type":"string","format":"date","description":"The date the stock came in or went out, or its value changed. Format: YYYY-MM-DD."},"inQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the item's stocking unit. It is 0 when the inventory transaction takes stock out or changes only the value of the stock."},"outQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction took out of stock, in the item's stocking unit. It is 0 when the inventory transaction brings stock in or changes only the value of the stock."},"unitInQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit."},"unitOutQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction took out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item, in the item's stocking unit and in the currency named by `currency`. When stock goes out, it is the item's cost at that time, from its valuation method."},"totalCost":{"type":"string","format":"decimal","description":"The total cost of the stock that this inventory transaction brought in or took out, in the currency named by `currency`. It is positive whichever way the stock moved, so use `inQuantity` and `outQuantity` to tell the direction. On an inventory revaluation, it is the change in the value of the stock: a positive amount raises the value and a negative amount lowers it."},"salesAmount":{"type":"string","format":"decimal","description":"The total selling price of the stock on the shipment line, in the currency named by `currency`. It is the line's unit price multiplied by the quantity. Only inventory transactions created by shipments have it."},"currency":{"type":"string","description":"The currency that `unitCost`, `totalCost`, and `salesAmount` are in. Format: ISO 4217, for example 'USD'."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from."},"sourceDocumentId":{"type":"string","description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"isReturn":{"type":"boolean","description":"Whether the inventory transaction comes from a sales return or a purchase return, including the inventory transactions created when a return is canceled."},"isPriceDiff":{"type":"boolean","description":"Whether the inventory transaction changes only the value of stock, without moving any, such as an inventory revaluation or a landed cost."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the item, warehouse, or unit of measure do not update this field."}},"additionalProperties":false,"required":["id","itemId","locationId","transactionDate","inQuantity"]},"description":"The matching inventory transactions in this response. When more inventory transactions match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","transactionDate":"2026-08-03","inQuantity":"500.00","outQuantity":"0.00","unitInQuantity":"500.00","unitCost":"3.75","totalCost":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","isReturn":false,"isPriceDiff":false,"lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryTransactionsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"itemId":{"type":"string","description":"Limits results to inventory transactions for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to inventory transactions for the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"fromDate":{"type":"string","format":"date","description":"Limits results to inventory transactions with a `transactionDate` on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to inventory transactions with a `transactionDate` on or before this date. Format: YYYY-MM-DD."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"Limits results to inventory transactions from this type of document line."},"isReturn":{"type":"boolean","description":"Limits results to inventory transactions from sales returns and purchase returns when true, and to all other inventory transactions when false."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to inventory transactions whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. An inventory transaction must match every filter you send. Send an empty object to return all inventory transactions.","examples":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","fromDate":"2026-08-01","toDate":"2026-08-31"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of inventory transactions per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"createWarehouseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created warehouse.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]}},"additionalProperties":false,"required":["id"]},"createWarehouseInput":{"type":"object","properties":{"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. Required. It must be unique within the tenant.","examples":["WH-01"]},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'. Required.","examples":["Rotterdam Distribution Centre"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. Required. An unknown identifier fails the call with ENTITY_NOT_FOUND. See id on GET base/entities.","examples":["3f9c1e28-7b45-4d60-a913-5e07c286bd41"]},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location. Required. WAREHOUSE is the only value accepted; the other values are kept for compatibility with existing integrations and are refused. Use API version v2, which declares WAREHOUSE only.","examples":["WAREHOUSE"]},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. Defaults to true. Set it to false to stage a warehouse before it goes into use."},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse, where open purchase-order on-order quantity is attributed for replenishment. Defaults to false. At most one warehouse per entity is meant to be the primary receiving warehouse. It is not enforced, and setting it on a second warehouse is accepted.","examples":[true]},"warehouseTypeId":{"type":"string","description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Omit to allow every document type. An unknown identifier fails the call with WAREHOUSE_TYPE_NOT_FOUND. There is no endpoint for it."},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box.","examples":["Waalhaven 12"]},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality.","examples":["Rotterdam"]},"stateProvince":{"type":"string","description":"The state, province or region."},"postalCode":{"type":"string","description":"The postal or ZIP code.","examples":["3087 BM"]},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. It is not validated against the ISO list.","examples":["NL"]},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state.","examples":["Benelux"]}},"additionalProperties":false,"required":["locationCode","name","entityId","inventoryLocationType"]},"createLandedCostItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created landed cost item. Format: UUID.","examples":["9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"]}},"additionalProperties":false,"required":["id"]},"createLandedCostItemInput":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. See `id` on GET inventory/items/:id (getItem).","examples":["3d81e07c-95a2-4f63-b1c8-27e5a94d0b36"]},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. See `id` on GET accounting/accounts/:id (getAccount)."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'.","examples":["Weight"]},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type.","examples":["c4a90e21-7b35-4d18-9e02-6f13a85c7d40"]},"active":{"type":"boolean","description":"Whether the landed cost item is active. Defaults to true."}},"additionalProperties":false,"required":["allocationMode"]},"sboContextTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context type."},"contextType":{"type":"string","description":"The name of the SBO context type."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the SBO context type last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createUnitOfMeasureGroupOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created unit of measure group.","examples":["2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"]}},"additionalProperties":false,"required":["id"]},"createUnitOfMeasureGroupInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the unit of measure group. Required. It is not checked for uniqueness.","examples":["Packaging"]},"description":{"type":"string","description":"A free-form description of what the group covers. Omit for none.","examples":["Eaches, boxes and pallets"]},"baseUnitOfMeasureId":{"type":"string","description":"The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Required. It is fixed for the life of the group and gets its own line automatically with a factor of 1, so do not list it in lines. See id on GET inventory/unit-of-measures/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"lines":{"type":"array","items":{"type":"object","properties":{"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. It must not be the base unit and must not repeat another line in this request. See id on GET inventory/unit-of-measures/:id."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It must be greater than zero."}},"additionalProperties":false,"required":["unitOfMeasureId","conversionFactor"]},"description":"The conversion lines to add, beyond the base unit's automatic one. Omit for a group with only its base unit. Each unit of measure may appear at most once, and none may be the base unit.","examples":[[{"unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","conversionFactor":"12.00"}]]}},"additionalProperties":false,"required":["name","baseUnitOfMeasureId"]},"bulkCreateAccountDeterminationRulesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created rule. Format: UUID."}},"additionalProperties":false,"required":["id"]},"description":"The created rules, in the order you sent them.","examples":[[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateAccountDeterminationRulesInput":{"type":"object","properties":{"accountDeterminationRules":{"type":"array","items":{"type":"object","properties":{"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique."},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used."},"isActive":{"type":"boolean","description":"Whether the rule is active. Defaults to true."},"matching":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"The unique identifier of the accounting book this rule applies to. Format: UUID. Required for every rule: leaving it out returns BOOK_REQUIRED. See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"type":"string","description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' applies to every transaction type. Leave the field out to store 'DEFAULT'. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"required":["entityId"],"description":"The dimensions this rule applies to. If you leave out the item type, item category, location, or transaction type, the rule applies to every value of it."},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"type":"string","description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"type":"string","description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"type":"string","description":"Deprecated: no journal entry or preview reads this account; it is kept so existing v1 callers keep working. The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"type":"string","description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"type":"string","description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"type":"string","description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"type":"string","description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"type":"string","description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"type":"string","description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"type":"string","description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryVarianceAccountId":{"type":"string","description":"The unique identifier of the inventory variance account. Format: UUID. It takes the difference between a document's own cost and the item's current cost when committed stock leaves again after its cost has moved. Three postings resolve it: a receipt cancellation, through rules for 'RECEIPT'; and, through rules for 'INTERCOMPANY_TRANSFER', an intercompany warehouse transfer cancellation (the receiving entity's stock leaves at its current cost) and an intercompany return (the returning entity's stock leaves at its current cost). It is looked up only when such a difference exists; if the matching rule then has no account, the posting fails with a missing-account error. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"type":"string","description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"type":"string","description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"type":"string","description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"type":"string","description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"type":"string","description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"type":"string","description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches."},"reasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the rule's accounts can be overridden."}},"additionalProperties":false,"required":["reasonCodeId","accountId","parentAccountType"]},"description":"The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by `parentAccountType`. An inventory increase or decrease created by manufacturing that has its own offset account (`offsetAccountId` on GET inventory/inventory-increases/:id and GET inventory/inventory-decreases/:id) uses that account instead of an override. Each combination of `reasonCodeId` and `parentAccountType` can appear only once on a rule."}},"additionalProperties":false,"required":["ruleName","matching"]},"description":"The rules to create.","examples":[[{"ruleName":"Finished goods — receipts","priority":10,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}}]]}},"additionalProperties":false,"required":["accountDeterminationRules"]},"unitOfMeasureGroupsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure group.","examples":["2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"]},"name":{"type":"string","description":"The display name of the unit of measure group. Names are not unique.","examples":["Packaging"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of what the group covers.","examples":["Eaches, boxes and pallets"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the unit of measure group or its conversion lines last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"updateSboContextValueOutput":{"type":"object","properties":{},"additionalProperties":false},"updateSboContextValueInput":{"type":"object","properties":{"contextValue":{"type":"string","description":"The new value. Must be unique."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. Fails if the record already carries the fieldName."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to change, matched by fieldName. Fails if the record does not carry the fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove."}},"additionalProperties":false},"updatePositionSkillRequirementOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePositionSkillRequirementInput":{"type":"object","properties":{"positionId":{"type":"string","description":"The new position. See id on GET people/positions.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PositionListEndpointV1","dataSetName":"positions","fieldName":"id"}},"skillId":{"type":"string","description":"The new skill. See id on GET people/skills.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"The new skill level.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"minimumSeniorityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lowest position seniority the requirement applies from. Send null to clear it.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"PositionSeniorityListEndpointV1","dataSetName":"positionSeniorities","fieldName":"id"}},"sboContextIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The SBO context lines. Replaces the full set. Send null to clear it.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextListEndpointV1","dataSetName":"sboContexts","fieldName":"id"}},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to change, matched by fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove."}},"additionalProperties":false},"bulkCreateInventoryRevaluationsOutput":{"type":"object","properties":{"inventoryRevaluations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation."},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'."},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'."},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet."},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation."},"lineCount":{"type":"number","description":"How many lines the revaluation has."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The created revaluations, in input order, headers only. Read one in full on its own endpoint.","examples":[[{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"DRAFT","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]}},"additionalProperties":false,"required":["inventoryRevaluations"]},"bulkCreateInventoryRevaluationsInput":{"type":"object","properties":{"inventoryRevaluations":{"type":"array","items":{"type":"object","properties":{"costingValuationType":{"type":"string","description":"How the value change is recorded. Accepted values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required, because the commit refuses a document without one."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Defaults to the entity that owns the first line's warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to date the revaluation. Defaults to today. Use format YYYY-MM-DD."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account the expense comes off. Required when costingValuationType is 'directCostCapitalisation'. See id on GET accounting/chart-of-accounts/:id."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the revaluation."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item to revalue. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates. Must be greater than zero."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the legal entity's functional currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize. Moving-average direct cost capitalization only."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity","currentUnitCost","newUnitCost"]},"description":"The lines of the revaluation. At least one is required."}},"additionalProperties":false,"required":["costingValuationType","costingElementTypeId","lines"]},"description":"The revaluations to create. All or nothing: if any is rejected, none is written.","examples":[[{"costingValuationType":"revaluation","costingElementTypeId":"f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","unitId":"d5a71e93-4c08-4b26-95f7-2e6a8c30b41f","quantity":"150","currentUnitCost":"12","newUnitCost":"9"}]}]]}},"additionalProperties":false,"required":["inventoryRevaluations"]},"deleteSboContextTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteSkillsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteSkillsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The identifiers of the skills to deprecate."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteShipmentsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted shipments, in input order.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeleteShipmentsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the shipments to delete. If any is missing or is not in 'DRAFT' status, none are deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeleteSalesReturnsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The identifiers of the deleted returns, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteSalesReturnsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The identifiers of the returns to delete. If any is missing or is not a draft, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"createSboContextTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created SBO context type."}},"additionalProperties":false,"required":["id"]},"createSboContextTypeInput":{"type":"object","properties":{"contextType":{"type":"string","description":"The name of the SBO context type, for example 'department'. Must be unique."},"contextValueIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of the SBO context values to link to the type. Omit to link none.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextValueListEndpointV1","dataSetName":"sboContextValues","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers other systems use for the record. At most one entry per fieldName."}},"additionalProperties":false,"required":["contextType"]},"searchSboContextTypesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context type."},"contextType":{"type":"string","description":"The name of the SBO context type, for example 'department'."},"contextValueIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of the SBO context values linked to this type.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextValueListEndpointV1","dataSetName":"sboContextValues","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the SBO context type last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to its value links or external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","contextType","contextValueIds","lastModifiedDate"]},"description":"The records on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSboContextTypesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the records with these identifiers."},"contextType":{"type":"string","description":"Limits results to the record with exactly this name."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key, for example 'apposeId'. A key that is not configured fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier in the other system. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to records that carry this external identifier. Several records can share one value."}},"additionalProperties":false,"description":"The filters to apply. A record must match every filter you send. Omit to return all records."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of records per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"bulkDeletePositionSkillRequirementsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeletePositionSkillRequirementsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The identifiers of the requirements to delete."}},"additionalProperties":false,"required":["ids"]},"getPlanningContextOutput":{"type":"object","properties":{"entity":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the entity (a UUID)."},"name":{"type":"string","description":"The name of the entity."},"currency":{"type":"string","description":"The ISO 4217 code of the entity's currency, the default currency of a plan for this entity."}},"additionalProperties":false,"required":["id","name","currency"],"description":"The entity you asked for.","examples":[{"id":"3f2a9c14-6b1d-4c8e-9a51-0d7e2b6f4a10","name":"Acme Inc.","currency":"USD"}]},"fiscalYear":{"type":"object","properties":{"fiscalYear":{"type":"string","description":"The fiscal year code as the calendar stores it, for example FY2027."},"startDate":{"type":"string","format":"date","description":"The first day of the fiscal year. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the fiscal year. Format YYYY-MM-DD."}},"additionalProperties":false,"required":["fiscalYear","startDate","endDate"],"description":"The fiscal year you asked for, from the entity's fiscal calendar, or from the default calendar when the entity has none.","examples":[{"fiscalYear":"FY2027","startDate":"2027-01-01","endDate":"2027-12-31"}]},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the department (a UUID)."},"name":{"type":"string","description":"The name of the department."},"code":{"type":"string","description":"The department code. Absent when none is set."}},"additionalProperties":false,"required":["id","name"]},"description":"The active departments a plan can allocate budget to, ordered by department code.","examples":[[{"id":"8c0e7d52-1f3a-4b6c-9d2e-5a4b3c2d1e0f","name":"Engineering","code":"ENG"}]]},"positions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the position (a UUID)."},"name":{"type":"string","description":"The name of the position."},"code":{"type":"string","description":"The position number. Absent when none is set."}},"additionalProperties":false,"required":["id","name"]},"description":"The active positions a plan line can recruit for.","examples":[[{"id":"1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Software Engineer","code":"POS-0042"}]]},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the location (a UUID)."},"name":{"type":"string","description":"The name of the location."}},"additionalProperties":false,"required":["id","name"]},"description":"The work locations a plan line can name.","examples":[[{"id":"6a5b4c3d-2e1f-4a0b-9c8d-7e6f5a4b3c2d","name":"Berlin"}]]},"employmentCategories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the employment category (a UUID)."},"name":{"type":"string","description":"The name of the employment category."}},"additionalProperties":false,"required":["id","name"]},"description":"The employment categories a plan line can name, ordered by name.","examples":[[{"id":"0f1e2d3c-4b5a-4968-8776-655443322110","name":"Full time"}]]},"currencies":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"The ISO 4217 currency code."},"name":{"type":"string","description":"The English name of the currency."}},"additionalProperties":false,"required":["code","name"]},"description":"The currencies an amount can be expressed in, ordered by code, with English names.","examples":[[{"code":"USD","name":"US Dollar"}]]},"managers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the employee (a UUID)."},"name":{"type":"string","description":"The display name of the employee."}},"additionalProperties":false,"required":["id","name"]},"description":"The active employees who can be named as hiring manager, ordered by name.","examples":[[{"id":"9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b","name":"Jordan Lee"}]]},"capabilities":{"type":"object","properties":{"planningRole":{"oneOf":[{"const":"admin","description":"Runs the planning cycle for every plan."},{"const":"contributor","description":"You are linked to an employee and hold the contributor planning role, and you either own at least one department budget or belong to no department budget as a member. The editOwnedDepartments and submitOwnedDepartments hints appear only when you own a department budget."},{"const":"budgetMember","description":"You are linked to an employee and are not an admin, and you either lack the contributor planning role or are a contributor member of a department budget you do not own. You work only in the department budgets you belong to (editMemberDepartments)."},{"const":"reader","description":"Holds a planning role but has no employee identity, so owns and contributes to no department budget. Can read references only."}],"description":"Your headcount planning role."},"employeeLinked":{"type":"boolean","description":"Whether your identity is linked to an employee. Department ownership and budget membership need one, so a token without an employee identity owns no departments."},"allowedActions":{"type":"array","items":{"type":"string"},"description":"Capability hints such as createPlans, approveDepartments, editOwnedDepartments, submitOwnedDepartments or editMemberDepartments. Empty when your role allows only reading."}},"additionalProperties":false,"required":["planningRole","employeeLinked","allowedActions"],"description":"What your headcount planning role allows. Descriptive only, never an authorization for a later call.","examples":[{"planningRole":"contributor","employeeLinked":true,"allowedActions":["editOwnedDepartments","submitOwnedDepartments"]}]}},"additionalProperties":false,"required":["entity","fiscalYear","departments","positions","locations","employmentCategories","currencies","managers","capabilities"]},"searchSkillCategoriesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill category."},"categoryName":{"type":"string","description":"The name of the skill category."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the skill category. A deleted skill category is 'Deprecated' and can be reactivated."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the skill category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","categoryName","status","lastModifiedDate"]},"description":"The records on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSkillCategoriesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the records with these identifiers."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key, for example 'apposeId'. A key that is not configured fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier in the other system. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to records that carry this external identifier. Several records can share one value."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"Limits results to records with this status."},"categoryName":{"type":"string","description":"Limits results to the record with exactly this name."}},"additionalProperties":false,"description":"The filters to apply. A record must match every filter you send. Omit to return all records."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of records per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"searchEmployeeSkillAssignmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the assignment."},"employeeId":{"type":"string","description":"The employee who has the skill. See id on GET people/person.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PeopleListEndpointV1","dataSetName":"people","fieldName":"id"}},"skillId":{"type":"string","description":"The skill. See id on GET people/skills.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"The level the employee has the skill at. See id on GET people/skill-levels.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"approvalStatus":{"enum":["Approved","Pending","Rejected"],"description":"The approval status."},"recordStatus":{"enum":["Active","Inactive","Deprecated"],"description":"'Active' for the employee's current approved assignment of the skill; 'Inactive' for older versions and for assignments not approved."},"aiGenerated":{"type":"boolean","description":"Whether the assignment was suggested by AI."},"reasoning":{"type":"string","description":"Why the assignment was made, approved or rejected. Absent when none was written."},"employeeNotes":{"type":"string","description":"The employee's own notes on the skill. Absent when none were written."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the assignment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","employeeId","skillId","skillLevelId","approvalStatus","recordStatus","aiGenerated","lastModifiedDate"]},"description":"The assignments on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchEmployeeSkillAssignmentsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the assignments with these identifiers."},"employeeId":{"type":"string","description":"Limits results to this employee's assignments.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PeopleListEndpointV1","dataSetName":"people","fieldName":"id"}},"skillId":{"type":"string","description":"Limits results to assignments of this skill.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"Limits results to assignments at this skill level.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"approvalStatus":{"enum":["Approved","Pending","Rejected"],"description":"Limits results to assignments with this approval status."},"recordStatus":{"enum":["Active","Inactive","Deprecated"],"description":"Limits results to assignments with this record status."}},"additionalProperties":false,"description":"The filters to apply. An assignment must match every filter you send. Omit to return all assignments."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of assignments per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"searchPlanningReferencesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","description":"The kind of the reference, the kind you asked for."},"id":{"type":"string","description":"The identifier of the referenced record (a UUID). Pass it wherever another endpoint takes this kind's id. Absent for kind fiscalYear, which has no record of its own: use its code."},"label":{"type":"string","description":"The display name of the reference."},"code":{"type":"string","description":"The business code of the reference: the department code, position number, account number, ISO 4217 currency code, or the fiscal year value getPlanningContext takes. Absent when the kind has none."},"currency":{"type":"string","description":"The ISO 4217 currency of an entity or compensation band set. Absent for other kinds."}},"additionalProperties":false,"required":["kind","label"]},"description":"The matching references, ordered by label. An empty array when nothing matches.","examples":[[{"kind":"department","id":"8c0e7d52-1f3a-4b6c-9d2e-5a4b3c2d1e0f","label":"Engineering","code":"ENG"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchPlanningReferencesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"kind":{"oneOf":[{"const":"entity","description":"Legal entities a plan can be created for."},{"const":"fiscalYear","description":"Fiscal years of the entity's fiscal calendar. Needs entityId."},{"const":"department","description":"Active departments."},{"const":"position","description":"Active positions."},{"const":"location","description":"Work locations."},{"const":"employee","description":"Employees, for example budget owners."},{"const":"employmentCategory","description":"Employment categories."},{"const":"currency","description":"Currencies, with English names."},{"const":"book","description":"The accounting book of the entity. Needs entityId."},{"const":"account","description":"Leaf profit-and-loss accounts of the entity's book. Needs entityId."},{"const":"compensationBandSet","description":"Draft and active compensation band sets of the entity. Needs entityId."}],"description":"The kind of reference to return."},"entityId":{"type":"string","description":"The identifier of the entity (a UUID). Required for kinds fiscalYear, book, account and compensationBandSet."},"text":{"type":"string","description":"Matches references whose label or code contains this text, case-insensitively. Omit or send blank text to match every reference of the kind."},"includeInactiveEmployees":{"type":"boolean","description":"Employees only. By default only active employees are returned. Send true to include inactive and former employees as well."}},"additionalProperties":false,"required":["kind"],"description":"Which references to return. kind is required.","examples":[{"kind":"department","text":"eng"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Do not construct it. Omit for the first page."},"size":{"type":"number","description":"References per page. Defaults to 50. A value below 1 reads as 1, and a value above 200 reads as 200."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkCreateSkillsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created skill."}},"additionalProperties":false,"required":["id"]},"description":"The created skills, in the same order as the rows. Match rows to inputs by index."}},"additionalProperties":false,"required":["created"]},"bulkCreateSkillsInput":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"skillName":{"type":"string","description":"The English name of the skill. Must be unique across all skills and rows."},"description":{"type":"string","description":"The English description of the skill."},"isCanonical":{"type":"boolean","description":"Whether the skill is a canonical catalogue entry."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of active categories to put the skill in.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillCategoryListEndpointV1","dataSetName":"skillCategories","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers other systems use for the skill. At most one entry per fieldName."}},"additionalProperties":false,"required":["skillName"]},"description":"The skills to create. If any row is invalid, the whole call is rejected."}},"additionalProperties":false,"required":["skills"]},"deleteEmployeeSkillAssignmentOutput":{"type":"object","properties":{},"additionalProperties":false},"getSboContextTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context type."},"contextType":{"type":"string","description":"The name of the SBO context type, for example 'department'."},"contextValueIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of the SBO context values linked to this type.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextValueListEndpointV1","dataSetName":"sboContextValues","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the SBO context type last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to its value links or external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","contextType","contextValueIds","lastModifiedDate"]},"sboContextsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context."},"contextTypeId":{"type":"string","description":"The identifier of the SBO context type."},"contextValueId":{"type":"string","description":"The identifier of the SBO context value."},"contextValueName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The SBO context value, for example 'Engineering'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the SBO context last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchSboContextValuesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context value."},"contextValue":{"type":"string","description":"The SBO context value, for example 'Engineering'."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the SBO context value last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","contextValue","lastModifiedDate"]},"description":"The records on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSboContextValuesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the records with these identifiers."},"contextValue":{"type":"string","description":"Limits results to the record with exactly this value."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key, for example 'apposeId'. A key that is not configured fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier in the other system. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to records that carry this external identifier. Several records can share one value."}},"additionalProperties":false,"description":"The filters to apply. A record must match every filter you send. Omit to return all records."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of records per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"sboContextValuesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context value."},"contextValue":{"type":"string","description":"The SBO context value."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the SBO context value last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchSkillsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill."},"skillName":{"type":"string","description":"The English name of the skill. Unique across all skills, deprecated ones included."},"description":{"type":"string","description":"The English description of the skill. Absent when none is set."},"isCanonical":{"type":"boolean","description":"Whether the skill is a canonical catalogue entry. Absent when not set."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the skill. A deleted skill is 'Deprecated' and can be reactivated."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of the active categories the skill is in. See id on GET people/skill-categories. An empty array when the skill is in none.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillCategoryListEndpointV1","dataSetName":"skillCategories","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when the skill has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the skill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to categories or external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","skillName","status","categoryIds","lastModifiedDate"]},"description":"The skills on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSkillsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the skills with these identifiers."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key, for example 'apposeId'. A key that is not configured fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier in the other system. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to skills that carry this external identifier. Several skills can share one value."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"Limits results to skills with this status."},"skillName":{"type":"string","description":"Limits results to the skill with exactly this English name."},"categoryId":{"type":"string","description":"Limits results to skills in this category. See id on GET people/skill-categories.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillCategoryListEndpointV1","dataSetName":"skillCategories","fieldName":"id"}},"isCanonical":{"type":"boolean","description":"Limits results to canonical or non-canonical skills."}},"additionalProperties":false,"description":"The filters to apply. A skill must match every filter you send. Omit to return all skills."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of skills per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"positionSenioritiesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position seniority."},"levelName":{"type":"string","description":"The name of the seniority level, for example 'Senior'."},"levelOrder":{"type":"number","description":"The rank of the level on the career ladder. A higher number is more senior."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status: 'Active', 'Inactive' or 'Deprecated'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the position seniority last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"bulkUpdatePositionSkillRequirementsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkUpdatePositionSkillRequirementsInput":{"type":"object","properties":{"requirements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the requirement."},"positionId":{"type":"string","description":"The new position. See id on GET people/positions.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PositionListEndpointV1","dataSetName":"positions","fieldName":"id"}},"skillId":{"type":"string","description":"The new skill. See id on GET people/skills.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"The new skill level.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"minimumSeniorityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The lowest position seniority the requirement applies from. Send null to clear it.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"PositionSeniorityListEndpointV1","dataSetName":"positionSeniorities","fieldName":"id"}},"sboContextIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"The SBO context lines. Replaces the full set. Send null to clear it.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextListEndpointV1","dataSetName":"sboContexts","fieldName":"id"}},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to change, matched by fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove."}},"additionalProperties":false,"required":["id"]},"description":"The changes, one row per requirement."}},"additionalProperties":false,"required":["requirements"]},"skillsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill."},"skillName":{"type":"string","description":"The English name of the skill."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The English description of the skill. Absent when none is set."},"isCanonical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the skill is a canonical catalogue entry."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the skill: 'Active', 'Inactive' or 'Deprecated'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the skill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createPositionSkillRequirementOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created requirement."}},"additionalProperties":false,"required":["id"]},"createPositionSkillRequirementInput":{"type":"object","properties":{"positionId":{"type":"string","description":"The position that needs the skill. See id on GET people/positions.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PositionListEndpointV1","dataSetName":"positions","fieldName":"id"}},"skillId":{"type":"string","description":"The skill the position needs. See id on GET people/skills.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"The skill level the position needs.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"minimumSeniorityId":{"type":"string","description":"The lowest position seniority the requirement applies from. See id on GET people/position-seniorities.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"PositionSeniorityListEndpointV1","dataSetName":"positionSeniorities","fieldName":"id"}},"sboContextIds":{"type":"array","items":{"type":"string"},"description":"The SBO context lines the requirement is limited to.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextListEndpointV1","dataSetName":"sboContexts","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers other systems use for the requirement. At most one entry per fieldName."}},"additionalProperties":false,"required":["positionId","skillId","skillLevelId"]},"createSkillOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created skill."}},"additionalProperties":false,"required":["id"]},"createSkillInput":{"type":"object","properties":{"skillName":{"type":"string","description":"The English name of the skill. Must be unique across all skills."},"description":{"type":"string","description":"The English description of the skill."},"isCanonical":{"type":"boolean","description":"Whether the skill is a canonical catalogue entry."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of active categories to put the skill in. See id on GET people/skill-categories.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillCategoryListEndpointV1","dataSetName":"skillCategories","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers other systems use for the skill. At most one entry per fieldName; each fieldName must be configured for skills."}},"additionalProperties":false,"required":["skillName"]},"searchSkillLevelsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill level."},"skillLevelName":{"type":"string","description":"The name of the skill level, for example 'Expert'."},"skillLevelOrder":{"type":"number","description":"The rank of the level. A higher number is more proficient."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the skill level."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the skill level last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","skillLevelName","skillLevelOrder","status","lastModifiedDate"]},"description":"The records on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSkillLevelsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the records with these identifiers."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"Limits results to records with this status."},"skillLevelName":{"type":"string","description":"Limits results to the record with exactly this name."}},"additionalProperties":false,"description":"The filters to apply. A record must match every filter you send. Omit to return all records."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of records per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"deleteSkillOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkCreatePositionSkillRequirementsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created requirement."}},"additionalProperties":false,"required":["id"]},"description":"The created requirements, in the same order as the rows."}},"additionalProperties":false,"required":["created"]},"bulkCreatePositionSkillRequirementsInput":{"type":"object","properties":{"requirements":{"type":"array","items":{"type":"object","properties":{"positionId":{"type":"string","description":"The position that needs the skill. See id on GET people/positions.","x-foreign-key":{"packageName":"everest.hr.base","apiName":"PositionListEndpointV1","dataSetName":"positions","fieldName":"id"}},"skillId":{"type":"string","description":"The skill the position needs. See id on GET people/skills.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillListEndpointV1","dataSetName":"skills","fieldName":"id"}},"skillLevelId":{"type":"string","description":"The skill level the position needs.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"minimumSeniorityId":{"type":"string","description":"The lowest position seniority the requirement applies from. See id on GET people/position-seniorities.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"PositionSeniorityListEndpointV1","dataSetName":"positionSeniorities","fieldName":"id"}},"sboContextIds":{"type":"array","items":{"type":"string"},"description":"The SBO context lines the requirement is limited to.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextListEndpointV1","dataSetName":"sboContexts","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers other systems use for the requirement. At most one entry per fieldName."}},"additionalProperties":false,"required":["positionId","skillId","skillLevelId"]},"description":"The requirements to create. If any row is invalid, the whole call is rejected."}},"additionalProperties":false,"required":["requirements"]},"getSkillCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill category."},"categoryName":{"type":"string","description":"The name of the skill category."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the skill category. A deleted skill category is 'Deprecated' and can be reactivated."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when there are none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the skill category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","categoryName","status","lastModifiedDate"]},"hr_people_createdPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"getSkillOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill."},"skillName":{"type":"string","description":"The English name of the skill. Unique across all skills, deprecated ones included."},"description":{"type":"string","description":"The English description of the skill. Absent when none is set."},"isCanonical":{"type":"boolean","description":"Whether the skill is a canonical catalogue entry. Absent when not set."},"status":{"enum":["Active","Inactive","Deprecated"],"description":"The status of the skill. A deleted skill is 'Deprecated' and can be reactivated."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of the active categories the skill is in. See id on GET people/skill-categories. An empty array when the skill is in none.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillCategoryListEndpointV1","dataSetName":"skillCategories","fieldName":"id"}},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers owned by other systems. At most one entry per fieldName. Absent when the skill has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the skill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Changes to categories or external identifiers alone do not move it."}},"additionalProperties":false,"required":["id","skillName","status","categoryIds","lastModifiedDate"]},"skillCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the skill category."},"categoryName":{"type":"string","description":"The name of the skill category."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status: 'Active', 'Inactive' or 'Deprecated'."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the skill category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createSboContextValueOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created SBO context value."}},"additionalProperties":false,"required":["id"]},"createSboContextValueInput":{"type":"object","properties":{"contextValue":{"type":"string","description":"The SBO context value, for example 'Engineering'. Must be unique."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"Identifiers other systems use for the record. At most one entry per fieldName."}},"additionalProperties":false,"required":["contextValue"]},"searchSboContextsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the SBO context. Position skill requirements reference this identifier in sboContextIds."},"contextTypeId":{"type":"string","description":"The identifier of the SBO context type.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextTypeListEndpointV1","dataSetName":"sboContextTypes","fieldName":"id"}},"contextValueId":{"type":"string","description":"The identifier of the SBO context value.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextValueListEndpointV1","dataSetName":"sboContextValues","fieldName":"id"}},"contextValueName":{"type":"string","description":"The SBO context value, for example 'Engineering'. Absent when the value has no name."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the SBO context last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","contextTypeId","contextValueId","lastModifiedDate"]},"description":"The records on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page."}},"additionalProperties":false,"required":["items","pagination"]},"searchSboContextsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the records with these identifiers."},"contextTypeId":{"type":"string","description":"Limits results to the lines of this SBO context type.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextTypeListEndpointV1","dataSetName":"sboContextTypes","fieldName":"id"}},"contextValueId":{"type":"string","description":"Limits results to the lines of this SBO context value.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextValueListEndpointV1","dataSetName":"sboContextValues","fieldName":"id"}}},"additionalProperties":false,"description":"The filters to apply. A record must match every filter you send. Omit to return all records."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request. Do not construct it."},"size":{"type":"number","description":"The number of records per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"updateSkillCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateSkillCategoryInput":{"type":"object","properties":{"categoryName":{"type":"string","description":"The new name. Must be unique across all records."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. Fails if the record already carries the fieldName."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to change, matched by fieldName. Fails if the record does not carry the fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove."}},"additionalProperties":false},"updateEmployeeSkillAssignmentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateEmployeeSkillAssignmentInput":{"type":"object","properties":{"skillLevelId":{"type":"string","description":"The new skill level. See id on GET people/skill-levels.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillLevelListEndpointV1","dataSetName":"skillLevels","fieldName":"id"}},"approvalStatus":{"enum":["Approved","Pending","Rejected"],"description":"The new approval status. 'Approved' makes the assignment the employee's current one for the skill."},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the assignment was made, approved or rejected. Send null to clear it."},"employeeNotes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employee's own notes on the skill. Send null to clear them."}},"additionalProperties":false},"updateSboContextTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"updateSboContextTypeInput":{"type":"object","properties":{"contextType":{"type":"string","description":"The new name. Must be unique."},"contextValueIds":{"type":"array","items":{"type":"string"},"description":"The complete new set of SBO context value identifiers linked to the type. Omit to keep the links.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SboContextValueListEndpointV1","dataSetName":"sboContextValues","fieldName":"id"}},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. Fails if the record already carries the fieldName."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to change, matched by fieldName. Fails if the record does not carry the fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove."}},"additionalProperties":false},"hr_people_updatedPayload":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false,"required":["id"]},"updateSkillOutput":{"type":"object","properties":{},"additionalProperties":false},"updateSkillInput":{"type":"object","properties":{"skillName":{"type":"string","description":"The new English name. Must be unique across all skills."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new English description. Send null to clear it."},"isCanonical":{"type":"boolean","description":"Whether the skill is a canonical catalogue entry."},"categoryIds":{"type":"array","items":{"type":"string"},"description":"The identifiers of active categories. Replaces the full set. See id on GET people/skill-categories.","x-foreign-key":{"packageName":"everest.hr.skillmanagement","apiName":"SkillCategoryListEndpointV1","dataSetName":"skillCategories","fieldName":"id"}},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. Fails if the skill already carries the fieldName."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the identifier, for example 'apposeId'."},"value":{"type":"string","description":"The identifier as the other system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to change, matched by fieldName. Fails if the skill does not carry the fieldName."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove."}},"additionalProperties":false},"createItemCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created item category.","examples":["a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"]}},"additionalProperties":false,"required":["id"]},"createItemCategoryInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not checked for uniqueness: creating a second category with an existing name succeeds.","examples":["Hardware"]},"description":{"type":"string","description":"A free-form description of what the category covers.","examples":["Fasteners, fittings and tooling"]},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. Defaults to true."},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency.","examples":["6.50"]},"parentId":{"type":"string","description":"The identifier of the category this one sits under. Omit for a top-level category. See id on GET inventory/item-categories/:id."}},"additionalProperties":false,"required":["name"]},"updateSerialNumberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial number. Format: UUID.","examples":["c3f80a41-6d29-4b57-8e10-92a4d7b05f63"]}},"additionalProperties":false,"required":["id"]},"updateSerialNumberInput":{"type":"object","properties":{"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number.","examples":["MFG-77-000418"]},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. If a receipt or inventory increase for the unit comes after your update, it sets a new date and replaces the date you sent."},"active":{"type":"boolean","description":"Whether the serial number is active."}},"additionalProperties":false},"salesReturnsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales return number, for example 'SR-1042'. Assigned on create.","examples":["SR-1042"]},"documentStatus":{"enum":["OPEN","COMMITTED","DRAFT","RECEIVED","INSPECTED","PROCESSED","COMPLETED","CANCELLED"],"description":"The status of the return.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"When the goods are expected back, or came back. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that customer.","examples":["Bakker Retail B.V."]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the return is valued in. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total value of the return, in the return's currency.","examples":["144.00"]},"returnFeeAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The fee withheld across the return, in the document's currency.","examples":["0.00"]},"returnType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the business classifies the return."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How many lines the return has. Published because the lines themselves are not.","examples":[1]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's own reference for the return, for example an RMA number."},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The carrier's tracking number for the returned goods."},"sourceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line, which GET inventory/sales-returns/:id and POST inventory/sales-returns/search return."},"sourceDocumentType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What kind of document that id refers to, for example 'SalesDelivery'."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the document.","examples":["Customer reports transit damage"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]}},"additionalProperties":false},"createInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'.","examples":["REV-1187"]},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.","examples":["revaluation"]},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit.","examples":["f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet.","examples":["-450"]},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation."},"lineCount":{"type":"number","description":"How many lines the revaluation has.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation line. Pass it in updateLines or deleteLines on PATCH inventory/inventory-revaluations/:id to change or remove the line."},"itemId":{"type":"string","description":"The unique identifier for the item being revalued. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock this line restates. The same item may be carried at a different cost in each warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates the cost of, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the revaluation's currency. You supply it and the platform checks it rather than deriving it. Read it from GET inventory/inventory-levels."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the revaluation's currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document, in the revaluation's currency. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize, in the revaluation's currency. Moving-average direct cost capitalization only."},"revaluationAmount":{"type":"string","format":"decimal","description":"The value this line moves on the balance sheet, in the revaluation's currency: (newUnitCost - currentUnitCost) x quantity."},"status":{"type":"string","description":"Where the line sits in the platform's own process. This is free text with no fixed set of values."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number."},"batchNumber":{"type":"string","description":"The batch number itself."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number."},"serialNumber":{"type":"string","description":"The serial number itself."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document. Direct cost capitalization on a sold serial only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit, so there must be exactly as many as the quantity says."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the created revaluation.","examples":[[{"id":"6c2f9a41-7b58-4d30-91e6-4a0d8c25f3b7","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationCode":"WH-CENTRAL","unitCode":"EA","quantity":"150","currentUnitCost":"12","newUnitCost":"9","revaluationAmount":"-450"}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"createInventoryRevaluationInput":{"type":"object","properties":{"costingValuationType":{"type":"string","description":"How the value change is recorded. Accepted values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.","examples":["revaluation"]},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required, because the commit refuses a document without one.","examples":["f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Defaults to the entity that owns the first line's warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to date the revaluation. Defaults to today. Use format YYYY-MM-DD."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account the expense comes off. Required when costingValuationType is 'directCostCapitalisation'. See id on GET accounting/chart-of-accounts/:id."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the revaluation."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item to revalue. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates. Must be greater than zero."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the legal entity's functional currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize. Moving-average direct cost capitalization only."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity","currentUnitCost","newUnitCost"]},"description":"The lines of the revaluation. At least one is required.","examples":[[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","unitId":"d5a71e93-4c08-4b26-95f7-2e6a8c30b41f","quantity":"150","currentUnitCost":"12","newUnitCost":"9"}]]}},"additionalProperties":false,"required":["costingValuationType","costingElementTypeId","lines"]},"updateUnitOfMeasureOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"updateUnitOfMeasureInput":{"type":"object","properties":{"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. It must stay unique within the tenant. Reusing the unit of measure's own current code is not a collision."},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'.","examples":["Kilograms"]}},"additionalProperties":false},"searchItemTypesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item type."},"name":{"type":"string","description":"The display name of the item type, for example 'Stocked good'. Two item types cannot share a name."},"description":{"type":"string","description":"A free-form description of the item type."},"procurable":{"type":"boolean","description":"Whether items of this type can appear on purchase documents."},"stockable":{"type":"boolean","description":"Whether items of this type hold stock."},"active":{"type":"boolean","description":"Whether the item type can be chosen for new items."},"itemCount":{"type":"number","description":"The number of items that name this item type."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the item type was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the item type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The item types on this page, oldest first. An empty array when nothing matches.","examples":[[{"id":"b1d47e29-3c86-4a05-9f72-04e5c13b8a60","name":"Service","description":"Bought but never stocked","procurable":true,"stockable":false,"active":true,"itemCount":7,"lastModifiedDate":"2026-08-18T09:15:02.108Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more item types remain beyond this page."}},"additionalProperties":false,"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchItemTypesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Limits results to the item type with this name. The match is exact. Names are unique, so this matches at most one item type."},"procurable":{"type":"boolean","description":"Limits results to item types with the given procurable value."},"stockable":{"type":"boolean","description":"Limits results to item types with the given stockable value."},"active":{"type":"boolean","description":"Limits results to item types with the given active value."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to item types changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. An item type must match every filter you send. Send an empty object to return all item types.","examples":[{"stockable":false}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of item types per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"updateReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created.","examples":["GR-2291"]},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The legal entity the receipt belongs to.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The vendor the goods came from.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of that vendor.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number.","examples":["DN-77121"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"What the receipt takes in: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns, valued at and cleared against those returns)."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency.","examples":["712.20"]},"notes":{"type":"string","description":"Free text on the receipt.","examples":["Received at the back dock"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:45:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, the purchase return line this line replaces, as its id under lines on GET inventory/purchase-returns/:id. The line carries that return line's unit price and the return's functional value."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"196.00","inventoryQuantity":"196.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"627.20","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateReceiptInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"A new vendor for the receipt."},"documentDate":{"type":"string","format":"date","description":"A new date for the receipt. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"A new delivery date. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"A new currency for the receipt's amounts. Format ISO 4217, for example 'EUR'."},"referenceNumber":{"type":"string","description":"A new vendor reference.","examples":["DN-77121"]},"trackingNumber":{"type":"string","description":"New carrier tracking number. Send an empty string to clear it; omit the property to leave it as it is.","examples":["1Z999AA10123456784"]},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"New receipt type: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns). Omit to leave it unchanged."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of lines to remove. Applied before updateLines and createLines."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line that belongs to another receipt is rejected."},"lineType":{"enum":["Inventory","Service","Expense"],"description":"A new type for the line."},"itemId":{"type":"string","description":"A new item for the line."},"serviceDescription":{"type":"string","description":"A new description, on a Service or Expense line."},"locationId":{"type":"string","description":"A new warehouse for the line."},"unitId":{"type":"string","description":"A new unit for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, in the line's unit. Greater than zero when given."},"unitPrice":{"type":"string","format":"decimal","description":"A new unit price, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"A new line total, in the receipt's currency. It must equal quantity × unitPrice, rounded to the currency's decimals, taking each from this item or else from the stored line, or the request fails with LINE_TOTAL_MISMATCH. Leave it out to have the total recalculated from quantity and unitPrice. A line without a quantity or unitPrice takes it as given."},"expenseAccountId":{"type":"string","description":"A new general ledger account for a Service or Expense line."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, another purchase return line for this line to replace, as its id under lines on GET inventory/purchase-returns/:id. Every update re-prices and re-values a replacement line at its return line, so a unitPrice sent for one does not stand."},"notes":{"type":"string","description":"New free text. Send an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."}},"additionalProperties":false},"description":"The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods go into."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"196.00"}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"lineType":{"enum":["Inventory","Service","Expense"],"description":"What this line receives. Defaults to Inventory. An Inventory line needs itemId, unitId, locationId and quantity, because it moves stock into a warehouse. A Service or Expense line needs serviceDescription and an amount, and has no item or warehouse. A line with a description and no item is taken as a Service line."},"itemId":{"type":"string","description":"The item received. Required on an Inventory line, and not used on a Service or Expense line."},"serviceDescription":{"type":"string","description":"What was bought. Required on a Service or Expense line, and not used on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods go into. Required on an Inventory line."},"unitId":{"type":"string","description":"The unit the quantity is counted in. Required on an Inventory line."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in that unit. Required on an Inventory line, and greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency. Leave it out to have it calculated as quantity × unitPrice, rounded to the currency's decimals. When quantity and unitPrice are also given it must equal that, once rounded the same way, or the request fails with LINE_TOTAL_MISMATCH. On a Service or Expense line without a quantity or unitPrice it is taken as given, and such a line needs this or a unitPrice."},"expenseAccountId":{"type":"string","description":"The general ledger account to charge. Required on a Service or Expense line, or the request fails with INCOMPLETE_LINE. Not used on an Inventory line."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, the purchase return line this line replaces, as its id under lines on GET inventory/purchase-returns/:id; its numeric id in string form is also accepted. It must be an open line of a shipped UNCREDITED_REPLACEMENT return of the same purchase order line, item, unit and currency. The line is then priced at that return line's unit price and valued at the return's functional amount; any unitPrice or lineTotal given is replaced. Required on every line of a replacement receipt before commit."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line receives against, as its id under lines on GET accounting/purchase-orders/:id. Its numeric id in string form is also accepted. The line type is set from it."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."}},"additionalProperties":false},"description":"The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods go into."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries."}},"additionalProperties":false},"description":"The lines to add."}},"additionalProperties":false},"getInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned.","examples":["DEC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse location.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse location.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"offsetAccountId":{"type":"string","description":"The unique identifier for the account the journal entry posts against instead of the account determination rule's adjustment loss account. Absent on an ordinary inventory decrease, which uses the rule's account; only decreases created by manufacturing carry one, and it can't be set through this API. See id on GET accounting/accounts/:id."},"offsetKind":{"type":"string","description":"Whether a later document is expected to clear the offset account. Possible values: 'clearing', 'final'. Absent means the same as 'final'."},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory decrease.","examples":["August cycle count"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"getUnitOfMeasureOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. It is unique within the tenant.","examples":["KG"]},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'.","examples":["Kilogram"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the unit of measure record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","unitCode","unitName"]},"billWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["9f3e71c5-2a48-4d09-b6e3-8c1d05a4f279"]},"billingStatus":{"type":"string","description":"The billing status of the transfer, read back from the document. 'BILLED' on success.","examples":["BILLED"]},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id.","examples":["884213"]},"intercompanyBillNumber":{"type":"string","description":"The number of that bill.","examples":["IC-BILL-1042"]},"journalEntryId":{"type":"string","description":"The journal entry the billing wrote. See id on GET accounting/journal-entries/:id.","examples":["8c04a1e5-7b39-4d26-90f8-1e5a3c72d0b9"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the billing. An empty array on a clean run.","examples":[[]]}},"additionalProperties":false,"required":["id","billingStatus","warnings"]},"billWarehouseTransferInput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteAccountDeterminationRulesOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted rule. Format: UUID."},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique."}},"additionalProperties":false,"required":["id","ruleName"]},"description":"The deleted rules, in the order you sent their ids."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteAccountDeterminationRulesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the rules you want to delete. Format: UUID.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"searchSerialNumbersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial number. Format: UUID."},"serialNumber":{"type":"string","description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity."},"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number."},"itemId":{"type":"string","description":"The unique identifier of the item this serial number belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse the unit is in, or was last in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the unit belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"inStock":{"type":"string","format":"decimal","description":"The current quantity of the unit in stock. It is 1 when the unit is in stock and 0 when it is not, including before the unit is received."},"isSold":{"type":"boolean","description":"Whether the unit has been sold."},"cost":{"type":"string","format":"decimal","description":"The cost of the unit. Cost changes made after the unit is sold are in `afterSaleCost`."},"originalCost":{"type":"string","format":"decimal","description":"The cost of the unit when it was first received. While the unit is in stock, landed costs added later, such as freight or customs duty, raise it, and other revaluations can raise or lower it. When the unit is received again on a receipt or inventory increase after it left stock, it is reset to the cost on that document. A sales return or a canceled shipment does not reset it."},"afterSaleCost":{"type":"string","format":"decimal","description":"The total of the cost changes made to the unit after it was sold, such as a landed cost added later. Absent when the unit has had no cost changes since it was sold."},"currency":{"type":"string","description":"The currency of `cost`, `originalCost`, and `afterSaleCost`. Format: ISO 4217, for example 'USD'."},"lastCostChangeDate":{"type":"string","format":"date","description":"The date the `cost` or `afterSaleCost` of the unit last changed. It is the date the change was committed, not the date of the document. Format: YYYY-MM-DD."},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase receives the unit, it is the date entered for the unit on that document, or the document's date when none was entered. Each later receipt or inventory increase for the unit sets a new date. A warehouse transfer does not change the date, including a transfer between legal entities."},"active":{"type":"boolean","description":"Whether the serial number is active."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the serial number record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the serial number record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The matching units in this response. When more units match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"c3f80a41-6d29-4b57-8e10-92a4d7b05f63","serialNumber":"SN-000418","manufacturerSerialNumber":"MFG-77-000418","itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","itemCode":"SERIAL-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","inStock":"1","isSold":false,"cost":"250","originalCost":"250","currency":"GBP","active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchSerialNumbersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"serialNumber":{"type":"string","description":"Limits results to units with this serial number. The match is exact."},"manufacturerSerialNumber":{"type":"string","description":"Limits results to units with this manufacturer's serial number. The match is exact."},"itemId":{"type":"string","description":"Limits results to units for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to units in the warehouse with this unique identifier. Units that were shipped or removed from the warehouse are included. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"active":{"type":"boolean","description":"Limits results to active units when true, and to inactive units when false."},"inStock":{"type":"boolean","description":"Limits results to units in stock when true, and to units not in stock when false."},"isSold":{"type":"boolean","description":"Limits results to units that have been sold when true, and to units that have not been sold when false. A unit that was sold and then returned counts as not sold."},"expiringBefore":{"type":"string","format":"date","description":"Limits results to units expiring on or before this date. Format: YYYY-MM-DD."},"expiringAfter":{"type":"string","format":"date","description":"Limits results to units expiring on or after this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to units changed on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A unit must match every filter you send. Send an empty object to return all units.","examples":[{"itemId":"afb4492d-52fc-44c5-ab10-71ad4a615496","inStock":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of units per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size."}},"additionalProperties":false,"required":["filters"]},"updateReasonCodeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the reason code.","examples":["7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"]}},"additionalProperties":false,"required":["id"]},"updateReasonCodeInput":{"type":"object","properties":{"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. It must stay unique within the tenant. Reusing the reason code's own current code is not a collision."},"description":{"type":"string","description":"A free-form description of what the reason code means."},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. Set it to false to retire the reason code without deleting it: existing documents keep it and new ones cannot select it."},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect."},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The complete set of document types this reason code may be selected on. It replaces the current set. Anything not listed is unlinked, and an empty array unlinks everything. Omit to leave the links unchanged. An unrecognized value fails the call with UNKNOWN_DOCUMENT_TYPES, which names every value it did not recognize.","examples":[["InventoryDecrease","SalesReturn","Disposal"]]}},"additionalProperties":false},"approvePurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentStatus":{"type":"string","description":"The status of the purchase return after the approval. It is 'APPROVED'.","examples":["APPROVED"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings about the approval. Empty when there are no warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"approvePurchaseReturnInput":{"type":"object","properties":{},"additionalProperties":false},"commitInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the committed inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentStatus":{"type":"string","description":"The status of the inventory increase after the commit, read back from the document. It is 'COMMITTED' on success.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The unique identifier for the journal entry the commit wrote. Absent when the posting produced none. See id on GET accounting/journal-entries/:id.","examples":["7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the posting, in practice soft bin-capacity breaches. An empty array on a clean commit. The commit succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitInventoryIncreaseInput":{"type":"object","properties":{},"additionalProperties":false},"getPurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The purchase return number, for example 'PRTR-1043'.","examples":["PRTR-1043"]},"documentStatus":{"type":"string","description":"The status of the purchase return. Possible values: 'DRAFT', 'APPROVED', 'PREPARED', 'SHIPPED', 'COMMITTED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', 'COMPLETED', 'CANCELLED'.","examples":["COMMITTED"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD.","examples":["2026-08-20"]},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"shippedDate":{"type":"string","format":"date","description":"The date the goods left for the vendor, as given when the purchase return was shipped with POST inventory/purchase-returns/:id/ship. Format: YYYY-MM-DD. Absent until the purchase return is shipped. It does not set the date of the inventory transaction or of the journal entry."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"type":"string","description":"The reference number of the purchase return.","examples":["RMA-4471"]},"originalReceiptId":{"type":"string","description":"Deprecated, and always empty. A purchase return is created from a purchase order. Use `purchaseOrderId`."},"purchaseOrderId":{"type":"string","description":"The unique identifier of the purchase order the purchase return was created from. Format: UUID. See `id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order the purchase return was created from."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped.","examples":["96.00"]},"notes":{"type":"string","description":"Notes on the purchase return.","examples":["Damaged in transit"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-20T09:20:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-20T11:05:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the purchase order line that this line returns goods from. Format: UUID. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'PurchaseOrderLine'."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of one stocking unit of the batch, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"30.00","inventoryQuantity":"30.00","unitPrice":"3.20","functionalUnitPrice":"3.20","functionalLineTotal":"96.00","sourceDocumentLineId":"a3e7c915-62d4-4f08-b1a9-7d5c24e8f063","sourceDocumentLineType":"PurchaseOrderLine","notes":"Cracked casings"}]]},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped.","examples":[[{"receiptLineId":"6b02f4d8-91c3-4e57-a8f6-3c1d9e70b254","quantity":"20.00","unitCost":"3.20","totalCost":"64.00"},{"receiptLineId":"d81a5c37-0f6e-4b92-9c24-e5f7a3b18d06","quantity":"10.00","unitCost":"3.20","totalCost":"32.00"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"deleteUnitOfMeasureGroupOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted unit of measure group.","examples":["5a8b0c34-7e19-4f26-9d51-b0c6238ea7f4"]},"name":{"type":"string","description":"The display name the deleted unit of measure group held.","examples":["Weight"]}},"additionalProperties":false,"required":["id","name"]},"deleteBinOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the removed bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]},"binCode":{"type":"string","description":"The bin's code.","examples":["A-01-1"]}},"additionalProperties":false,"required":["id"]},"getTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"]},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'.","examples":["WTO-1043"]},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"locationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"targetLocationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order.","examples":[1]},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. updateLines and deleteLines address a line by it."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from. See id on GET inventory/warehouses/:id. Absent while no source warehouse has been resolved, and such a line blocks the conversion."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Always greater than zero."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line is still to be transferred."},"processedQuantity":{"type":"string","format":"decimal","description":"How much of the line a transfer has already taken."},"status":{"type":"string","description":"The state of the line. 'NEEDS_SOURCE' means no source warehouse has been resolved, and the transfer order cannot be converted until it is."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer order. Absent from the collection GET inventory/warehouse-transfer-orders, which returns lineCount instead.","examples":[[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","unitCode":"EA","quantity":"40","inventoryQuantity":"40","openQuantity":"40","status":"DRAFT"}]]}},"additionalProperties":false,"required":["id","documentStatus","lines"]},"updateUnitOfMeasureGroupOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure group.","examples":["2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"]}},"additionalProperties":false,"required":["id"]},"updateUnitOfMeasureGroupInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the unit of measure group. Omit to leave unchanged. It is not checked for uniqueness."},"description":{"type":"string","description":"A free-form description of what the group covers. Omit to leave unchanged."},"createLines":{"type":"array","items":{"type":"object","properties":{"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It must be greater than zero."}},"additionalProperties":false,"required":["unitOfMeasureId","conversionFactor"]},"description":"The conversion lines to add, each a full line with no id. A unit of measure the group already has a line for fails with DUPLICATE_UNIT_IN_GROUP, unless the same call also deletes that line, since deletes are applied first.","examples":[[{"unitOfMeasureId":"d1f7b204-53ea-4c98-8b16-7f420e93ac57","conversionFactor":"480.00"}]]},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the conversion line to change. Read it from the line's id on GET inventory/unit-of-measure-groups/:id, not the unit's id."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this line's unit. Omit to leave unchanged. It must be greater than zero."}},"additionalProperties":false,"required":["id"]},"description":"The conversion lines to change, each keyed by its own id. The remaining fields are optional, and omitting one leaves it unchanged. A line id belonging to another group fails with LINE_NOT_FOUND."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the conversion lines to remove. They are removed before createLines is applied, so one call can free a unit of measure and re-add it with a different factor. Removing every line, the base unit's included, leaves a group that has forgotten its base unit and can take no new lines."}},"additionalProperties":false},"createPurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The purchase return number.","examples":["PRTR-1043"]},"documentStatus":{"type":"string","description":"The status of the purchase return. It is always 'DRAFT' on a created purchase return.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD.","examples":["2026-08-20"]},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"Deprecated, and always empty. A purchase return is created from a purchase order. Use `purchaseOrderId`."},"purchaseOrderId":{"type":"string","description":"The unique identifier of the purchase order the purchase return was created from. Format: UUID. See `id` on GET accounting/purchase-orders/:id (getPurchaseOrder).","examples":["c3b9e1a4-7d52-4f08-a6e3-91d40b2c5f87"]},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order the purchase return was created from.","examples":["PO-2291"]},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the purchase order line that this line returns goods from. Format: UUID. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'PurchaseOrderLine'."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of one stocking unit of the batch, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","quantity":"30.00","unitPrice":"3.20"}]]},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createPurchaseReturnInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD. Defaults to today's date in UTC. It cannot be in the future.","examples":["2026-08-20"]},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217, for example 'EUR'. If this currency differs from the legal entity's functional currency, an exchange rate between the two currencies must exist for the `documentDate`."},"returnType":{"type":"string","description":"The type of the purchase return. Defaults to 'NORMAL'. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Shipping an 'UNINVOICED_CANCELLATION' purchase return fails when a line returns more of its purchase order line than is received, not invoiced, and not already canceled. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]},"referenceNumber":{"type":"string","description":"The reference number of the purchase return.","examples":["RMA-4471"]},"originalReceiptId":{"type":"string","description":"Deprecated, and ignored. Kept so existing requests that send it are still accepted. A purchase return is created from a purchase order, which is taken from the lines' `sourceDocumentLineId`."},"notes":{"type":"string","description":"Notes on the purchase return.","examples":["Damaged in transit"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It must belong to the purchase return's legal entity. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. Required. It must be the same unit as on the purchase order line. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It must be greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It can be zero, but not less than zero."},"sourceDocumentLineId":{"type":"string","description":"The identifier of the purchase order line that this line returns goods from. Send the line's unique identifier or its numeric `id`. Required. All lines must belong to the same purchase order. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Defaults to 'PurchaseOrderLine'. Accepted values: 'PurchaseOrderLine'."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned. To identify the batch, send `batchNumberId`. To take this batch from a bin, send the same value in `binLocations[].batchNumber`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch to return, in the item's stocking unit. It must be greater than zero."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being returned. Required when the item is batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned. To identify the unit, send `serialNumberId`. To take this unit from a bin, send the same value in `binLocations[].serialNumber`."}},"additionalProperties":false},"description":"The serialized units being returned, one entry for each unit. Required when the item is serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for. It must match the `batchNumber` of one of the line's batches."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for. It must match the `serialNumber` of one of the line's serials."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins to take the stock on this purchase return line from, with the quantity to take from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["itemId","locationId","quantity"]},"description":"The lines of the purchase return. Send at least one.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"30.00","unitPrice":"3.20","sourceDocumentLineId":"6b02f4d8-91c3-4e57-a8f6-3c1d9e70b254","sourceDocumentLineType":"PurchaseOrderLine","notes":"Cracked casings"}]]}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"inventoryDecreasesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned.","examples":["DEC-42"]},"documentStatus":{"enum":["DRAFT","COMMITTED","CANCELLED"],"description":"The status of the inventory decrease. 'DRAFT' covers every uncommitted inventory decrease, including one that has been posted and numbered but not yet committed.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code of that warehouse location.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that warehouse location.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description of that reason code.","examples":["Count correction"]},"offsetAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the account the journal entry posts against instead of the account determination rule's adjustment loss account. Absent on an ordinary inventory decrease; only decreases created by manufacturing carry one. See id on GET accounting/accounts/:id."},"offsetKind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whether a later document is expected to clear the offset account. Possible values: 'clearing', 'final'. Absent means the same as 'final'."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines the inventory decrease has. The collection returns it because the lines themselves are not on the collection.","examples":[1]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the inventory decrease.","examples":["August cycle count"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]}},"additionalProperties":false},"deleteWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]}},"additionalProperties":false,"required":["id"]},"getBinOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]},"binCode":{"type":"string","description":"The short code that identifies the bin, for example 'A-01-1'. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created.","examples":["A-01-1"]},"barcode":{"type":"string","description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created.","examples":["BIN-A011"]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the bin is in. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id.","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-02"]},"locationName":{"type":"string","description":"The name of that warehouse.","examples":["Main warehouse"]},"aisle":{"type":"string","description":"The aisle in the warehouse layout.","examples":["A"]},"rack":{"type":"string","description":"The rack within the aisle.","examples":["01"]},"shelfLevel":{"type":"string","description":"The shelf level within the rack.","examples":["1"]},"zone":{"type":"string","description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'.","examples":["Picking"]},"itemPosition":{"type":"string","description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments.","examples":[true]},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away.","examples":[false]},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"type":"number","description":"The largest number of units the bin will hold. It is meaningful only when everything in the bin is counted in the same unit.","examples":[500]},"maxWeight":{"type":"string","format":"decimal","description":"The largest weight the bin will hold, in maxWeightUnit.","examples":["250"]},"maxWeightUnit":{"type":"string","description":"The unit maxWeight is given in. Possible values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"maxVolume":{"type":"string","format":"decimal","description":"The largest volume the bin will hold, in maxVolumeUnit."},"maxVolumeUnit":{"type":"string","description":"The unit maxVolume is given in. Possible values: 'L'."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Possible values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it.","examples":["HardBlock"]},"tempZone":{"type":"string","description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'.","examples":["Ambient"]},"tempMin":{"type":"string","format":"decimal","description":"The lowest temperature kept in the bin, in degrees Celsius."},"tempMax":{"type":"string","format":"decimal","description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin.","examples":[false]},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. When false, the stock already in the bin stays there but no new movement can be assigned to it.","examples":[true]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the bin was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bin record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"capacity":{"type":"object","properties":{"currentQuantity":{"type":"string","format":"decimal","description":"The number of units in the bin."},"currentWeight":{"type":"string","format":"decimal","description":"The total weight of what is in the bin, normalized to kilograms whatever unit the limit is given in."},"currentVolume":{"type":"string","format":"decimal","description":"The total volume of what is in the bin, normalized to cubic meters."},"quantityUtilizationPct":{"type":"string","format":"decimal","description":"How full the bin is against maxQuantity, as a percentage."},"weightUtilizationPct":{"type":"string","format":"decimal","description":"How full the bin is against maxWeight, as a percentage."},"volumeUtilizationPct":{"type":"string","format":"decimal","description":"How full the bin is against maxVolume, as a percentage."},"status":{"type":"string","description":"How full the bin is overall. Possible values: 'ok', 'near_full', 'exceeded'. 'exceeded' means the bin is over a limit it was given, which is possible because a 'SoftWarning' bin allows the movement that crosses the limit."},"mixedUnits":{"type":"boolean","description":"Whether the bin holds items counted in more than one stocking unit. When true, currentQuantity is a sum of unlike things and the quantity utilization means nothing, so use the weight and volume instead."}},"additionalProperties":false,"description":"What is in the bin now, measured against what it will hold. Present on this endpoint only. Absent when the bin has no limit configured, because there is nothing to measure a utilization against.","examples":[{"currentQuantity":"310","currentWeight":"148.2","quantityUtilizationPct":"62","weightUtilizationPct":"59.3","status":"ok","mixedUnits":false}]}},"additionalProperties":false,"required":["id"]},"createItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"type":"string","description":"The item code of the created item.","examples":["WIDGET-01"]}},"additionalProperties":false,"required":["id"]},"createItemInput":{"type":"object","properties":{"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Must be unique within the tenant, including against retired items whose codes are never released. It cannot be changed after the item is created.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The display name of the item.","examples":["Standard widget"]},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It cannot be changed after the item is created. See id on GET inventory/item-types/:id.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id.","examples":["6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b"]},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction will be in this unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id.","examples":["77bd4c16-e1f0-426d-a98f-07b063df2d9c"]},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. inventoryUnitId, salesUnitId and purchaseUnitId must all be units in this group, and a unit outside it fails with UNIT_NOT_IN_UNIT_GROUP. See id on GET inventory/unit-of-measure-groups/:id.","examples":["38b5454a-c3fe-452b-9754-61f9ead49e87"]},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Accepted values: 'movingAverage', 'batch', 'serials', 'none'. Use 'none' for an item that is not stocked. Defaults to 'movingAverage'. 'batch' requires isBatch, 'serials' requires isSerial, and 'none' requires isInventory false, and each contradiction fails with TRACKING_MISMATCH. 'fifo' is under development and fails with VALUATION_METHOD_UNAVAILABLE.","examples":["movingAverage"]},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Defaults to false."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Defaults to false."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. Defaults to true. Set false for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents. Defaults to true."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents. Defaults to true."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. Defaults to true. Setting it false retires the item without deleting it."},"notes":{"type":"string","description":"Free text on the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Omit for no restriction. Omitting it is not the same as sending 1."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning. State its currency in currency."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price. State its currency in currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Required when either is given. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. Set it if the item may be received under a landed cost that uses Weight allocation, because that mode fails rather than falling back when an item has no weight.","examples":["1.4"]},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Accepted values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Accepted values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge billed as this item falls back to when it names none. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest storage temperature, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest storage temperature, in degrees Celsius."}},"additionalProperties":false,"required":["itemCode","itemTypeId","categoryId","inventoryUnitId","unitGroupId"]},"updateWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'.","examples":["WTR-2291"]},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed."},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'."},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document.","examples":["Consolidated with WTR-2290"]},"lineCount":{"type":"number","description":"The number of lines on the transfer.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T11:20:04.219Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer line. updateLines and deleteLines address lines by it."},"itemId":{"type":"string","description":"The item being moved. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from, the document's warehouse applied to every line. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much moves, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"transferCost":{"type":"string","format":"decimal","description":"What one unit left the source warehouse at, in the transfer's currency. The valuation method sets it at commit. Absent on a draft."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit on an intercompany transfer, in the contractual currency. Supplied on create."},"totalTransferValue":{"type":"string","format":"decimal","description":"The line's total on an intercompany transfer, in the contractual currency: totalTransferValue = unitTransferValue x quantity. Written by the platform."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this line has come back on an intercompany return."},"status":{"type":"string","description":"The status of the line."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number. See id on GET inventory/batch-numbers/:id."},"batchNumber":{"type":"string","description":"The batch number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"What this batch moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The batches that make up the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number. See id on GET inventory/serial-numbers/:id."},"serialNumber":{"type":"string","description":"The serial number."},"quantity":{"type":"string","format":"decimal","description":"Always one, for a serialized unit."},"unitCost":{"type":"string","format":"decimal","description":"What this unit moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The serialized units that move."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"fromBinLocationCode":{"type":"string","description":"The code of that bin."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"toBinLocationCode":{"type":"string","description":"The code of that bin."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer. The collection GET inventory/warehouse-transfers returns lineCount in place of these."},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the update. It has one entry for each line whose serials, batches, or bin locations were cleared because a header warehouse change moved the line. An empty array when there is nothing to report. The update succeeded whatever it lists.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"updateWarehouseTransferInput":{"type":"object","properties":{"locationId":{"type":"string","description":"The warehouse the goods leave, applied to every line. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. It must differ from locationId. See id on GET inventory/warehouses/:id."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer. Use format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"notes":{"type":"string","description":"Free text on the document.","examples":["Consolidated with WTR-2290"]},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. Defaults to the item's inventory unit; an item without one needs it, or the call is refused with WAREHOUSE_TRANSFER_LINE_UNIT_REQUIRED. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit, in the transfer's contractual currency. Required on an intercompany transfer. The two entities agree the price, and the API cannot derive it from a cost."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the goods leave. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches that make up the line's quantity. Required for a batch-tracked item, and they must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the goods leave. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units that move. Required for a serialized item, one entry per unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false,"required":["quantity"]},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one. Leave both names off for a quantity that moves at line level."}},"additionalProperties":false,"required":["itemId","quantity"]},"description":"Lines to add. Same shape as on create."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. Leave it out to keep the line's current unit. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit, in the transfer's contractual currency. Required on an intercompany transfer. The two entities agree the price, and the API cannot derive it from a cost."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the goods leave. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches that make up the line's quantity. Required for a batch-tracked item, and they must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the goods leave. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units that move. Required for a serialized item, one entry per unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false,"required":["quantity"]},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one. Leave both names off for a quantity that moves at line level."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by its id. Every field but the id is optional, and a tracking array you send replaces what the line had."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of lines to remove. They are applied before the updates and the creates."}},"additionalProperties":false},"bulkCreateItemCategoriesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created item category."}},"additionalProperties":false,"required":["id"]},"description":"The created item categories, in input order. Match rows to inputs by index.","examples":[[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"},{"id":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateItemCategoriesInput":{"type":"object","properties":{"itemCategories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not checked for uniqueness, within this batch or against existing records."},"description":{"type":"string","description":"A free-form description of what the category covers."},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. Defaults to true."},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency."},"parentId":{"type":"string","description":"The identifier of an existing category this one sits under. Omit for a top-level category. See id on GET inventory/item-categories/:id."}},"additionalProperties":false,"required":["name"]},"description":"The item categories to create. All or nothing: if any row fails, nothing is created.","examples":[[{"name":"Hardware","description":"Fasteners, fittings and tooling","idealTurnoverRatio":"6.50"},{"name":"Consumables","idealTurnoverRatio":"12.00"}]]}},"additionalProperties":false,"required":["itemCategories"]},"commitWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentStatus":{"type":"string","description":"The status of the transfer, read back from the document. 'COMMITTED' on success.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The journal entry the commit wrote in the entity's default transactions book. Absent when the posting produced none there, and on an intercompany transfer or return, which writes one entry per entity and names neither. See id on GET accounting/journal-entries/:id.","examples":["6b31d0a7-4e28-4c95-8f13-2a7e0c5d9b64"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the posting. An empty array on a clean run. The commit succeeded whatever it lists.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitWarehouseTransferInput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteLandedCostItemsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted landed cost item. Format: UUID."}},"additionalProperties":false,"required":["id"]},"description":"The deleted landed cost items, in the order you sent them."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteLandedCostItemsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the landed cost items to delete. Format: UUID.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"warehouseTransfersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transfer's number, for example 'WTR-2291'.","examples":["WTR-2291"]},"documentStatus":{"enum":["DRAFT","COMMITTED","CANCELLED"],"description":"The status of the transfer.","examples":["DRAFT"]},"documentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the transfer is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your own reference on the transfer."},"transferType":{"anyOf":[{"enum":["NORMAL","INTERCOMPANY","INTERCOMPANY_RETURN"]},{"type":"null"}],"description":"The type of transfer. An intercompany transfer sells the goods to another legal entity and can be billed.","examples":["NORMAL"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity the goods leave. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"toEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Central warehouse"]},"targetLocationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"targetLocationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Northern depot"]},"billingStatus":{"anyOf":[{"enum":["NOT_BILLED","BILLED"]},{"type":"null"}],"description":"The billing status of the transfer. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"sourceAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the document."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines on the transfer.","examples":[1]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.104Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"getLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"documentNumber":{"type":"string","description":"The landed cost number, for example 'LC-1007'.","examples":["LC-1007"]},"documentStatus":{"type":"string","description":"The status of the landed cost. Possible values: 'DRAFT', 'COMMITTED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["7039b992-696a-40c7-a181-51759304ef83"]},"entityName":{"type":"string","description":"The name of the legal entity in `entityId`.","examples":["Flow UK"]},"currency":{"type":"string","description":"The currency of every amount on the landed cost, which is the functional currency of its legal entity. Format: ISO 4217, for example 'GBP'.","examples":["GBP"]},"notes":{"type":"string","description":"Free text on the landed cost."},"totalChargeAmount":{"type":"string","format":"decimal","description":"The total of the selected charges, in the landed cost's currency.","examples":["240"]},"receiptCount":{"type":"number","description":"The number of receipts on the landed cost.","examples":[1]},"chargeCount":{"type":"number","description":"The number of charges on the landed cost.","examples":[1]},"allocationLineCount":{"type":"number","description":"The number of allocation lines on the landed cost.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the landed cost was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the landed cost last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"receiptNumber":{"type":"string","description":"The receipt's number."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format: YYYY-MM-DD."},"documentStatus":{"type":"string","description":"The status of the receipt. See `documentStatus` on GET inventory/receipts/:id (getReceipt)."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the receipt line. Format: UUID. It is the `id` you send in `selectedLineIds`. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"isSelected":{"type":"boolean","description":"Whether the charges are spread over the line."},"itemId":{"type":"string","description":"The unique identifier of the item received on the line. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that received the stock on the receipt line. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure `quantity` is counted in, the receipt line's own unit. Format: UUID. See `lines[].unitId` on GET inventory/receipts/:id (getReceipt)."},"unitCode":{"type":"string","description":"The code of the unit in `unitId`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of stock the receipt line brought in, in the unit in `unitId`. It is the quantity received, not the quantity in stock now."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of stock the receipt line brought in, in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The price the line was received at, per unit in `unitId`, in the landed cost's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the landed cost's currency."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt. Every line is included, whether or not the charges are spread over it."}},"additionalProperties":false,"required":["id"]},"description":"The receipts whose stock the charges are spread over, with their lines.","examples":[[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40","unitPrice":"12","lineTotal":"480"}]}]]},"charges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"vendorBillId":{"type":"string","description":"The unique identifier of the vendor bill the line belongs to. Format: UUID. See `id` on GET accounting/vendor-bills/:id (getVendorBill)."},"vendorBillNumber":{"type":"string","description":"The vendor bill's number."},"itemId":{"type":"string","description":"The unique identifier of the item on the vendor bill line. Format: UUID. Absent when the line has no item. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`. When the vendor bill line has no item, the line's description is used."},"allocationMode":{"type":"string","description":"How this charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the charge this landed cost takes, in the landed cost's currency."},"allocatedAmount":{"type":"string","format":"decimal","description":"The amount of the charge that the commit used (allocated), in the landed cost's currency. After the commit, it equals `amount`. It is absent before the commit, and on charges whose `isSelected` is false."},"isSelected":{"type":"boolean","description":"Whether the charge is spread over the receipt lines. A charge set to false is kept in the landed cost's charges, but the commit does not spread it."}},"additionalProperties":false,"required":["id"]},"description":"The charges of the landed cost. Each charge comes from a line of a vendor bill.","examples":[[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}]]},"allocationLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the allocation line. It is a number sent as a string, not a UUID."},"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"itemId":{"type":"string","description":"The unique identifier of the item on the receipt line. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that received the stock on the receipt line. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure `quantity` is counted in, the item's stocking unit. Format: UUID. See `inventoryUnitId` on GET inventory/items/:id (getItem)."},"unitCode":{"type":"string","description":"The code of the unit in `unitId`."},"quantity":{"type":"string","format":"decimal","description":"The quantity received on the receipt line, in the item's stocking unit, the unit in `unitId`."},"currentUnitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item in the warehouse before the charges, in the landed cost's currency, at the time the landed cost was created or last updated. It is the item's average cost, or the receipt line's unit price when there is no average cost. When you commit the landed cost, the commit uses the item's cost at that moment, which can differ from this cost."},"additionalCostAmount":{"type":"string","format":"decimal","description":"This receipt line's share of the charges, in the landed cost's currency. It is the share for the whole line, not for one unit."},"newUnitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item with the charges, in the landed cost's currency. It is `currentUnitCost` plus this line's share of the charges for one unit. The share for one unit is `additionalCostAmount` divided by `quantity`. The commit can end with a different cost, because it uses the item's cost at the time of the commit."},"revaluationDocuments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the inventory revaluation. Format: UUID. See `id` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation)."},"documentNumber":{"type":"string","description":"The inventory revaluation number."},"documentStatus":{"type":"string","description":"The status of the inventory revaluation."}},"additionalProperties":false,"required":["id"]},"description":"The inventory revaluations that the commit created for this allocation line. It is empty before the commit. It has more than one inventory revaluation when the line's charges have different expense accounts or costing element types."}},"additionalProperties":false,"required":["id"]},"description":"The allocation of the charges over the receipt lines, with one allocation line for each selected receipt line that has an inventory item. It is calculated when the landed cost is created or updated.","examples":[[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"searchReceiptsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt."},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created."},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity the receipt belongs to."},"entityName":{"type":"string","description":"The name of that legal entity."},"businessPartnerId":{"type":"string","description":"The vendor the goods came from."},"businessPartnerName":{"type":"string","description":"The name of that vendor."},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"What the receipt takes in: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns, valued at and cleared against those returns)."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency."},"notes":{"type":"string","description":"Free text on the receipt."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, the purchase return line this line replaces, as its id under lines on GET inventory/purchase-returns/:id. The line carries that return line's unit price and the return's functional value."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The receipts on this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"COMMITTED","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T10:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more receipts remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchReceiptsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the receipt with this receipt number. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to receipts with this status. The match is exact. This api's own routes produce 'DRAFT' and 'COMMITTED'; 'RECEIVED', 'DELIVERED', 'PARTIALLY_INVOICED', 'INVOICED' and 'CANCELLED' are written by the receiving and invoicing processes around it."},"entityId":{"type":"string","description":"Limits results to receipts for this legal entity."},"businessPartnerId":{"type":"string","description":"Limits results to receipts from this vendor."},"locationId":{"type":"string","description":"Limits results to receipts that have a line for this warehouse."},"itemId":{"type":"string","description":"Limits results to receipts that have a line for this item."},"referenceNumber":{"type":"string","description":"The vendor's own reference, matched exactly — their delivery note number is what a buyer has in front of them."},"trackingNumber":{"type":"string","description":"The carrier's tracking number, matched exactly and case-sensitively."},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"Only receipts of this type: NORMAL (goods ordered on the purchase order, including receipts saved before the type existed) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns)."},"fromDate":{"type":"string","format":"date","description":"Inclusive lower bound on documentDate (YYYY-MM-DD)."},"toDate":{"type":"string","format":"date","description":"Limits results to receipts dated on or before this date. Format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to receipts changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A receipt must match every filter you send. Send an empty object to return all receipts.","examples":[{"documentStatus":"DRAFT"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of receipts per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"bulkDeleteLandedCostsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted landed cost. Format: UUID."}},"additionalProperties":false,"required":["id"]},"description":"The deleted landed costs, in the order you sent them."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteLandedCostsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the landed costs to delete. Format: UUID.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"searchReasonCodesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the reason code."},"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. It is unique within the tenant."},"description":{"type":"string","description":"A free-form description of what the reason code means. Absent when none was given."},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. When false, existing documents keep it and new ones cannot select it."},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect."},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The document types this reason code may be selected on, in a stable order. An empty array when it is linked to none. This is the reason code's full set. Filtering by documentType narrows which reason codes are returned, not the set each one reports."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the reason code record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change it."}},"additionalProperties":false,"required":["id","code","documentTypes"]},"description":"The reason codes on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61","code":"DAMAGE","description":"Stock damaged in the warehouse","isActive":true,"requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more reason codes remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchReasonCodesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"code":{"type":"string","description":"Limits results to the reason code with this code. The match is exact. Codes are unique, so this matches at most one reason code."},"isActive":{"type":"boolean","description":"Limits results to reason codes that can be selected on new documents when true, or to retired ones when false. Omit to match both."},"requiresApproval":{"type":"boolean","description":"Limits results to reason codes that require approval when true, or that do not when false. Omit to match both."},"documentType":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"],"description":"Limits results to the reason codes linked to this document type. This filter is available only here, not on the collection. A document type nothing is linked to returns an empty page, not an error."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to reason codes changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change lastModifiedDate."}},"additionalProperties":false,"description":"The filters to apply. A reason code must match every filter you send. Send an empty object to return all reason codes.","examples":[{"documentType":"InventoryDecrease","isActive":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of reason codes per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"updateShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned.","examples":["SD-8841"]},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD.","examples":["2026-08-19"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The display name of that customer.","examples":["Bakker Retail B.V."]},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"shipmentCarrierName":{"type":"string","description":"The name of that carrier.","examples":["PostNL"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods.","examples":["3SABCD7654321"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment.","examples":["PO-BAKKER-4417"]},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it.","examples":["OPEN"]},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency.","examples":["864.00"]},"notes":{"type":"string","description":"Free text on the shipment.","examples":["Palletised"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:05:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"36.00","inventoryQuantity":"36.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateShipmentInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The planned delivery date. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency for every amount on the shipment. Format ISO 4217, for example 'EUR'."},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id."},"trackingNumber":{"type":"string","description":"The carrier's tracking number.","examples":["3SABCD7654321"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment."},"notes":{"type":"string","description":"Free text on the shipment. Pass an empty string to clear it."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of lines to remove. Applied before updateLines and createLines."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line belonging to another shipment is rejected."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. It must agree with every other line. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to ship, in the line's unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"notes":{"type":"string","description":"Free text on the line. Pass an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch going out. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line ships from. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to ship, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches going out on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. This replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit going out. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line ships from. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units going out, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. This replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the goods from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line. This replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, each addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"36.00"}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line must use the same warehouse. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to ship, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency. Omit it to take the price from the sales order line."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id. Naming it links the shipment to the order it fulfills."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch going out. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line ships from. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to ship, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches going out on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit going out. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line ships from. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units going out, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the goods from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines to add."}},"additionalProperties":false},"createTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"]},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'.","examples":["WTO-1043"]},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order.","examples":[1]},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. updateLines and deleteLines address a line by it."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from. See id on GET inventory/warehouses/:id. Absent while no source warehouse has been resolved, and such a line blocks the conversion."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Always greater than zero."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line is still to be transferred."},"processedQuantity":{"type":"string","format":"decimal","description":"How much of the line a transfer has already taken."},"status":{"type":"string","description":"The state of the line. 'NEEDS_SOURCE' means no source warehouse has been resolved, and the transfer order cannot be converted until it is."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the created transfer order.","examples":[[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"40","inventoryQuantity":"40","openQuantity":"40","status":"DRAFT"}]]}},"additionalProperties":false,"required":["id","documentStatus","lines"]},"createTransferOrderInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity. Defaults to the entity that owns the first line’s warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer order. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-18"]},"locationId":{"type":"string","description":"The warehouse the goods leave, for the transfer order as a whole. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"targetLocationId":{"type":"string","description":"The warehouse the goods go to, for the transfer order as a whole. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order, for example a replenishment run or a ticket number.","examples":["REPLEN-2026-33"]},"notes":{"type":"string","description":"Free text on the document."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse to draw from, required on a line. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse to deliver to. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. Defaults to the item's stocking unit. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line’s unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["itemId","locationId","targetLocationId","quantity"]},"description":"The lines of the transfer order. At least one is required.","examples":[[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"40"}]]}},"additionalProperties":false,"required":["lines"]},"updateInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'.","examples":["REV-1187"]},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet."},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation.","examples":["Reviewed with finance"]},"lineCount":{"type":"number","description":"How many lines the revaluation has.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T11:20:04.219Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation line. Pass it in updateLines or deleteLines on PATCH inventory/inventory-revaluations/:id to change or remove the line."},"itemId":{"type":"string","description":"The unique identifier for the item being revalued. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock this line restates. The same item may be carried at a different cost in each warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates the cost of, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the revaluation's currency. You supply it and the platform checks it rather than deriving it. Read it from GET inventory/inventory-levels."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the revaluation's currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document, in the revaluation's currency. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize, in the revaluation's currency. Moving-average direct cost capitalization only."},"revaluationAmount":{"type":"string","format":"decimal","description":"The value this line moves on the balance sheet, in the revaluation's currency: (newUnitCost - currentUnitCost) x quantity."},"status":{"type":"string","description":"Where the line sits in the platform's own process. This is free text with no fixed set of values."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number."},"batchNumber":{"type":"string","description":"The batch number itself."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number."},"serialNumber":{"type":"string","description":"The serial number itself."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document. Direct cost capitalization on a sold serial only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit, so there must be exactly as many as the quantity says."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the revaluation as it now stands."}},"additionalProperties":false,"required":["id","documentStatus"]},"updateInventoryRevaluationInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Use format YYYY-MM-DD."},"costingValuationType":{"type":"string","description":"How the value change is recorded. Accepted values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the revaluation.","examples":["Reviewed with finance"]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item to revalue. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates. Must be greater than zero."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the legal entity's functional currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize. Moving-average direct cost capitalization only."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity","currentUnitCost","newUnitCost"]},"description":"The lines to add, each the same shape as a line on create."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change."},"itemId":{"type":"string","description":"The unique identifier for a different item. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock is being restated. There is no document-level warehouse, so every line names its own. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. Required: without it the platform falls back to whichever unit is first in the tenant. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates. Must be greater than zero."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the legal entity's functional currency. Read it from GET inventory/inventory-levels for the same item and warehouse, since it is checked and never looked up, and a guess posts the wrong difference. Zero is accepted and a negative cost is not."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the legal entity's functional currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize. Moving-average direct cost capitalization only."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the line's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the line's warehouse. Given beside serialNumberId, it must be that unit's own number."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, addressed by the id this endpoint publishes. Everything but the id is optional, and a tracking array replaces what that line had."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the lines to remove."}},"additionalProperties":false},"bulkCreateItemsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created item."},"itemCode":{"type":"string","description":"The item code of the created item."}},"additionalProperties":false,"required":["id"]},"description":"The created items, in the same order as the input.","examples":[[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateItemsInput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Must be unique within the tenant, including against retired items whose codes are never released. It cannot be changed after the item is created."},"itemName":{"type":"string","description":"The display name of the item."},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It cannot be changed after the item is created. See id on GET inventory/item-types/:id."},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id."},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction will be in this unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. inventoryUnitId, salesUnitId and purchaseUnitId must all be units in this group, and a unit outside it fails with UNIT_NOT_IN_UNIT_GROUP. See id on GET inventory/unit-of-measure-groups/:id."},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Accepted values: 'movingAverage', 'batch', 'serials', 'none'. Use 'none' for an item that is not stocked. Defaults to 'movingAverage'. 'batch' requires isBatch, 'serials' requires isSerial, and 'none' requires isInventory false, and each contradiction fails with TRACKING_MISMATCH. 'fifo' is under development and fails with VALUATION_METHOD_UNAVAILABLE."},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Defaults to false."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Defaults to false."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. Defaults to true. Set false for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents. Defaults to true."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents. Defaults to true."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. Defaults to true. Setting it false retires the item without deleting it."},"notes":{"type":"string","description":"Free text on the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Omit for no restriction. Omitting it is not the same as sending 1."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning. State its currency in currency."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price. State its currency in currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Required when either is given. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. Set it if the item may be received under a landed cost that uses Weight allocation, because that mode fails rather than falling back when an item has no weight."},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Accepted values: 'G', 'Kg', 'Lbs'."},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Accepted values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge billed as this item falls back to when it names none. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest storage temperature, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest storage temperature, in degrees Celsius."}},"additionalProperties":false,"required":["itemCode","itemTypeId","categoryId","inventoryUnitId","unitGroupId"]},"description":"The items to create. All or nothing: if any row is invalid, the whole call fails and nothing is created.","examples":[[{"itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87"}]]}},"additionalProperties":false,"required":["items"]},"getReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created.","examples":["GR-2291"]},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The legal entity the receipt belongs to.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The vendor the goods came from.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of that vendor.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number.","examples":["DN-77120"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"What the receipt takes in: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns, valued at and cleared against those returns)."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency.","examples":["725.00"]},"notes":{"type":"string","description":"Free text on the receipt.","examples":["Received at the back dock"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, the purchase return line this line replaces, as its id under lines on GET inventory/purchase-returns/:id. The line carries that return line's unit price and the return's functional value."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"getItemCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item category.","examples":["a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"]},"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not unique: two categories can share a name, so use id to address one.","examples":["Hardware"]},"description":{"type":"string","description":"A free-form description of what the category covers. Absent when none was set.","examples":["Fasteners, fittings and tooling"]},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. When false the category is retired: existing items keep it and new ones cannot be assigned to it.","examples":[true]},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency.","examples":["6.50"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]},"parentId":{"type":"string","description":"The identifier of the category this one sits under. Absent for a top-level category. See id on GET inventory/item-categories/:id."}},"additionalProperties":false,"required":["id","name"]},"searchBatchNumbersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch number. Format: UUID."},"batchNumber":{"type":"string","description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse."},"manufacturerBatchNumber":{"type":"string","description":"The manufacturer's batch number."},"itemId":{"type":"string","description":"The unique identifier of the item this batch belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse the batch is in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"quantity":{"type":"string","format":"decimal","description":"The total quantity received into the batch, in the item's stocking unit. When a receipt, inventory increase, or inventory count creates the batch, it is 0 until the document that brings in the stock is committed. For a batch created by a production order, it does not show the quantity received, so use `inStock` instead. Unlike `inStock`, it does not change when stock leaves the batch or comes back on a sales return. Only canceling a receipt, inventory increase, or warehouse transfer that brought stock into the batch lowers it."},"inStock":{"type":"string","format":"decimal","description":"The quantity of the batch currently in stock, in the item's stocking unit. It counts all of the batch's stock, whatever its `batchStatus`, so quarantined, expired, and disposed stock are included. To take stock out, create and commit a document that moves it out, such as an inventory decrease."},"cost":{"type":"string","format":"decimal","description":"The cost of one unit of the batch. When more stock comes into the batch, the cost becomes the average of the existing and new stock, weighted by quantity."},"originalCost":{"type":"string","format":"decimal","description":"The cost of one unit of the batch when the stock was first received. Landed costs added later, such as freight or customs duty, raise it, and other revaluations can raise or lower it. When the batch is refilled after running out, it is reset to the new stock's cost."},"currency":{"type":"string","description":"The currency of `cost` and `originalCost`. Format: ISO 4217, for example 'USD'."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD."},"manufactureDate":{"type":"string","format":"date","description":"The date the manufacturer made the batch. Format: YYYY-MM-DD."},"bestBeforeDate":{"type":"string","format":"date","description":"The best-before date of the batch. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the batch's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase creates the batch, it is the date entered for the batch on that document, or the document's date when none was entered. When a warehouse transfer creates the batch, it is the `entryDate` of the batch in the sending warehouse. Each later receipt or inventory increase for the batch sets a new date. The age of all the batch's stock is then counted from the new date, including stock received earlier. A warehouse transfer that adds stock to an existing batch does not change the date."},"batchStatus":{"type":"string","description":"The status of the batch. Changing the status does not change the batch's `quantity`, `inStock`, or `cost`. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'."},"temperatureBreach":{"type":"boolean","description":"Whether the batch has been outside its storage temperature range."},"qcStatus":{"type":"string","description":"The quality-control status of the batch, as free text."},"active":{"type":"boolean","description":"Whether the batch is active."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the batch record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the batch record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The matching batches in this response. When more batches match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"7a4e91c3-2b58-4d06-9f31-c85e207a4b19","batchNumber":"LOT-2026-0448","manufacturerBatchNumber":"MFG-8842-C","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","quantity":"400","inStock":"260","cost":"12.5","originalCost":"12","currency":"GBP","expirationDate":"2027-03-31","batchStatus":"ACTIVE","temperatureBreach":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchBatchNumbersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"batchNumber":{"type":"string","description":"Limits results to batches with this batch number. The match is exact."},"manufacturerBatchNumber":{"type":"string","description":"Limits results to batches with this manufacturer's batch number. The match is exact."},"itemId":{"type":"string","description":"Limits results to batches for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to batches in the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"batchStatus":{"type":"string","description":"Limits results to batches with this status. Accepted values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'."},"temperatureBreach":{"type":"boolean","description":"Limits results to batches with a temperature breach when true, and to batches without one when false."},"qcStatus":{"type":"string","description":"Limits results to batches with this quality-control status. The match is exact."},"active":{"type":"boolean","description":"Limits results to active batches when true, and to inactive batches when false."},"inStock":{"type":"boolean","description":"Limits results to batches with stock when true, and to batches with no stock when false."},"expiringBefore":{"type":"string","format":"date","description":"Limits results to batches expiring on or before this date. Format: YYYY-MM-DD."},"expiringAfter":{"type":"string","format":"date","description":"Limits results to batches expiring on or after this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to batches changed on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A batch must match every filter you send. Send an empty object to return all batches.","examples":[{"expiringBefore":"2027-12-31","inStock":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of batches per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size."}},"additionalProperties":false,"required":["filters"]},"searchItemsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item."},"isDraft":{"type":"boolean","description":"True when the item is a system draft: created with POST inventory/items/drafts or saved as a draft in the item form, not offered on any document, and made a real item by POST inventory/items/:id/activate."},"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Unique within the tenant. It is set when the item is created and cannot be changed."},"itemName":{"type":"string","description":"The display name of the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"notes":{"type":"string","description":"Free text on the item."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image. Absent when none is set."},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It is set when the item is created and cannot be changed. See id on GET inventory/item-types/:id."},"itemTypeName":{"type":"string","description":"The display name of the item's type."},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id."},"categoryName":{"type":"string","description":"The display name of the item's category."},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction is in this unit. See id on GET inventory/unit-of-measures/:id."},"inventoryUnitCode":{"type":"string","description":"The code of the inventory unit."},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"salesUnitCode":{"type":"string","description":"The code of the sales unit."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitCode":{"type":"string","description":"The code of the purchase unit."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. See id on GET inventory/unit-of-measure-groups/:id."},"unitGroupName":{"type":"string","description":"The display name of the unit of measure group."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Possible values: 'movingAverage', 'batch', 'serials', 'none'. 'none' is for an item that is not stocked. 'fifo' can be returned but cannot be written, because it is under development."},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Receipts and shipments of it name batches."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Receipts and shipments of it name one serial per unit."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. False for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. False means it is retired, and historical records keep it."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Absent when there is no restriction."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning, in the item's currency. It is not the value of the stock on hand. Read that from GET inventory/inventory-levels."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price, in the item's currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. A landed cost Weight allocation fails rather than falling back when an item on the receipt has none."},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Possible values: 'G', 'Kg', 'Lbs'."},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Possible values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge for this item falls back to when it names none. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest temperature the item can be stored at, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest temperature the item can be stored at, in degrees Celsius."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the item was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the item record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The items on this page, oldest first. An empty array when nothing matches.","examples":[[{"id":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","itemName":"Standard widget","itemTypeId":"66aea173-07b8-4c4e-bc4a-5c35dedfdc16","itemTypeName":"Stocked good","categoryId":"6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b","categoryName":"Components","inventoryUnitId":"77bd4c16-e1f0-426d-a98f-07b063df2d9c","inventoryUnitCode":"EA","unitGroupId":"38b5454a-c3fe-452b-9754-61f9ead49e87","unitGroupName":"Each","valuationMethod":"movingAverage","isBatch":false,"isSerial":false,"isInventory":true,"isSalesItem":true,"isPurchaseItem":true,"active":true,"weight":"1.4","weightUnit":"Kg","lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more items remain beyond this page."}},"additionalProperties":false,"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchItemsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"itemCode":{"type":"string","description":"Limits results to the item with this item code. The match is exact. Item codes are unique, so this matches at most one item."},"itemTypeId":{"type":"string","description":"Limits results to items with this item type. See id on GET inventory/item-types/:id."},"categoryId":{"type":"string","description":"Limits results to items in this category. See id on GET inventory/item-categories/:id."},"unitGroupId":{"type":"string","description":"Limits results to items in this unit of measure group. See id on GET inventory/unit-of-measure-groups/:id."},"valuationMethod":{"type":"string","description":"Limits results to items with this valuation method. Accepted values: 'movingAverage', 'batch', 'serials', 'none', 'fifo'. 'fifo' can be matched on read but cannot be written."},"isBatch":{"type":"boolean","description":"Limits results to items with the given isBatch value."},"isSerial":{"type":"boolean","description":"Limits results to items with the given isSerial value."},"isInventory":{"type":"boolean","description":"Limits results to items with the given isInventory value. False finds service and charge items."},"isSalesItem":{"type":"boolean","description":"Limits results to items with the given isSalesItem value."},"isPurchaseItem":{"type":"boolean","description":"Limits results to items with the given isPurchaseItem value."},"isPerishable":{"type":"boolean","description":"Limits results to items with the given isPerishable value."},"active":{"type":"boolean","description":"Limits results to items with the given active value. Omit to return both."},"externalItemId":{"type":"string","description":"Limits results to the item with this external identifier. The match is exact."},"brandName":{"type":"string","description":"Limits results to items with this brand name. The match is exact."},"countryOfOrigin":{"type":"string","description":"Limits results to items with this country of origin. The match is exact."},"missingWeight":{"type":"boolean","description":"True to return only items that have no weight, the items a landed cost Weight allocation would fail on."},"missingDimensions":{"type":"boolean","description":"True to return only items missing length, width or height, the items a landed cost Volume allocation would fail on."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to items changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"isDraft":{"type":"boolean","description":"True to return only draft items. Drafts are never mixed into the other results: omit it, or send false, for real items only."}},"additionalProperties":false,"description":"The filters to apply. An item must match every filter you send. Send an empty object to return all items.","examples":[{"missingWeight":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of items per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"activateItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the activated item. It is the draft's id: activation does not create a new record.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]}},"additionalProperties":false,"required":["id"]},"activateItemInput":{"type":"object","properties":{},"additionalProperties":false},"listItemAttributesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item attribute."},"itemId":{"type":"string","description":"The unique identifier for the item carrying the attribute. See id on GET inventory/items/:id."},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The item's code, for example 'WIDGET-01'."},"attributeId":{"type":"string","description":"The unique identifier for the attribute definition."},"attributeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The attribute's name, for example 'Colour'."},"valueId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the chosen value. Absent when the attribute has been assigned without a value."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The chosen value's text, for example 'Red'. Absent when the attribute has been assigned without a value."}},"additionalProperties":false},"createItemDraftOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the draft item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"type":"string","description":"The item code of the draft, when one was sent."}},"additionalProperties":false,"required":["id"]},"createItemDraftInput":{"type":"object","properties":{"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. On a draft it may be omitted, repeated or changed: uniqueness is checked when the draft is activated."},"itemName":{"type":"string","description":"The display name of the item.","examples":["Standard widget"]},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It can still be changed while the item is a draft. See id on GET inventory/item-types/:id."},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id.","examples":["6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b"]},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction will be in this unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. inventoryUnitId, salesUnitId and purchaseUnitId must all be units in this group, and a unit outside it fails with UNIT_NOT_IN_UNIT_GROUP. See id on GET inventory/unit-of-measure-groups/:id."},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Omit when it is the same as the inventory unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Accepted values: 'movingAverage', 'batch', 'serials', 'none'. Use 'none' for an item that is not stocked. Defaults to 'movingAverage'. 'batch' requires isBatch, 'serials' requires isSerial, and 'none' requires isInventory false, and each contradiction fails with TRACKING_MISMATCH. 'fifo' is under development and fails with VALUATION_METHOD_UNAVAILABLE."},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Defaults to false."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Defaults to false."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. Defaults to true. Set false for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents. Defaults to true."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents. Defaults to true."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. Defaults to true. Setting it false retires the item without deleting it."},"notes":{"type":"string","description":"Free text on the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Omit for no restriction. Omitting it is not the same as sending 1."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning. State its currency in currency."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price. State its currency in currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Required when either is given. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. Set it if the item may be received under a landed cost that uses Weight allocation, because that mode fails rather than falling back when an item has no weight."},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Accepted values: 'G', 'Kg', 'Lbs'."},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Accepted values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge billed as this item falls back to when it names none. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest storage temperature, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest storage temperature, in degrees Celsius."}},"additionalProperties":false},"updateLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"allocationLineCount":{"type":"number","description":"The number of allocation lines on the landed cost. There is one allocation line for each selected receipt line that has an inventory item and takes a share of the charges. When it is 0, no stock takes a share of the charges, and committing the landed cost fails.","examples":[1]}},"additionalProperties":false,"required":["id"]},"updateLandedCostInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD. The inventory revaluations that the commit creates have this date, so it sets the date of the change in the stock's value. It must fall in an open accounting period."},"notes":{"type":"string","description":"Free text on the landed cost."},"receipts":{"type":"array","items":{"type":"object","properties":{"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"selectedLineIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the receipt lines to spread the charges over. Format: UUID. Each identifier must be the `id` of a line of the receipt named by `receiptId`. Omit to spread the charges over all of the receipt's lines. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."}},"additionalProperties":false,"required":["receiptId"]},"description":"The receipts whose stock the charges are spread over. Send at least one. Every receipt must have the `documentStatus` 'COMMITTED' and belong to the landed cost's legal entity."},"charges":{"type":"array","items":{"type":"object","properties":{"chargeId":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. The vendor bill is taken from the line, so you do not send it. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"allocationMode":{"type":"string","description":"How the charge is spread (allocated) over the receipt lines. When left out, a charge already on the landed cost for the same vendor bill line keeps the mode it has. A charge new to the landed cost defaults as on create: to the `allocationMode` of the active landed cost item that matches the vendor bill line, by its item first and then by its general ledger account (the `allocationMode` GET inventory/landed-costs/vendor-bill-lines reports for the line). With no matching landed cost item, it defaults to the `defaultAllocationMode` of the item on the vendor bill line, or to 'Equal' when there is no such default. 'Weight' needs a gross weight, weight, or net weight on the item of every selected receipt line. 'Volume' needs a volume per unit on the item of every selected receipt line, or else a length, width, and height on every one. Weights and volumes are converted to the same unit before the charge is spread. See `defaultAllocationMode`, `grossWeight`, `weight`, `netWeight`, `weightUnit`, `volumePerUnit`, `volumeUnit`, `length`, `width`, and `height` on GET inventory/items/:id (getItem). Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the vendor bill line to use, in the functional currency of the landed cost's legal entity. It must be more than 0. To use what is left on the line, send `functionalLineTotal` minus `functionalAllocatedAmount` from GET inventory/landed-costs/vendor-bill-lines. The commit fails if this amount is more than what is left on the line."},"isSelected":{"type":"boolean","description":"Whether to spread the charge over the receipt lines. Defaults to true. A charge set to false is kept in the landed cost's charges, so you can set it back to true later, but the commit does not spread it."}},"additionalProperties":false,"required":["chargeId","amount"]},"description":"The charges to spread over the stock. Each charge comes from a line of an approved vendor bill of the landed cost's legal entity, and the line must match an active landed cost item. Send at least one.","examples":[[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"LineTotal","amount":"300"}]]}},"additionalProperties":false},"deleteAccountDeterminationRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique.","examples":["Finished goods — receipts"]}},"additionalProperties":false,"required":["id","ruleName"]},"bulkCreateLandedCostsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created landed cost. Format: UUID."},"documentNumber":{"type":"string","description":"The landed cost number, for example 'LC-1007'."}},"additionalProperties":false,"required":["id"]},"description":"The created landed costs, in the order you sent them.","examples":[[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateLandedCostsInput":{"type":"object","properties":{"landedCosts":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. It cannot be changed later. See `id` on GET base/entities (entities)."},"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD. Defaults to today's date in UTC. The inventory revaluations that the commit creates have this date, so it sets the date of the change in the stock's value. It must fall in an open accounting period."},"notes":{"type":"string","description":"Free text on the landed cost."},"receipts":{"type":"array","items":{"type":"object","properties":{"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"selectedLineIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the receipt lines to spread the charges over. Format: UUID. Each identifier must be the `id` of a line of the receipt named by `receiptId`. Omit to spread the charges over all of the receipt's lines. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."}},"additionalProperties":false,"required":["receiptId"]},"description":"The receipts whose stock the charges are spread over. Send at least one. Every receipt must have the `documentStatus` 'COMMITTED' and belong to the landed cost's legal entity."},"charges":{"type":"array","items":{"type":"object","properties":{"chargeId":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. The vendor bill is taken from the line, so you do not send it. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"allocationMode":{"type":"string","description":"How the charge is spread (allocated) over the receipt lines. Defaults to the `allocationMode` of the active landed cost item that matches the vendor bill line, by its item first and then by its general ledger account. This is the `allocationMode` GET inventory/landed-costs/vendor-bill-lines reports for the line. With no matching landed cost item, it defaults to the `defaultAllocationMode` of the item on the vendor bill line, or to 'Equal' when there is no such default. 'Weight' needs a gross weight, weight, or net weight on the item of every selected receipt line. 'Volume' needs a volume per unit on the item of every selected receipt line, or else a length, width, and height on every one. Weights and volumes are converted to the same unit before the charge is spread. See `defaultAllocationMode`, `grossWeight`, `weight`, `netWeight`, `weightUnit`, `volumePerUnit`, `volumeUnit`, `length`, `width`, and `height` on GET inventory/items/:id (getItem). Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the vendor bill line to use, in the functional currency of the landed cost's legal entity. It must be more than 0. To use what is left on the line, send `functionalLineTotal` minus `functionalAllocatedAmount` from GET inventory/landed-costs/vendor-bill-lines. The commit fails if this amount is more than what is left on the line."},"isSelected":{"type":"boolean","description":"Whether to spread the charge over the receipt lines. Defaults to true. A charge set to false is kept in the landed cost's charges, so you can set it back to true later, but the commit does not spread it."}},"additionalProperties":false,"required":["chargeId","amount"]},"description":"The charges to spread over the stock. Each charge comes from a line of an approved vendor bill of the landed cost's legal entity, and the line must match an active landed cost item. Send at least one."}},"additionalProperties":false,"required":["entityId","receipts","charges"]},"description":"The landed costs to create.","examples":[[{"entityId":"7039b992-696a-40c7-a181-51759304ef83","receipts":[{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}],"charges":[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"Quantity","amount":"240"}]}]]}},"additionalProperties":false,"required":["landedCosts"]},"commitInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the committed inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease, read back from the document. It is 'COMMITTED' on success. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The unique identifier for the journal entry the commit posted. Absent when posting produced none. See id on GET accounting/journal-entries/:id.","examples":["7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the posting, in practice soft bin-capacity breaches. An empty array on a clean commit. The commit succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitInventoryDecreaseInput":{"type":"object","properties":{},"additionalProperties":false},"receiptsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created.","examples":["GR-2291"]},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods arrived or are expected. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The legal entity the receipt belongs to.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The vendor the goods came from.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that vendor.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor's own reference, typically their delivery note number."},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The carrier's tracking number for the inbound shipment. Returned, not filterable: matching it is a search criterion."},"receiptType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the receipt takes in: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns). Empty for a receipt saved before the type existed, which is a normal one."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 4217 code the receipt is valued in.","examples":["EUR"]},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total value of the receipt, in the receipt's currency.","examples":["725.00"]},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines on the receipt.","examples":[2]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the receipt.","examples":["Received at the back dock"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]}},"additionalProperties":false},"bulkDeleteWarehousesOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted warehouse."},"locationCode":{"type":"string","description":"The location code the deleted warehouse held."}},"additionalProperties":false,"required":["id","locationCode"]},"description":"The deleted warehouses, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteWarehousesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the warehouses to delete. If any identifier matches nothing or its warehouse is still in use, nothing is deleted and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"getItemAttributeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item attribute.","examples":["9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"]},"itemId":{"type":"string","description":"The identifier of the item carrying the attribute. See id on GET inventory/items/:id.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The item's code, for example 'WIDGET-01'. Echoed so the row can be rendered without reading the item.","examples":["WIDGET-01"]},"attributeId":{"type":"string","description":"The identifier of the attribute definition, for example the one named 'Colour'.","examples":["c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48"]},"attributeName":{"type":"string","description":"The attribute's name, for example 'Colour'.","examples":["Colour"]},"valueId":{"type":"string","description":"The identifier of the chosen value. Absent when the attribute has been assigned without a value.","examples":["2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03"]},"value":{"type":"string","description":"The chosen value's text, for example 'Red'. Absent when the attribute has been assigned without a value.","examples":["Red"]}},"additionalProperties":false,"required":["id","itemId","attributeId"]},"commitSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentStatus":{"type":"string","description":"The status the return is now in, read back from the document. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["RECEIVED"]},"creditMemoId":{"type":"string","description":"The unique identifier for the credit memo this commit raised, where it raised one. Absent for an inventory-only return, and its absence never means the commit failed. See id on GET accounting/credit-memos/:id."},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from this step. An empty array on a clean run. The step succeeded whatever is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitSalesReturnInput":{"type":"object","properties":{"approvalNotes":{"type":"string","description":"Free text recorded with the commit, added to the return's notes for audit.","examples":["RMA verified against the delivery"]}},"additionalProperties":false},"updateSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you.","examples":["SR-1042"]},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The name of that customer.","examples":["Bakker Retail B.V."]},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line.","examples":["55120"]},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'.","examples":["SalesDelivery"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number.","examples":["RMA-2026-0087"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back.","examples":["3SABCD7654321"]},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency.","examples":["96.00"]},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency.","examples":["0.00"]},"notes":{"type":"string","description":"Free text on the document.","examples":["Customer reports transit damage"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:05:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"4.00","inventoryQuantity":"4.00","openQuantity":"4.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updateSalesReturnInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"A new customer for the return. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"documentDate":{"type":"string","format":"date","description":"A new document date. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"A new expected-back date. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"A new currency for the return's amounts. Format ISO 4217, for example 'EUR'."},"referenceNumber":{"type":"string","description":"A new customer reference."},"trackingNumber":{"type":"string","description":"A new carrier tracking number.","examples":["3SABCD7654321"]},"returnType":{"type":"string","description":"A new classification for the return."},"returnFeeAmount":{"type":"string","format":"decimal","description":"A new fee across the return, in the document's currency."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The identifiers of lines to remove. Applied before the other two arrays."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line belonging to another return is rejected, not skipped."},"itemId":{"type":"string","description":"A new item for the line. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"A new warehouse for the line. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"A new unit for the line's quantity. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, in the line's unit. Greater than zero when given."},"unitPrice":{"type":"string","format":"decimal","description":"A new unit value, in the document's currency."},"condition":{"enum":["NEW","GOOD","USED","OPENED","DAMAGED","DEFECTIVE","EXPIRED","REFURBISHED"],"description":"A new expected condition."},"disposition":{"enum":["RETURN_TO_STOCK","RETURN_TO_VENDOR","SCRAP","DONATE","REPAIR","REWORK","CREDIT_ONLY"],"description":"A new intended disposition."},"reasonCode":{"type":"string","description":"A new customer-facing reason."},"reasonCodeId":{"type":"string","description":"A new internal reason code. See id on GET inventory/reason-codes/:id."},"returnFeeAmount":{"type":"string","format":"decimal","description":"A new fee for this line, in the document's currency."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch coming back, as batchNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line returns to. Given beside batchNumberId, it must be that batch's own number."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches coming back on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. On PATCH inventory/sales-returns/:id this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit coming back, as serialNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line returns to. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units coming back, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. On PATCH inventory/sales-returns/:id this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry may name a batchNumber or serialNumber of its own line. On PATCH inventory/sales-returns/:id this replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"4.00"}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency. Omit it to take the price from the sale."},"condition":{"enum":["NEW","GOOD","USED","OPENED","DAMAGED","DEFECTIVE","EXPIRED","REFURBISHED"],"description":"The condition the goods are expected in. The inspection may find otherwise and restates it."},"disposition":{"enum":["RETURN_TO_STOCK","RETURN_TO_VENDOR","SCRAP","DONATE","REPAIR","REWORK","CREDIT_ONLY"],"description":"What you intend to do with the goods. The inspection may change it."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code. See id on GET inventory/reason-codes/:id."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return follows a delivery. It is a line's id on GET inventory/shipments/:id. Naming it lets the commit value the return from the original shipment cost."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch coming back, as batchNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line returns to. Given beside batchNumberId, it must be that batch's own number."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches coming back on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. On PATCH inventory/sales-returns/:id this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit coming back, as serialNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line returns to. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units coming back, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. On PATCH inventory/sales-returns/:id this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry may name a batchNumber or serialNumber of its own line. On PATCH inventory/sales-returns/:id this replaces the line's bin entries."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"Lines to add."}},"additionalProperties":false},"deleteTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted transfer order.","examples":["3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6"]}},"additionalProperties":false,"required":["id"]},"createSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you.","examples":["SR-1042"]},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The name of that customer.","examples":["Bakker Retail B.V."]},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line.","examples":["55120"]},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'.","examples":["SalesDelivery"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number.","examples":["RMA-2026-0087"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back.","examples":["3SABCD1234567"]},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency.","examples":["144.00"]},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency.","examples":["0.00"]},"notes":{"type":"string","description":"Free text on the document.","examples":["Customer reports transit damage"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createSalesReturnInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Required, a return always comes from one. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it and the first line's warehouse decides it. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back. Use format YYYY-MM-DD.","examples":["2026-08-18"]},"currency":{"type":"string","description":"The currency for every amount on the return. Format ISO 4217, for example 'EUR'. Defaults to the legal entity's functional currency. Set it when the sale was in another.","examples":["EUR"]},"referenceNumber":{"type":"string","description":"The customer's own reference, for example an RMA number.","examples":["RMA-2026-0087"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back.","examples":["3SABCD1234567"]},"returnType":{"type":"string","description":"How the business classifies the return."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency."},"notes":{"type":"string","description":"Free text on the document.","examples":["Customer reports transit damage"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency. Omit it to take the price from the sale."},"condition":{"enum":["NEW","GOOD","USED","OPENED","DAMAGED","DEFECTIVE","EXPIRED","REFURBISHED"],"description":"The condition the goods are expected in. The inspection may find otherwise and restates it."},"disposition":{"enum":["RETURN_TO_STOCK","RETURN_TO_VENDOR","SCRAP","DONATE","REPAIR","REWORK","CREDIT_ONLY"],"description":"What you intend to do with the goods. The inspection may change it."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code. See id on GET inventory/reason-codes/:id."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return follows a delivery. It is a line's id on GET inventory/shipments/:id. Naming it lets the commit value the return from the original shipment cost."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch coming back, as batchNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line returns to. Given beside batchNumberId, it must be that batch's own number."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches coming back on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. On PATCH inventory/sales-returns/:id this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit coming back, as serialNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line returns to. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units coming back, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. On PATCH inventory/sales-returns/:id this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry may name a batchNumber or serialNumber of its own line. On PATCH inventory/sales-returns/:id this replaces the line's bin entries."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines of the return. At least one is required.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]]}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"getInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned.","examples":["INC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"offsetAccountId":{"type":"string","description":"The unique identifier for the account the journal entry posts against instead of the account determination rule's adjustment gain account. Absent on an ordinary inventory increase, which uses the rule's account; only increases created by manufacturing carry one, and it can't be set through this API. See id on GET accounting/accounts/:id."},"offsetKind":{"type":"string","description":"Whether a later document is expected to clear the offset account. Possible values: 'clearing', 'final'. Absent means the same as 'final'."},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory increase.","examples":["August cycle count"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth, and unitPrice is calculated from it as lineValue divided by quantity. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit, when one was recorded. Format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"shipmentCarriersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment carrier.","examples":["5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"]},"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. Names are not unique, so use id to address one carrier.","examples":["DHL Express"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the carrier can be selected on new shipments. Absent on carriers created before the active flag existed.","examples":[true]},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the vendor this carrier bills through. Absent when the carrier has no vendor. See id on GET accounting/vendors/:id.","examples":["d4a71e08-6b95-4f23-b7c1-52e08a936d47"]},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor this carrier bills through. Absent when the carrier has no vendor. It is resolved from the vendor at read time and is not stored on the carrier.","examples":["DHL International GmbH"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the carrier record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"updateItemCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the updated item category.","examples":["a2f47b91-0c6d-4e38-95b1-7d3e6a428c50"]}},"additionalProperties":false,"required":["id"]},"updateItemCategoryInput":{"type":"object","properties":{"name":{"type":"string","description":"The new display name of the category, for example 'Hardware'. Cannot be cleared, and is not checked for uniqueness: renaming onto a name another category already has is allowed."},"description":{"type":"string","description":"A new free-form description of what the category covers."},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. Set false to retire the category without deleting it: existing items keep their assignment and new ones cannot choose it."},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"A new target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency.","examples":["8.00"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the category this one sits under. This is how a category is re-parented. Pass null to make it a top-level category. Re-parenting moves the whole subtree and touches no item: items stay assigned to the categories they already had. See id on GET inventory/item-categories/:id."}},"additionalProperties":false},"deleteItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Unique within the tenant. It is set when the item is created and cannot be changed.","examples":["WIDGET-01"]}},"additionalProperties":false,"required":["id"]},"searchBatchTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch transaction. Format: UUID."},"batchNumberId":{"type":"string","description":"The unique identifier of the batch this transaction is for. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse. Example: 'LOT-2026-08-14'."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. It shows the batch's current value, not the value at the time of the batch transaction. Format: YYYY-MM-DD."},"transactionId":{"type":"string","description":"The unique identifier of the inventory transaction this batch transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction)."},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure the batch transaction was recorded in. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure in `unitId`."},"transactionDate":{"type":"string","format":"date","description":"The date of the inventory transaction this batch transaction belongs to. Format: YYYY-MM-DD."},"inQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch that came into stock, in the item's stocking unit. It is 0 on an inventory revaluation, which changes the batch's cost without moving stock. Absent when stock went out."},"outQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch that went out of stock, in the item's stocking unit. Absent when stock came in or on an inventory revaluation."},"unitInQuantity":{"type":"string","format":"decimal","description":"The quantity that came into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit."},"unitOutQuantity":{"type":"string","format":"decimal","description":"The quantity that went out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"cost":{"type":"string","format":"decimal","description":"The unit cost of the batch, in the currency named by `currency`. When stock comes in, it is the unit cost of the stock received. When stock goes out, it is the batch's unit cost at that time. On an inventory revaluation, it is the batch's new unit cost."},"valueDelta":{"type":"string","format":"decimal","description":"The change in the total value of the batch's stock from this transaction, in the currency named by `currency`. A negative value is a decrease."},"currency":{"type":"string","description":"The currency that `cost` and `valueDelta` are in. Format: ISO 4217, for example 'USD'."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from."},"sourceDocumentId":{"type":"string","description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the batch transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the batch itself, such as its `expirationDate`, do not update this field."}},"additionalProperties":false,"required":["id","batchNumberId"]},"description":"The matching batch transactions in this response. When more batch transactions match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"6d2b8e17-4f90-4c53-a821-0e7d3b95c46f","batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"500.00","cost":"3.75","valueDelta":"1875.00","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchBatchTransactionsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"Limits results to batch transactions for the batch with this unique identifier. Format: UUID. When you also send `batchNumber`, `batchNumber` is used instead. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"Limits results to batch transactions for batches with this batch number. The match is exact. The same batch number can be used for other items and in other warehouses, so the results can include more than one batch. When you also send `batchNumberId`, this filter is used instead. Example: 'LOT-2026-08-14'."},"itemId":{"type":"string","description":"Limits results to batch transactions for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to batch transactions for the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"fromDate":{"type":"string","format":"date","description":"Limits results to batch transactions with a `transactionDate` on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to batch transactions with a `transactionDate` on or before this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to batch transactions whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A batch transaction must match every filter you send. Send an empty object to return all batch transactions.","examples":[{"batchNumber":"LOT-2026-08-14"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of batch transactions per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"commitLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"documentStatus":{"type":"string","description":"The status of the landed cost after the commit. It is always 'COMMITTED'.","examples":["COMMITTED"]},"totalChargeAmount":{"type":"string","format":"decimal","description":"The total of the selected charges, in the landed cost's currency.","examples":["240"]},"revaluationIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the inventory revaluations that the commit created. Format: UUID. See `id` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation).","examples":[["f0a25c71-8d43-4e96-b2c8-51730e9a4d62"]]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings from the inventory revaluations that the commit created. An empty array when there are none. The landed cost is committed even when there are warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","revaluationIds","warnings"]},"commitLandedCostInput":{"type":"object","properties":{},"additionalProperties":false},"deleteItemAttributeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the removed item attribute.","examples":["9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"]}},"additionalProperties":false,"required":["id"]},"commitShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentStatus":{"type":"string","description":"The status the shipment is now in, read back from the document. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DELIVERED"]},"journalEntryId":{"type":"string","description":"The unique identifier for the journal entry this step posted, when it posted one. See id on GET accounting/journal-entries/:id.","examples":["6b2d90f1-4c37-4e85-a019-8d3f5c72b6e4"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the step. An empty array on a clean run. The step succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitShipmentInput":{"type":"object","properties":{"cogsChoice":{"enum":["NON_AMORTIZED","AMORTIZED"],"description":"Whether the cost of sale is amortized. AMORTIZED requests COGS amortization schedules, which are created only for service lines, so on a shipment of goods it changes nothing. Defaults to NON_AMORTIZED."}},"additionalProperties":false},"purchaseReturnsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID."},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The purchase return number, for example 'PRTR-1043'."},"documentStatus":{"enum":["DRAFT","APPROVED","PREPARED","SHIPPED","VENDOR_ACKNOWLEDGED","CREDITED","COMPLETED","CANCELLED","COMMITTED"],"description":"The status of the purchase return."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD."},"deliveryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"shippedDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods left for the vendor, as given when the purchase return was shipped with POST inventory/purchase-returns/:id/ship. Format: YYYY-MM-DD. Absent until the purchase return is shipped. It does not set the date of the inventory transaction or of the journal entry."},"returnType":{"anyOf":[{"enum":["NORMAL","UNCREDITED_REPLACEMENT","UNINVOICED_CANCELLATION"]},{"type":"null"}],"description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"businessPartnerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor the goods go back to."},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reference number of the purchase return."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the purchase return's amounts. Format: ISO 4217, for example 'EUR'."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines on the purchase return."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Notes on the purchase return."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchInventoryDecreasesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease."},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse location."},"locationName":{"type":"string","description":"The display name of that warehouse location."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The short code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"offsetAccountId":{"type":"string","description":"The unique identifier for the account the journal entry posts against instead of the account determination rule's adjustment loss account. Absent on an ordinary inventory decrease, which uses the rule's account; only decreases created by manufacturing carry one, and it can't be set through this API. See id on GET accounting/accounts/:id."},"offsetKind":{"type":"string","description":"Whether a later document is expected to clear the offset account. Possible values: 'clearing', 'final'. Absent means the same as 'final'."},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'."},"notes":{"type":"string","description":"Free text on the inventory decrease."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"description":"The inventory decreases that match, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryDecreasesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the inventory decrease with this document number, for example 'DEC-42'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to inventory decreases with this status. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'. The match is exact."},"entityId":{"type":"string","description":"Limits results to inventory decreases for this legal entity. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to inventory decreases at this warehouse location. See id on GET inventory/warehouses/:id."},"reasonCodeId":{"type":"string","description":"Limits results to inventory decreases with this reason code. See id on GET inventory/reason-codes/:id."},"itemId":{"type":"string","description":"Limits results to inventory decreases that have a line for this item. The collection cannot filter by item, because lines are not on it. See id on GET inventory/items/:id."},"fromDate":{"type":"string","format":"date","description":"Limits results to documentDate on or after this date. Omit for an open-ended start. Use format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to documentDate on or before this date. Omit for an open-ended end. Use format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to inventory decreases changed at or after this time, in UTC. This is separate from the documentDate window. Use format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The search criteria, combined with AND. An empty object returns every inventory decrease, page by page.","examples":[{"documentStatus":"DRAFT","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of inventory decreases per page. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"shipmentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned.","examples":["SD-8841"]},"documentStatus":{"enum":["DRAFT","PACKED","PARTIALLY_SHIPPED","SHIPPED","COMMITTED","DELIVERED","COMPLETED","CANCELLED","INVOICED","PARTIALLY_INVOICED","RETURNED","PARTIALLY_RETURNED"],"description":"The status of the shipment.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The planned or actual delivery date. Format YYYY-MM-DD.","examples":["2026-08-19"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that customer.","examples":["Bakker Retail B.V."]},"shipmentCarrierId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"shipmentCarrierName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that carrier.","examples":["PostNL"]},"returnStatus":{"anyOf":[{"enum":["OPEN","PARTIALLY_RETURNED","FULLY_RETURNED"]},{"type":"null"}],"description":"How much of the shipment has come back on sales returns. The return process maintains it.","examples":["OPEN"]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer's own reference for the shipment.","examples":["SO-4471"]},"trackingNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The carrier's tracking number for the goods.","examples":["3STBJG7291043"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total value of the shipment, in the shipment's currency.","examples":["960.00"]},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines the shipment has. The collection does not return the lines themselves.","examples":[1]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the shipment.","examples":["Palletised"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]}},"additionalProperties":false},"deleteSalesReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted return, echoed back so a batch of deletes can be matched to requests.","examples":["5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46"]}},"additionalProperties":false,"required":["id"]},"inventoryRevaluationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The revaluation's document number, for example 'REV-1187'.","examples":["REV-1187"]},"documentStatus":{"enum":["DRAFT","COMMITTED","CANCELLED"],"description":"The status of the revaluation.","examples":["COMMITTED"]},"documentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the revaluation is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"costingValuationType":{"anyOf":[{"enum":["revaluation","directCostCapitalisation"]},{"type":"null"}],"description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.","examples":["revaluation"]},"capitalisationExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit."},"reasonCodeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that reason code."},"reasonCodeDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description of that reason code."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalRevaluationAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet.","examples":["-450"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the document is active.","examples":[true]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the revaluation."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How many lines the revaluation has.","examples":[1]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.104Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"getBatchTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch transaction. Format: UUID.","examples":["6d2b8e17-4f90-4c53-a821-0e7d3b95c46f"]},"batchNumberId":{"type":"string","description":"The unique identifier of the batch this transaction is for. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber).","examples":["9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9"]},"batchNumber":{"type":"string","description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse. Example: 'LOT-2026-08-14'.","examples":["LOT-2026-08-14"]},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. It shows the batch's current value, not the value at the time of the batch transaction. Format: YYYY-MM-DD.","examples":["2027-08-14"]},"transactionId":{"type":"string","description":"The unique identifier of the inventory transaction this batch transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction).","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The name of the item in `itemId`.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"unitId":{"type":"string","description":"The unique identifier of the unit of measure the batch transaction was recorded in. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure in `unitId`."},"transactionDate":{"type":"string","format":"date","description":"The date of the inventory transaction this batch transaction belongs to. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch that came into stock, in the item's stocking unit. It is 0 on an inventory revaluation, which changes the batch's cost without moving stock. Absent when stock went out.","examples":["500.00"]},"outQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch that went out of stock, in the item's stocking unit. Absent when stock came in or on an inventory revaluation."},"unitInQuantity":{"type":"string","format":"decimal","description":"The quantity that came into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit."},"unitOutQuantity":{"type":"string","format":"decimal","description":"The quantity that went out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"cost":{"type":"string","format":"decimal","description":"The unit cost of the batch, in the currency named by `currency`. When stock comes in, it is the unit cost of the stock received. When stock goes out, it is the batch's unit cost at that time. On an inventory revaluation, it is the batch's new unit cost.","examples":["3.75"]},"valueDelta":{"type":"string","format":"decimal","description":"The change in the total value of the batch's stock from this transaction, in the currency named by `currency`. A negative value is a decrease.","examples":["1875.00"]},"currency":{"type":"string","description":"The currency that `cost` and `valueDelta` are in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"sourceDocumentId":{"type":"string","description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the batch transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the batch itself, such as its `expirationDate`, do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false,"required":["id","batchNumberId"]},"searchShipmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment."},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"businessPartnerName":{"type":"string","description":"The display name of that customer."},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id."},"shipmentCarrierName":{"type":"string","description":"The name of that carrier."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods."},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment."},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it."},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency."},"notes":{"type":"string","description":"Free text on the shipment."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The shipments on this page, each with its lines. An empty array when nothing matches.","examples":[[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"SHIPPED","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-15T07:05:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more shipments remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchShipmentsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the shipment with this document number. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to shipments with this status. The match is exact. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'."},"entityId":{"type":"string","description":"Limits results to shipments for the legal entity with this identifier."},"businessPartnerId":{"type":"string","description":"Limits results to shipments for the customer with this identifier. Despite the name, this is a customer id."},"locationId":{"type":"string","description":"Limits results to shipments with a line for the warehouse with this identifier."},"itemId":{"type":"string","description":"Limits results to shipments with a line for the item with this identifier."},"referenceNumber":{"type":"string","description":"Limits results to the shipment with this customer reference. The match is exact."},"trackingNumber":{"type":"string","description":"Limits results to the shipment with this carrier tracking number. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to shipments dated on or after this date. Format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to shipments dated on or before this date. Format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to shipments changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A shipment must match every filter you send. Send an empty object to return all shipments.","examples":[{"documentStatus":"SHIPPED"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of shipments per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"updatePurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The purchase return number.","examples":["PRTR-1043"]},"documentStatus":{"type":"string","description":"The status of the purchase return. It is always 'DRAFT', because only a draft can be updated.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD.","examples":["2026-08-20"]},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"Deprecated, and always empty. A purchase return is created from a purchase order. Use `purchaseOrderId`."},"purchaseOrderId":{"type":"string","description":"The unique identifier of the purchase order the purchase return was created from. Format: UUID. See `id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order the purchase return was created from."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return.","examples":["Vendor agreed collection for Friday"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the purchase order line that this line returns goods from. Format: UUID. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'PurchaseOrderLine'."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of one stocking unit of the batch, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"25.00"}]]},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"updatePurchaseReturnInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT","UNINVOICED_CANCELLATION"],"description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"notes":{"type":"string","description":"Notes on the purchase return.","examples":["Vendor agreed collection for Friday"]},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the line you want to change. Format: UUID."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It must belong to the purchase return's legal entity. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It must be greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It can be zero, but not less than zero."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned. To identify the batch, send `batchNumberId`. To take this batch from a bin, send the same value in `binLocations[].batchNumber`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch to return, in the item's stocking unit. It must be greater than zero."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned. To identify the unit, send `serialNumberId`. To take this unit from a bin, send the same value in `binLocations[].serialNumber`."}},"additionalProperties":false},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for. It must match the `batchNumber` of one of the line's batches."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for. It must match the `serialNumber` of one of the line's serials."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins to take the stock on this purchase return line from, with the quantity to take from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The purchase return lines to change, each identified by its `id`. A field you leave out keeps its current value. The exceptions are `batches`, `serials`, and `binLocations`: each one you send replaces that list, so send every entry it should have. One you leave out keeps its current entries. An empty `batches` or `serials` is refused for a batch- or serial-tracked item.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","quantity":"25.00"}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It must belong to the purchase return's legal entity. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It must be greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It can be zero, but not less than zero."},"sourceDocumentLineId":{"type":"string","description":"The identifier of the purchase order line that this line returns goods from. Send the line's unique identifier or its numeric `id`. Required. All lines must belong to the same purchase order. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Defaults to 'PurchaseOrderLine'. Accepted values: 'PurchaseOrderLine'."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned. To identify the batch, send `batchNumberId`. To take this batch from a bin, send the same value in `binLocations[].batchNumber`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch to return, in the item's stocking unit. It must be greater than zero."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being returned. Required when the item is batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned. To identify the unit, send `serialNumberId`. To take this unit from a bin, send the same value in `binLocations[].serialNumber`."}},"additionalProperties":false},"description":"The serialized units being returned, one entry for each unit. Required when the item is serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for. It must match the `batchNumber` of one of the line's batches."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for. It must match the `serialNumber` of one of the line's serials."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins to take the stock on this purchase return line from, with the quantity to take from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["itemId","locationId","quantity"]},"description":"The lines to add to the purchase return."},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the purchase return lines to remove. Format: UUID. Each identifier must be the `id` of a line of this purchase return.","examples":[["d0a7e3b5-2f61-4c98-b704-1a5e9c86d243"]]}},"additionalProperties":false},"getItemTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item type.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"name":{"type":"string","description":"The display name of the item type, for example 'Stocked good'. Two item types cannot share a name.","examples":["Stocked good"]},"description":{"type":"string","description":"A free-form description of the item type.","examples":["Physical goods held in a warehouse"]},"procurable":{"type":"boolean","description":"Whether items of this type can appear on purchase documents.","examples":[true]},"stockable":{"type":"boolean","description":"Whether items of this type hold stock.","examples":[true]},"active":{"type":"boolean","description":"Whether the item type can be chosen for new items.","examples":[true]},"itemCount":{"type":"number","description":"The number of items that name this item type.","examples":[42]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the item type was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the item type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"bulkDeleteReasonCodesOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted reason code."},"code":{"type":"string","description":"The business code the deleted reason code held."}},"additionalProperties":false,"required":["id","code"]},"description":"The deleted reason codes, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteReasonCodesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the reason codes to delete. If any identifier matches nothing or its reason code is still named on a document, nothing is deleted and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkCreateTransferOrdersOutput":{"type":"object","properties":{"transferOrders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order."},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'."},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open."},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order."},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The created transfer orders, in input order. Headers only. Read one in full on GET inventory/warehouse-transfer-orders/:id.","examples":[[{"id":"3f8c0b21-6e57-4d92-a134-8b5e7c2f01a6","documentNumber":"WTO-1044","documentStatus":"DRAFT","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T10:02:41.883Z"}]]}},"additionalProperties":false,"required":["transferOrders"]},"bulkCreateTransferOrdersInput":{"type":"object","properties":{"transferOrders":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity. Defaults to the entity that owns the first line’s warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer order. Defaults to today. Use format YYYY-MM-DD."},"locationId":{"type":"string","description":"The warehouse the goods leave, for the transfer order as a whole. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to, for the transfer order as a whole. See id on GET inventory/warehouses/:id."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"notes":{"type":"string","description":"Free text on the document."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse to draw from, required on a line. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse to deliver to. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line’s unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["itemId","locationId","targetLocationId","quantity"]},"description":"The lines of the transfer order. At least one is required."}},"additionalProperties":false,"required":["lines"]},"description":"The transfer orders to create. All or nothing: if any is rejected, none is created.","examples":[[{"targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","quantity":"12","locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}],"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"}]]}},"additionalProperties":false,"required":["transferOrders"]},"createPositionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created position."}},"additionalProperties":false,"required":["id"]},"createPositionInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the position."},"description":{"type":"string","description":"A free-form description of the position's responsibilities."},"desiredHeadcount":{"type":"number","description":"The target number of people to fill this position."},"expectedSalary":{"type":"number","description":"The expected annual salary for this position, in the entity's currency."},"startDate":{"type":"string","description":"The date the position becomes active. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the position becomes inactive. Use format YYYY-MM-DD. Omit for an open-ended position."},"overtimeStatus":{"enum":["EXEMPT","NON_EXEMPT"],"description":"The overtime eligibility of the position."},"hiringManagerId":{"type":"string","description":"The identifier of the employee who is the hiring manager. See id on GET people/person/:id."},"jobProfileId":{"type":"string","description":"The identifier of the job profile the position is associated with. There is no endpoint for it."},"regionId":{"type":"string","description":"The identifier of the region the position is based in. There is no endpoint for it."}},"additionalProperties":false,"required":["name"]},"voidAdHocDocumentOutput":{"type":"object","properties":{},"additionalProperties":false},"voidAdHocDocumentInput":{"type":"object","properties":{"voidReason":{"type":"string","description":"Why the document is being voided. Required and must not be blank. Stored on the reversing journal entry and in the audit log; no read returns it.","examples":["Issued against the wrong entity"]}},"additionalProperties":false,"required":["voidReason"]},"importDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the document, also when importKey was already used for the same document. See id on GET people/documents.","examples":["5b7e2c91-8a4d-4f36-b1e0-9c2d7a6f3e85"]}},"additionalProperties":false,"required":["id"]},"importDocumentInput":{"type":"object","properties":{"importKey":{"type":"string","description":"A UUID you choose for this document. Sending the same importKey with the same file and values again returns the document already imported instead of creating another.","examples":["6d2b8f3e-1c4a-4e7b-9f05-3a8c2d1e7b64"]},"employeeId":{"type":"string","description":"The identifier of the employee the document belongs to. See id on GET people/person/:id.","examples":["3f2a9c14-6b1d-4f0e-9a52-0c7d8e1b2a34"]},"categoryId":{"type":"string","description":"The identifier of the document category to file the document under. See id on GET people/document-categories.","examples":["8c1e4b27-2d9a-4c63-b0f1-5e7a9d3c6b18"]},"fileName":{"type":"string","description":"The file name to store, with its extension: pdf, tif, tiff, jpg, jpeg or png. Stored as sent, trimmed of surrounding spaces. At most 200 characters, with no path and no control characters.","examples":["EMP-1001_Payslip_2026-12.pdf"]},"mimeType":{"type":"string","description":"The MIME type of the file: 'application/pdf', 'image/png', 'image/jpeg' or 'image/tiff'. Must describe the same format as the extension and the content.","examples":["application/pdf"]},"contentBase64":{"type":"string","description":"The file's bytes, base64-encoded with the standard alphabet and padding. Must be non-empty and well-formed.","examples":["JVBERi0xLjQK"]},"expiryDate":{"type":"string","format":"date","description":"The day the document expires. Format YYYY-MM-DD. Omit for a document that does not expire.","examples":["2027-12-31"]}},"additionalProperties":false,"required":["importKey","employeeId","categoryId","fileName","mimeType","contentBase64"]},"peopleRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the person."},"employeeNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's business number."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's first name."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's last name."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's full name, in first-name-last-name order."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name the person goes by: their preferred first and last name where set, otherwise their legal name. Returned only — it can be neither filtered nor sorted on."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person's work email address."},"status":{"anyOf":[{"enum":["Inactive","Active","Planned","Cancelled"]},{"type":"null"}],"description":"The current employment status of the person."},"employmentCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employment category assigned to this person."},"weeklyWorkingHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The person's standard working hours per week, for example 40 for full time. A number of hours, not an amount."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity the person is employed by."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this person belongs to."},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of this person's work location."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the person record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"documentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the document."},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated document number."},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the employee the document belongs to. Absent when the linked employee no longer resolves. See id on GET people/person/:id."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the document category the document is filed under. Absent when the linked category no longer resolves. See id on GET people/document-categories."},"categoryLabel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display label of the document category the document is filed under. See label on GET people/document-categories."},"fileName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The stored file name, generated on upload from the category label and the employee's name."},"status":{"anyOf":[{"enum":["pending","approved","rejected","deprecated","readyToDownload","downloaded"]},{"type":"null"}],"description":"The current status of the document."},"expiryDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The day the document expires, projected as UTC midnight of that day. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent when the document does not expire."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the document record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"rejectAbsencesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the rejected absences, in the same order as the input."}},"additionalProperties":false,"required":["ids"]},"rejectAbsencesInput":{"type":"object","properties":{"absences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence to reject."}},"additionalProperties":false,"required":["id"]},"description":"The absences to reject."},"approverEmployeeId":{"type":"string","description":"The unique identifier for the employee performing the rejection. Omit to let the platform infer it from the session. See id on GET people/person/:id."}},"additionalProperties":false,"required":["absences"]},"updateAbsenceOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAbsenceInput":{"type":"object","properties":{"editReason":{"type":"string","description":"The reason for the edit. The reason is recorded on the absence's history. If it contains the text 'sick certificate', only leaveCertificate and certificateName are written and every other field in the request is ignored."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"days":{"type":"string","format":"decimal","description":"The number of absence days. May be fractional for partial days."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"absencePolicyId":{"type":"string","description":"The unique identifier of the absence policy to book the absence against instead of its current one. Leave it out to keep the current policy. Must belong to the absence's type (absenceTypeId when sent, otherwise its current type). Ignored for vacation and time off in lieu."},"leaveDescription":{"type":"string","description":"A free-text reason for the absence."},"googleEvent":{"type":"boolean","description":"Whether to mirror this absence to the linked Google Calendar."},"leaveCertificate":{"type":"string","description":"The certificate file content. The certificate is written only when editReason contains the text 'sick certificate'. Sent without that text, it is ignored."},"certificateName":{"type":"string","description":"The file name of the certificate. Written only when editReason contains the text 'sick certificate', like leaveCertificate."}},"additionalProperties":false,"required":["editReason"]},"updateReconciliationInTransitBankTransactionsOutput":{"type":"object","properties":{},"additionalProperties":false},"updateReconciliationInTransitBankTransactionsInput":{"type":"object","properties":{"set":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of bank transactions to flag as in transit. These are bank transaction ids, not in-transit flag ids. Omit or send an empty array to flag nothing.","examples":[["b2f7c418-95a1-4d0e-8a63-7fe0d1c34592"]]},"reset":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of bank transactions whose in-transit flag is to be cleared. Applied before `set`, so an id in both lists ends up flagged. Omit or send an empty array to clear nothing.","examples":[["d4a19f62-0c37-4e85-b2d1-8f6e3a70c9b4"]]},"resetFromDate":{"type":"string","format":"date","description":"When present, each transaction in `reset` also loses its in-transit flag in every later period that carried it forward, from this date on (inclusive). Requires `reset` to be non-empty (RESET_FROM_DATE_WITHOUT_RESET), must not precede this reconciliation's period, and must not reach a completed reconciliation's flags. Format YYYY-MM-DD."}},"additionalProperties":false},"getAbsenceTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence type."},"name":{"type":"string","description":"The name of the absence type."},"category":{"enum":["sickLeave","vacation","other","overtime"],"description":"The category the absence type belongs to."},"description":{"type":"string","description":"A description of the absence type."}},"additionalProperties":false,"required":["id","name","category"]},"runBankRulesOutput":{"type":"object","properties":{"matchedCount":{"type":"number","description":"The number of bank transactions this run matched, across all rules.","examples":[2]},"matchedBankTransactionIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the bank transactions this run matched. Lists at most 500, so use matchedCount for the total.","examples":[["6b87606e-ab22-479b-8b0b-3d79b1c0c611","2683e61d-f4ed-45bf-a3d8-63d81d138edd"]]},"skippedBankRules":{"type":"array","items":{"type":"object","properties":{"bankRuleId":{"type":"string","description":"The unique identifier for the skipped bank rule."},"reason":{"type":"string","description":"Why the rule was skipped. Possible values: 'NO_ACCOUNTS_MAPPED' (the rule applies to no bank accounts), 'RULE_INCOMPLETE' (the rule has no criteria, or does not have exactly one action object), 'RUN_FAILED' (the rule failed while running, for example because every bank account it applies to is deleted or not ready), 'RULE_NOT_ACTIVE' or 'NOT_FOUND' (the rule was deactivated or deleted while the run was in progress)."},"message":{"type":"string","description":"A readable explanation of why the rule was skipped."}},"additionalProperties":false,"required":["bankRuleId","reason","message"]},"description":"The active rules that could not run. The other rules still ran.","examples":[[{"bankRuleId":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7","reason":"RULE_INCOMPLETE","message":"Bank rule BR-00042 cannot be run because it is missing criteria."}]]}},"additionalProperties":false,"required":["matchedCount","matchedBankTransactionIds","skippedBankRules"]},"runBankRulesInput":{"type":"object","properties":{},"additionalProperties":false},"getReconciliationInTransitBankTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the bank transaction. This is the id to pass to PATCH on this path, not the id of the in-transit flag itself."},"bankTransactionNumber":{"type":"string","description":"Human-readable bank transaction number assigned by the platform."},"transactionDate":{"type":"string","format":"date","description":"Date the transaction was created in the bank's own system. Format YYYY-MM-DD."},"amount":{"type":"string","format":"decimal","description":"Transaction amount in the account currency (see currency): positive for money arriving, negative for money leaving."},"currency":{"type":"string","description":"ISO 4217 currency code governing amount."},"payeeOrPayor":{"type":"string","description":"Name of the payee for an outgoing transaction, or the payor for an incoming one, as the bank reported it."},"description":{"type":"string","description":"Description of the transaction: the one it was created with, or else the text from the bank feed."},"automaticallySet":{"type":"boolean","description":"True when the platform carried this transaction forward on its own, false when a person flagged it. PATCH on this path leaves the automatic ones alone."},"nextAccountingPeriodId":{"type":"string","description":"Id (a UUID) of the accounting period the transaction is expected to reach the ledger in. Derived when it was flagged, not chosen."}},"additionalProperties":false,"required":["id"]},"description":"Bank transactions flagged in transit for this reconciliation, oldest first.","examples":[[{"id":"b2f7c418-95a1-4d0e-8a63-7fe0d1c34592","bankTransactionNumber":"BT-004182","transactionDate":"2026-07-28","amount":"-2150.00","currency":"USD","payeeOrPayor":"Cascade Logistics","description":"Freight settlement July","automaticallySet":false,"nextAccountingPeriodId":"6f9a2b1c-3d47-4a80-b5e2-91c8d0374fab"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass back as the `cursor` query parameter for the next page. Absent on the last page, which is how a caller knows to stop."},"hasMore":{"type":"boolean","description":"True when more transactions remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"documentCategoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the document category."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The internal name of the category. Absent when none is set."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display label of the category. Documents filed under this category are named with it as a prefix. Absent when none is set."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A longer description of what belongs in this category. Absent when none is set."},"requestable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an employee may request a document of this category from HR, rather than the category only receiving uploads."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the category record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"createBankRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bank rule.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]}},"additionalProperties":false,"required":["id"]},"createBankRuleInput":{"type":"object","properties":{"rule":{"type":"string","description":"The name of the bank rule. Must be unique within the tenant.","examples":["Stripe payouts"]},"action":{"enum":["createBankEntry","createCreditCardEntry","createFundTransfer"],"description":"What the rule does when a transaction matches. Only these three are implemented; autoMatch is rejected with RULE_ACTION_NOT_SUPPORTED.","examples":["createBankEntry"]},"status":{"enum":["active","inactive"],"description":"The status of the rule. Accepted values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run).","examples":["active"]},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first. A bank transaction matched by one rule is no longer available to the rules after it.","examples":[10]},"description":{"type":"string","description":"A description of the rule.","examples":["Book Stripe payouts to the clearing account"]},"bankAccountIds":{"type":"array","items":{"type":"string"},"description":"The bank accounts or credit card accounts this rule applies to. At least one is required. They must all belong to the same legal entity, and must be all bank accounts or all credit card accounts, not a mix. See id on GET banking/bank-accounts/:id.","examples":[["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]]},"criteria":{"type":"array","items":{"type":"object","properties":{"criteria":{"enum":["amount","description","payeePayor"],"description":"The bank transaction field this criterion tests. Accepted values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty)."},"operator":{"type":"string","description":"How the field is compared with value. When criteria is 'amount', use 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', use 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'."},"logicalOperator":{"enum":["and","or"],"description":"How this criterion combines with the next one. Accepted values: 'and', 'or'. Defaults to 'and'. Ignored on the last criterion. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Ignored when criteriaGroups is sent."},"value":{"type":"string","description":"The value the field is compared with. Cannot be empty. When criteria is 'amount', send a number, for example '-250.00'. Otherwise, send text."},"groupKey":{"type":"string","description":"The key of the criteria group this criterion belongs to. See key on criteriaGroups. Required when criteriaGroups is sent, and left out otherwise."}},"additionalProperties":false,"required":["criteria","operator","value"]},"description":"The conditions a bank transaction must meet for the rule to act on it. At least one is required. They are evaluated in the order given.","examples":[[{"criteria":"description","operator":"containsCaseInsensitive","logicalOperator":"and","value":"STRIPE"}]]},"criteriaGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"A key you choose for the group, unique within this request. Criteria refer to it in groupKey and child groups in parentKey."},"parentKey":{"type":"string","description":"The key of the parent group. Left out for the root group."},"logicalOperator":{"enum":["and","or"],"description":"How the group combines its criteria and child groups. Accepted values: 'and', 'or'."}},"additionalProperties":false,"required":["key","logicalOperator"]},"description":"Optional nested AND/OR groups for the criteria. When sent, exactly one group has no parentKey and is the root, every criterion names its group in groupKey, and each group combines its criteria and child groups with its own logicalOperator. For example, (A and B) or C is a root 'or' group holding C and a child 'and' group holding A and B. When left out, criteria are combined using logicalOperator on each criterion."},"actionObject":{"type":"object","properties":{"accountId":{"type":"string","description":"The account each bank entry or credit card entry posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name given to each bank entry or credit card entry."},"description":{"type":"string","description":"The description set on each bank entry or credit card entry and on its line."},"billableExpense":{"enum":["yes","no"],"description":"Marks the line of each credit card entry as a billable expense when 'yes'. Accepted values: 'yes', 'no'. Applies only to rules with the action 'createCreditCardEntry'."},"businessUnitId":{"type":"string","description":"The business unit set on each bank entry or credit card entry."},"departmentId":{"type":"string","description":"The department set on each bank entry or credit card entry."},"customerId":{"type":"string","description":"The customer set on each credit card entry. Use only when billableExpense is 'yes'. Not applied to bank entries. See id on GET accounting/customers/:id."},"vendorId":{"type":"string","description":"A vendor to save on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id."},"intercompanyPartnerId":{"type":"string","description":"The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account, and ignored otherwise. No endpoint returns intercompany partners."},"valueAllocationTags":{"type":"array","items":{"type":"string"},"description":"The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry."},"taxCodeId":{"type":"string","description":"The tax code set on the line of each bank entry or credit card entry, which fills its VAT amount and VAT account. See lines[].id on GET accounting/tax-configurations/:id. While a business partner is required for VAT, it needs a Vendor or Customer tag in valueAllocationTags that a run applies (value allocation tags turned on and that dimension enabled for the entry type), or the request fails with BUSINESS_PARTNER_REQUIRED."},"fromAccountId":{"type":"string","description":"[fk: AccountApi.accounts.id] createFundTransfer only. Source cash account of the transfer, given as its id (a UUID). Required for createFundTransfer."},"toAccountId":{"type":"string","description":"[fk: AccountApi.accounts.id] createFundTransfer only. Destination cash account of the transfer, given as its id (a UUID). Required for createFundTransfer, and must differ from fromAccountId."},"fromLineDescription":{"type":"string","description":"createFundTransfer only. Description stamped on the transfer's From line."},"toLineDescription":{"type":"string","description":"createFundTransfer only. Description stamped on the transfer's To line."},"intercompanyProcessId":{"type":"string","description":"[fk: IntercompanyProcessApi.intercompanyProcesses.id] createFundTransfer only, given as its id (a UUID). Required when the two accounts belong to different legal entities."},"transferReason":{"enum":["funding","repayment"],"description":"createFundTransfer only. Required when the two accounts belong to different legal entities."},"intercompanyTransactionalCurrency":{"type":"string","description":"createFundTransfer only. Currency the intercompany balance is carried in. Required when the two accounts belong to different legal entities."},"fromFeeToleranceType":{"enum":["percentage","fixedAmount"],"description":"createFundTransfer only. Whether the sending-side bank fee tolerance is read as a percentage or a fixed amount."},"fromFeeToleranceValue":{"type":"string","format":"decimal","description":"createFundTransfer only. Sending-side tolerance; a shortfall up to this much is booked as a bank fee, beyond it the two transactions are not paired. Left unset, the amounts must match exactly."},"toFeeToleranceType":{"enum":["percentage","fixedAmount"],"description":"createFundTransfer only. Whether the receiving-side bank fee tolerance is read as a percentage or a fixed amount."},"toFeeToleranceValue":{"type":"string","format":"decimal","description":"createFundTransfer only. Receiving-side tolerance; a shortfall up to this much is booked as a bank fee, beyond it the two transactions are not paired. Left unset, the amounts must match exactly."}},"additionalProperties":false,"description":"The values for the bank entry or credit card entry the rule creates for each bank transaction that meets its criteria. All of its fields are optional.","examples":[{"accountId":"6d1e4b27-8a90-4c31-b5f2-7e8a9c0d1b23","name":"Stripe payout","description":"Auto-created by rule"}]}},"additionalProperties":false,"required":["rule","action","status","priority","bankAccountIds","criteria","actionObject"]},"downloadDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the document the link points at."},"fileName":{"type":"string","description":"The stored file name of the document. Save the downloaded bytes under it."},"mimeType":{"type":"string","description":"The MIME type of the stored file. Absent when storage does not report one."},"fileSizeBytes":{"type":"number","description":"The size of the stored file in bytes. Absent when storage does not report one."},"downloadUrl":{"type":"string","description":"A short-lived pre-signed URL the file's bytes are fetched from. It expires and is not a stable link."}},"additionalProperties":false,"required":["id","fileName","downloadUrl"]},"getTeamOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team."},"teamNumber":{"type":"string","description":"The system-generated team number. Absent while none has been assigned."},"name":{"type":"string","description":"The name of the team."},"teamType":{"enum":["hrTeam","psaTeam"],"description":"The type of the team."},"status":{"enum":["planned","active","inactive"],"description":"The status of the team, derived from its dates. 'planned' before the start date, 'active' between the dates, 'inactive' after the end date."},"startDate":{"type":"string","description":"The first day the team exists. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The last day the team exists. Format YYYY-MM-DD. Absent for a team with no planned end."},"employeeCount":{"type":"number","description":"The number of active members of the team."},"parentId":{"type":"string","description":"The identifier of the parent team. Absent for a top-level team. See id on GET people/teams/:id."},"parentName":{"type":"string","description":"The name of the parent team. Absent for a top-level team."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the team record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"departmentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the department."},"departmentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated department number, for example '100010'. Absent while none has been assigned."},"departmentCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code for the department, for example 'IT', 'HR' or 'FIN'."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the parent department. Absent for a top-level department. See id on GET people/departments/:id."},"name":{"type":"string","description":"The display name of the department."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the department's purpose and responsibilities."},"managerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the department's managing employee. Absent when no manager is assigned."},"status":{"anyOf":[{"enum":["planned","inactive","active","canceled"]},{"type":"null"}],"description":"The timeline status of the department."},"employeeCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of employees in the department."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the department record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getDepartmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the department."},"departmentNumber":{"type":"string","description":"The system-generated department number, for example '100010'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the department."},"departmentCode":{"type":"string","description":"The short code for the department, for example 'IT', 'HR' or 'FIN'."},"description":{"type":"string","description":"A free-form description of the department's purpose and responsibilities."},"managerId":{"type":"string","description":"The identifier of the managing employee. Absent when no manager is assigned. See id on GET people/person/:id."},"managerName":{"type":"string","description":"The full name of the managing employee. Absent when no manager is assigned."},"parentId":{"type":"string","description":"The identifier of the parent department. Absent for a top-level department. See id on GET people/departments/:id."},"parentName":{"type":"string","description":"The display name of the parent department. Absent for a top-level department."},"status":{"type":"string","description":"The timeline status of the department. Possible values: 'planned', 'inactive', 'active', 'canceled'."},"startDate":{"type":"string","description":"The date the department becomes active. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the department becomes inactive. Format YYYY-MM-DD. Absent for an open-ended department."},"employeeCount":{"type":"number","description":"The number of employees in the department."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the department record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteDepartmentId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The department's identifiers in other systems, one per configured field name. An empty array or absent when the department has none."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"getPositionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position."},"positionNumber":{"type":"string","description":"The system-generated position number, for example 'POS-100010'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the position."},"description":{"type":"string","description":"A free-form description of the position's responsibilities. Absent when none is set."},"desiredHeadcount":{"type":"number","description":"The target number of people to fill this position."},"employeeCount":{"type":"number","description":"The number of employees currently in this position."},"expectedSalary":{"type":"number","description":"The expected annual salary for this position, in the entity's currency."},"overtimeStatus":{"type":"string","description":"The overtime eligibility of the position. Possible values: 'EXEMPT', 'NON_EXEMPT'."},"status":{"type":"string","description":"The fill status of the position. Possible values: 'unfilled', 'partiallyFilled', 'filled', 'overfilled', 'inactive'."},"timelineStatus":{"type":"string","description":"The timeline status of the position. Possible values: 'planned', 'inactive', 'active', 'canceled'."},"startDate":{"type":"string","description":"The date the position becomes active. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the position becomes inactive. Format YYYY-MM-DD. Absent for an open-ended position."},"hiringManagerId":{"type":"string","description":"The identifier of the hiring manager. Absent when none is assigned. See id on GET people/person/:id."},"hiringManagerName":{"type":"string","description":"The full name of the hiring manager. Absent when none is assigned."},"jobProfileId":{"type":"string","description":"The identifier of the associated job profile. Absent when none is assigned. There is no endpoint for it."},"jobProfileName":{"type":"string","description":"The name of the associated job profile. Absent when none is assigned."},"regionId":{"type":"string","description":"The identifier of the region the position is based in. Absent when none is assigned. There is no endpoint for it."},"regionName":{"type":"string","description":"The name of the region the position is based in. Absent when none is assigned."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the position record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"searchBankRuleOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank rule."},"bankRuleNumber":{"type":"string","description":"The bank rule number. Example: 'BR-000014'."},"rule":{"type":"string","description":"The name of the bank rule. Unique within the tenant."},"action":{"type":"string","description":"What the rule creates for each bank transaction that meets its criteria. Possible values: 'createBankEntry' (a bank entry), 'createCreditCardEntry' (a credit card entry)."},"status":{"type":"string","description":"The status of the rule. Possible values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run), 'draft' (a rule proposed by the Bank Rules Advisor, which does not run until it is activated)."},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first."},"description":{"type":"string","description":"A description of the rule."},"externalId":{"type":"string","description":"The bank rule's identifier in an external system, if provided."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank rule last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the criterion."},"criteria":{"type":"string","description":"The bank transaction field this criterion tests. Possible values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty)."},"operator":{"type":"string","description":"How the field is compared with value. When criteria is 'amount', it is 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', it is 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'."},"logicalOperator":{"type":"string","description":"How this criterion combines with the next one. Possible values: 'and', 'or'. When absent, 'and' applies. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Not used when the rule has criteria groups."},"value":{"type":"string","description":"The value the field is compared with. A number when criteria is 'amount', and text otherwise."},"groupKey":{"type":"string","description":"The key of the criteria group this criterion belongs to. See key on criteriaGroups. Absent when the rule has no criteria groups."}},"additionalProperties":false,"required":["id","criteria","operator","value"]},"description":"The conditions a bank transaction must meet, in the order they are evaluated. Rules created or updated through the API always have at least one."},"criteriaGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The group's identifier, referenced by groupKey on criteria and by parentKey on child groups."},"parentKey":{"type":"string","description":"The key of the parent group. Absent on the root group."},"logicalOperator":{"type":"string","description":"How the group combines its criteria and child groups. Possible values: 'and', 'or'."}},"additionalProperties":false,"required":["key","logicalOperator"]},"description":"The nested AND/OR groups of the rule's criteria. Empty when the rule combines its criteria with logicalOperator on each criterion. When present, exactly one group has no parentKey and is the root."},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account mapping."},"bankAccountId":{"type":"string","description":"The unique identifier for the bank account. See id on GET banking/bank-accounts/:id."},"accountName":{"type":"string","description":"The name of the bank account."}},"additionalProperties":false,"required":["id","bankAccountId"]},"description":"The bank accounts or credit card accounts this rule applies to. Rules created or updated through the API always have at least one. They all belong to the same legal entity, and are all bank accounts or all credit card accounts."},"actionObject":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the action object."},"accountId":{"type":"string","description":"The account each bank entry or credit card entry posts to. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name given to each bank entry or credit card entry."},"description":{"type":"string","description":"The description set on each bank entry or credit card entry and on its line."},"billableExpense":{"type":"string","description":"Marks the line of each credit card entry as a billable expense when 'yes'. Possible values: 'yes', 'no'."},"businessUnitId":{"type":"string","description":"The business unit set on each bank entry or credit card entry."},"departmentId":{"type":"string","description":"The department set on each bank entry or credit card entry."},"customerId":{"type":"string","description":"The customer set on each credit card entry. Not applied to bank entries. See id on GET accounting/customers/:id."},"vendorId":{"type":"string","description":"The vendor saved on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id."},"intercompanyPartnerId":{"type":"string","description":"The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account. No endpoint returns intercompany partners."},"valueAllocationTags":{"type":"array","items":{"type":"string"},"description":"The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry."},"taxCodeId":{"type":"string","description":"The tax code set on the line of each bank entry or credit card entry. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["id"],"description":"The values for the bank entry or credit card entry the rule creates for each bank transaction that meets its criteria. Absent when the rule has no action object, and such a rule is skipped when bank rules run."}},"additionalProperties":false,"required":["id","rule","action","status","priority","lastModifiedDate","criteria","criteriaGroups","accounts"]},"description":"The bank rules on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7","bankRuleNumber":"BR-000014","rule":"Stripe payouts","action":"createBankEntry","status":"active","priority":10,"lastModifiedDate":"2026-08-27T09:15:22.000Z","criteria":[],"criteriaGroups":[],"accounts":[]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchBankRuleInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the bank rule with this identifier. The match is exact."},"rule":{"type":"string","description":"Limits results to the bank rule with this name. The match is exact."},"action":{"type":"string","description":"Limits results to bank rules with this action. Accepted values: 'createBankEntry', 'createCreditCardEntry'. Any other value matches nothing."},"status":{"type":"string","description":"Limits results to bank rules with this status. Accepted values: 'active', 'inactive', 'draft'. Any other value matches nothing."}},"additionalProperties":false,"description":"The filters to apply. A bank rule must match every filter sent. Omit to return all bank rules.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of bank rules per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":25}]}},"additionalProperties":false},"getRecruitmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the recruitment."},"recruitmentNumber":{"type":"string","description":"The system-generated recruitment number. Absent while none has been assigned."},"name":{"type":"string","description":"The name of the opening."},"category":{"type":"string","description":"A free-text category of the opening, for example internal, external or student."},"status":{"enum":["active","inactive"],"description":"The status of the opening, derived from the deadline. 'inactive' once the deadline has passed, 'active' otherwise, including when no deadline is set."},"published":{"type":"boolean","description":"Whether the opening is published externally. It is set by the external-publishing flow, not through this API."},"unsolicited":{"type":"boolean","description":"Whether this is the catch-all opening that unsolicited applications are filed against."},"deadline":{"type":"string","description":"The application deadline. Format YYYY-MM-DD. Absent when no deadline is set."},"vacancies":{"type":"number","description":"The number of vacant positions the opening covers."},"departmentId":{"type":"string","description":"The identifier of the department the opening belongs to. Absent when not set. See id on GET people/departments/:id."},"departmentName":{"type":"string","description":"The name of the department. Absent when not set."},"positionId":{"type":"string","description":"The identifier of the position being recruited for. Absent when not set. See id on GET people/positions/:id."},"positionName":{"type":"string","description":"The name of the position. Absent when not set."},"teamId":{"type":"string","description":"The identifier of the team. Absent when none is assigned. See id on GET people/teams/:id."},"teamName":{"type":"string","description":"The name of the team. Absent when none is assigned."},"locationId":{"type":"string","description":"The identifier of the work location. Absent when none is assigned. There is no endpoint for it."},"locationName":{"type":"string","description":"The name of the work location. Absent when none is assigned."},"entityId":{"type":"string","description":"The legal entity that will employ the hire. Absent when none is assigned."},"entityName":{"type":"string","description":"The name of the legal entity that will employ the hire. Absent when none is assigned."},"employmentCategoryId":{"type":"string","description":"The identifier of the employment category. Absent when none is assigned. There is no endpoint for it."},"hiringManagerId":{"type":"string","description":"The identifier of the hiring manager. Absent when none is assigned. See id on GET people/person/:id."},"hiringManagerName":{"type":"string","description":"The full name of the hiring manager. Absent when none is assigned."},"ownerId":{"type":"string","description":"The identifier of the recruitment owner, the recruiter. Absent when none is assigned. See id on GET people/person/:id."},"ownerName":{"type":"string","description":"The full name of the recruitment owner. Absent when none is assigned."},"jobDescription":{"type":"string","description":"The job description, as plain text."},"viabilityCriteria":{"type":"string","description":"The internal viability criteria used to screen applicants, as plain text."},"website":{"type":"string","description":"The URL of the posting or the hiring team's page."},"relocationRequired":{"type":"string","description":"Whether and how relocation is required. Free text, not a boolean."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the recruitment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"bankRulesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank rule."},"bankRuleNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank rule number. Example: 'BR-000014'."},"rule":{"type":"string","description":"The name of the bank rule. Unique within the tenant."},"action":{"type":"string","description":"What the rule creates for each bank transaction that meets its criteria. Possible values: 'createBankEntry' (a bank entry), 'createCreditCardEntry' (a credit card entry)."},"status":{"enum":["active","inactive","draft"],"description":"The status of the rule. An active rule runs whenever bank rules run, an inactive rule is kept but does not run, and a draft rule was proposed by the Bank Rules Advisor and does not run until it is activated."},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the rule."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank rule last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"positionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position."},"positionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated position number, for example 'POS-100010'. Absent while none has been assigned."},"name":{"type":"string","description":"The display name of the position."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the position's responsibilities. Absent when none is set."},"desiredHeadcount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The target number of people to fill this position."},"employeeCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of employees currently in this position."},"expectedSalary":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The expected annual salary for this position, in the entity's currency."},"hiringManagerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the hiring manager. Absent when none is assigned."},"overtimeStatus":{"anyOf":[{"enum":["EXEMPT","NON_EXEMPT"]},{"type":"null"}],"description":"The overtime eligibility of the position."},"status":{"anyOf":[{"enum":["unfilled","filled","overfilled","inactive","partiallyFilled"]},{"type":"null"}],"description":"The fill status of the position."},"timelineStatus":{"anyOf":[{"enum":["planned","inactive","active","canceled"]},{"type":"null"}],"description":"The timeline status of the position."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the position record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"fixedAssetTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the fixed asset type — the public identifier of this record.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]},"name":{"type":"string","description":"Display name of the fixed asset type, e.g. 'Machinery'. Filterable and orderable by exact match — a type name is a configuration label, not identifying data, so unlike most name fields it is admitted to the query string. There is no free-text matching on it.","examples":["Machinery"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the type is usable for business users. A type is deactivated rather than deleted once assets reference it, so this collection carries both; filter it to populate a picker. Absent on legacy rows that predate the column, which should be read as active.","examples":[true]},"defaultUsefulLife":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Number of depreciation periods a new asset of this type inherits as its useful life. A whole COUNT of periods, not an amount and not a duration: the depreciation interval that gives it units (monthly, quarterly, yearly) lives on the asset, so this number alone does not say whether it means months or years. Absent when the type sets no default.","examples":[60]},"groupId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Platform id (a UUID) of the FixedAssetTypeGroup this type belongs to. Absent on an ungrouped type. That group may itself have a parent group, which this API does not walk.","examples":["2e8c14a9-6b73-4f52-9d01-8a3f7e0c5b26"]},"groupName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the group named by groupId, carried alongside it so the common grouping needs no second call. Returned but NOT filterable or orderable — filter groupId instead, so one question has one answer. Absent whenever groupId is.","examples":["Plant and Equipment"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset type record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filterable and orderable together, which is what makes filter[lastModifiedDate][gte] plus sort=lastModifiedDate a complete incremental-sync cursor. NOTE it tracks the FixedAssetType row only: renaming the group a type belongs to does not move it.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"landedCostItemsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost item. Format: UUID.","examples":["9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. Absent when the landed cost item covers only an account. See `id` on GET inventory/items/:id (getItem).","examples":["3d81e07c-95a2-4f63-b1c8-27e5a94d0b36"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["SVC-FREIGHT"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`.","examples":["Inbound freight"]},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. Absent when the landed cost item covers only an item. See `id` on GET accounting/accounts/:id (getAccount)."},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the account in `accountId`."},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the account in `accountId`."},"allocationMode":{"anyOf":[{"enum":["Quantity","LineTotal","Weight","Volume","Equal"]},{"type":"null"}],"description":"How a charge is spread (allocated) over the receipt lines.","examples":["Weight"]},"costingElementTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type. Absent when the landed cost item has none.","examples":["c4a90e21-7b35-4d18-9e02-6f13a85c7d40"]},"costingElementTypeCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the costing element type in `costingElementTypeId`.","examples":["FRT"]},"costingElementTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the costing element type in `costingElementTypeId`.","examples":["Freight"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the landed cost item is active.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the landed cost item was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-01T11:02:19.880Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the landed cost item last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"createDepreciationPolicyOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created depreciation policy.","examples":["b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5"]}},"additionalProperties":false,"required":["id"]},"createDepreciationPolicyInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the depreciation policy. Unique within the tenant; a name another policy has fails with DUPLICATE_POLICY_NAME. Not blank.","examples":["Office Equipment — 5 Year Straight Line"]},"description":{"type":"string","description":"A description of the depreciation policy. An empty string is treated as absent.","examples":["Standard straight-line write-down for office equipment over five years."]},"depreciationMethod":{"enum":["StraightLine","Degressive","Immediate","Bypassed"],"description":"The method used to spread depreciation over an asset's useful life. Fixed assets of the policy's types take this method when they are set up.","examples":["StraightLine"]},"depreciationConvention":{"enum":["FullMonth","MidMonth","MidYear","SixMonthRule","ProrateFirstLast","ActualDays"],"description":"How the method treats time. Required for 'StraightLine' (any value) and 'Degressive' (only 'FullMonth'); leave it out for 'Immediate' and 'Bypassed', which take none.","examples":["FullMonth"]},"depreciationInterval":{"enum":["Monthly","Quarterly","Yearly"],"description":"The length of each depreciation period.","examples":["Monthly"]},"bookId":{"type":"string","description":"The accounting book the depreciation policy applies to. See id on GET accounting/books/:id.","examples":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]},"assetAccountId":{"type":"string","description":"The balance sheet account that holds the cost of fixed assets under this policy. See id on GET accounting/accounts/:id.","examples":["3a5f81c6-9d24-4b70-8e15-6c2b7f094d38"]},"accumulatedDepreciationAccountId":{"type":"string","description":"The accumulated depreciation account, a contra-asset account. Recording depreciation credits this account. See id on GET accounting/accounts/:id.","examples":["9e14d7b2-6c83-4f51-a027-8d3b5e199c61"]},"depreciationExpenseAccountId":{"type":"string","description":"The depreciation expense account. Recording depreciation debits this account. See id on GET accounting/accounts/:id.","examples":["5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5"]},"gainAccountId":{"type":"string","description":"The account for gains when an asset under this policy is sold for more than its net book value. On most books it is the same account as lossAccountId. See id on GET accounting/accounts/:id.","examples":["8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04"]},"lossAccountId":{"type":"string","description":"The account for losses when an asset under this policy is disposed of. See id on GET accounting/accounts/:id.","examples":["2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a"]},"entityIds":{"type":"array","items":{"type":"string"},"description":"The legal entities the depreciation policy is set up for, each at most once. See id on GET base/entities. Defaults to none.","examples":[["e3a9c2d1-4b5f-4d6e-8a7b-9c0d1e2f3a4b"]]},"rules":{"type":"array","items":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string","description":"The fixed asset type the rule applies to."},"code":{"type":"string","description":"A free-text code for the rule. An empty string is treated as absent."},"usefulLife":{"type":"number","description":"The useful life of fixed assets of the type, a whole number of at least 1, counted in `usefulLifeDurationType` units. Required for 'year' and 'month' (MISSING_DEPRECIATION_POLICY_USEFUL_LIFE); refused with FIELD_NOT_APPLICABLE for 'custom'."},"usefulLifeDurationType":{"enum":["year","month","custom"],"description":"The unit of `usefulLife`. With 'custom', each fixed asset sets its own depreciation end date; it cannot be combined with the 'MidYear' or 'SixMonthRule' convention."},"minimumAmount":{"type":"string","format":"decimal","description":"The capitalization threshold, in the rule's currency (see `currency`). Not negative."},"currency":{"type":"string","description":"The ISO 4217 code of the currency `minimumAmount` is in. Must be a currency the tenant defines."},"belowThresholdDepreciationMethod":{"enum":["capitalizeAndDepreciateUsefulLife","capitalizeAndDepreciateImmediately","expense"],"description":"How a fixed asset below the capitalization threshold is treated: 'capitalizeAndDepreciateUsefulLife' (depreciated over the useful life like any other), 'capitalizeAndDepreciateImmediately' (depreciated in full in the first period), 'expense' (not depreciated)."},"available":{"type":"boolean","description":"Whether the rule can be used for new fixed assets. Defaults to true."}},"additionalProperties":false,"required":["fixedAssetTypeId","usefulLifeDurationType","minimumAmount","currency","belowThresholdDepreciationMethod"]},"description":"The depreciation rules: at least one, and at most one per fixed asset type.","examples":[[{"fixedAssetTypeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","usefulLife":5,"usefulLifeDurationType":"year","minimumAmount":"500","currency":"USD","belowThresholdDepreciationMethod":"expense"}]]}},"additionalProperties":false,"required":["name","depreciationMethod","depreciationInterval","bookId","assetAccountId","accumulatedDepreciationAccountId","depreciationExpenseAccountId","gainAccountId","lossAccountId","rules"]},"updateInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned.","examples":["INC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory increase.","examples":["August cycle count, recounted"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:40:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth, and unitPrice is calculated from it as lineValue divided by quantity. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit, when one was recorded. Format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"150.00","inventoryQuantity":"150.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"150.00","inventoryQuantity":"150.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"150.00","inventoryQuantity":"150.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"updateInventoryIncreaseInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"A new document date. It sets the posting period. Use format YYYY-MM-DD."},"reasonCodeId":{"type":"string","description":"A new reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it.","examples":["August cycle count, recounted"]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of lines to remove. Applied before updateLines and createLines."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line belonging to another inventory increase is rejected, not skipped."},"itemId":{"type":"string","description":"A new item for the line. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"A new unit for the line's quantity. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, in the line's unit. Greater than zero when given."},"unitPrice":{"type":"string","format":"decimal","description":"A new unit value, in the inventory increase's currency. Greater than zero when given. On a line valued by lineValue, a price equal to the one calculated from it (lineValue divided by the quantity as it will be stored after this update, at the currency's precision) changes nothing and the line keeps its lineValue; any other price becomes the line's valuation source and lineValue is cleared."},"notes":{"type":"string","description":"New free text. Pass an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the batch."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Use format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch, in the line's unit. The batch quantities of a line must add up to the line's quantity."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches making up this line's quantity. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Sending this array replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the unit."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit. Use format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false},"description":"The serialized units, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Sending this array replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity lands in. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number not on the line is rejected."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line. Sending this array replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, each addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","quantity":"150.00","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"150.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"150.00","batchNumber":"LOT-2026-08-14"}]}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency. Greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the batch."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Use format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch, in the line's unit. The batch quantities of a line must add up to the line's quantity."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches making up this line's quantity. Required for a batch-tracked item, and the quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the unit."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit. Use format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false},"description":"The serialized units, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity lands in. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number not on the line is rejected."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity","unitPrice"]},"description":"The lines to add. They land at the inventory increase's existing warehouse. A document with no lines cannot take new ones."}},"additionalProperties":false},"depreciationPoliciesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation policy.","examples":["b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5"]},"depreciationPolicyNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation policy number. Unique within the tenant. Example: 'DP-0007'.","examples":["DP-0007"]},"name":{"type":"string","description":"The name of the depreciation policy. Unique within the tenant.","examples":["Office Equipment — 5 Year Straight Line"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the depreciation policy.","examples":["Standard straight-line write-down for office equipment over five years."]},"depreciationMethod":{"enum":["StraightLine","Degressive","Immediate","Bypassed"],"description":"The method used to spread depreciation over an asset's useful life. When a fixed asset of one of these types is set up, it takes this method. The method can then be changed on the fixed asset. Possible values: 'StraightLine' (equal amounts each period), 'Degressive' (declining balance at the fixed asset's annual `degressionRate`, switching to straight line when that gives a higher amount), 'Immediate' (the whole depreciable amount in the first period), 'Bypassed' (no depreciation schedule is created). How the method treats time is `depreciationConvention`.","examples":["StraightLine"]},"depreciationConvention":{"anyOf":[{"enum":["FullMonth","MidMonth","MidYear","SixMonthRule","ProrateFirstLast","ActualDays"]},{"type":"null"}],"description":"How the method treats time: how the first and last periods are measured and how an amount is spread across periods. FullMonth: the in-service month counts as a full month, and every period takes an equal share. MidMonth: in service on or before the 15th, the full first month; after the 15th, depreciation starts the following month. MidYear: year one and the year after the useful life each take half the annual amount. SixMonthRule: the full annual amount in year one when in service more than six months of the fiscal year, otherwise half of it. ProrateFirstLast: the partial first and last periods are prorated by days. ActualDays: every period is weighted by its actual number of days. Present for 'StraightLine' (any value) and 'Degressive' (only 'FullMonth'); absent for 'Immediate' and 'Bypassed', which take none.","examples":["FullMonth"]},"depreciationInterval":{"enum":["Monthly","Quarterly","Yearly"],"description":"The length of each depreciation period.","examples":["Monthly"]},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting book the depreciation policy applies to. A policy applies to one book only, so each book needs its own policies. See id on GET accounting/books/:id. Absent when the book no longer exists.","examples":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]},"assetAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The balance sheet account that holds the cost of fixed assets under this policy. Disposing of a fixed asset credits its acquisition value to this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["3a5f81c6-9d24-4b70-8e15-6c2b7f094d38"]},"accumulatedDepreciationAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accumulated depreciation account, a contra-asset account. Recording depreciation credits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["9e14d7b2-6c83-4f51-a027-8d3b5e199c61"]},"depreciationExpenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation expense account. Recording depreciation debits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5"]},"gainAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account for gains when an asset under this policy is sold for more than its net book value. It is used only on books that keep gains and losses in separate accounts, such as HGB books. On such a sale, the asset's net book value and the sale amount go to this account. If the fixed asset has a `revenueAccountId`, the sale amount goes there instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04"]},"lossAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account for losses when an asset under this policy is disposed of. The asset's net book value goes to this account. On a sale, the sale amount also goes here, unless the fixed asset has a `revenueAccountId`. On books that keep gains and losses in separate accounts, a sale for more than the net book value goes to `gainAccountId` instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a"]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the depreciation policy is active. Only active policies are offered when a fixed asset type is chosen for a fixed asset. Depreciation already scheduled under an inactive policy is still recorded.","examples":[true]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation policy last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.000Z"]}},"additionalProperties":false},"updateFixedAssetTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"updateFixedAssetTypeInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the fixed asset type. Omit to leave unchanged. Leading and trailing spaces are removed; must not be blank. Not required to be unique.","examples":["Heavy machinery"]},"groupId":{"type":"string","description":"Platform id (a UUID) of the FixedAssetTypeGroup the type belongs to — the groupId GET fixed-asset-types/:id returns. Omit to leave unchanged; send an empty string to make the type ungrouped."},"defaultUsefulLife":{"type":"number","description":"Default useful life, in months, that a depreciation policy rule for this type is pre-filled with. A whole number from 1 to 2147483647. Omit to leave unchanged. It cannot be cleared here, only changed. Fixed assets already created keep the useful life they have.","examples":[84]},"bookIds":{"type":"array","items":{"type":"string"},"description":"Platform ids (UUIDs) of the accounting books the type is in — the whole set, not the change. See id on GET accounting/books/:id. At least one; a book you add must be a full book (not an adjustment book). Omit to leave the books unchanged; a type that is in no book (possible only for types that predate this rule) must be sent bookIds, or the request fails with AT_LEAST_ONE_BOOK_REQUIRED. Removing a book a depreciation policy covers for this type needs confirmBookRemoval."},"confirmBookRemoval":{"type":"boolean","description":"Set to true to accept the depreciation policy changes that removing a book causes; see BOOK_REMOVAL_AFFECTS_DEPRECIATION_POLICIES. Only together with bookIds. Omit or send false to have such a request refused instead."}},"additionalProperties":false},"bulkDeleteTransferOrdersOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the deleted transfer orders, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteTransferOrdersInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the transfer orders to delete. All or nothing: if any is missing or is not 'DRAFT', none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"batchTransactionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch transaction. Format: UUID.","examples":["6d2b8e17-4f90-4c53-a821-0e7d3b95c46f"]},"batchNumberId":{"type":"string","description":"The unique identifier of the batch this transaction is for. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber).","examples":["9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9"]},"batchNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse. Example: 'LOT-2026-08-14'.","examples":["LOT-2026-08-14"]},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the batch expires. It shows the batch's current value, not the value at the time of the batch transaction. Format: YYYY-MM-DD.","examples":["2027-08-14"]},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the inventory transaction this batch transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction).","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`.","examples":["Standard widget"]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"unitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit of measure the batch transaction was recorded in. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the unit of measure in `unitId`."},"transactionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the inventory transaction this batch transaction belongs to. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the batch that came into stock, in the item's stocking unit. It is 0 on an inventory revaluation, which changes the batch's cost without moving stock.","examples":["500.00"]},"outQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the batch that went out of stock, in the item's stocking unit."},"unitInQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that came into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit."},"unitOutQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that went out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"cost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The unit cost of the batch, in the currency named by `currency`. When stock comes in, it is the unit cost of the stock received. When stock goes out, it is the batch's unit cost at that time. On an inventory revaluation, it is the batch's new unit cost.","examples":["3.75"]},"valueDelta":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The change in the total value of the batch's stock from this transaction, in the currency named by `currency`. A negative value is a decrease.","examples":["1875.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency that `cost` and `valueDelta` are in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"anyOf":[{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"]},{"type":"null"}],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"sourceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the batch transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the batch itself, such as its `expirationDate`, do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false},"createUnitOfMeasureOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createUnitOfMeasureInput":{"type":"object","properties":{"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. Required. It must be unique within the tenant.","examples":["KG"]},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'.","examples":["Kilogram"]}},"additionalProperties":false,"required":["unitCode","unitName"]},"getDepreciationPolicyOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation policy.","examples":["b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5"]},"depreciationPolicyNumber":{"type":"string","description":"The depreciation policy number. Unique within the tenant. Example: 'DP-0007'.","examples":["DP-0007"]},"name":{"type":"string","description":"The name of the depreciation policy. Unique within the tenant.","examples":["Office Equipment — 5 Year Straight Line"]},"description":{"type":"string","description":"A description of the depreciation policy.","examples":["Standard straight-line write-down for office equipment over five years."]},"depreciationMethod":{"type":"string","description":"The method used to spread depreciation over an asset's useful life. When a fixed asset of one of these types is set up, it takes this method. The method can then be changed on the fixed asset. Possible values: 'StraightLine' (equal amounts each period), 'Degressive' (declining balance at the fixed asset's annual `degressionRate`, switching to straight line when that gives a higher amount), 'Immediate' (the whole depreciable amount in the first period), 'Bypassed' (no depreciation schedule is created). How the method treats time is `depreciationConvention`.","examples":["StraightLine"]},"depreciationConvention":{"type":"string","description":"How the method treats time: how the first and last periods are measured and how an amount is spread across periods. Possible values: 'FullMonth' (the in-service month counts as a full month; every period takes an equal share), 'MidMonth' (in service on or before the 15th: the full first month; after the 15th: depreciation starts the following month), 'MidYear' (year one and the year after the useful life each take half the annual amount), 'SixMonthRule' (the full annual amount in year one when in service more than six months of the fiscal year, otherwise half of it), 'ProrateFirstLast' (the partial first and last periods are prorated by days), 'ActualDays' (every period is weighted by its actual number of days). Present for 'StraightLine' (any value) and 'Degressive' (only 'FullMonth'); absent for 'Immediate' and 'Bypassed', which take none.","examples":["FullMonth"]},"depreciationInterval":{"type":"string","description":"The length of each depreciation period. Possible values: 'Monthly', 'Quarterly', 'Yearly'.","examples":["Monthly"]},"bookId":{"type":"string","description":"The accounting book the depreciation policy applies to. A policy applies to one book only, so each book needs its own policies. See id on GET accounting/books/:id. Absent when the book no longer exists.","examples":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]},"assetAccountId":{"type":"string","description":"The balance sheet account that holds the cost of fixed assets under this policy. Disposing of a fixed asset credits its acquisition value to this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["3a5f81c6-9d24-4b70-8e15-6c2b7f094d38"]},"accumulatedDepreciationAccountId":{"type":"string","description":"The accumulated depreciation account, a contra-asset account. Recording depreciation credits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["9e14d7b2-6c83-4f51-a027-8d3b5e199c61"]},"depreciationExpenseAccountId":{"type":"string","description":"The depreciation expense account. Recording depreciation debits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5"]},"gainAccountId":{"type":"string","description":"The account for gains when an asset under this policy is sold for more than its net book value. It is used only on books that keep gains and losses in separate accounts, such as HGB books. On such a sale, the asset's net book value and the sale amount go to this account. If the fixed asset has a `revenueAccountId`, the sale amount goes there instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04"]},"lossAccountId":{"type":"string","description":"The account for losses when an asset under this policy is disposed of. The asset's net book value goes to this account. On a sale, the sale amount also goes here, unless the fixed asset has a `revenueAccountId`. On books that keep gains and losses in separate accounts, a sale for more than the net book value goes to `gainAccountId` instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists.","examples":["2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a"]},"active":{"type":"boolean","description":"Whether the depreciation policy is active. Only active policies are offered when a fixed asset type is chosen for a fixed asset. Depreciation already scheduled under an inactive policy is still recorded.","examples":[true]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation policy last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.000Z"]},"entityIds":{"type":"array","items":{"type":"string"},"description":"The legal entities the depreciation policy is set up for. The policy applies to fixed assets of these legal entities only. See id on GET base/entities. Absent or empty when the policy is set up for no legal entity.","examples":[["e3a9c2d1-4b5f-4d6e-8a7b-9c0d1e2f3a4b"]]},"rules":{"type":"array","items":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string","description":"The fixed asset type the rule applies to. Unique within the depreciation policy."},"code":{"type":"string","description":"A free-text code for the rule."},"usefulLife":{"type":"number","description":"The useful life of fixed assets of the type, counted in `usefulLifeDurationType` units. Absent for the 'custom' term."},"usefulLifeDurationType":{"type":"string","description":"The unit of `usefulLife`. Possible values: 'year', 'month', 'custom'. With 'custom', the rule has no useful life: each fixed asset sets its own depreciation end date."},"minimumAmount":{"type":"string","format":"decimal","description":"The capitalization threshold, in the rule's currency (see `currency`). A fixed asset whose acquisition value is below it is treated as `belowThresholdDepreciationMethod` says."},"currency":{"type":"string","description":"The ISO 4217 code of the currency `minimumAmount` is in."},"belowThresholdDepreciationMethod":{"type":"string","description":"How a fixed asset below the capitalization threshold is treated. Possible values: 'capitalizeAndDepreciateUsefulLife' (depreciated over the useful life like any other), 'capitalizeAndDepreciateImmediately' (depreciated in full in the first period), 'expense' (not depreciated)."},"available":{"type":"boolean","description":"Whether the rule can be used for new fixed assets. Fixed assets already depreciated under an unavailable rule keep their schedules."}},"additionalProperties":false,"required":["fixedAssetTypeId","usefulLifeDurationType","minimumAmount","currency","belowThresholdDepreciationMethod","available"]},"description":"The depreciation rules, one per fixed asset type the policy covers, oldest first. A rule sets the useful life and the capitalization threshold for fixed assets of its type.","examples":[[{"fixedAssetTypeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","usefulLife":5,"usefulLifeDurationType":"year","minimumAmount":"500","currency":"USD","belowThresholdDepreciationMethod":"expense","available":true}]]}},"additionalProperties":false,"required":["id","name","depreciationMethod","depreciationInterval","lastModifiedDate"]},"listUnscheduledFixedAssetsRow":{"type":"object","properties":{"id":{"type":"string","description":"The journal entry line's id (kind 'journalEntryLine') or the draft fixed asset's id (kind 'draft'). Pass it to POST fixed-assets as sourceJournalEntryLineId or draftFixedAssetId, by kind, and to GET unscheduled-fixed-assets/:id.","examples":["52e7c0a9-1d84-4b36-9f20-8c3a6b15e7d4"]},"kind":{"type":"string","description":"What the row is. Possible values: 'journalEntryLine', a posted line no fixed asset holds; 'draft', a draft fixed asset saved, split or combined on the Unscheduled tab. It is an open set: skip a row with a value you do not know.","examples":["draft"]},"entityId":{"type":"string","description":"The legal entity of the row. See id on GET base/entities.","examples":["c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9"]},"bookId":{"type":"string","description":"The accounting book of the row: the line's journal entry's book, or the draft's book. A fixed asset registered from the row is recorded in this book. See id on GET accounting/books/:id.","examples":["e0c37a94-2d15-4b86-9f42-5a7c81de03b6"]},"sourceJournalEntryLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The journal entry line: for kind 'journalEntryLine' the row itself, for kind 'draft' the draft's source line in its book (the first one, for a draft that combines several lines). Absent for a draft with no source line.","examples":["a0d4e9b2-7c15-4f83-b6e1-29c58d07f3a4"]},"journalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The journal entry of sourceJournalEntryLineId. See id on GET accounting/journal-entries/:id.","examples":["b81e40d2-6c9a-4f13-9e57-2d0a7c63f914"]},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The asset account of sourceJournalEntryLineId. The allowed types follow from it. See id on GET accounting/accounts/:id.","examples":["6d2c9e41-0b87-4a35-bf1d-93e5a7c08f26"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name a fixed asset registered from the row gets by default: the draft's name, or the asset's name in another book, or else the line's description. Absent when there is none.","examples":["Laptops (2 of 4)"]},"transactionDate":{"type":"string","format":"date","description":"The line's transaction date, or the draft's acquisition date. A fixed asset registered from the row is acquired on this date. Format YYYY-MM-DD.","examples":["2026-03-11"]},"amount":{"type":"string","format":"decimal","description":"The value a fixed asset registered from the row is capitalized at, in currency: the line's amount, or the draft's acquisition value (its share of the line, for a split).","examples":["3000"]},"currency":{"type":"string","description":"The currency of amount. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The document line sourceJournalEntryLineId was posted from, or else its reference. Absent when it has neither.","examples":["VB-000318 / 2"]},"allowedTypeCount":{"type":"number","description":"How many fixed asset types the row can be registered as: the types the depreciation policies of the book cover for accountId (for a draft with no source line, every type they cover). A draft's saved type counts while its rule is unavailable. 0 when none qualifies.","examples":[2]},"defaultTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type POST fixed-assets uses when you leave typeId out: the draft's saved type while it is one of the allowed types, or else the only type that qualifies. Absent when you must choose. See id on GET fixed-asset-types/:id.","examples":["4e8a1f60-2b93-4c07-8d5e-71f6a2c9b034"]},"typeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type saved on the draft. Absent for a journal entry line, and for a draft saved without one.","examples":["4e8a1f60-2b93-4c07-8d5e-71f6a2c9b034"]},"inServiceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The in-service date saved on the draft. Absent for a journal entry line. Format YYYY-MM-DD.","examples":["2026-04-01"]},"depreciationMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation method saved on the draft. Absent for a journal entry line.","examples":["StraightLine"]},"depreciationInterval":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation interval saved on the draft. Absent for a journal entry line.","examples":["Monthly"]},"depreciationConvention":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation convention saved on the draft. Absent for a journal entry line.","examples":["FullMonth"]},"degressionRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The degression rate saved on the draft, as a decimal fraction: 0.2 is 20%. Absent for a journal entry line."},"salvageValueAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The salvage value saved on the draft, in currency. Absent for a journal entry line.","examples":["0"]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The serial number saved on the draft. Absent for a journal entry line."},"assetTag":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The asset tag saved on the draft. Absent for a journal entry line."},"departmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The department saved on the draft. Absent for a journal entry line. See id on GET people/departments/:id."},"businessUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The business unit saved on the draft. Absent for a journal entry line."},"lastModifiedDate":{"type":"string","format":"date-time","description":"When the row last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ): the journal entry line's, or for a draft the later of its fixed asset's and its asset's, so an edit made to a draft on the Unscheduled tab moves it.","examples":["2026-03-12T08:41:07.000Z"]}},"additionalProperties":false},"bulkCreateSalesReturnsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you."},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"businessPartnerName":{"type":"string","description":"The name of that customer."},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line."},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'."},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back."},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency."},"notes":{"type":"string","description":"Free text on the document."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The created returns, in input order. Match them to inputs by index.","examples":[[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"6.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit"}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateSalesReturnsInput":{"type":"object","properties":{"returns":{"type":"array","items":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Required, a return always comes from one. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it and the first line's warehouse decides it. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Defaults to today. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency for every amount on the return. Format ISO 4217, for example 'EUR'. Defaults to the legal entity's functional currency. Set it when the sale was in another."},"referenceNumber":{"type":"string","description":"The customer's own reference, for example an RMA number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back."},"returnType":{"type":"string","description":"How the business classifies the return."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency."},"notes":{"type":"string","description":"Free text on the document."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. Use the same warehouse on every line, because a return with lines in different warehouses can't be committed. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency. Omit it to take the price from the sale."},"condition":{"enum":["NEW","GOOD","USED","OPENED","DAMAGED","DEFECTIVE","EXPIRED","REFURBISHED"],"description":"The condition the goods are expected in. The inspection may find otherwise and restates it."},"disposition":{"enum":["RETURN_TO_STOCK","RETURN_TO_VENDOR","SCRAP","DONATE","REPAIR","REWORK","CREDIT_ONLY"],"description":"What you intend to do with the goods. The inspection may change it."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code. See id on GET inventory/reason-codes/:id."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return follows a delivery. It is a line's id on GET inventory/shipments/:id. Naming it lets the commit value the return from the original shipment cost."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch coming back, as batchNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line returns to. Given beside batchNumberId, it must be that batch's own number."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches coming back on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit. On PATCH inventory/sales-returns/:id this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit coming back, as serialNumberId on the shipment line it went out on (GET inventory/shipments/:id). Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line returns to. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units coming back, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. On PATCH inventory/sales-returns/:id this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry may name a batchNumber or serialNumber of its own line. On PATCH inventory/sales-returns/:id this replaces the line's bin entries."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines of this return. At least one is required."}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"description":"The returns to create. At least one, each exactly what POST inventory/sales-returns takes.","examples":[[{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-18","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","notes":"Customer reports transit damage","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"6.00","unitPrice":"24.00","condition":"DAMAGED","disposition":"SCRAP","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","notes":"Carton crushed in transit"}]}]]}},"additionalProperties":false,"required":["returns"]},"serialTransactionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial transaction. Format: UUID.","examples":["b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92"]},"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit this transaction is for. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber).","examples":["7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537"]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity. Example: 'SN-000412'.","examples":["SN-000412"]},"manufacturerSerialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The manufacturer's serial number. It shows the unit's current value, not the value at the time of the serial transaction.","examples":["ACME-77-000412"]},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the unit expires. It shows the unit's current value, not the value at the time of the serial transaction. Format: YYYY-MM-DD.","examples":["2029-05-31"]},"entryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the unit's age is counted from. Format: YYYY-MM-DD. It is the unit's current `entryDate`, not the date at the time of this serial transaction.","examples":["2026-08-03"]},"isSold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the unit has been sold. It shows the unit's current value, not the value at the time of the serial transaction. A unit that was sold and then returned has the value false.","examples":[false]},"transactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the inventory transaction this serial transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction).","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["LAPTOP-14"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`.","examples":["14-inch laptop"]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"transactionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date of the inventory transaction this serial transaction belongs to. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the unit that came into stock. It is 1 when the unit came in, and 0 when only the unit's cost changed.","examples":["1.00"]},"outQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the unit that went out of stock. It is 1 when the unit went out."},"cost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost of the unit, in the currency named by `currency`. When the unit comes in, it is the cost the unit was received at. When the unit goes out, it is the unit's cost at that time. On an inventory revaluation, it is the unit's new cost.","examples":["742.50"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency that `cost` is in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"anyOf":[{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"]},{"type":"null"}],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"sourceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the serial transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the unit itself, such as its `isSold` or `entryDate`, do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false},"searchDepreciationSchedulesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation schedule."},"scheduleNumber":{"type":"string","description":"The depreciation schedule number. Unique within the tenant. Example: 'DS-0042'."},"fixedAssetId":{"type":"number","description":"The internal number of the fixed asset the schedule depreciates. It is not the `id` that the fixed asset endpoints use."},"entityId":{"type":"number","description":"The internal number of the legal entity that owns the fixed asset. It is not the `id` that the legal entity endpoints use."},"bookId":{"type":"number","description":"The internal number of the accounting book the fixed asset is tracked in. It is not the `id` that the accounting book endpoints use, or the `bookId` on a depreciation policy."},"depreciationRuleId":{"type":"number","description":"The internal number of the depreciation rule applied to the fixed asset. A rule links a depreciation policy to a fixed asset type and sets the useful life."},"status":{"type":"string","description":"The status of the schedule. Possible values: 'NotStarted' (no line has been recorded), 'Ongoing' (some lines have been recorded), 'Completed' (every line has been recorded), 'Disposed' (the fixed asset was disposed of), 'Voided' (the fixed asset was voided)."},"acquisitionDate":{"type":"string","format":"date","description":"The date the fixed asset was acquired. Format: YYYY-MM-DD. It can be earlier than startDate."},"startDate":{"type":"string","format":"date","description":"The date depreciation starts. Format: YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of depreciation. Format: YYYY-MM-DD."},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'."},"acquisitionValue":{"type":"string","format":"decimal","description":"The acquisition cost of the fixed asset, in the `currency`."},"depreciableAmount":{"type":"string","format":"decimal","description":"The total amount to depreciate over the schedule, in the `currency`. Formula: the fixed asset's depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValue - salvageValueAmount. See depreciationStartValueAmount and salvageValueAmount on GET fixed-assets/:id."},"depreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation recorded on this schedule, in the `currency`. Formula: the sum of the recorded schedule lines. Lines that have not been recorded do not count, whatever their dates."},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValue - depreciatedAmount, or when the fixed asset has a depreciationStartValueAmount, depreciationStartValueAmount - depreciatedAmount. It is 0 once the fixed asset is voided, retired, or disposed of."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation schedule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Recording depreciation changes depreciatedAmount and remainingValue. It updates lastModifiedDate only when the schedule's status changes."}},"additionalProperties":false,"required":["id","fixedAssetId","entityId","bookId","depreciationRuleId","status","acquisitionDate","startDate","endDate","currency","acquisitionValue","depreciableAmount","depreciatedAmount","remainingValue","lastModifiedDate"]},"description":"The depreciation schedules on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39","scheduleNumber":"DS-0042","fixedAssetId":3187,"entityId":1,"bookId":1,"depreciationRuleId":12,"status":"Ongoing","acquisitionDate":"2024-01-15","startDate":"2024-02-01","endDate":"2029-01-31","currency":"EUR","acquisitionValue":"24000.00","depreciableAmount":"21600.00","depreciatedAmount":"7560.00","remainingValue":"16440.00","lastModifiedDate":"2026-08-14T09:12:33.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more depreciation schedules match after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether more depreciation schedules match, and the cursor for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchDepreciationSchedulesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the depreciation schedule with this id. The match is exact. A value that is not in the format of an id matches no schedule."},"scheduleNumber":{"type":"string","description":"Limits results to the depreciation schedule with this schedule number. The match is exact and case-sensitive. Example: 'DS-0042'."},"fixedAssetIds":{"type":"array","items":{"type":"number"},"description":"Limits results to the schedules of any of these fixed assets. The match is exact. Send the internal numbers that schedules return in `fixedAssetId`, not the `id` that the fixed asset endpoints use."},"entityIds":{"type":"array","items":{"type":"number"},"description":"Limits results to schedules for fixed assets owned by any of these legal entities. The match is exact. Send the internal numbers that schedules return in `entityId`, not the `id` that the legal entity endpoints use."},"bookIds":{"type":"array","items":{"type":"number"},"description":"Limits results to schedules for fixed assets tracked in any of these accounting books. The match is exact. Send the internal numbers that schedules return in `bookId`, not the `id` that the accounting book endpoints use."},"status":{"type":"string","description":"Limits results to schedules with this status. Accepted values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'."},"startDateFrom":{"type":"string","format":"date","description":"Limits results to schedules whose startDate is on or after this date. Format: YYYY-MM-DD."},"startDateTo":{"type":"string","format":"date","description":"Limits results to schedules whose startDate is on or before this date. Format: YYYY-MM-DD."},"endDateFrom":{"type":"string","format":"date","description":"Limits results to schedules whose endDate is on or after this date. Format: YYYY-MM-DD."},"endDateTo":{"type":"string","format":"date","description":"Limits results to schedules whose endDate is on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The filters to apply. A schedule must match every filter you send. Omit to return all depreciation schedules. If you send an empty list for a filter, that filter is ignored.","examples":[{"status":"Ongoing","entityIds":[1],"startDateFrom":"2024-01-01","startDateTo":"2024-12-31"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of depreciation schedules per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, and a value below 1 as 1, not rejected."}},"additionalProperties":false,"description":"The page of results to return. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"searchDepreciationPoliciesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation policy."},"depreciationPolicyNumber":{"type":"string","description":"The depreciation policy number. Unique within the tenant. Example: 'DP-0007'."},"name":{"type":"string","description":"The name of the depreciation policy. Unique within the tenant."},"description":{"type":"string","description":"A description of the depreciation policy."},"depreciationMethod":{"type":"string","description":"The method used to spread depreciation over an asset's useful life. When a fixed asset of one of these types is set up, it takes this method. The method can then be changed on the fixed asset. Possible values: 'StraightLine' (equal amounts each period), 'Degressive' (declining balance at the fixed asset's annual `degressionRate`, switching to straight line when that gives a higher amount), 'Immediate' (the whole depreciable amount in the first period), 'Bypassed' (no depreciation schedule is created). How the method treats time is `depreciationConvention`."},"depreciationConvention":{"type":"string","description":"How the method treats time: how the first and last periods are measured and how an amount is spread across periods. Possible values: 'FullMonth' (the in-service month counts as a full month; every period takes an equal share), 'MidMonth' (in service on or before the 15th: the full first month; after the 15th: depreciation starts the following month), 'MidYear' (year one and the year after the useful life each take half the annual amount), 'SixMonthRule' (the full annual amount in year one when in service more than six months of the fiscal year, otherwise half of it), 'ProrateFirstLast' (the partial first and last periods are prorated by days), 'ActualDays' (every period is weighted by its actual number of days). Present for 'StraightLine' (any value) and 'Degressive' (only 'FullMonth'); absent for 'Immediate' and 'Bypassed', which take none."},"depreciationInterval":{"type":"string","description":"The length of each depreciation period. Possible values: 'Monthly', 'Quarterly', 'Yearly'."},"bookId":{"type":"string","description":"The accounting book the depreciation policy applies to. A policy applies to one book only, so each book needs its own policies. See id on GET accounting/books/:id. Absent when the book no longer exists."},"assetAccountId":{"type":"string","description":"The balance sheet account that holds the cost of fixed assets under this policy. Disposing of a fixed asset credits its acquisition value to this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"accumulatedDepreciationAccountId":{"type":"string","description":"The accumulated depreciation account, a contra-asset account. Recording depreciation credits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"depreciationExpenseAccountId":{"type":"string","description":"The depreciation expense account. Recording depreciation debits this account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"gainAccountId":{"type":"string","description":"The account for gains when an asset under this policy is sold for more than its net book value. It is used only on books that keep gains and losses in separate accounts, such as HGB books. On such a sale, the asset's net book value and the sale amount go to this account. If the fixed asset has a `revenueAccountId`, the sale amount goes there instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"lossAccountId":{"type":"string","description":"The account for losses when an asset under this policy is disposed of. The asset's net book value goes to this account. On a sale, the sale amount also goes here, unless the fixed asset has a `revenueAccountId`. On books that keep gains and losses in separate accounts, a sale for more than the net book value goes to `gainAccountId` instead. On most books, gainAccountId and lossAccountId are the same account, set in Lensing as one gain or loss account. See id on GET accounting/accounts/:id. Absent when the account no longer exists."},"active":{"type":"boolean","description":"Whether the depreciation policy is active. Only active policies are offered when a fixed asset type is chosen for a fixed asset. Depreciation already scheduled under an inactive policy is still recorded."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation policy last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"entityIds":{"type":"array","items":{"type":"string"},"description":"The legal entities the depreciation policy is set up for. The policy applies to fixed assets of these legal entities only. See id on GET base/entities. Absent or empty when the policy is set up for no legal entity."},"rules":{"type":"array","items":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string","description":"The fixed asset type the rule applies to. Unique within the depreciation policy."},"code":{"type":"string","description":"A free-text code for the rule."},"usefulLife":{"type":"number","description":"The useful life of fixed assets of the type, counted in `usefulLifeDurationType` units. Absent for the 'custom' term."},"usefulLifeDurationType":{"type":"string","description":"The unit of `usefulLife`. Possible values: 'year', 'month', 'custom'. With 'custom', the rule has no useful life: each fixed asset sets its own depreciation end date."},"minimumAmount":{"type":"string","format":"decimal","description":"The capitalization threshold, in the rule's currency (see `currency`). A fixed asset whose acquisition value is below it is treated as `belowThresholdDepreciationMethod` says."},"currency":{"type":"string","description":"The ISO 4217 code of the currency `minimumAmount` is in."},"belowThresholdDepreciationMethod":{"type":"string","description":"How a fixed asset below the capitalization threshold is treated. Possible values: 'capitalizeAndDepreciateUsefulLife' (depreciated over the useful life like any other), 'capitalizeAndDepreciateImmediately' (depreciated in full in the first period), 'expense' (not depreciated)."},"available":{"type":"boolean","description":"Whether the rule can be used for new fixed assets. Fixed assets already depreciated under an unavailable rule keep their schedules."}},"additionalProperties":false,"required":["fixedAssetTypeId","usefulLifeDurationType","minimumAmount","currency","belowThresholdDepreciationMethod","available"]},"description":"The depreciation rules, one per fixed asset type the policy covers, oldest first. A rule sets the useful life and the capitalization threshold for fixed assets of its type."}},"additionalProperties":false,"required":["id","name","depreciationMethod","depreciationInterval","lastModifiedDate"]},"description":"The depreciation policies on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"b1d4c8f2-5a37-4e91-8c62-9f0a3d7e14b5","depreciationPolicyNumber":"DP-0007","name":"Office Equipment — 5 Year Straight Line","description":"Standard straight-line write-down for office equipment over five years.","depreciationMethod":"StraightLine","depreciationConvention":"FullMonth","depreciationInterval":"Monthly","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","assetAccountId":"3a5f81c6-9d24-4b70-8e15-6c2b7f094d38","accumulatedDepreciationAccountId":"9e14d7b2-6c83-4f51-a027-8d3b5e199c61","depreciationExpenseAccountId":"5c2b8a41-7e96-4d03-b158-2f7a9c4e60d5","gainAccountId":"8f0b3d27-4a19-4c62-9e73-1b5d8a2f7c04","lossAccountId":"2d7e9a15-8b34-4f07-a5c1-6e0f3b9d472a","active":true,"lastModifiedDate":"2026-08-14T09:12:33.000Z","entityIds":["e3a9c2d1-4b5f-4d6e-8a7b-9c0d1e2f3a4b"],"rules":[{"fixedAssetTypeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","usefulLife":5,"usefulLifeDurationType":"year","minimumAmount":"500","currency":"USD","belowThresholdDepreciationMethod":"expense","available":true}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more depreciation policies match after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether more depreciation policies match, and the cursor for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchDepreciationPoliciesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the depreciation policy with this id. The match is exact."},"depreciationPolicyNumber":{"type":"string","description":"Limits results to the policy with this policy number. The match is exact. Example: 'DP-0007'."},"name":{"type":"string","description":"Limits results to the policy with this name. The match is exact and case-sensitive. When sent, nameContains is ignored."},"nameContains":{"type":"string","description":"Limits results to policies whose name contains this text. The match is case-insensitive, and % and _ match as ordinary characters. Ignored if the request also includes the name filter."},"descriptionContains":{"type":"string","description":"Limits results to policies whose description contains this text. The match is case-insensitive, and % and _ match as ordinary characters. A policy with no description never matches."},"bookIds":{"type":"array","items":{"type":"string"},"description":"Limits results to policies that apply to any of these accounting books. The match is exact. See id on GET accounting/books/:id."}},"additionalProperties":false,"description":"The filters to apply. A policy must match every filter you send. Omit to return all depreciation policies. If you send an empty list for a filter, that filter is ignored.","examples":[{"nameContains":"equipment","bookIds":["b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47"]}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of depreciation policies per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, and a value below 1 as 1, not rejected."}},"additionalProperties":false,"description":"The page of results to return. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"updateFixedAssetOutput":{"type":"object","properties":{},"additionalProperties":false},"updateFixedAssetInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the asset. Omit to leave unchanged. A blank name is refused with FIELD_REQUIRED.","examples":["Forklift - Warehouse 3"]},"entityId":{"type":"string","description":"The legal entity that owns the asset. See id on GET base/entities. Omit to leave unchanged. Locked once depreciation has started, and for a fixed asset created from a journal entry line."},"assetStatus":{"type":"string","description":"The physical status of the asset. Accepted values: 'available', 'broken', 'inRepair', 'inUse'. Omit to leave unchanged. 'retired' and 'disposed' are set by disposing of the asset; the status of a retired or disposed asset cannot be changed."},"serialNumber":{"type":"string","description":"The serial number of the asset. Free text. Omit to leave unchanged; send an empty string to clear it."},"assetTag":{"type":"string","description":"The asset tag of the asset. Free text. Omit to leave unchanged; send an empty string to clear it."},"acquisitionDate":{"type":"string","format":"date","description":"The date the asset was acquired. Format YYYY-MM-DD. Omit to leave unchanged. Locked once depreciation has started, and for a fixed asset created from a journal entry line."},"departmentId":{"type":"string","description":"The department the asset is assigned to. See id on GET people/departments/:id. Omit to leave unchanged; send an empty string to clear it.","examples":["5c8a2b70-1e94-4f37-8d06-b3e75f1290ac"]},"businessUnitId":{"type":"string","description":"The business unit the asset is assigned to. Omit to leave unchanged; send an empty string to clear it."},"typeId":{"type":"string","description":"The type of the fixed asset. See id on GET fixed-asset-types/:id. Omit to leave unchanged. Locked once depreciation has started."},"bookId":{"type":"string","description":"The accounting book the fixed asset is recorded in. See id on GET accounting/books/:id. Omit to leave unchanged. Locked once depreciation has started, and for a fixed asset created from a journal entry line."},"currency":{"type":"string","description":"The currency of the fixed asset. It governs acquisitionValueAmount and salvageValueAmount. Format: ISO 4217, for example 'EUR'. Omit to leave unchanged. Locked once depreciation has started, and for a fixed asset created from a journal entry line."},"inServiceDate":{"type":"string","format":"date","description":"The date the asset was placed in service. Format YYYY-MM-DD. Omit to leave unchanged. Locked once depreciation has started."},"depreciationMethod":{"type":"string","description":"The depreciation method. Accepted values: 'StraightLine', 'Degressive', 'Immediate', 'Bypassed'. Omit to leave unchanged. Locked once depreciation has started. A fixed asset depreciated with 'Immediate' cannot change to another method."},"depreciationInterval":{"type":"string","description":"The interval at which depreciation is recorded. Accepted values: 'Monthly', 'Quarterly', 'Yearly'. Omit to leave unchanged. Locked once depreciation has started."},"depreciationConvention":{"type":"string","description":"How the depreciation method treats time. Accepted values: 'FullMonth', 'MidMonth', 'MidYear', 'SixMonthRule', 'ProrateFirstLast', 'ActualDays'. Omit to leave unchanged, or to let a type or method change pick it. Locked once depreciation has started."},"degressionRate":{"type":"string","format":"decimal","description":"The yearly rate of declining-balance depreciation, as a decimal fraction. For example, 0.2 is 20%. Must be greater than 0 and at most 1, or the request fails with INVALID_FIELD_VALUE. Only for the 'Degressive' method. Omit to leave unchanged; it is cleared when the method changes away from 'Degressive'. Locked once depreciation has started."},"acquisitionValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset is capitalized at, in the fixed asset's currency (see currency). Omit to leave unchanged. Locked once depreciation has started, and for a fixed asset created from a journal entry line."},"acquisitionValueCurrency":{"type":"string","description":"The currency of acquisitionValueAmount. Optional; when sent it must equal the fixed asset's currency, or the request fails with CURRENCY_MISMATCH."},"salvageValueAmount":{"type":"string","format":"decimal","description":"The value the asset is expected to have at the end of its useful life, in the fixed asset's currency (see currency). Omit to leave unchanged; send 0 for none. Must be at least 0 and at most the acquisition value, or the request fails with INVALID_FIELD_VALUE. Locked once depreciation has started."},"salvageValueCurrency":{"type":"string","description":"The currency of salvageValueAmount. Optional; when sent it must equal the fixed asset's currency, or the request fails with CURRENCY_MISMATCH."}},"additionalProperties":false},"getDepreciationScheduleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation schedule.","examples":["7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39"]},"scheduleNumber":{"type":"string","description":"The depreciation schedule number. Unique within the tenant. Example: 'DS-0042'.","examples":["DS-0042"]},"fixedAssetId":{"type":"number","description":"The internal number of the fixed asset the schedule depreciates. It is not the `id` that the fixed asset endpoints use.","examples":[3187]},"entityId":{"type":"number","description":"The internal number of the legal entity that owns the fixed asset. It is not the `id` that the legal entity endpoints use.","examples":[1]},"bookId":{"type":"number","description":"The internal number of the accounting book the fixed asset is tracked in. It is not the `id` that the accounting book endpoints use, or the `bookId` on a depreciation policy.","examples":[1]},"depreciationRuleId":{"type":"number","description":"The internal number of the depreciation rule applied to the fixed asset. A rule links a depreciation policy to a fixed asset type and sets the useful life.","examples":[12]},"status":{"type":"string","description":"The status of the schedule. Possible values: 'NotStarted' (no line has been recorded), 'Ongoing' (some lines have been recorded), 'Completed' (every line has been recorded), 'Disposed' (the fixed asset was disposed of), 'Voided' (the fixed asset was voided).","examples":["Ongoing"]},"acquisitionDate":{"type":"string","format":"date","description":"The date the fixed asset was acquired. Format: YYYY-MM-DD. It can be earlier than startDate.","examples":["2024-01-15"]},"startDate":{"type":"string","format":"date","description":"The date depreciation starts. Format: YYYY-MM-DD.","examples":["2024-02-01"]},"endDate":{"type":"string","format":"date","description":"The last day of depreciation. Format: YYYY-MM-DD.","examples":["2029-01-31"]},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"acquisitionValue":{"type":"string","format":"decimal","description":"The acquisition cost of the fixed asset, in the `currency`.","examples":["24000.00"]},"depreciableAmount":{"type":"string","format":"decimal","description":"The total amount to depreciate over the schedule, in the `currency`. Formula: the fixed asset's depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValue - salvageValueAmount. See depreciationStartValueAmount and salvageValueAmount on GET fixed-assets/:id.","examples":["21600.00"]},"depreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation recorded on this schedule, in the `currency`. Formula: the sum of the recorded schedule lines. Lines that have not been recorded do not count, whatever their dates.","examples":["7560.00"]},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValue - depreciatedAmount, or when the fixed asset has a depreciationStartValueAmount, depreciationStartValueAmount - depreciatedAmount. It is 0 once the fixed asset is voided, retired, or disposed of.","examples":["16440.00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation schedule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Recording depreciation changes depreciatedAmount and remainingValue. It updates lastModifiedDate only when the schedule's status changes.","examples":["2026-08-14T09:12:33.000Z"]}},"additionalProperties":false,"required":["id","fixedAssetId","entityId","bookId","depreciationRuleId","status","acquisitionDate","startDate","endDate","currency","acquisitionValue","depreciableAmount","depreciatedAmount","remainingValue","lastModifiedDate"]},"searchUnscheduledFixedAssetsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The journal entry line's id (kind 'journalEntryLine') or the draft fixed asset's id (kind 'draft'). Pass it to POST fixed-assets as sourceJournalEntryLineId or draftFixedAssetId, by kind, and to GET unscheduled-fixed-assets/:id."},"kind":{"type":"string","description":"What the row is. Possible values: 'journalEntryLine', a posted line no fixed asset holds; 'draft', a draft fixed asset saved, split or combined on the Unscheduled tab. It is an open set: skip a row with a value you do not know."},"entityId":{"type":"string","description":"The legal entity of the row. See id on GET base/entities."},"bookId":{"type":"string","description":"The accounting book of the row: the line's journal entry's book, or the draft's book. A fixed asset registered from the row is recorded in this book. See id on GET accounting/books/:id."},"sourceJournalEntryLineId":{"type":"string","description":"The journal entry line: for kind 'journalEntryLine' the row itself, for kind 'draft' the draft's source line in its book (the first one, for a draft that combines several lines). Absent for a draft with no source line."},"journalEntryId":{"type":"string","description":"The journal entry of sourceJournalEntryLineId. See id on GET accounting/journal-entries/:id."},"accountId":{"type":"string","description":"The asset account of sourceJournalEntryLineId. The allowed types follow from it. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name a fixed asset registered from the row gets by default: the draft's name, or the asset's name in another book, or else the line's description. Absent when there is none."},"transactionDate":{"type":"string","format":"date","description":"The line's transaction date, or the draft's acquisition date. A fixed asset registered from the row is acquired on this date. Format YYYY-MM-DD."},"amount":{"type":"string","format":"decimal","description":"The value a fixed asset registered from the row is capitalized at, in currency: the line's amount, or the draft's acquisition value (its share of the line, for a split)."},"currency":{"type":"string","description":"The currency of amount. Format: ISO 4217, for example 'EUR'."},"reference":{"type":"string","description":"The document line sourceJournalEntryLineId was posted from, or else its reference. Absent when it has neither."},"allowedTypeCount":{"type":"number","description":"How many fixed asset types the row can be registered as: the types the depreciation policies of the book cover for accountId (for a draft with no source line, every type they cover). A draft's saved type counts while its rule is unavailable. 0 when none qualifies."},"defaultTypeId":{"type":"string","description":"The type POST fixed-assets uses when you leave typeId out: the draft's saved type while it is one of the allowed types, or else the only type that qualifies. Absent when you must choose. See id on GET fixed-asset-types/:id."},"typeId":{"type":"string","description":"The type saved on the draft. Absent for a journal entry line, and for a draft saved without one."},"inServiceDate":{"type":"string","format":"date","description":"The in-service date saved on the draft. Absent for a journal entry line. Format YYYY-MM-DD."},"depreciationMethod":{"type":"string","description":"The depreciation method saved on the draft. Absent for a journal entry line."},"depreciationInterval":{"type":"string","description":"The depreciation interval saved on the draft. Absent for a journal entry line."},"depreciationConvention":{"type":"string","description":"The depreciation convention saved on the draft. Absent for a journal entry line."},"degressionRate":{"type":"string","format":"decimal","description":"The degression rate saved on the draft, as a decimal fraction: 0.2 is 20%. Absent for a journal entry line."},"salvageValueAmount":{"type":"string","format":"decimal","description":"The salvage value saved on the draft, in currency. Absent for a journal entry line."},"serialNumber":{"type":"string","description":"The serial number saved on the draft. Absent for a journal entry line."},"assetTag":{"type":"string","description":"The asset tag saved on the draft. Absent for a journal entry line."},"departmentId":{"type":"string","description":"The department saved on the draft. Absent for a journal entry line. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit saved on the draft. Absent for a journal entry line."},"allowedTypes":{"type":"array","items":{"type":"object","properties":{"typeId":{"type":"string","description":"The fixed asset type. Send it as typeId to POST fixed-assets."},"typeName":{"type":"string","description":"The name of the fixed asset type."},"depreciationPolicyId":{"type":"string","description":"The depreciation policy that covers the type for the account. See id on GET depreciation-policies/:id."},"depreciationPolicyName":{"type":"string","description":"The name of the depreciation policy."},"depreciationMethod":{"type":"string","description":"The policy's depreciation method, the default when you leave depreciationMethod out."},"depreciationInterval":{"type":"string","description":"The policy's depreciation interval, the default when you leave depreciationInterval out."},"depreciationConvention":{"type":"string","description":"The policy's depreciation convention. Absent when the policy has none."},"usefulLife":{"type":"number","description":"The useful life the rule sets for the type, in usefulLifeUnit. Absent for a custom term."},"usefulLifeUnit":{"type":"string","description":"The unit of usefulLife. Possible values: 'year', 'month', 'custom'."},"minimumAmount":{"type":"string","format":"decimal","description":"The capitalization threshold: below this acquisition value the rule's belowThresholdDepreciationMethod applies, in minimumAmountCurrency."},"minimumAmountCurrency":{"type":"string","description":"The currency of minimumAmount. Format: ISO 4217."},"belowThresholdDepreciationMethod":{"type":"string","description":"What happens to an asset below minimumAmount. Possible values: 'capitalizeAndDepreciateUsefulLife', 'capitalizeAndDepreciateImmediately', 'expense'."}},"additionalProperties":false,"required":["typeId","typeName","depreciationPolicyId","depreciationPolicyName","depreciationMethod","depreciationInterval"]},"description":"The types the row can be registered as, with the terms of the depreciation policy and rule each one takes: the types the depreciation policies of the book cover for accountId (for a draft with no source line, every type they cover). A draft's saved type is included while its rule is unavailable. Empty when none qualifies."},"lastModifiedDate":{"type":"string","format":"date-time","description":"When the row last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ): the journal entry line's, or for a draft the later of its fixed asset's and its asset's, so an edit made to a draft on the Unscheduled tab moves it."}},"additionalProperties":false,"required":["id","kind","entityId","bookId","transactionDate","amount","currency","allowedTypeCount","allowedTypes","lastModifiedDate"]},"description":"The rows on this page, newest transactionDate first. An empty array when nothing matches.","examples":[[{"id":"52e7c0a9-1d84-4b36-9f20-8c3a6b15e7d4","kind":"draft","entityId":"c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9","bookId":"e0c37a94-2d15-4b86-9f42-5a7c81de03b6","sourceJournalEntryLineId":"a0d4e9b2-7c15-4f83-b6e1-29c58d07f3a4","journalEntryId":"b81e40d2-6c9a-4f13-9e57-2d0a7c63f914","accountId":"6d2c9e41-0b87-4a35-bf1d-93e5a7c08f26","name":"Laptops (2 of 4)","transactionDate":"2026-03-11","amount":"3000","currency":"EUR","reference":"VB-000318 / 2","allowedTypeCount":2,"defaultTypeId":"4e8a1f60-2b93-4c07-8d5e-71f6a2c9b034","typeId":"4e8a1f60-2b93-4c07-8d5e-71f6a2c9b034","inServiceDate":"2026-04-01","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationConvention":"FullMonth","salvageValueAmount":"0","allowedTypes":[{"typeId":"4e8a1f60-2b93-4c07-8d5e-71f6a2c9b034","typeName":"IT equipment","depreciationPolicyId":"8c1f7a42-6d09-4b5e-a3f8-0e27d91c64b5","depreciationPolicyName":"Office and IT","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationConvention":"FullMonth","usefulLife":3,"usefulLifeUnit":"year","minimumAmount":"800","minimumAmountCurrency":"EUR","belowThresholdDepreciationMethod":"expense"},{"typeId":"9a3d5c17-0e6b-4f28-b4a1-c7d2e8f05b39","typeName":"Furniture","depreciationPolicyId":"8c1f7a42-6d09-4b5e-a3f8-0e27d91c64b5","depreciationPolicyName":"Office and IT","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationConvention":"FullMonth","usefulLife":8,"usefulLifeUnit":"year","minimumAmount":"800","minimumAmountCurrency":"EUR","belowThresholdDepreciationMethod":"capitalizeAndDepreciateUsefulLife"}],"lastModifiedDate":"2026-03-12T08:41:07.000Z"}]]},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether more rows match after this page."},"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether more rows match, and the cursor for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchUnscheduledFixedAssetsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the rows with these ids: journal entry line ids and draft fixed asset ids. The match is exact."},"entityId":{"type":"string","description":"Limits results to this legal entity. Required unless you send ids. See id on GET base/entities."},"bookId":{"type":"string","description":"Limits results to this accounting book. Required unless you send ids. See id on GET accounting/books/:id."},"kinds":{"type":"array","items":{"type":"string"},"description":"Limits results to rows of these kinds. Accepted values: 'journalEntryLine', 'draft'."},"accountIds":{"type":"array","items":{"type":"string"},"description":"Limits results to rows on these asset accounts: a line's account, or a draft's source line's. See id on GET accounting/accounts/:id."},"sourceJournalEntryLineIds":{"type":"array","items":{"type":"string"},"description":"Limits results to the lines with these ids and the drafts with one of them as a source line."},"name":{"type":"string","description":"Limits results to rows whose own description contains this text: a line's description, or a draft's name. It does not match a line's name taken from the asset in another book (see name in the results). The match is case-insensitive, and % and _ match as ordinary characters. Spaces at the start and end are ignored."},"transactionDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Limits results to rows on or after this date. Format: YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Limits results to rows on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The range of transactionDate to match. Send start, end, or both."}},"additionalProperties":false,"description":"The filters to apply. A row must match every filter you send. Send entityId and bookId, or ids. If you send an empty list for a filter, that filter is ignored.","examples":[{"entityId":"c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9","bookId":"e0c37a94-2d15-4b86-9f42-5a7c81de03b6","name":"laptop"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of rows per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, and a value below 1 as 1, not rejected."}},"additionalProperties":false,"description":"The page of results to return. Omit for the first page.","examples":[{"size":25}]}},"additionalProperties":false},"updateLandedCostItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost item. Format: UUID.","examples":["9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"]}},"additionalProperties":false,"required":["id"]},"updateLandedCostItemInput":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. See `id` on GET inventory/items/:id (getItem)."},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. See `id` on GET accounting/accounts/:id (getAccount)."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Changing it does not change the charges already on landed costs. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'.","examples":["Quantity"]},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type."},"active":{"type":"boolean","description":"Whether the landed cost item is active."}},"additionalProperties":false},"getFixedAssetOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed asset.","examples":["9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915"]},"fixedAssetNumber":{"type":"string","description":"The fixed asset number. Unique within the tenant. Each book's fixed asset has its own number, unlike assetNumber, which is the same in every book. Example: 'FA-1'.","examples":["FA-000142"]},"fixedAssetStatus":{"type":"string","description":"The status of the fixed asset. Possible values: 'active', 'voided'. Voided fixed assets are returned here, unlike on `GET fixed-assets`.","examples":["active"]},"companyAssetId":{"type":"string","description":"The asset this fixed asset records. Fixed assets of the same asset in different books have the same companyAssetId.","examples":["3a7e5c81-9b24-4d0f-8e63-1c95af207b48"]},"name":{"type":"string","description":"The name of the asset.","examples":["Forklift - Warehouse 2"]},"entityId":{"type":"string","description":"The legal entity that owns the asset. See id on GET base/entities.","examples":["c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9"]},"assetStatus":{"type":"string","description":"The physical status of the asset. Possible values: 'available', 'broken', 'inRepair', 'inUse', 'retired', 'disposed'. Disposing of an asset sets assetStatus to 'disposed' and leaves fixedAssetStatus as 'active'.","examples":["inUse"]},"assetNumber":{"type":"string","description":"The asset number. It is unique within the tenant, and all fixed assets of the same asset have the same number.","examples":["CA-0881"]},"serialNumber":{"type":"string","description":"The serial number of the asset. It is free text and does not have to be unique.","examples":["SN-77120934"]},"assetTag":{"type":"string","description":"The asset tag of the asset, such as the code on a label attached to it. It is free text.","examples":["WH2-FORK-03"]},"acquisitionDate":{"type":"string","format":"date","description":"The date the asset was acquired. Format: YYYY-MM-DD.","examples":["2024-03-11"]},"departmentId":{"type":"string","description":"The department the asset is assigned to. Absent when the asset has no department. See id on GET people/departments/:id.","examples":["5c8a2b70-1e94-4f37-8d06-b3e75f1290ac"]},"businessUnitId":{"type":"string","description":"The business unit the asset is assigned to. Absent when the asset has no business unit."},"typeId":{"type":"string","description":"The type of the fixed asset.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]},"typeName":{"type":"string","description":"The name of the fixed asset type. Example: 'Machinery'.","examples":["Machinery"]},"bookId":{"type":"string","description":"The accounting book the fixed asset is recorded in. See id on GET accounting/books/:id.","examples":["e0c37a94-2d15-4b86-9f42-5a7c81de03b6"]},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"inServiceDate":{"type":"string","format":"date","description":"The date the asset was placed in service. The depreciation schedule is calculated from this date. Format: YYYY-MM-DD.","examples":["2024-04-01"]},"depreciationMethod":{"type":"string","description":"The depreciation method of the fixed asset. Possible values: 'StraightLine', 'Degressive', 'Immediate', 'Bypassed'.","examples":["StraightLine"]},"depreciationInterval":{"type":"string","description":"The interval at which depreciation is recorded for the fixed asset. Possible values: 'Monthly', 'Quarterly', 'Yearly'.","examples":["Monthly"]},"depreciationConvention":{"type":"string","description":"How the depreciation method treats time. Possible values: 'FullMonth', 'MidMonth', 'MidYear', 'SixMonthRule', 'ProrateFirstLast', 'ActualDays'. Absent when depreciationMethod is 'Immediate' or 'Bypassed'."},"depreciationStatus":{"type":"string","description":"The depreciation status of the fixed asset. Possible values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. A fixed asset with no depreciation schedule also has the value 'Completed', so check depreciatedAmount before you treat a fixed asset as fully depreciated.","examples":["Ongoing"]},"degressionRate":{"type":"string","format":"decimal","description":"The yearly rate of declining-balance depreciation, as a decimal fraction. For example, 0.2 is 20%. Used only when depreciationMethod is 'Degressive'."},"acquisitionValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset was capitalized at, in the `acquisitionValueCurrency`.","examples":["42000"]},"acquisitionValueCurrency":{"type":"string","description":"The currency of acquisitionValueAmount. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"salvageValueAmount":{"type":"string","format":"decimal","description":"The value the asset is expected to have at the end of its useful life (salvage value, also called residual value), in the `salvageValueCurrency`. Depreciation reduces the asset's net book value to this amount, not to zero.","examples":["2000"]},"salvageValueCurrency":{"type":"string","description":"The currency of salvageValueAmount. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"depreciationStartValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset's depreciation started from, in the `currency`. Present only for imported fixed assets."},"depreciableAmount":{"type":"string","format":"decimal","description":"The amount that is depreciated over the useful life of the fixed asset, in the `currency`. Formula: depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValueAmount - salvageValueAmount.","examples":["40000"]},"depreciatedAmount":{"type":"string","format":"decimal","description":"The total depreciation of the fixed asset, in the `currency`. Formula: initialDepreciatedAmount + the depreciation recorded on the depreciation schedule.","examples":["13333.33"]},"initialDepreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation the fixed asset had before it was imported, in the `currency`. Formula: acquisitionValueAmount - depreciationStartValueAmount, or 0 when depreciationStartValueAmount is absent."},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValueAmount - depreciatedAmount. It is 0 when fixedAssetStatus is 'voided' or assetStatus is 'retired' or 'disposed'.","examples":["28666.67"]},"disposalDate":{"type":"string","format":"date","description":"The date the asset was disposed of. Format: YYYY-MM-DD. Present only when the asset has been disposed of."},"disposalAmount":{"type":"string","format":"decimal","description":"The value written off when the asset was disposed of, in the `currency`. Present only when the asset has been disposed of."},"disposalEntryId":{"type":"string","description":"The journal entry that records the disposal. Present only when the asset has been disposed of. See id on GET accounting/journal-entries/:id."},"disposalEntryNumber":{"type":"string","description":"The number of the journal entry that records the disposal. Present only when the asset has been disposed of. Example: 'JE-4412'."},"soldAmountAmount":{"type":"string","format":"decimal","description":"The amount the asset was sold for, in the `soldAmountCurrency`. Present only when the asset was sold."},"soldAmountCurrency":{"type":"string","description":"The currency of soldAmountAmount. Format: ISO 4217, for example 'EUR'. It can differ from currency."},"saleEntryId":{"type":"string","description":"Platform id (a UUID) of the journal entry recording the sale. Absent when the asset wasn't sold."},"saleEntryNumber":{"type":"string","description":"Human-readable number of the sale journal entry, carried alongside saleEntryId."},"saleReceivingAccountId":{"type":"string","description":"The account the sale proceeds were received into. Present only when the asset was sold. See id on GET accounting/accounts/:id."},"revenueAccountId":{"type":"string","description":"The revenue account for the sale of the asset. Present only when the asset was sold and a revenue account was chosen for the sale. See id on GET accounting/accounts/:id."},"saleDocumentId":{"type":"string","description":"The invoice for the sale of the asset, created as a manual taxable document. Present only when the asset was sold. See id on GET tax-documents/manual-taxable-documents/:id."},"saleDocumentNumber":{"type":"string","description":"The number of the invoice for the sale of the asset. Present only when the asset was sold. See taxDocumentNumber on GET tax-documents/manual-taxable-documents/:id."},"vatPercentageId":{"type":"string","description":"The tax code applied to the sale of the asset. Present only when the asset was sold and a tax code was applied to the sale. See lines.id on GET accounting/tax-configurations/:id."},"valueAllocationId":{"type":"string","description":"The value accounting tags set on the fixed asset. Absent when the fixed asset has no tags."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Always present — the column is set on every row, and R2.4.1 wants one optionality across all three read entry points. NOTE it tracks the FixedAsset row only: renaming or reassigning the underlying CompanyAsset does not move it.","examples":["2026-08-18T09:14:22.517Z"]},"sources":{"type":"array","items":{"type":"object","properties":{"journalEntryLineId":{"type":"string","description":"The journal entry line. It is the id of a row of kind 'journalEntryLine' on GET unscheduled-fixed-assets before registration."},"journalEntryId":{"type":"string","description":"The journal entry the line belongs to. See id on GET accounting/journal-entries/:id."},"source":{"type":"string","description":"The document line the journal entry line was posted from, or else the line's reference. Absent when it has neither."}},"additionalProperties":false,"required":["journalEntryLineId","journalEntryId"]},"description":"The journal entry lines the fixed asset was registered from, in its own book: one for a fixed asset registered from a line (POST fixed-assets), several for one that combines lines, and none for an imported fixed asset. Use journalEntryLineId to tell which fixed asset holds a line, or filter POST fixed-assets/search on sourceJournalEntryLineIds.","examples":[[{"journalEntryLineId":"3f6a1c88-9b27-4d05-a6e3-0c9d4b7e21f5","journalEntryId":"b81e40d2-6c9a-4f13-9e57-2d0a7c63f914","source":"VB-000318 / 1"}]]}},"additionalProperties":false,"required":["id","fixedAssetStatus","companyAssetId","lastModifiedDate","sources"]},"getShipmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment.","examples":["2f7c9b31-8a05-4d16-b47e-903c5f1a86d2"]},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned.","examples":["SD-8841"]},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD.","examples":["2026-08-19"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id.","examples":["c73f2b81-5d94-4e60-a812-0f9b6d3e45c7"]},"businessPartnerName":{"type":"string","description":"The display name of that customer.","examples":["Bakker Retail B.V."]},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id.","examples":["9d0a5e26-b183-4c47-92f5-6a4e17b0c853"]},"shipmentCarrierName":{"type":"string","description":"The name of that carrier.","examples":["PostNL"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods.","examples":["3SABCD1234567"]},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment.","examples":["PO-BAKKER-4417"]},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it.","examples":["OPEN"]},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency.","examples":["960.00"]},"notes":{"type":"string","description":"Free text on the shipment.","examples":["Palletised"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T08:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"searchFixedAssetsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed asset."},"fixedAssetNumber":{"type":"string","description":"The fixed asset number. Unique within the tenant. Each book's fixed asset has its own number, unlike assetNumber, which is the same in every book. Example: 'FA-1'."},"fixedAssetStatus":{"type":"string","description":"The status of the fixed asset. Possible values: 'active', 'voided'. Voided fixed assets are returned here, unlike on `GET fixed-assets`."},"companyAssetId":{"type":"string","description":"The asset this fixed asset records. Fixed assets of the same asset in different books have the same companyAssetId."},"name":{"type":"string","description":"The name of the asset."},"entityId":{"type":"string","description":"The legal entity that owns the asset. See id on GET base/entities."},"assetStatus":{"type":"string","description":"The physical status of the asset. Possible values: 'available', 'broken', 'inRepair', 'inUse', 'retired', 'disposed'. Disposing of an asset sets assetStatus to 'disposed' and leaves fixedAssetStatus as 'active'."},"assetNumber":{"type":"string","description":"The asset number. It is unique within the tenant, and all fixed assets of the same asset have the same number."},"serialNumber":{"type":"string","description":"The serial number of the asset. It is free text and does not have to be unique."},"assetTag":{"type":"string","description":"The asset tag of the asset, such as the code on a label attached to it. It is free text."},"acquisitionDate":{"type":"string","format":"date","description":"The date the asset was acquired. Format: YYYY-MM-DD."},"departmentId":{"type":"string","description":"The department the asset is assigned to. Absent when the asset has no department. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit the asset is assigned to. Absent when the asset has no business unit."},"typeId":{"type":"string","description":"The type of the fixed asset."},"typeName":{"type":"string","description":"The name of the fixed asset type. Example: 'Machinery'."},"bookId":{"type":"string","description":"The accounting book the fixed asset is recorded in. See id on GET accounting/books/:id."},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'."},"inServiceDate":{"type":"string","format":"date","description":"The date the asset was placed in service. The depreciation schedule is calculated from this date. Format: YYYY-MM-DD."},"depreciationMethod":{"type":"string","description":"The depreciation method of the fixed asset. Possible values: 'StraightLine', 'Degressive', 'Immediate', 'Bypassed'."},"depreciationInterval":{"type":"string","description":"The interval at which depreciation is recorded for the fixed asset. Possible values: 'Monthly', 'Quarterly', 'Yearly'."},"depreciationConvention":{"type":"string","description":"How the depreciation method treats time. Possible values: 'FullMonth', 'MidMonth', 'MidYear', 'SixMonthRule', 'ProrateFirstLast', 'ActualDays'. Absent when depreciationMethod is 'Immediate' or 'Bypassed'."},"depreciationStatus":{"type":"string","description":"The depreciation status of the fixed asset. Possible values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. A fixed asset with no depreciation schedule also has the value 'Completed', so check depreciatedAmount before you treat a fixed asset as fully depreciated."},"degressionRate":{"type":"string","format":"decimal","description":"The yearly rate of declining-balance depreciation, as a decimal fraction. For example, 0.2 is 20%. Used only when depreciationMethod is 'Degressive'."},"acquisitionValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset was capitalized at, in the `acquisitionValueCurrency`."},"acquisitionValueCurrency":{"type":"string","description":"The currency of acquisitionValueAmount. Format: ISO 4217, for example 'EUR'."},"salvageValueAmount":{"type":"string","format":"decimal","description":"The value the asset is expected to have at the end of its useful life (salvage value, also called residual value), in the `salvageValueCurrency`. Depreciation reduces the asset's net book value to this amount, not to zero."},"salvageValueCurrency":{"type":"string","description":"The currency of salvageValueAmount. Format: ISO 4217, for example 'EUR'."},"depreciationStartValueAmount":{"type":"string","format":"decimal","description":"The value the fixed asset's depreciation started from, in the `currency`. Present only for imported fixed assets."},"depreciableAmount":{"type":"string","format":"decimal","description":"The amount that is depreciated over the useful life of the fixed asset, in the `currency`. Formula: depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValueAmount - salvageValueAmount."},"depreciatedAmount":{"type":"string","format":"decimal","description":"The total depreciation of the fixed asset, in the `currency`. Formula: initialDepreciatedAmount + the depreciation recorded on the depreciation schedule."},"initialDepreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation the fixed asset had before it was imported, in the `currency`. Formula: acquisitionValueAmount - depreciationStartValueAmount, or 0 when depreciationStartValueAmount is absent."},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValueAmount - depreciatedAmount. It is 0 when fixedAssetStatus is 'voided' or assetStatus is 'retired' or 'disposed'."},"disposalDate":{"type":"string","format":"date","description":"The date the asset was disposed of. Format: YYYY-MM-DD. Present only when the asset has been disposed of."},"disposalAmount":{"type":"string","format":"decimal","description":"The value written off when the asset was disposed of, in the `currency`. Present only when the asset has been disposed of."},"disposalEntryId":{"type":"string","description":"The journal entry that records the disposal. Present only when the asset has been disposed of. See id on GET accounting/journal-entries/:id."},"disposalEntryNumber":{"type":"string","description":"The number of the journal entry that records the disposal. Present only when the asset has been disposed of. Example: 'JE-4412'."},"soldAmountAmount":{"type":"string","format":"decimal","description":"The amount the asset was sold for, in the `soldAmountCurrency`. Present only when the asset was sold."},"soldAmountCurrency":{"type":"string","description":"The currency of soldAmountAmount. Format: ISO 4217, for example 'EUR'. It can differ from currency."},"saleEntryId":{"type":"string","description":"Platform id (a UUID) of the journal entry recording the sale. Absent when the asset wasn't sold."},"saleEntryNumber":{"type":"string","description":"Human-readable number of the sale journal entry, carried alongside saleEntryId."},"saleReceivingAccountId":{"type":"string","description":"The account the sale proceeds were received into. Present only when the asset was sold. See id on GET accounting/accounts/:id."},"revenueAccountId":{"type":"string","description":"The revenue account for the sale of the asset. Present only when the asset was sold and a revenue account was chosen for the sale. See id on GET accounting/accounts/:id."},"saleDocumentId":{"type":"string","description":"The invoice for the sale of the asset, created as a manual taxable document. Present only when the asset was sold. See id on GET tax-documents/manual-taxable-documents/:id."},"saleDocumentNumber":{"type":"string","description":"The number of the invoice for the sale of the asset. Present only when the asset was sold. See taxDocumentNumber on GET tax-documents/manual-taxable-documents/:id."},"vatPercentageId":{"type":"string","description":"The tax code applied to the sale of the asset. Present only when the asset was sold and a tax code was applied to the sale. See lines.id on GET accounting/tax-configurations/:id."},"valueAllocationId":{"type":"string","description":"The value accounting tags set on the fixed asset. Absent when the fixed asset has no tags."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Always present — the column is set on every row, and R2.4.1 wants one optionality across all three read entry points. NOTE it tracks the FixedAsset row only: renaming or reassigning the underlying CompanyAsset does not move it."},"sources":{"type":"array","items":{"type":"object","properties":{"journalEntryLineId":{"type":"string","description":"The journal entry line. It is the id of a row of kind 'journalEntryLine' on GET unscheduled-fixed-assets before registration."},"journalEntryId":{"type":"string","description":"The journal entry the line belongs to. See id on GET accounting/journal-entries/:id."},"source":{"type":"string","description":"The document line the journal entry line was posted from, or else the line's reference. Absent when it has neither."}},"additionalProperties":false,"required":["journalEntryLineId","journalEntryId"]},"description":"The journal entry lines the fixed asset was registered from, in its own book: one for a fixed asset registered from a line (POST fixed-assets), several for one that combines lines, and none for an imported fixed asset. Use journalEntryLineId to tell which fixed asset holds a line, or filter POST fixed-assets/search on sourceJournalEntryLineIds."}},"additionalProperties":false,"required":["id","fixedAssetStatus","companyAssetId","lastModifiedDate","sources"]},"description":"The fixed assets on this page, most recently created first. An empty array when nothing matches.","examples":[[{"id":"9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915","fixedAssetNumber":"FA-000142","fixedAssetStatus":"active","companyAssetId":"3a7e5c81-9b24-4d0f-8e63-1c95af207b48","name":"Forklift - Warehouse 2","entityId":"c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9","assetStatus":"inUse","assetNumber":"CA-0881","serialNumber":"SN-77120934","assetTag":"WH2-FORK-03","typeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","typeName":"Machinery","currency":"EUR","inServiceDate":"2024-04-01","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationStatus":"Ongoing","acquisitionValueAmount":"42000","depreciatedAmount":"13333.33","remainingValue":"28666.67","lastModifiedDate":"2026-08-18T09:14:22.517Z","sources":[{"journalEntryLineId":"3f6a1c88-9b27-4d05-a6e3-0c9d4b7e21f5","journalEntryId":"b81e40d2-6c9a-4f13-9e57-2d0a7c63f914","source":"VB-000318 / 1"}]}]]},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean","description":"Whether more fixed assets match after this page."},"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as `page.cursor`. Absent on the last page."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether more fixed assets match, and the cursor for the next page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchFixedAssetsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Limits results to the fixed assets with these ids. The match is exact."},"sourceJournalEntryLineIds":{"type":"array","items":{"type":"string"},"description":"Limits results to the fixed assets registered from any of these journal entry lines, each in the line's own book. The match is exact. See sources[].journalEntryLineId."},"fixedAssetNumber":{"type":"string","description":"Limits results to the fixed asset with this fixed asset number. The match is exact and case-sensitive. Example: 'FA-1'."},"assetNumber":{"type":"string","description":"Limits results to the fixed assets with this asset number. The match is exact and case-sensitive. All the fixed assets of the asset are returned, one for each book it is recorded in."},"serialNumber":{"type":"string","description":"Limits results to fixed assets whose asset has this serial number. The match is exact and case-sensitive."},"name":{"type":"string","description":"Limits results to fixed assets whose name contains this text. The match is case-insensitive, and % and _ match as ordinary characters. Spaces at the start and end are ignored. If the text is empty or only spaces, this filter is ignored."},"assetTag":{"type":"string","description":"Limits results to fixed assets whose asset tag contains this text. The match is case-insensitive, and % and _ match as ordinary characters. Spaces at the start and end are ignored. If the text is empty or only spaces, this filter is ignored."},"entityIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets whose asset belongs to any of these legal entities. The match is exact. See id on GET base/entities."},"bookIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets in any of these accounting books. The match is exact. An asset recorded in more than one book has one fixed asset in each, so send one book before you add up amounts. See id on GET accounting/books/:id."},"typeIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets of any of these types. The match is exact."},"departmentIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets whose asset is assigned to any of these departments. The match is exact. See id on GET people/departments/:id."},"businessUnitIds":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets whose asset is assigned to any of these business units. The match is exact."},"fixedAssetStatuses":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets with any of these statuses. Accepted values: 'active', 'voided'. Send ['active'] to leave out voided fixed assets."},"depreciationStatuses":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets with any of these depreciation statuses. Accepted values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. 'Completed' also matches fixed assets that have no depreciation schedule."},"depreciationMethods":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets with any of these depreciation methods. Accepted values: 'StraightLine', 'Degressive', 'Immediate', 'Bypassed'."},"depreciationIntervals":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets with any of these depreciation intervals. Accepted values: 'Monthly', 'Quarterly', 'Yearly'."},"assetStatuses":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets whose asset has any of these physical statuses. Accepted values: 'available', 'broken', 'inRepair', 'inUse', 'retired', 'disposed'."},"currencies":{"type":"array","items":{"type":"string"},"description":"Limits results to fixed assets in any of these currencies. Format: ISO 4217, for example 'EUR'. The match is exact and case-sensitive."},"inServiceDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Limits results to fixed assets placed in service on or after this date. Format: YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Limits results to fixed assets placed in service on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The range of in-service dates to match. Send start, end, or both."},"acquisitionDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Limits results to fixed assets acquired on or after this date. Format: YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Limits results to fixed assets acquired on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The range of acquisition dates to match. Send start, end, or both."},"disposalDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Limits results to fixed assets disposed of on or after this date. Format: YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Limits results to fixed assets disposed of on or before this date. Format: YYYY-MM-DD."}},"additionalProperties":false,"description":"The range of disposal dates to match. Send start, end, or both."},"disposed":{"type":"boolean","description":"When true, returns only fixed assets that have been disposed of. When false, returns only fixed assets that have not been disposed of. Omit to return both."},"acquisitionValueAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"Limits results to fixed assets with an acquisitionValueAmount of this value or more."},"max":{"type":"string","format":"decimal","description":"Limits results to fixed assets with an acquisitionValueAmount of this value or less."}},"additionalProperties":false,"description":"The range of acquisition values to match. Each fixed asset's value is compared in its own `acquisitionValueCurrency`, without conversion. Send min, max, or both."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"Limits results to fixed assets that last changed at or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"end":{"type":"string","description":"Limits results to fixed assets that last changed at or before this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The range of last-change times to match, in UTC. Send start, end, or both."}},"additionalProperties":false,"description":"The filters to apply. A fixed asset must match every filter you send. Omit to return all fixed assets. If you send an empty list for a filter, that filter is ignored.","examples":[{"serialNumber":"SN-77120934"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Omit on the first request."},"size":{"type":"number","description":"The number of fixed assets per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, and a value below 1 as 1, not rejected."}},"additionalProperties":false,"description":"The page of results to return. Omit for the first page."}},"additionalProperties":false},"getFixedAssetTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the fixed asset type — the public identifier of this record.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]},"name":{"type":"string","description":"Display name of the fixed asset type, e.g. 'Machinery'. Unique per tenant is NOT guaranteed by this contract; treat id as the identity.","examples":["Machinery"]},"active":{"type":"boolean","description":"Whether the type is usable for business users. A type is deactivated rather than deleted once assets reference it, so an inactive type is still returned here and by the collection. Absent on legacy rows that predate the column, which should be read as active.","examples":[true]},"defaultUsefulLife":{"type":"number","description":"Number of depreciation periods a new asset of this type inherits as its useful life. A whole COUNT of periods, not an amount and not a duration: the depreciation interval that gives it units (monthly, quarterly, yearly) lives on the asset, so this number alone does not say whether it means months or years. Absent when the type sets no default.","examples":[60]},"groupId":{"type":"string","description":"Platform id (a UUID) of the FixedAssetTypeGroup this type belongs to. Absent on an ungrouped type. That group may itself have a parent group, which this API does not walk.","examples":["2e8c14a9-6b73-4f52-9d01-8a3f7e0c5b26"]},"groupName":{"type":"string","description":"Display name of the group named by groupId, carried alongside it so the common grouping needs no second call. Absent whenever groupId is.","examples":["Plant and Equipment"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset type record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). NOTE it tracks the FixedAssetType row only: renaming the group a type belongs to does not move it.","examples":["2026-08-18T09:14:22.517Z"]},"bookIds":{"type":"array","items":{"type":"string"},"description":"Platform ids (UUIDs) of the accounting books the type is in. See id on GET accounting/books/:id. A type is in at least one book; a fixed asset can use the type only in these books. Send this array back as bookIds on PATCH fixed-asset-types/:id to keep the books, or change it to change them. Not on the collection: GET fixed-asset-types cannot carry an array.","examples":[["4a1d7c52-93e8-4f06-b2c1-7e5d08a39f64"]]}},"additionalProperties":false,"required":["id","name","lastModifiedDate","bookIds"]},"updateDepreciationPolicyOutput":{"type":"object","properties":{},"additionalProperties":false},"updateDepreciationPolicyInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the depreciation policy. Unique within the tenant. Not blank. Omit to leave unchanged.","examples":["Office Equipment — 4 Year Straight Line"]},"description":{"type":"string","description":"A description of the depreciation policy. Omit to leave unchanged; send an empty string to clear it."},"depreciationMethod":{"enum":["StraightLine","Degressive","Immediate","Bypassed"],"description":"The depreciation method. Omit to leave unchanged. Fixed assets already set up keep their method."},"depreciationConvention":{"enum":["FullMonth","MidMonth","MidYear","SixMonthRule","ProrateFirstLast","ActualDays"],"description":"How the method treats time. 'StraightLine' accepts all of them, 'Degressive' only 'FullMonth', and 'Immediate' and 'Bypassed' none. Omit to leave unchanged; it is cleared when depreciationMethod changes to 'Immediate' or 'Bypassed'."},"depreciationInterval":{"enum":["Monthly","Quarterly","Yearly"],"description":"The length of each depreciation period. Omit to leave unchanged."},"bookId":{"type":"string","description":"The accounting book the depreciation policy applies to. See id on GET accounting/books/:id. Omit to leave unchanged."},"assetAccountId":{"type":"string","description":"The balance sheet account that holds the cost of fixed assets under this policy. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"accumulatedDepreciationAccountId":{"type":"string","description":"The accumulated depreciation account. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"depreciationExpenseAccountId":{"type":"string","description":"The depreciation expense account. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"gainAccountId":{"type":"string","description":"The account for gains on disposal. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"lossAccountId":{"type":"string","description":"The account for losses on disposal. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"entityIds":{"type":"array","items":{"type":"string"},"description":"The legal entities the depreciation policy is set up for, as a whole set: each at most once, and a stored legal entity you leave out is removed. See id on GET base/entities. Omit to leave unchanged; send an empty array to clear them."},"createRules":{"type":"array","items":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string","description":"The fixed asset type to add a rule for. The policy must not have a rule for it yet."},"code":{"type":"string","description":"A free-text code for the rule. An empty string is treated as absent."},"usefulLife":{"type":"number","description":"The useful life, a whole number of at least 1, counted in `usefulLifeDurationType` units. Required for 'year' and 'month' (MISSING_DEPRECIATION_POLICY_USEFUL_LIFE); refused with FIELD_NOT_APPLICABLE for 'custom'."},"usefulLifeDurationType":{"enum":["year","month","custom"],"description":"The unit of `usefulLife`."},"minimumAmount":{"type":"string","format":"decimal","description":"The capitalization threshold, in the rule's currency (see `currency`). Not negative."},"currency":{"type":"string","description":"The ISO 4217 code of the currency `minimumAmount` is in. Must be a currency the tenant defines."},"belowThresholdDepreciationMethod":{"enum":["capitalizeAndDepreciateUsefulLife","capitalizeAndDepreciateImmediately","expense"],"description":"How a fixed asset below the capitalization threshold is treated."},"available":{"type":"boolean","description":"Whether the rule can be used for new fixed assets. Defaults to true."}},"additionalProperties":false,"required":["fixedAssetTypeId","usefulLifeDurationType","minimumAmount","currency","belowThresholdDepreciationMethod"]},"description":"Rules to add, one per fixed asset type the policy has no rule for yet (a type it has one for fails with DUPLICATE_FIXED_ASSET_TYPE_IDS).","examples":[[{"fixedAssetTypeId":"5e1c7a92-3d48-4b06-8f21-9a6d0c3e7b15","usefulLife":3,"usefulLifeDurationType":"year","minimumAmount":"250","currency":"USD","belowThresholdDepreciationMethod":"expense"}]]},"updateRules":{"type":"array","items":{"type":"object","properties":{"fixedAssetTypeId":{"type":"string","description":"The fixed asset type of the stored rule to change."},"code":{"type":"string","description":"A free-text code for the rule. Omit to leave unchanged; send an empty string to clear it."},"usefulLife":{"type":"number","description":"The useful life, a whole number of at least 1, counted in `usefulLifeDurationType` units. Omit to leave unchanged. It cannot be cleared on a 'year' or 'month' rule (MISSING_DEPRECIATION_POLICY_USEFUL_LIFE); changing the term to 'custom' clears it, and sending one for a 'custom' rule fails with FIELD_NOT_APPLICABLE."},"usefulLifeDurationType":{"enum":["year","month","custom"],"description":"The unit of `usefulLife`. Omit to leave unchanged."},"minimumAmount":{"type":"string","format":"decimal","description":"The capitalization threshold, in the rule's currency (see `currency`). Not negative. Omit to leave unchanged."},"currency":{"type":"string","description":"The ISO 4217 code of the currency `minimumAmount` is in. Must be a currency the tenant defines. Omit to leave unchanged."},"belowThresholdDepreciationMethod":{"enum":["capitalizeAndDepreciateUsefulLife","capitalizeAndDepreciateImmediately","expense"],"description":"How a fixed asset below the capitalization threshold is treated. Omit to leave unchanged."},"available":{"type":"boolean","description":"Whether the rule can be used for new fixed assets. Omit to leave unchanged."}},"additionalProperties":false,"required":["fixedAssetTypeId"]},"description":"Rules to change, each matched by fixedAssetTypeId to a stored rule (DEPRECIATION_RULE_NOT_FOUND if the policy has none for it). A field you leave out keeps its value.","examples":[[{"fixedAssetTypeId":"7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a","usefulLife":4}]]},"deleteRules":{"type":"array","items":{"type":"string"},"description":"The fixedAssetTypeIds of the rules to remove (DEPRECIATION_RULE_NOT_FOUND if the policy has none for one). A rule fixed assets use cannot be removed (USED_FIXED_ASSET_TYPE).","examples":[["0f4b8d26-7a19-4c53-b2e8-1d6a9f3c5e70"]]}},"additionalProperties":false},"commitInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentStatus":{"type":"string","description":"The status the revaluation is now in, read back from the document. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The unique identifier for the journal entry the commit wrote. Absent when the posting reported none. See id on GET accounting/journal-entries/:id.","examples":["3a91c74e-6b05-4d28-91f6-8c2e70a5d413"]},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"What the document moved on the balance sheet, in the revaluation's currency. Negative for a write-down.","examples":["-450"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the posting. An empty array on a clean run. The commit succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitInventoryRevaluationInput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteInventoryRevaluationsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted revaluations, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteInventoryRevaluationsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the revaluations to delete. If any is missing or is not a draft, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"depreciationSchedulesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the depreciation schedule.","examples":["7c2e5a91-3f84-4b60-9d17-a5e8f2c04b39"]},"scheduleNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation schedule number. Unique within the tenant. Example: 'DS-0042'.","examples":["DS-0042"]},"fixedAssetId":{"type":"number","description":"The internal number of the fixed asset the schedule depreciates. It is not the `id` that the fixed asset endpoints use.","examples":[3187]},"entityId":{"type":"number","description":"The internal number of the legal entity that owns the fixed asset. It is not the `id` that the legal entity endpoints use.","examples":[1]},"bookId":{"type":"number","description":"The internal number of the accounting book the fixed asset is tracked in. It is not the `id` that the accounting book endpoints use, or the `bookId` on a depreciation policy.","examples":[1]},"depreciationRuleId":{"type":"number","description":"The internal number of the depreciation rule applied to the fixed asset. A rule links a depreciation policy to a fixed asset type and sets the useful life.","examples":[12]},"status":{"type":"string","description":"The status of the schedule. Possible values: 'NotStarted' (no line has been recorded), 'Ongoing' (some lines have been recorded), 'Completed' (every line has been recorded), 'Disposed' (the fixed asset was disposed of), 'Voided' (the fixed asset was voided).","examples":["Ongoing"]},"acquisitionDate":{"type":"string","format":"date","description":"The date the fixed asset was acquired. Format: YYYY-MM-DD. It can be earlier than startDate.","examples":["2024-01-15"]},"startDate":{"type":"string","format":"date","description":"The date depreciation starts. Format: YYYY-MM-DD.","examples":["2024-02-01"]},"endDate":{"type":"string","format":"date","description":"The last day of depreciation. Format: YYYY-MM-DD.","examples":["2029-01-31"]},"currency":{"type":"string","description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"acquisitionValue":{"type":"string","format":"decimal","description":"The acquisition cost of the fixed asset, in the `currency`.","examples":["24000.00"]},"depreciableAmount":{"type":"string","format":"decimal","description":"The total amount to depreciate over the schedule, in the `currency`. Formula: the fixed asset's depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValue - salvageValueAmount. See depreciationStartValueAmount and salvageValueAmount on GET fixed-assets/:id.","examples":["21600.00"]},"depreciatedAmount":{"type":"string","format":"decimal","description":"The depreciation recorded on this schedule, in the `currency`. Formula: the sum of the recorded schedule lines. Lines that have not been recorded do not count, whatever their dates.","examples":["7560.00"]},"remainingValue":{"type":"string","format":"decimal","description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValue - depreciatedAmount, or when the fixed asset has a depreciationStartValueAmount, depreciationStartValueAmount - depreciatedAmount. It is 0 once the fixed asset is voided, retired, or disposed of.","examples":["16440.00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the depreciation schedule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Recording depreciation changes depreciatedAmount and remainingValue. It updates lastModifiedDate only when the schedule's status changes.","examples":["2026-08-14T09:12:33.000Z"]}},"additionalProperties":false},"recordDepreciationOutput":{"type":"object","properties":{"asyncExecution":{"type":"boolean","description":"Whether the recording was queued to run in the background. True when you sent more than 35 line ids. When true, the journal entries do not exist yet, and a problem with the lines is not reported in the response.","examples":[false]},"lineCount":{"type":"number","description":"The number of line ids you sent, including duplicates and ids that match no line. It can be more than the number of lines recorded.","examples":[3]}},"additionalProperties":false,"required":["asyncExecution","lineCount"]},"recordDepreciationInput":{"type":"object","properties":{"lineIds":{"type":"array","items":{"type":"number"},"description":"The internal numbers of the depreciation schedule lines to record. Send at least one. An id that matches no line is skipped, as long as at least one id matches. A line that is already recorded cannot be recorded again, and sending one fails the request.","examples":[[101,102,103]]},"postingDate":{"type":"string","format":"date","description":"The posting date of the journal entries that recording creates. Format: YYYY-MM-DD. The date must fall in an accounting period of the legal entity's book that is open for posting. It does not have to fall in the period the lines belong to.","examples":["2026-09-30"]}},"additionalProperties":false,"required":["lineIds","postingDate"]},"getUnscheduledFixedAssetOutput":{"type":"object","properties":{"id":{"type":"string","description":"The journal entry line's id (kind 'journalEntryLine') or the draft fixed asset's id (kind 'draft'). Pass it to POST fixed-assets as sourceJournalEntryLineId or draftFixedAssetId, by kind, and to GET unscheduled-fixed-assets/:id.","examples":["52e7c0a9-1d84-4b36-9f20-8c3a6b15e7d4"]},"kind":{"type":"string","description":"What the row is. Possible values: 'journalEntryLine', a posted line no fixed asset holds; 'draft', a draft fixed asset saved, split or combined on the Unscheduled tab. It is an open set: skip a row with a value you do not know.","examples":["draft"]},"entityId":{"type":"string","description":"The legal entity of the row. See id on GET base/entities.","examples":["c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9"]},"bookId":{"type":"string","description":"The accounting book of the row: the line's journal entry's book, or the draft's book. A fixed asset registered from the row is recorded in this book. See id on GET accounting/books/:id.","examples":["e0c37a94-2d15-4b86-9f42-5a7c81de03b6"]},"sourceJournalEntryLineId":{"type":"string","description":"The journal entry line: for kind 'journalEntryLine' the row itself, for kind 'draft' the draft's source line in its book (the first one, for a draft that combines several lines). Absent for a draft with no source line.","examples":["a0d4e9b2-7c15-4f83-b6e1-29c58d07f3a4"]},"journalEntryId":{"type":"string","description":"The journal entry of sourceJournalEntryLineId. See id on GET accounting/journal-entries/:id.","examples":["b81e40d2-6c9a-4f13-9e57-2d0a7c63f914"]},"accountId":{"type":"string","description":"The asset account of sourceJournalEntryLineId. The allowed types follow from it. See id on GET accounting/accounts/:id.","examples":["6d2c9e41-0b87-4a35-bf1d-93e5a7c08f26"]},"name":{"type":"string","description":"The name a fixed asset registered from the row gets by default: the draft's name, or the asset's name in another book, or else the line's description. Absent when there is none.","examples":["Laptops (2 of 4)"]},"transactionDate":{"type":"string","format":"date","description":"The line's transaction date, or the draft's acquisition date. A fixed asset registered from the row is acquired on this date. Format YYYY-MM-DD.","examples":["2026-03-11"]},"amount":{"type":"string","format":"decimal","description":"The value a fixed asset registered from the row is capitalized at, in currency: the line's amount, or the draft's acquisition value (its share of the line, for a split).","examples":["3000"]},"currency":{"type":"string","description":"The currency of amount. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"reference":{"type":"string","description":"The document line sourceJournalEntryLineId was posted from, or else its reference. Absent when it has neither.","examples":["VB-000318 / 2"]},"allowedTypeCount":{"type":"number","description":"How many fixed asset types the row can be registered as: the types the depreciation policies of the book cover for accountId (for a draft with no source line, every type they cover). A draft's saved type counts while its rule is unavailable. 0 when none qualifies.","examples":[2]},"defaultTypeId":{"type":"string","description":"The type POST fixed-assets uses when you leave typeId out: the draft's saved type while it is one of the allowed types, or else the only type that qualifies. Absent when you must choose. See id on GET fixed-asset-types/:id.","examples":["4e8a1f60-2b93-4c07-8d5e-71f6a2c9b034"]},"typeId":{"type":"string","description":"The type saved on the draft. Absent for a journal entry line, and for a draft saved without one.","examples":["4e8a1f60-2b93-4c07-8d5e-71f6a2c9b034"]},"inServiceDate":{"type":"string","format":"date","description":"The in-service date saved on the draft. Absent for a journal entry line. Format YYYY-MM-DD.","examples":["2026-04-01"]},"depreciationMethod":{"type":"string","description":"The depreciation method saved on the draft. Absent for a journal entry line.","examples":["StraightLine"]},"depreciationInterval":{"type":"string","description":"The depreciation interval saved on the draft. Absent for a journal entry line.","examples":["Monthly"]},"depreciationConvention":{"type":"string","description":"The depreciation convention saved on the draft. Absent for a journal entry line.","examples":["FullMonth"]},"degressionRate":{"type":"string","format":"decimal","description":"The degression rate saved on the draft, as a decimal fraction: 0.2 is 20%. Absent for a journal entry line."},"salvageValueAmount":{"type":"string","format":"decimal","description":"The salvage value saved on the draft, in currency. Absent for a journal entry line.","examples":["0"]},"serialNumber":{"type":"string","description":"The serial number saved on the draft. Absent for a journal entry line."},"assetTag":{"type":"string","description":"The asset tag saved on the draft. Absent for a journal entry line."},"departmentId":{"type":"string","description":"The department saved on the draft. Absent for a journal entry line. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit saved on the draft. Absent for a journal entry line."},"allowedTypes":{"type":"array","items":{"type":"object","properties":{"typeId":{"type":"string","description":"The fixed asset type. Send it as typeId to POST fixed-assets."},"typeName":{"type":"string","description":"The name of the fixed asset type."},"depreciationPolicyId":{"type":"string","description":"The depreciation policy that covers the type for the account. See id on GET depreciation-policies/:id."},"depreciationPolicyName":{"type":"string","description":"The name of the depreciation policy."},"depreciationMethod":{"type":"string","description":"The policy's depreciation method, the default when you leave depreciationMethod out."},"depreciationInterval":{"type":"string","description":"The policy's depreciation interval, the default when you leave depreciationInterval out."},"depreciationConvention":{"type":"string","description":"The policy's depreciation convention. Absent when the policy has none."},"usefulLife":{"type":"number","description":"The useful life the rule sets for the type, in usefulLifeUnit. Absent for a custom term."},"usefulLifeUnit":{"type":"string","description":"The unit of usefulLife. Possible values: 'year', 'month', 'custom'."},"minimumAmount":{"type":"string","format":"decimal","description":"The capitalization threshold: below this acquisition value the rule's belowThresholdDepreciationMethod applies, in minimumAmountCurrency."},"minimumAmountCurrency":{"type":"string","description":"The currency of minimumAmount. Format: ISO 4217."},"belowThresholdDepreciationMethod":{"type":"string","description":"What happens to an asset below minimumAmount. Possible values: 'capitalizeAndDepreciateUsefulLife', 'capitalizeAndDepreciateImmediately', 'expense'."}},"additionalProperties":false,"required":["typeId","typeName","depreciationPolicyId","depreciationPolicyName","depreciationMethod","depreciationInterval"]},"description":"The types the row can be registered as, with the terms of the depreciation policy and rule each one takes: the types the depreciation policies of the book cover for accountId (for a draft with no source line, every type they cover). A draft's saved type is included while its rule is unavailable. Empty when none qualifies.","examples":[[{"typeId":"4e8a1f60-2b93-4c07-8d5e-71f6a2c9b034","typeName":"IT equipment","depreciationPolicyId":"8c1f7a42-6d09-4b5e-a3f8-0e27d91c64b5","depreciationPolicyName":"Office and IT","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationConvention":"FullMonth","usefulLife":3,"usefulLifeUnit":"year","minimumAmount":"800","minimumAmountCurrency":"EUR","belowThresholdDepreciationMethod":"expense"},{"typeId":"9a3d5c17-0e6b-4f28-b4a1-c7d2e8f05b39","typeName":"Furniture","depreciationPolicyId":"8c1f7a42-6d09-4b5e-a3f8-0e27d91c64b5","depreciationPolicyName":"Office and IT","depreciationMethod":"StraightLine","depreciationInterval":"Monthly","depreciationConvention":"FullMonth","usefulLife":8,"usefulLifeUnit":"year","minimumAmount":"800","minimumAmountCurrency":"EUR","belowThresholdDepreciationMethod":"capitalizeAndDepreciateUsefulLife"}]]},"lastModifiedDate":{"type":"string","format":"date-time","description":"When the row last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ): the journal entry line's, or for a draft the later of its fixed asset's and its asset's, so an edit made to a draft on the Unscheduled tab moves it.","examples":["2026-03-12T08:41:07.000Z"]}},"additionalProperties":false,"required":["id","kind","entityId","bookId","transactionDate","amount","currency","allowedTypeCount","allowedTypes","lastModifiedDate"]},"listFixedAssetsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed asset.","examples":["9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915"]},"fixedAssetNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fixed asset number. Unique within the tenant. Each book's fixed asset has its own number, unlike assetNumber, which is the same in every book. Example: 'FA-1'.","examples":["FA-000142"]},"fixedAssetStatus":{"enum":["active","voided"],"description":"The status of the fixed asset. Possible values: 'active', 'voided'.","examples":["active"]},"companyAssetId":{"type":"string","description":"The asset this fixed asset records. Fixed assets of the same asset in different books have the same companyAssetId.","examples":["3a7e5c81-9b24-4d0f-8e63-1c95af207b48"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the asset.","examples":["Forklift - Warehouse 2"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that owns the asset. See id on GET base/entities.","examples":["c41d8e07-5f62-4a93-b7d1-8e0364f5a2c9"]},"assetStatus":{"anyOf":[{"enum":["available","broken","inRepair","inUse","retired","disposed"]},{"type":"null"}],"description":"The physical status of the asset. Disposing of an asset sets assetStatus to 'disposed' and leaves fixedAssetStatus as 'active'.","examples":["inUse"]},"assetNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The asset number. It is unique within the tenant, and all fixed assets of the same asset have the same number.","examples":["CA-0881"]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The serial number of the asset. It is free text and does not have to be unique.","examples":["SN-77120934"]},"assetTag":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The asset tag of the asset, such as the code on a label attached to it. It is free text.","examples":["WH2-FORK-03"]},"acquisitionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the asset was acquired. Format: YYYY-MM-DD.","examples":["2024-03-11"]},"departmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The department the asset is assigned to. Absent when the asset has no department. See id on GET people/departments/:id."},"businessUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The business unit the asset is assigned to. Absent when the asset has no business unit."},"typeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of the fixed asset.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]},"typeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the fixed asset type. Example: 'Machinery'.","examples":["Machinery"]},"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting book the fixed asset is recorded in. See id on GET accounting/books/:id.","examples":["e0c37a94-2d15-4b86-9f42-5a7c81de03b6"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the fixed asset. Format: ISO 4217, for example 'EUR'.","examples":["EUR"]},"inServiceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the asset was placed in service. The depreciation schedule is calculated from this date. Format: YYYY-MM-DD.","examples":["2024-04-01"]},"depreciationMethod":{"anyOf":[{"enum":["StraightLine","Degressive","Immediate","Bypassed"]},{"type":"null"}],"description":"The depreciation method of the fixed asset. Possible values: 'StraightLine', 'Degressive', 'Immediate', 'Bypassed'.","examples":["StraightLine"]},"depreciationInterval":{"anyOf":[{"enum":["Monthly","Quarterly","Yearly"]},{"type":"null"}],"description":"The interval at which depreciation is recorded for the fixed asset. Possible values: 'Monthly', 'Quarterly', 'Yearly'.","examples":["Monthly"]},"depreciationConvention":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How the depreciation method treats time. Possible values: 'FullMonth', 'MidMonth', 'MidYear', 'SixMonthRule', 'ProrateFirstLast', 'ActualDays'. Absent when depreciationMethod is 'Immediate' or 'Bypassed'.","examples":["FullMonth"]},"depreciationStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The depreciation status of the fixed asset. Possible values: 'NotStarted', 'Ongoing', 'Completed', 'Disposed', 'Voided'. A fixed asset with no depreciation schedule also has the value 'Completed', so check depreciatedAmount before you treat a fixed asset as fully depreciated.","examples":["Ongoing"]},"degressionRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The yearly rate of declining-balance depreciation, as a decimal fraction. For example, 0.2 is 20%. Used only when depreciationMethod is 'Degressive'."},"acquisitionValueAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value the fixed asset was capitalized at, in the `acquisitionValueCurrency`.","examples":["42000"]},"acquisitionValueCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of acquisitionValueAmount. Format: ISO 4217, for example 'EUR'."},"salvageValueAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value the asset is expected to have at the end of its useful life (salvage value, also called residual value), in the `salvageValueCurrency`. Depreciation reduces the asset's net book value to this amount, not to zero."},"salvageValueCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of salvageValueAmount. Format: ISO 4217, for example 'EUR'."},"depreciationStartValueAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value the fixed asset's depreciation started from, in the `currency`. Present only for imported fixed assets."},"depreciableAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount that is depreciated over the useful life of the fixed asset, in the `currency`. Formula: depreciationStartValueAmount - salvageValueAmount, or when depreciationStartValueAmount is absent, acquisitionValueAmount - salvageValueAmount.","examples":["40000"]},"depreciatedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total depreciation of the fixed asset, in the `currency`. Formula: initialDepreciatedAmount + the depreciation recorded on the depreciation schedule.","examples":["13333.33"]},"initialDepreciatedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The depreciation the fixed asset had before it was imported, in the `currency`. Formula: acquisitionValueAmount - depreciationStartValueAmount, or 0 when depreciationStartValueAmount is absent."},"remainingValue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The net book value of the fixed asset, in the `currency`. Formula: acquisitionValueAmount - depreciatedAmount. It is 0 when fixedAssetStatus is 'voided' or assetStatus is 'retired' or 'disposed'.","examples":["28666.67"]},"disposalDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the asset was disposed of. Format: YYYY-MM-DD. Present only when the asset has been disposed of."},"disposalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The value written off when the asset was disposed of. It carries its own currency, which this endpoint does not expose and which is not necessarily `currency`. Present only when the asset has been disposed of."},"disposalEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The journal entry that records the disposal. Present only when the asset has been disposed of. See id on GET accounting/journal-entries/:id."},"disposalEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the journal entry that records the disposal. Present only when the asset has been disposed of. Example: 'JE-4412'."},"soldAmountAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The amount the asset was sold for, in the `soldAmountCurrency`. Present only when the asset was sold."},"soldAmountCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of soldAmountAmount. Format: ISO 4217, for example 'EUR'. It can differ from currency."},"saleEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Platform id (a UUID) of the journal entry recording the sale. Absent when the asset wasn't sold."},"saleEntryNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable number of the sale journal entry, carried alongside saleEntryId."},"saleReceivingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account the sale proceeds were received into. Present only when the asset was sold. See id on GET accounting/accounts/:id."},"revenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The revenue account for the sale of the asset. Present only when the asset was sold and a revenue account was chosen for the sale. See id on GET accounting/accounts/:id."},"saleDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice for the sale of the asset, created as a manual taxable document. Present only when the asset was sold. See id on GET tax-documents/manual-taxable-documents/:id."},"saleDocumentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The number of the invoice for the sale of the asset. Present only when the asset was sold. See taxDocumentNumber on GET tax-documents/manual-taxable-documents/:id."},"vatPercentageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax code applied to the sale of the asset. Present only when the asset was sold and a tax code was applied to the sale. See lines.id on GET accounting/tax-configurations/:id."},"valueAllocationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value accounting tags set on the fixed asset. Absent when the fixed asset has no tags."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the fixed asset record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). NOTE it tracks the FixedAsset row only: renaming or reassigning the underlying CompanyAsset does not move it.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"createFixedAssetOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the registered fixed asset. For a draft, the draft's id.","examples":["9d5b1f42-7c30-4e88-b1a6-2f0c7e34d915"]}},"additionalProperties":false,"required":["id"]},"createFixedAssetInput":{"type":"object","properties":{"sourceJournalEntryLineId":{"type":"string","description":"The journal entry line to register as a fixed asset: the id of a row of kind 'journalEntryLine' on GET unscheduled-fixed-assets. The line sets the legal entity, book, currency, acquisition value and acquisition date. Send this or draftFixedAssetId, not both.","examples":["3f6a1c88-9b27-4d05-a6e3-0c9d4b7e21f5"]},"draftFixedAssetId":{"type":"string","description":"The draft fixed asset to register: the id of a row of kind 'draft' on GET unscheduled-fixed-assets. The draft is published and keeps this id. Send this or sourceJournalEntryLineId, not both."},"typeId":{"type":"string","description":"The type of the fixed asset. See typeId in allowedTypes on GET unscheduled-fixed-assets/:id. Defaults to the row's defaultTypeId: the draft's saved type while it is allowed, or else the only type that qualifies; required when there is no default."},"name":{"type":"string","description":"The name of the asset. Defaults to the draft's name, or the asset's name in another book, or else the line's description. A blank name is refused with FIELD_REQUIRED.","examples":["Forklift - Warehouse 2"]},"serialNumber":{"type":"string","description":"The serial number of the asset. Free text. Defaults to the draft's. An empty string means none, the same as leaving it out of a line.","examples":["SN-77120934"]},"assetTag":{"type":"string","description":"The asset tag of the asset, such as the code on a label attached to it. Free text. Defaults to the draft's. An empty string means none, the same as leaving it out of a line."},"departmentId":{"type":"string","description":"The department the asset is assigned to. See id on GET people/departments/:id. Defaults to the draft's or the line's department."},"businessUnitId":{"type":"string","description":"The business unit the asset is assigned to. Defaults to the draft's or the line's business unit."},"inServiceDate":{"type":"string","format":"date","description":"The date the asset was placed in service. The depreciation schedule is calculated from this date. Format YYYY-MM-DD. Defaults to the draft's in-service date, or else the line's transaction date.","examples":["2026-04-01"]},"depreciationMethod":{"type":"string","description":"The depreciation method. Accepted values: 'StraightLine', 'Degressive', 'Immediate', 'Bypassed'. Defaults to the draft's method, or else the depreciation policy's. 'Bypassed' creates no depreciation schedule."},"depreciationInterval":{"type":"string","description":"The interval at which depreciation is recorded. Accepted values: 'Monthly', 'Quarterly', 'Yearly'. Defaults to the draft's interval, or else the depreciation policy's."},"depreciationConvention":{"type":"string","description":"How the depreciation method treats time. Accepted values: 'FullMonth', 'MidMonth', 'MidYear', 'SixMonthRule', 'ProrateFirstLast', 'ActualDays'. 'StraightLine' accepts all of them, 'Degressive' only 'FullMonth', and 'Immediate' and 'Bypassed' none. Defaults to the draft's convention while it suits the method, or else the depreciation policy's, or the method's default when the method does not accept the policy's."},"degressionRate":{"type":"string","format":"decimal","description":"The yearly rate of declining-balance depreciation, as a decimal fraction, the same scale GET fixed-assets/:id returns. For example, 0.25 is 25%. Must be greater than 0 and at most 1, or the request fails with INVALID_FIELD_VALUE. Required when depreciationMethod is 'Degressive' (a draft's saved rate counts), and refused with FIELD_NOT_APPLICABLE for any other method."},"salvageValueAmount":{"type":"string","format":"decimal","description":"The value the asset is expected to have at the end of its useful life, in the source's currency. Defaults to the draft's, or else 0. Must be at least 0 and at most the acquisition value, or the request fails with INVALID_FIELD_VALUE.","examples":["2000"]}},"additionalProperties":false},"searchSalesReturnsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the sales return."},"documentNumber":{"type":"string","description":"The sales return number, for example 'SR-1042'. Assigned on create and never supplied by you."},"documentStatus":{"type":"string","description":"The status of the return. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the return is dated. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"When the goods are expected back, or came back. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the return belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer returning the goods. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"businessPartnerName":{"type":"string","description":"The name of that customer."},"sourceDocumentId":{"type":"string","description":"The document the goods went out on, where the platform recorded one, as its own numeric id in a string. It is not an identifier this API can look up. The usable link is sourceDocumentLineId on the line."},"sourceDocumentType":{"type":"string","description":"What kind of document that was, for example 'SalesDelivery'."},"referenceNumber":{"type":"string","description":"The customer's own reference for the return, for example an RMA number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods coming back."},"returnType":{"type":"string","description":"How the business classifies the return."},"currency":{"type":"string","description":"The currency every amount on the document is in. Format ISO 4217, for example 'EUR'. A return is valued in the currency it was sold in, which need not be the legal entity's functional currency."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the return, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld across the return, in the document's currency."},"notes":{"type":"string","description":"Free text on the document."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the return was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the return record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines on PATCH inventory/sales-returns/:id."},"itemId":{"type":"string","description":"The unique identifier for the item coming back. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse that receives the returned goods. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity the customer is returning, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line has not yet been received."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much of the line the inspection covered."},"approvedQuantity":{"type":"string","format":"decimal","description":"How much of the line was approved back into stock."},"rejectedQuantity":{"type":"string","format":"decimal","description":"How much of the line was rejected. Approved plus rejected equals inspected."},"inspectedDate":{"type":"string","format":"date","description":"When the inspection took place. Format YYYY-MM-DD."},"condition":{"type":"string","description":"The condition the goods arrived in, restated by the inspection. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with the goods. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why the rejected portion was rejected."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the document's currency."},"returnFeeAmount":{"type":"string","format":"decimal","description":"The fee withheld on this line, in the document's currency."},"reasonCode":{"type":"string","description":"The customer-facing reason for the return, for example 'defectiveItem'. Reporting only, it does not affect how the return is processed."},"reasonCodeId":{"type":"string","description":"The unique identifier for an internal reason code, where one was set. See id on GET inventory/reason-codes/:id."},"sourceDocumentLineId":{"type":"string","description":"The shipment line the goods went out on, where the return cites one. It is a line's id on GET inventory/shipments/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"What kind of document line that was."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the lot. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch coming back, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this batch has not yet been received."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the document's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches coming back on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"How much of this unit is still outstanding, one or zero."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the document's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units coming back, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods go into. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's batches, naming it."},"serialNumber":{"type":"string","description":"Set when this bin entry belongs to one of the line's serialized units, naming it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array. An entry naming a batchNumber or serialNumber belongs to that batch or unit, and one naming neither belongs to the line."},"inspectionDetails":{"type":"array","items":{"type":"object","properties":{"approvalStatus":{"type":"string","description":"What was decided about this portion, recorded as given."},"inspectedQuantity":{"type":"string","format":"decimal","description":"How much this finding covers."},"condition":{"type":"string","description":"The condition of this portion. Possible values: 'NEW', 'GOOD', 'USED', 'OPENED', 'DAMAGED', 'DEFECTIVE', 'EXPIRED', 'REFURBISHED'."},"disposition":{"type":"string","description":"What is to be done with this portion. Possible values: 'RETURN_TO_STOCK', 'RETURN_TO_VENDOR', 'SCRAP', 'DONATE', 'REPAIR', 'REWORK', 'CREDIT_ONLY'."},"qualityGrade":{"type":"string","description":"The grade assigned at inspection, where the business uses one."},"inspectionNotes":{"type":"string","description":"Free text from the inspector."},"rejectionReason":{"type":"string","description":"Why this portion was rejected, where it was."},"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this finding is about, as batchNumberId in batches. Tells apart two batches that share a number."},"batchNumber":{"type":"string","description":"The batch this finding is about, where it is about one."},"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this finding is about, as serialNumberId in serials."},"serialNumber":{"type":"string","description":"The serialized unit this finding is about, where it is about one."}},"additionalProperties":false,"required":["approvalStatus","inspectedQuantity"]},"description":"What the inspection found, broken down by batch or unit. Absent before the inspection runs. The line has the totals and these give the detail."}},"additionalProperties":false,"required":["id","itemId","locationId","unitId","quantity"]},"description":"The lines of the return, oldest first. A sales return always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The matching returns for this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"5e9b0c74-1a26-4d83-b5f0-73c8e2a91d46","documentNumber":"SR-1042","documentStatus":"INSPECTED","documentDate":"2026-08-14","deliveryDate":"2026-08-18","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","sourceDocumentId":"55120","sourceDocumentType":"SalesDelivery","referenceNumber":"RMA-2026-0087","trackingNumber":"3SABCD1234567","currency":"EUR","totalAmount":"144.00","returnFeeAmount":"0.00","notes":"Customer reports transit damage","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-19T15:10:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"6.00","inventoryQuantity":"6.00","openQuantity":"0.00","condition":"DAMAGED","disposition":"SCRAP","unitPrice":"24.00","reasonCode":"damagedInTransit","sourceDocumentLineId":"5c1d9a72-0e64-4a1f-8b39-2c7f4a6e15d8","sourceDocumentLineType":"IMInventorySalesDeliveryLine","notes":"Carton crushed in transit","inspectedQuantity":"6.00","approvedQuantity":"2.00","rejectedQuantity":"4.00","inspectedDate":"2026-08-19","qualityGrade":"C","rejectionReason":"Water ingress","inspectionDetails":[{"approvalStatus":"APPROVED","inspectedQuantity":"2.00","condition":"GOOD","disposition":"RETURN_TO_STOCK"},{"approvalStatus":"REJECTED","inspectedQuantity":"4.00","condition":"DAMAGED","disposition":"SCRAP","rejectionReason":"Water ingress"}]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchSalesReturnsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the return with this document number. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to returns with this status. The match is exact. Possible values: 'DRAFT', 'OPEN', 'COMMITTED', 'RECEIVED', 'INSPECTED', 'PROCESSED', 'COMPLETED', 'CANCELLED'."},"entityId":{"type":"string","description":"Limits results to returns for the legal entity with this identifier."},"businessPartnerId":{"type":"string","description":"Limits results to returns for the customer with this identifier. Despite the name, this is a customer id."},"locationId":{"type":"string","description":"Limits results to returns with a line for the warehouse with this identifier."},"itemId":{"type":"string","description":"Limits results to returns with a line for the item with this identifier."},"referenceNumber":{"type":"string","description":"Limits results to returns with this customer reference, for example an RMA number. The match is exact."},"trackingNumber":{"type":"string","description":"Limits results to returns with this carrier tracking number. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to returns dated on or after this date. Use format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to returns dated on or before this date. Use format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to returns changed on or after this time, in UTC. Use format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The criteria to apply, combined with AND. Omit to return all sales returns.","examples":[{"documentStatus":"RECEIVED"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The maximum number of returns to return. Defaults to 50. The maximum is 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"createInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned.","examples":["DEC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse location.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse location.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory decrease.","examples":["August cycle count"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"createInventoryDecreaseInput":{"type":"object","properties":{"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line comes out of it. Required. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it to use the location's owning entity. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code explaining the adjustment. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"notes":{"type":"string","description":"Free text on the inventory decrease.","examples":["Forklift damage, aisle 4"]},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to remove, in that unit. A positive number greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency. Optional: omit it to value the stock at the cost it already has, which is what a write-off ordinarily wants. A supplied value must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch being removed. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the document's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to remove, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches to take the quantity from. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Every batch named must already exist for the item, since a decrease removes lots and does not create them."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit being removed. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the document's warehouse. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The units to remove, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Every unit named must already exist."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the quantity from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number the line does not have is rejected rather than reinterpreted."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity comes out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. At least one is required.","examples":[[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["locationId","lines"]},"createFixedAssetTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the created fixed asset type.","examples":["7b2f9d13-4c68-4e51-a0d7-6f39c58e2b4a"]}},"additionalProperties":false,"required":["id"]},"createFixedAssetTypeInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the fixed asset type, e.g. 'Machinery'. Leading and trailing spaces are removed; must not be blank. Not required to be unique.","examples":["Machinery"]},"groupId":{"type":"string","description":"Platform id (a UUID) of the FixedAssetTypeGroup the type belongs to — the groupId GET fixed-asset-types/:id returns. Omit, or send an empty string, for an ungrouped type.","examples":["2e8c14a9-6b73-4f52-9d01-8a3f7e0c5b26"]},"defaultUsefulLife":{"type":"number","description":"Default useful life, in months, that a depreciation policy rule for this type is pre-filled with. A whole number from 1 to 2147483647. Omit for no default.","examples":[60]},"bookIds":{"type":"array","items":{"type":"string"},"description":"Platform ids (UUIDs) of the accounting books the type is in. See id on GET accounting/books/:id. At least one, and full books only (not adjustment books). A book sent twice counts once.","examples":[["4a1d7c52-93e8-4f06-b2c1-7e5d08a39f64"]]}},"additionalProperties":false,"required":["name","bookIds"]},"createItemAttributeDefinitionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the new attribute.","examples":["c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48"]},"name":{"type":"string","description":"The attribute's name.","examples":["Colour"]},"description":{"type":"string","description":"What the attribute is for.","examples":["Product colour"]},"valueType":{"type":"string","description":"TEXT or NUMBER.","examples":["TEXT"]},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false,"required":["id","value"]},"description":"The values this attribute allows, each with its own identifier.","examples":[[{"id":"2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03","value":"Red"},{"id":"8e1a5c39-4b62-4d17-9f08-3a7c21d5e690","value":"Green"},{"id":"5d92f7b1-6c04-4e83-a215-9b83f4e07c2d","value":"Blue"}]]}},"additionalProperties":false,"required":["id","name","values"]},"createItemAttributeDefinitionInput":{"type":"object","properties":{"name":{"type":"string","description":"The attribute's name, for example 'Colour'. Unique within the tenant.","examples":["Colour"]},"description":{"type":"string","description":"What the attribute is for. Free text, shown beside it in the UI.","examples":["Product colour"]},"valueType":{"type":"string","description":"TEXT or NUMBER. Defaults to TEXT. Under NUMBER every value must parse as a number.","examples":["TEXT"]},"values":{"type":"array","items":{"type":"string"},"description":"The values this attribute allows, for example ['Red','Green']. May be omitted to create the attribute with no values yet; there is no update route, so further values are added through the Item Attributes screen or a CSV upload.","examples":[["Red","Green","Blue"]]}},"additionalProperties":false,"required":["name"]},"applicationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the application."},"applicantNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated applicant number."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The applicant's display name."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The applicant's email address."},"personId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the person behind this application."},"recruitmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the recruitment applied to. See id on GET people/recruitments/:id."},"recruitmentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the recruitment applied to."},"positionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The position or job title the recruitment hires for."},"status":{"anyOf":[{"enum":["draft","inProcess","waiting","accpeted","rejected","withdrawn","deleted","new","purged","anonymized"]},{"type":"null"}],"description":"The status of the application."},"source":{"anyOf":[{"enum":["appliedDirectly","sourcedInternally","sourcedExternally","employeeReferral","externalRecruiter"]},{"type":"null"}],"description":"How the application arrived."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the application record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"removePositionPermissionsOutput":{"type":"object","properties":{},"additionalProperties":false},"removePositionPermissionsInput":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"},"description":"[fk: PositionGetPermissionsEndpointV1.getPositionPermissions.roleUUIDs] The uuids of the permission roles to remove."},"taskUUIDs":{"type":"array","items":{"type":"string"},"description":"[fk: PositionGetPermissionsEndpointV1.getPositionPermissions.taskUUIDs] The uuids of the permission tasks to remove."}},"additionalProperties":false},"searchAbsencesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence."},"leaveNumber":{"type":"string","description":"The absence number."},"employeeId":{"type":"string","description":"The employee the absence belongs to. See id on GET people/person/:id."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"days":{"type":"string","format":"decimal","description":"The number of absence days. May be fractional for partial days."},"status":{"enum":["requested","approved","rejected","canceled"],"description":"The status of the absence."},"leaveDescription":{"type":"string","description":"The reason for the absence."}},"additionalProperties":false,"required":["id","employeeId","absenceTypeId","startDate","endDate"]},"description":"The absences on this page. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more absences remain after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchAbsencesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"employeeId":{"type":"string","description":"Limits results to absences for this employee."},"absenceTypeId":{"type":"string","description":"Limits results to absences of this absence type."},"status":{"enum":["requested","approved","rejected","canceled"],"description":"Limits results to absences with this status."},"startsAfter":{"type":"string","format":"date-time","description":"Limits results to absences whose startDate is on or after this value, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endsBefore":{"type":"string","format":"date-time","description":"Limits results to absences whose endDate is on or before this value, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"descriptionContains":{"type":"string","description":"Limits results to absences whose description contains this text. The match is case-insensitive."}},"additionalProperties":false,"description":"The filters to apply. An absence must match every filter you send. Omit to return all absences."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of absences per page, at most 100. Defaults to 25. A value above 100 is treated as 100, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"adHocDocumentsRow":{"type":"object","properties":{"id":{"type":"string","description":"Id of the ad hoc document (a UUID).","examples":["3f2a9c14-7b6d-4e58-9a01-2c8f5d6e7a0b"]},"type":{"anyOf":[{"oneOf":[{"const":"outgoingInvoice","description":"A customer-facing invoice. Its incoming payment can be matched to a bank deposit."},{"const":"outgoingCredit","description":"A credit issued to a customer, reducing what they owe."},{"const":"incomingInvoice","description":"An invoice received from a vendor, employee or intercompany entity."},{"const":"incomingCredit","description":"A credit received from a vendor, employee or intercompany entity."}]},{"type":"null"}],"description":"Kind of document.","examples":["outgoingInvoice"]},"taxDocumentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated ad hoc document number, unique per tenant and human-readable. Absent until one has been assigned.","examples":["ADH-1042"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or the number carried over from an external system. Distinct from taxDocumentNumber, which Everest assigns.","examples":["INV-2026-0188"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Title of the document, as shown on the record. Returned but not filterable: match on it through POST accounting/ad-hoc-documents/search.","examples":["Consulting services, October"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text description of the document. Returned but not filterable: match on it through POST accounting/ad-hoc-documents/search.","examples":["Recharge of advisory hours"]},"invoiceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the document was issued. Format YYYY-MM-DD.","examples":["2026-10-31"]},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the underlying service was provided. Drives the tax point where it differs from the invoice date. Format YYYY-MM-DD.","examples":["2026-10-31"]},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date payment falls due. Absent when no due date has been set. Format YYYY-MM-DD.","examples":["2026-11-30"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR, GBP). It governs every amount on the row.","examples":["EUR"]},"paymentStatus":{"anyOf":[{"oneOf":[{"const":"paid","description":"Fully settled by payments."},{"const":"partiallyPaid","description":"Settled in part by payments; a balance remains."},{"const":"unpaid","description":"Receivable or payable in full, with nothing settled yet."},{"const":"noPaymentNeeded","description":"Posted to an account that carries no settlement, so no payment is expected."},{"const":"voided","description":"Voided. The journal entry it posted has been reversed and the document can no longer be settled."},{"const":"applied","description":"A credit fully applied against other documents."},{"const":"unapplied","description":"A credit with nothing applied yet."},{"const":"partiallyApplied","description":"A credit applied in part; a balance remains."},{"const":"noApplicationNeeded","description":"A credit posted to an account that carries no application, so none is expected."}]},{"type":"null"}],"description":"Settlement status of the document, derived by the server from the document's allocations and the AR-ness of its posting account.","examples":["unpaid"]},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Payment terms recorded on the document, as free text (e.g. 'Net 30'). Returned but not filterable.","examples":["Net 30"]},"hasAttachment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when the document has at least one attachment. The attachments themselves are not published by this API.","examples":[false]},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the account the document posts its offsetting entry to (a UUID).","examples":["a41b6c70-2d85-4f19-8c03-5e7a9b1d2f46"]},"postingPeriodId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the accounting period the document posted into (a UUID).","examples":["c82d4e90-1f63-4a27-b5d8-093e6c7a1b45"]},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the customer the document is issued to (a UUID). Set on customer-facing documents; absent on vendor, employee or intercompany ones.","examples":["7d1e8f20-3a4b-4c5d-9e60-1f2a3b4c5d6e"]},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the customer. Returned but neither filterable nor orderable, so it never travels in a URL; match on it through POST accounting/ad-hoc-documents/search.","examples":["Northwind GmbH"]},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated customer number of the customer, unique per tenant. Returned but neither filterable nor orderable: a counterparty identifier is disclosed by ordering as surely as by filtering.","examples":["CUST-0231"]},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the vendor the document is received from (a UUID). Set on vendor documents; absent otherwise.","examples":["4b5c6d7e-8f90-4a1b-9c2d-3e4f5a6b7c8d"]},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the employee the document is received from (a UUID). Set on employee documents; absent otherwise.","examples":["6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d"]},"intercompanyEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the intercompany entity the document is exchanged with (a UUID). Set on intercompany documents; absent otherwise.","examples":["0c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the legal entity the document belongs to (a UUID).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the legal entity the document belongs to. Returned but not filterable.","examples":["Everest Europe B.V."]},"totalTaxAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Sum of the tax amounts of every line, in the row's currency (see currency).","examples":["190.00"]},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Sum of the total amounts of every line — the gross document total, in the row's currency (see currency).","examples":["1190.00"]},"totalAllocatedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount already allocated to this document by payments or credits, in the row's currency (see currency).","examples":["0.00"]},"totalOpenAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Remaining unallocated balance on this document, in the row's currency (see currency). A voided document keeps its open amount and a noPaymentNeeded one shows its full total here, so filter paymentStatus on unpaid and partiallyPaid to find the documents still open.","examples":["1190.00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the document record last changed. Filter and sort on this together for an incremental sync. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ).","examples":["2026-11-02T09:30:00.000Z"]}},"additionalProperties":false},"absencesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence."},"leaveNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The absence number."},"employeeId":{"type":"string","description":"The employee the absence belongs to. See id on GET people/person/:id."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"days":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The number of absence days. May be fractional for partial days."},"status":{"anyOf":[{"enum":["approved","requested","rejected","canceled"]},{"type":"null"}],"description":"The status of the absence."},"leaveDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reason for the absence."}},"additionalProperties":false},"recruitmentsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the recruitment."},"recruitmentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated recruitment number. Absent while none has been assigned."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the opening."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-text category of the opening, for example internal, external or student."},"status":{"anyOf":[{"enum":["active","inactive"]},{"type":"null"}],"description":"The status of the opening, derived from the deadline. 'inactive' once the deadline has passed, 'active' otherwise, including when no deadline is set."},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the opening is published externally. It is set by the external-publishing flow, not through this API."},"unsolicited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this is the catch-all opening that unsolicited applications are filed against."},"deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The application deadline, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Absent when no deadline is set."},"vacancies":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of vacant positions the opening covers."},"departmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the department the opening belongs to. Absent when not set. See id on GET people/departments/:id."},"departmentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the department. Absent when not set."},"positionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the position being recruited for. Absent when not set. See id on GET people/positions/:id."},"positionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the position. Absent when not set."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the team. Absent when none is assigned. See id on GET people/teams/:id."},"teamName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the team. Absent when none is assigned."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the work location. Absent when none is assigned. There is no endpoint for it."},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the work location. Absent when none is assigned."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity that will employ the hire. Absent when none is assigned."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that will employ the hire. Absent when none is assigned."},"employmentCategoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the employment category. Absent when none is assigned. There is no endpoint for it."},"hiringManagerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the hiring manager. Absent when none is assigned. See id on GET people/person/:id."},"hiringManagerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the hiring manager. Absent when none is assigned."},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the recruitment owner, the recruiter. Absent when none is assigned. See id on GET people/person/:id."},"ownerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the recruitment owner. Absent when none is assigned."},"jobDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The job description, as plain text."},"viabilityCriteria":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The internal viability criteria used to screen applicants, as plain text."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The URL of the posting or the hiring team's page."},"relocationRequired":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whether and how relocation is required. Free text, not a boolean."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the recruitment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteAbsenceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted absence."}},"additionalProperties":false,"required":["id"]},"assignPositionPermissionsOutput":{"type":"object","properties":{},"additionalProperties":false},"assignPositionPermissionsInput":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"},"description":"[fk: PermissionSearchApi.searchPermissionItems.permissions.uuid] The uuids of the permission roles to assign. Find them with searchPermissionItems and permissionType 'roles'."},"taskUUIDs":{"type":"array","items":{"type":"string"},"description":"[fk: PermissionSearchApi.searchPermissionItems.permissions.uuid] The uuids of the permission tasks to assign. Find them with searchPermissionItems and permissionType 'tasks'."}},"additionalProperties":false},"searchManualTaxableDocumentOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the manual taxable document (a UUID) — the public identifier of this record."},"type":{"type":"string","description":"Kind of document. One of 'outgoingInvoice', 'outgoingCredit', 'incomingInvoice', 'incomingCredit'. An outgoingInvoice is a customer-facing invoice whose incoming payment can be matched to a bank deposit."},"taxDocumentNumber":{"type":"string","description":"System-generated tax document number, unique per tenant and human-readable. Absent until one has been assigned."},"documentNumber":{"type":"string","description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or the number carried over from an external system. Distinct from taxDocumentNumber, which Everest assigns."},"title":{"type":"string","description":"Title of the document, as shown on the record."},"description":{"type":"string","description":"Free-text description of the document."},"invoiceDate":{"type":"string","format":"date","description":"Date the document was issued, as a calendar date (YYYY-MM-DD)."},"serviceDate":{"type":"string","format":"date","description":"Date the underlying service was provided, as a calendar date (YYYY-MM-DD). Drives the tax point where it differs from the invoice date."},"dueDate":{"type":"string","format":"date","description":"Date payment falls due, as a calendar date (YYYY-MM-DD). Absent when no due date has been set."},"currency":{"type":"string","description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR, GBP). It governs every amount on the record, on the header and on every line alike."},"paymentStatus":{"type":"string","description":"Settlement status of the document. One of 'paid', 'partiallyPaid', 'unpaid', 'noPaymentNeeded', 'voided', 'applied', 'unapplied', 'partiallyApplied', 'noApplicationNeeded'."},"paymentTerms":{"type":"string","description":"Payment terms recorded on the document, as free text (e.g. 'Net 30')."},"totalTaxAmount":{"type":"string","format":"decimal","description":"Sum of the tax amounts of every line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Sum of the total amounts of every line, tax included except the self-assessed VAT of reverse-charge lines, in the document currency (see currency)."},"totalAllocatedAmount":{"type":"string","format":"decimal","description":"Amount already allocated to this document by payments or credits, in the document currency (see currency)."},"totalOpenAmount":{"type":"string","format":"decimal","description":"Remaining unallocated balance on this document, in the document currency (see currency). Greater than zero means the document is still open."},"hasAttachment":{"type":"boolean","description":"True when the document has at least one attachment. The attachments themselves are not published by this API; document delivery is a separate concern with its own permission."},"customerId":{"type":"string","description":"Id of the customer the document is issued to (a UUID). Set on customer-facing documents; absent on vendor or employee ones."},"customerName":{"type":"string","description":"Display name of the customer. Personal and counterparty data."},"customerNumber":{"type":"string","description":"System-generated customer number of the customer, unique per tenant."},"entityId":{"type":"string","description":"Id of the legal entity the document belongs to (a UUID)."},"entityName":{"type":"string","description":"Name of the legal entity the document belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the document record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Poll on this to sync incrementally rather than re-reading the whole collection."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the document line (a UUID)."},"lineNumber":{"type":"string","description":"System-generated line number within the document. Absent until one has been assigned."},"description":{"type":"string","description":"Free-text description of the line item."},"taxableBasis":{"type":"string","format":"decimal","description":"Basis amount the tax is calculated on, in the document currency (see currency)."},"taxAmount":{"type":"string","format":"decimal","description":"Tax charged on the line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Line total including tax, in the document currency (see currency)."}},"additionalProperties":false,"required":["id"]},"description":"Lines of the document, each carrying one taxable position. Empty on a document with no lines. All line amounts are in the document currency (see currency)."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"Matching manual taxable documents for this page, newest first. Empty when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as page.cursor for the next page; absent on the last page (mirrors the list/v1 data-set pagination.nextCursor)."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page (mirrors the list/v1 data-set pagination.hasMore)."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchManualTaxableDocumentInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Exact match on a document's id (a UUID). This is how a single known document is fetched."},"taxDocumentNumber":{"type":"string","description":"Exact match on the system-generated tax document number. In the body because a document number must not travel in a URL."},"documentNumber":{"type":"string","description":"Exact match on the source document number — the counterparty's own number, or one carried over from an external system. In the body on the same grounds as taxDocumentNumber."},"type":{"type":"array","items":{"type":"string"},"description":"Restrict to documents of any of these kinds. Allowed values: 'outgoingInvoice', 'outgoingCredit', 'incomingInvoice', 'incomingCredit'; an unrecognised value simply matches nothing. An empty array does not constrain."},"paymentStatus":{"type":"array","items":{"type":"string"},"description":"Restrict to documents in any of these settlement statuses. Allowed values: 'paid', 'partiallyPaid', 'unpaid', 'noPaymentNeeded', 'voided', 'applied', 'unapplied', 'partiallyApplied', 'noApplicationNeeded'; an unrecognised value simply matches nothing. An empty array does not constrain."},"currency":{"type":"array","items":{"type":"string"},"description":"Restrict to documents in any of these currencies, as 3-letter ISO 4217 codes. An empty array does not constrain."},"title":{"type":"string","description":"Case-insensitive SUBSTRING match on the document title. In the body because free text must never travel in a URL."},"description":{"type":"string","description":"Case-insensitive SUBSTRING match on the free-text document description. In the body because free text must never travel in a URL."},"paymentTerms":{"type":"string","description":"Case-insensitive SUBSTRING match on the payment terms recorded on the document. In the body because free text must never travel in a URL."},"customerId":{"type":"string","description":"Restrict to documents issued to this customer, given as the customer id (a UUID). An id that matches no customer yields an empty page, not an error."},"customerName":{"type":"string","description":"Case-insensitive SUBSTRING match on the customer's name. In the body precisely because a counterparty name must never travel in a URL."},"customerNumber":{"type":"string","description":"Exact match on the customer's system-generated customer number. In the body on the same grounds as customerName."},"entityId":{"type":"string","description":"Restrict to documents belonging to this legal entity, given as the entity id (a UUID). An id that matches no entity yields an empty page, not an error."},"entityName":{"type":"string","description":"Case-insensitive SUBSTRING match on the legal entity's name. In the body because it names internal organisational structure."},"invoiceDate":{"type":"object","properties":{"start":{"type":"string","description":"Earliest issue date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no lower bound."},"end":{"type":"string","description":"Latest issue date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict to documents issued in this date window. Both bounds are calendar dates (YYYY-MM-DD) and are INCLUSIVE; omit either side to leave it open-ended."},"serviceDate":{"type":"object","properties":{"start":{"type":"string","description":"Earliest service date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no lower bound."},"end":{"type":"string","description":"Latest service date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict to documents whose service date falls in this window. Both bounds are calendar dates (YYYY-MM-DD) and are INCLUSIVE; omit either side to leave it open-ended."},"dueDate":{"type":"object","properties":{"start":{"type":"string","description":"Earliest due date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no lower bound."},"end":{"type":"string","description":"Latest due date to include, as a calendar date (YYYY-MM-DD). Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict to documents falling due in this window. Both bounds are calendar dates (YYYY-MM-DD) and are INCLUSIVE; omit either side to leave it open-ended."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","description":"Earliest change instant to include, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Inclusive. Omit for no lower bound."},"end":{"type":"string","description":"Latest change instant to include, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict to documents changed in this window — the incremental-sync filter. Both bounds are ISO 8601 UTC timestamps (YYYY-MM-DDTHH:mm:ss.sssZ) and are INCLUSIVE; omit either side to leave it open-ended."},"totalAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"Smallest document total to include. Inclusive. Omit for no lower bound."},"max":{"type":"string","format":"decimal","description":"Largest document total to include. Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict by document total (see totalAmount), in each document's own currency (see the currency filter to pin one). Both bounds are INCLUSIVE; omit either side to leave it open-ended."},"totalOpenAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"Smallest open balance to include. Inclusive. Omit for no lower bound."},"max":{"type":"string","format":"decimal","description":"Largest open balance to include. Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict by remaining open balance, in each document's own currency. Set min to a value just above zero to select the documents still outstanding. Both bounds are INCLUSIVE; omit either side to leave it open-ended."}},"additionalProperties":false,"description":"Search filters, nested as one object so they map onto the POST body. All are optional and are ANDed; omitting every one of them matches all documents. Omit the whole object to do exactly that."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct manually."},"size":{"type":"number","description":"Maximum number of documents to return. Defaults to 50, capped at 200; the server may return fewer, but never more."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page."}},"additionalProperties":false},"searchAdHocDocumentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the ad hoc document (a UUID) — the public identifier used by this route."},"type":{"oneOf":[{"const":"outgoingInvoice","description":"A customer-facing invoice. Its incoming payment can be matched to a bank deposit."},{"const":"outgoingCredit","description":"A credit issued to a customer, reducing what they owe."},{"const":"incomingInvoice","description":"An invoice received from a vendor, employee or intercompany entity."},{"const":"incomingCredit","description":"A credit received from a vendor, employee or intercompany entity."}],"description":"Kind of document."},"taxDocumentNumber":{"type":"string","description":"System-generated ad hoc document number, unique per tenant and human-readable. Absent until one has been assigned."},"documentNumber":{"type":"string","description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or the number carried over from an external system. Distinct from taxDocumentNumber, which Everest assigns."},"title":{"type":"string","description":"Title of the document, as shown on the record."},"description":{"type":"string","description":"Free-text description of the document."},"invoiceDate":{"type":"string","format":"date","description":"Date the document was issued. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"Date the underlying service was provided. Drives the tax point where it differs from the invoice date. Format YYYY-MM-DD."},"dueDate":{"type":"string","format":"date","description":"Date payment falls due. Absent when no due date has been set. Format YYYY-MM-DD."},"currency":{"type":"string","description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR, GBP). It governs every amount on the record, on the header and on every line alike."},"paymentStatus":{"oneOf":[{"const":"paid","description":"Fully settled by payments."},{"const":"partiallyPaid","description":"Settled in part by payments; a balance remains."},{"const":"unpaid","description":"Receivable or payable in full, with nothing settled yet."},{"const":"noPaymentNeeded","description":"Posted to an account that carries no settlement, so no payment is expected."},{"const":"voided","description":"Voided. The journal entry it posted has been reversed and the document can no longer be settled."},{"const":"applied","description":"A credit fully applied against other documents."},{"const":"unapplied","description":"A credit with nothing applied yet."},{"const":"partiallyApplied","description":"A credit applied in part; a balance remains."},{"const":"noApplicationNeeded","description":"A credit posted to an account that carries no application, so none is expected."}],"description":"Settlement status of the document, derived by the server from the document's allocations and the AR-ness of its posting account."},"paymentTerms":{"type":"string","description":"Payment terms recorded on the document, as free text (e.g. 'Net 30')."},"totalTaxAmount":{"type":"string","format":"decimal","description":"Sum of the tax amounts of every line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Sum of the total amounts of every line — the gross document total, in the document currency (see currency)."},"totalAllocatedAmount":{"type":"string","format":"decimal","description":"Amount already allocated to this document by payments or credits, in the document currency (see currency)."},"totalOpenAmount":{"type":"string","format":"decimal","description":"Remaining unallocated balance on this document, in the document currency (see currency). A voided document keeps its open amount and a noPaymentNeeded one shows its full total here, so this alone does not tell whether a document is still open; use paymentStatus unpaid or partiallyPaid for that."},"hasAttachment":{"type":"boolean","description":"True when the document has at least one attachment. The attachments themselves are not published by this API; document delivery is a separate concern with its own permission."},"accountId":{"type":"string","description":"Id of the account the document posts its offsetting entry to (a UUID). Whether this account is a receivable account is what decides the document's paymentStatus."},"postingPeriodId":{"type":"string","description":"Id of the accounting period the document posted into (a UUID). Derived by the server from invoiceDate when the document is created, and read-only from then on."},"customerId":{"type":"string","description":"Id of the customer the document is issued to (a UUID). Set on customer-facing documents; absent on vendor, employee or intercompany ones."},"customerName":{"type":"string","description":"Display name of the customer. Personal and counterparty data — it is returned here but is not a filter on GET accounting/ad-hoc-documents, so it never travels in a URL."},"customerNumber":{"type":"string","description":"System-generated customer number of the customer, unique per tenant."},"vendorId":{"type":"string","description":"Id of the vendor the document is received from (a UUID). Set on vendor documents; absent otherwise."},"employeeId":{"type":"string","description":"Id of the employee the document is received from (a UUID). Set on employee documents; absent otherwise."},"intercompanyEntityId":{"type":"string","description":"Id of the intercompany entity the document is exchanged with (a UUID). Set on intercompany documents; absent otherwise."},"entityId":{"type":"string","description":"Id of the legal entity the document belongs to (a UUID)."},"entityName":{"type":"string","description":"Name of the legal entity the document belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the document record last changed. Poll on this to sync incrementally rather than re-reading the whole collection. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the document line (a UUID)."},"lineNumber":{"type":"string","description":"System-generated line number within the document. Absent until one has been assigned."},"description":{"type":"string","description":"Free-text description of the line item."},"taxableBasis":{"type":"string","format":"decimal","description":"Basis amount the tax is calculated on, in the document currency (see currency)."},"taxAmount":{"type":"string","format":"decimal","description":"Tax charged on the line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Line total, in the document currency (see currency): taxableBasis plus taxAmount, or taxableBasis alone on a reverse-charge line. Computed by the server."},"accountId":{"type":"string","description":"Id of the account this line books its revenue or cost to (a UUID)."},"taxConfigurationLineId":{"type":"string","description":"Id of the tax configuration line that governs this line's tax (a UUID). Absent on a document whose entity has no tax configuration."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this tag points to (a UUID), on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to (a UUID). Present only for a custom-dimension tag."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. A document can carry tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags this line carries, in the same shape as a journal entry line's. Includes the customer, vendor or employee tag set from the document's counterparty. Empty when the line has none."}},"additionalProperties":false,"required":["id"]},"description":"Lines of the document, each carrying one taxable position. Empty on a document with no lines. All line amounts are in the document currency (see currency)."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The matching ad hoc documents, newest first.","examples":[[{"id":"3f2a9c14-7b6d-4e58-9a01-2c8f5d6e7a0b","type":"outgoingInvoice","taxDocumentNumber":"ADH-1042","documentNumber":"INV-2026-0188","title":"Consulting services, October","invoiceDate":"2026-10-31","currency":"EUR","paymentStatus":"unpaid","totalAmount":"1190.00","totalOpenAmount":"1190.00","accountId":"a41b6c70-2d85-4f19-8c03-5e7a9b1d2f46","postingPeriodId":"c82d4e90-1f63-4a27-b5d8-093e6c7a1b45","customerId":"7d1e8f20-3a4b-4c5d-9e60-1f2a3b4c5d6e","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","lastModifiedDate":"2026-11-02T09:30:00.000Z","lines":[{"id":"9b0c1d2e-4f5a-4b6c-8d7e-0f1a2b3c4d5e","lineNumber":"1","taxableBasis":"1000.00","taxAmount":"190.00","totalAmount":"1190.00","accountId":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Pass back as page.cursor to fetch the next page. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether a further page exists. Always agrees with the presence of nextCursor."}},"additionalProperties":false,"required":["hasMore"],"description":"Cursor and flag for fetching the next page.","examples":[{"nextCursor":"eyJ2IjoxLCJrIjoiaWQiLCJwIjoxMDQyfQ","hasMore":true}]}},"additionalProperties":false,"required":["items","pagination"]},"searchAdHocDocumentsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Exact match on a document's id (a UUID). This is how a single known document is fetched without its lines being the point."},"taxDocumentNumber":{"type":"string","description":"Exact match on the system-generated ad hoc document number. In the body because a document number must not travel in a URL."},"documentNumber":{"type":"string","description":"Exact match on the source document number — the counterparty's own number, or one carried over from an external system. In the body on the same grounds as taxDocumentNumber."},"type":{"type":"array","items":{"oneOf":[{"const":"outgoingInvoice","description":"A customer-facing invoice."},{"const":"outgoingCredit","description":"A credit issued to a customer, reducing what they owe."},{"const":"incomingInvoice","description":"An invoice received from a vendor, employee or intercompany entity."},{"const":"incomingCredit","description":"A credit received from a vendor, employee or intercompany entity."}]},"description":"Restrict to documents of any of these kinds. An empty array does not constrain."},"paymentStatus":{"type":"array","items":{"oneOf":[{"const":"paid","description":"Fully settled by payments."},{"const":"partiallyPaid","description":"Settled in part by payments; a balance remains."},{"const":"unpaid","description":"Receivable or payable in full, with nothing settled yet."},{"const":"noPaymentNeeded","description":"Posted to an account that carries no settlement, so no payment is expected."},{"const":"voided","description":"Voided. The journal entry it posted has been reversed."},{"const":"applied","description":"A credit fully applied against other documents."},{"const":"unapplied","description":"A credit with nothing applied yet."},{"const":"partiallyApplied","description":"A credit applied in part; a balance remains."},{"const":"noApplicationNeeded","description":"A credit posted to an account that carries no application, so none is expected."}]},"description":"Restrict to documents in any of these settlement statuses. An empty array does not constrain."},"currency":{"type":"array","items":{"type":"string"},"description":"Restrict to documents in any of these currencies, as 3-letter ISO 4217 codes. An empty array does not constrain."},"title":{"type":"string","description":"Case-insensitive SUBSTRING match on the document title. In the body because free text must never travel in a URL."},"description":{"type":"string","description":"Case-insensitive SUBSTRING match on the free-text document description. In the body because free text must never travel in a URL."},"paymentTerms":{"type":"string","description":"Case-insensitive SUBSTRING match on the payment terms recorded on the document. In the body because free text must never travel in a URL."},"accountId":{"type":"string","description":"Restrict to documents posting their offsetting entry to this account, given as the account id (a UUID). An id that matches no account yields an empty page, not an error."},"postingPeriodId":{"type":"string","description":"Restrict to documents that posted into this accounting period, given as the period id (a UUID). An id that matches no period yields an empty page, not an error."},"customerId":{"type":"string","description":"Restrict to documents issued to this customer, given as the customer id (a UUID). An id that matches no customer yields an empty page, not an error."},"customerName":{"type":"string","description":"Case-insensitive SUBSTRING match on the customer's name. In the body precisely because a counterparty name must never travel in a URL."},"customerNumber":{"type":"string","description":"Exact match on the customer's system-generated customer number. In the body on the same grounds as customerName."},"vendorId":{"type":"string","description":"Restrict to documents received from this vendor, given as the vendor id (a UUID). An id that matches no vendor yields an empty page, not an error."},"employeeId":{"type":"string","description":"Restrict to documents received from this employee, given as the employee id (a UUID). An id that matches no employee yields an empty page, not an error."},"intercompanyEntityId":{"type":"string","description":"Restrict to documents exchanged with this intercompany entity, given as the entity id (a UUID). An id that matches no entity yields an empty page, not an error."},"entityId":{"type":"string","description":"Restrict to documents belonging to this legal entity, given as the entity id (a UUID). An id that matches no entity yields an empty page, not an error."},"entityName":{"type":"string","description":"Case-insensitive SUBSTRING match on the legal entity's name. In the body because it names internal organisational structure."},"invoiceDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Earliest issue date to include. Inclusive. Omit for no lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Latest issue date to include. Inclusive. Omit for no upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Restrict to documents issued in this date window. Both bounds are calendar dates and are INCLUSIVE; omit either side to leave it open-ended. Format YYYY-MM-DD."},"serviceDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Earliest service date to include. Inclusive. Omit for no lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Latest service date to include. Inclusive. Omit for no upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Restrict to documents whose service date falls in this window. Both bounds are INCLUSIVE; omit either side to leave it open-ended. Format YYYY-MM-DD."},"dueDate":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"Earliest due date to include. Inclusive. Omit for no lower bound. Format YYYY-MM-DD."},"end":{"type":"string","format":"date","description":"Latest due date to include. Inclusive. Omit for no upper bound. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Restrict to documents falling due in this window. Both bounds are INCLUSIVE; omit either side to leave it open-ended. Format YYYY-MM-DD."},"lastModifiedDate":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Earliest change instant to include. Inclusive. Omit for no lower bound. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."},"end":{"type":"string","format":"date-time","description":"Latest change instant to include. Inclusive. Omit for no upper bound. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."}},"additionalProperties":false,"description":"Restrict to documents changed in this window — the incremental-sync filter. Both bounds are INCLUSIVE; omit either side to leave it open-ended. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."},"totalAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"Smallest gross total to include. Inclusive. Omit for no lower bound."},"max":{"type":"string","format":"decimal","description":"Largest gross total to include. Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict by gross document total, in each document's own currency (use the currency filter to pin one). Both bounds are INCLUSIVE; omit either side to leave it open-ended."},"totalOpenAmount":{"type":"object","properties":{"min":{"type":"string","format":"decimal","description":"Smallest open balance to include. Inclusive. Omit for no lower bound."},"max":{"type":"string","format":"decimal","description":"Largest open balance to include. Inclusive. Omit for no upper bound."}},"additionalProperties":false,"description":"Restrict by remaining open balance, in each document's own currency. A voided or noPaymentNeeded document keeps an open balance, so to select the documents still outstanding filter paymentStatus on unpaid and partiallyPaid instead. Both bounds are INCLUSIVE; omit either side to leave it open-ended."}},"additionalProperties":false,"description":"Predicates to apply. A document must match every one you send, and omitting the whole object matches all documents.","examples":[{"type":["outgoingInvoice"],"customerName":"northwind","paymentStatus":["unpaid","partiallyPaid"]}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct manually."},"size":{"type":"number","description":"Maximum number of documents to return. Defaults to 50, capped at 200; the server may return fewer, but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":25}]}},"additionalProperties":false},"uploadDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created document."}},"additionalProperties":false,"required":["id"]},"uploadDocumentInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The identifier of the employee the document belongs to. See id on GET people/person/:id."},"categoryId":{"type":"string","description":"The identifier of the document category to file the document under. See id on GET people/document-categories."},"fileName":{"type":"string","description":"The name of the file being uploaded, with its extension. Only the extension is kept, and the stored file name is generated from the category label and the employee's name."},"mimeType":{"type":"string","description":"The MIME type of the file, for example 'application/pdf'."},"contentBase64":{"type":"string","description":"The file's bytes, base64-encoded with the standard alphabet and padding. Must be non-empty and well-formed."},"expiryDate":{"type":"string","description":"The day the document expires. Use format YYYY-MM-DD. Omit for a document that does not expire."}},"additionalProperties":false,"required":["employeeId","categoryId","fileName","mimeType","contentBase64"]},"deleteDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted document."},"fileName":{"type":"string","description":"The stored file name the deleted document had."}},"additionalProperties":false,"required":["id","fileName"]},"updatePersonOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePersonInput":{"type":"object","properties":{"firstName":{"type":"string","description":"The person's first name. Changing first or last name recomputes the display name."},"lastName":{"type":"string","description":"The person's last name. Changing first or last name recomputes the display name."},"middleName":{"type":"string","description":"The person's middle name."},"email":{"type":"string","description":"The person's work email address. It is stored in lowercase."},"personalEmail":{"type":"string","description":"The person's personal email address. It is stored in lowercase."},"gender":{"type":"string","description":"The person's self-identified gender. Any string value is accepted."},"dateOfBirth":{"type":"string","description":"The person's date of birth. Use format YYYY-MM-DD."},"nationality":{"type":"string","description":"The person's nationality. Format ISO 3166-1 alpha-2, for example 'US'."},"startDate":{"type":"string","description":"The employment start date. Use format YYYY-MM-DD. It must not overlap the person's other employee profiles. Changing it also re-anchors incomplete boarding deadlines and, for future-dated employments, absence policy assignments and the first job's start."},"endDate":{"type":"string","description":"The employment end date. Use format YYYY-MM-DD. It cannot be cleared through this endpoint. Setting it on a previously open-ended employment also end-dates the person's active jobs and open absence policy assignments to the same date."},"employmentCategory":{"type":"string","description":"The person's employment category."},"address":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"country":{"type":"string","description":"The country. Format ISO 3166-1 alpha-2, for example 'US'."},"stateProvince":{"type":"string","description":"The state, province or region."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The person's home address. When present it replaces the whole address, not a per-field patch."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It must be the fieldName of an existing employee external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers to add. A fieldName already present on the record fails with DUPLICATE_EXTERNAL_IDENTIFIER, because adding a duplicate key is not an implicit update."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier already present on the record."},"value":{"type":"string","description":"The new identifier value."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers to rewrite, matched by fieldName. A fieldName not already present fails with EXTERNAL_IDENTIFIER_NOT_FOUND, because rewriting is not an implicit create."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The fieldNames of external identifiers to remove. A fieldName not present on the record fails with EXTERNAL_IDENTIFIER_NOT_FOUND. Omit all three external-identifier arrays to leave the set unchanged, since deletion is always explicit."}},"additionalProperties":false},"searchPeopleOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the person."},"employeeNumber":{"type":"string","description":"The person's business number."},"firstName":{"type":"string","description":"The person's first name."},"lastName":{"type":"string","description":"The person's last name."},"middleName":{"type":"string","description":"The person's middle name."},"preferredFirstName":{"type":"string","description":"The person's preferred first name."},"preferredLastName":{"type":"string","description":"The person's preferred last name."},"name":{"type":"string","description":"The person's full name, in first-name-last-name order."},"email":{"type":"string","description":"The person's work email address."},"status":{"type":"string","description":"The current employment status of the person. Possible values: 'Active', 'Inactive', 'Planned', 'Cancelled'."},"employmentCategory":{"type":"string","description":"The employment category assigned to this person."},"startDate":{"type":"string","description":"The employment start date. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The employment end date. Format YYYY-MM-DD. Absent while the person is still employed."},"probationEndDate":{"type":"string","description":"The probation end date. Format YYYY-MM-DD. Absent when no probation period applies."},"jobId":{"type":"string","description":"The identifier of this person's active primary job. Absent when the person has no active primary job. There is no endpoint for it."},"departmentName":{"type":"string","description":"The name of the department this person belongs to. Absent when no department is assigned."},"positionName":{"type":"string","description":"The position or job title assigned to this person. Absent when no position is assigned."},"managerName":{"type":"string","description":"The full name of this person's primary manager. Absent when there is no active primary job or no manager assigned to it."},"compensation":{"type":"object","properties":{"amount":{"type":"object","properties":{"currency":{"type":"string","description":"The currency of the base salary. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The numeric value of the base salary, in the given currency."}},"additionalProperties":false,"description":"The base salary as a currency amount."},"paymentFrequency":{"type":"string","description":"The frequency at which this person is paid. Possible values: 'monthly', 'biweekly', 'weekly', 'yearly'."},"unit":{"type":"string","description":"The unit the base salary is measured in. Possible values: 'annually', 'quarterly', 'monthly', 'semiMonthly', 'weekly', 'biWeekly', 'daily', 'hourly', 'fixed'."},"monthlyAmount":{"type":"object","properties":{"currency":{"type":"string","description":"The currency of the monthly-equivalent salary. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The numeric value of the monthly-equivalent salary, in the given currency."}},"additionalProperties":false,"description":"The base salary converted to a monthly amount: 'annually' / 12, 'quarterly' / 3, 'semiMonthly' x 2, 'biWeekly' x 26 / 12, 'weekly' x 52 / 12, 'daily' x 5 x 52 / 12 (a 5-day week), 'hourly' x 40 x 52 / 12 (a 40-hour week). For 'monthly' and 'fixed' this is the base salary unchanged."},"salaryType":{"type":"string","description":"The name of the compensation type. Absent when none is assigned."},"salaryCode":{"type":"string","description":"The code of the compensation type. Absent when the type has no code or none is assigned."},"startDate":{"type":"string","description":"The date from which this compensation record is effective. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date on which this compensation record expires. Format YYYY-MM-DD. Absent when it is open-ended."}},"additionalProperties":false,"description":"The person's current active compensation record. Absent when no compensation record exists."},"entityName":{"type":"string","description":"The name of the legal entity this person belongs to."},"locationName":{"type":"string","description":"The name of this person's work location. Absent when none is assigned."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"The person's custom field values, as key-value pairs of field name and value."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the person record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It is the fieldName of an existing employee external-identifier configuration."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers owned by other systems, at most one per fieldName. Absent when the person has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The people that match this page of the search. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain after this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPeopleInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"firstName":{"type":"string","description":"Limits results to people with this first name."},"lastName":{"type":"string","description":"Limits results to people with this last name."},"name":{"type":"string","description":"Limits results to people with this full name."},"email":{"type":"string","description":"Limits results to people with this work email address."},"employeeNumber":{"type":"string","description":"Limits results to the person with this business number. The match is exact."},"entityName":{"type":"string","description":"Limits results to people in the legal entity with this name. The match is exact."},"status":{"type":"string","description":"Limits results to people with this employment status. Accepted values: 'Active', 'Inactive', 'Planned', 'Cancelled'. Any other value matches no person."},"employmentCategory":{"type":"string","description":"Limits results to people with this employment category."},"externalIdentifier":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It must be the fieldName of an existing employee external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system holds it. The match is exact."}},"additionalProperties":false,"required":["fieldName","value"],"description":"Limits results to people with this external identifier. Both fieldName and value are required. Several people may share a value, so this returns the items array, not a single record."}},"additionalProperties":false,"description":"The filters to apply. A person must match every filter you send."},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The maximum number of people per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"getPositionPermissionsOutput":{"type":"object","properties":{"roleUUIDs":{"type":"array","items":{"type":"string"},"description":"The uuids of the permission roles assigned to the position."},"taskUUIDs":{"type":"array","items":{"type":"string"},"description":"The uuids of the permission tasks assigned to the position."}},"additionalProperties":false,"required":["roleUUIDs","taskUUIDs"]},"reconciliationsRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the reconciliation — the public identifier used by the item routes (GET/PATCH banking/reconciliations/:id and the submit/reopen sub-paths). Filter e.g. filter[id][in]=<id1>,<id2>.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"reconciliationNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable reconciliation number assigned by the platform, unique per tenant. Sortable but not filterable; look a reconciliation up by its id.","examples":["AR-000117"]},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the bank or credit-card account being reconciled. Filter e.g. filter[accountId][eq]=<account-uuid> to get one account's history.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"accountNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account number of the reconciled account, as shown in the chart of accounts. Returned but neither filterable nor orderable — filter by accountId.","examples":["1010"]},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account name of the reconciled account. Returned but neither filterable nor orderable — filter by accountId.","examples":["Operating Account USD"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the entity owning the account. Filter e.g. filter[entityId][eq]=<entity-uuid> for one entity's worklist.","examples":["e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the entity owning the account. Returned but neither filterable nor orderable — filter by entityId.","examples":["Everest US Inc."]},"accountingPeriodId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the accounting period being reconciled. Filter e.g. filter[accountingPeriodId][eq]=<period-uuid> to see every account's reconciliation for one period.","examples":["8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"]},"periodName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the accounting period, e.g. 'Jul 2026'. Returned but neither filterable nor orderable — filter by accountingPeriodId.","examples":["Jul 2026"]},"statementEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Closing date of the bank statement this reconciliation covers. PlainDate filter target: filter[statementEndDate][between]=2026-01-01,2026-06-30, and sort=-statementEndDate. Format YYYY-MM-DD.","examples":["2026-07-31"]},"statementEndBalance":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Closing balance the statement reports, in the account currency (see currency). Decimal filter target: filter[statementEndBalance][gte]=0.","examples":["184320.55"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 4217 currency code of the account, governing statementEndBalance.","examples":["USD"]},"status":{"anyOf":[{"enum":["created","inProgress","complete","unreconciled"]},{"type":"null"}],"description":"Lifecycle status. Filter e.g. filter[status][in]=inProgress,unreconciled for the open worklist.","examples":["inProgress"]},"reconciledOn":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the reconciliation was last submitted; absent until it has been submitted for the first time. A reopened reconciliation keeps the stamps from its last submit until it is submitted again, so read `status` to tell an open one from a closed one. PlainDate filter target. Format YYYY-MM-DD.","examples":["2026-08-04"]},"reconciledBy":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full name of the user who last submitted the reconciliation, resolved from the stored user reference. Personal data: neither filterable nor orderable, and it must not travel in a URL. Absent until it has been submitted for the first time. A reopened reconciliation keeps the stamps from its last submit until it is submitted again, so read `status` to tell an open one from a closed one.","examples":["Dana Whitfield"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"Timestamp of the last change to the reconciliation. Filter with filter[lastModifiedDate][gte]=2026-01-01T00:00:00.000Z — the milliseconds and the trailing Z are both required, and a numeric offset such as +02:00 is not accepted. Paired with sort=lastModifiedDate this is a complete incremental-sync cursor. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ).","examples":["2026-08-04T14:12:09.418Z"]}},"additionalProperties":false},"unmatchBankTransactionOutput":{"type":"object","properties":{},"additionalProperties":false},"unmatchBankTransactionInput":{"type":"object","properties":{},"additionalProperties":false},"createApplicantOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created application."}},"additionalProperties":false,"required":["id"]},"createApplicantInput":{"type":"object","properties":{"person":{"type":"object","properties":{"firstName":{"type":"string","description":"The applicant's first name."},"lastName":{"type":"string","description":"The applicant's last name."},"email":{"type":"string","description":"The applicant's email address. If it already belongs to a person, that person is reused rather than created again."},"middleName":{"type":"string","description":"The applicant's middle name."},"phoneNumber":{"type":"string","description":"The applicant's phone number."}},"additionalProperties":false,"required":["firstName","lastName","email"],"description":"The personal details of the applicant."},"application":{"type":"object","properties":{"recruitmentId":{"type":"string","description":"The identifier of the recruitment being applied to. See id on GET people/recruitments/:id."},"source":{"enum":["appliedDirectly","sourcedInternally","sourcedExternally","employeeReferral","externalRecruiter"],"description":"How the application arrived. Omit to leave it unset."},"sourceDetails":{"type":"string","description":"Free-text detail about the source, for example the referring employee or the job board."},"expectedSalary":{"type":"string","description":"The applicant's salary expectation, as free text."},"linkedIn":{"type":"string","description":"The URL of the applicant's LinkedIn profile."},"shortIntroduction":{"type":"string","description":"A short free-text introduction or motivation supplied with the application."}},"additionalProperties":false,"required":["recruitmentId"],"description":"The application details."},"address":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"country":{"type":"string","description":"The country. Format ISO 3166-1 alpha-2, for example 'US'."},"stateProvince":{"type":"string","description":"The state or province, as the code the platform's state and province list uses, for example 'CA'. Not a spelled-out name."},"zipCode":{"type":"string","description":"The postal or ZIP code. Required whenever you send an address."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The applicant's home address. When you send it, line1, city, country and zipCode are all required."}},"additionalProperties":false,"required":["person","application"]},"manualTaxableDocumentsRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the document — the public identifier used by GET tax-documents/manual-taxable-documents/:id. Filter e.g. filter[id][in]=<id1>,<id2>."},"type":{"anyOf":[{"enum":["outgoingInvoice","outgoingCredit","incomingInvoice","incomingCredit"]},{"type":"null"}],"description":"Kind of document. One of 'outgoingInvoice', 'outgoingCredit', 'incomingInvoice', 'incomingCredit'. Filter target: filter[type][eq]=outgoingInvoice, which with filter[totalOpenAmount][gt]=0 selects the unmatched customer invoices."},"taxDocumentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated tax document number, unique per tenant and human-readable. Absent until one has been assigned. Returned but NOT filterable or orderable — it identifies a specific financial document, and a sorted page would disclose the numbers in issue order; match on it through POST tax-documents/manual-taxable-documents/search."},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or one carried over from an external system. Returned but NOT filterable or orderable, on the same grounds as taxDocumentNumber; match on it through POST tax-documents/manual-taxable-documents/search."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Title of the document. Returned but NOT filterable or orderable by design — free text must never travel in a URL, so match on it through POST tax-documents/manual-taxable-documents/search."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-text description of the document. Returned but NOT filterable or orderable by design — free text must never travel in a URL; match on it through POST tax-documents/manual-taxable-documents/search."},"invoiceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the document was issued, as a calendar date (YYYY-MM-DD). Filter target: filter[invoiceDate][between]=2026-01-01,2026-03-31; bounds are inclusive."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the underlying service was provided, as a calendar date (YYYY-MM-DD). Drives the tax point where it differs from the invoice date. Filter target: filter[serviceDate][gte]=2026-01-01."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date payment falls due, as a calendar date (YYYY-MM-DD). Filter target: filter[dueDate][lt]=2026-01-01 selects what was already due by then."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR). It governs every amount on this row. Filter target: filter[currency][in]=USD,EUR."},"paymentStatus":{"anyOf":[{"enum":["paid","partiallyPaid","unpaid","noPaymentNeeded","voided","applied","unapplied","partiallyApplied","noApplicationNeeded"]},{"type":"null"}],"description":"Settlement status of the document. One of 'paid', 'partiallyPaid', 'unpaid', 'noPaymentNeeded', 'voided', 'applied', 'unapplied', 'partiallyApplied', 'noApplicationNeeded'. Filter target: filter[paymentStatus][in]=unpaid,partiallyPaid."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Payment terms recorded on the document, as free text (e.g. 'Net 30'). Returned but NOT filterable or orderable by design — free text must never travel in a URL; match on it through POST tax-documents/manual-taxable-documents/search."},"hasAttachment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when the document has at least one attachment. The attachments themselves are not published by this API. Filter target: filter[hasAttachment][eq]=false finds documents still missing their supporting file."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the customer the document is issued to (a UUID). Filter target: filter[customerId][eq]=<customerId> — this is how a customer's documents are listed."},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the customer. Returned but NOT filterable or orderable — a counterparty name must not travel in a URL, and a sorted page would disclose the names in order; match on it through POST tax-documents/manual-taxable-documents/search."},"customerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated customer number of the customer. Returned but NOT filterable or orderable, on the same grounds as customerName; match on it through POST tax-documents/manual-taxable-documents/search."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id of the legal entity the document belongs to (a UUID). Filter target: filter[entityId][eq]=<entityId>."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the legal entity the document belongs to. Returned but NOT filterable or orderable — it names internal organisational structure, which a sorted page would disclose in order; match on it through POST tax-documents/manual-taxable-documents/search."},"totalTaxAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Sum of the tax amounts of every line, in the document currency (see currency). Filter target: filter[totalTaxAmount][gt]=0."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Sum of the total amounts of every line, tax included except the self-assessed VAT of reverse-charge lines, in the document currency (see currency). Filter target: filter[totalAmount][between]=100,5000."},"totalAllocatedAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount already allocated to this document by payments or credits, in the document currency (see currency)."},"totalOpenAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Remaining unallocated balance on this document, in the document currency (see currency). Filter target: filter[totalOpenAmount][gt]=0 combined with filter[type][eq]=outgoingInvoice selects the open customer receivables."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Instant the document record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter with filter[lastModifiedDate][gte]= and sort with sort=lastModifiedDate for a complete incremental-sync cursor."}},"additionalProperties":false},"updatePositionOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePositionInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the position."},"description":{"type":"string","description":"A free-form description of the position's responsibilities."},"desiredHeadcount":{"type":"number","description":"The target number of people to fill this position."},"expectedSalary":{"type":"number","description":"The expected annual salary for this position, in the entity's currency."},"startDate":{"type":"string","description":"The date the position becomes active. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the position becomes inactive. Use format YYYY-MM-DD. It cannot be cleared through this endpoint."},"overtimeStatus":{"enum":["EXEMPT","NON_EXEMPT"],"description":"The overtime eligibility of the position."},"hiringManagerId":{"type":"string","description":"The identifier of the employee who is the hiring manager. See id on GET people/person/:id."},"jobProfileId":{"type":"string","description":"The identifier of the job profile the position is associated with. There is no endpoint for it."},"regionId":{"type":"string","description":"The identifier of the region the position is based in. There is no endpoint for it."}},"additionalProperties":false},"getPersonOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the person."},"employeeNumber":{"type":"string","description":"The person's business number."},"firstName":{"type":"string","description":"The person's first name."},"lastName":{"type":"string","description":"The person's last name."},"middleName":{"type":"string","description":"The person's middle name."},"preferredFirstName":{"type":"string","description":"The person's preferred first name."},"preferredLastName":{"type":"string","description":"The person's preferred last name."},"name":{"type":"string","description":"The person's full name, in first-name-last-name order."},"email":{"type":"string","description":"The person's work email address."},"status":{"type":"string","description":"The current employment status of the person. Possible values: 'Active', 'Inactive', 'Planned', 'Cancelled'."},"employmentCategory":{"type":"string","description":"The employment category assigned to this person."},"startDate":{"type":"string","description":"The employment start date. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The employment end date. Format YYYY-MM-DD. Absent while the person is still employed."},"probationEndDate":{"type":"string","description":"The probation end date. Format YYYY-MM-DD. Absent when no probation period applies."},"jobId":{"type":"string","description":"The identifier of this person's active primary job. Absent when the person has no active primary job. There is no endpoint for it."},"departmentName":{"type":"string","description":"The name of the department this person belongs to. Absent when no department is assigned."},"positionName":{"type":"string","description":"The position or job title assigned to this person. Absent when no position is assigned."},"managerName":{"type":"string","description":"The full name of this person's primary manager. Absent when there is no active primary job or no manager assigned to it."},"compensation":{"type":"object","properties":{"amount":{"type":"object","properties":{"currency":{"type":"string","description":"The currency of the base salary. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The numeric value of the base salary, in the given currency."}},"additionalProperties":false,"description":"The base salary as a currency amount."},"paymentFrequency":{"type":"string","description":"The frequency at which this person is paid. Possible values: 'monthly', 'biweekly', 'weekly', 'yearly'."},"unit":{"type":"string","description":"The unit the base salary is measured in. Possible values: 'annually', 'quarterly', 'monthly', 'semiMonthly', 'weekly', 'biWeekly', 'daily', 'hourly', 'fixed'."},"monthlyAmount":{"type":"object","properties":{"currency":{"type":"string","description":"The currency of the monthly-equivalent salary. Format ISO 4217, for example 'USD'."},"amount":{"type":"string","format":"decimal","description":"The numeric value of the monthly-equivalent salary, in the given currency."}},"additionalProperties":false,"description":"The base salary converted to a monthly amount: 'annually' / 12, 'quarterly' / 3, 'semiMonthly' x 2, 'biWeekly' x 26 / 12, 'weekly' x 52 / 12, 'daily' x 5 x 52 / 12 (a 5-day week), 'hourly' x 40 x 52 / 12 (a 40-hour week). For 'monthly' and 'fixed' this is the base salary unchanged."},"salaryType":{"type":"string","description":"The name of the compensation type. Absent when none is assigned."},"salaryCode":{"type":"string","description":"The code of the compensation type. Absent when the type has no code or none is assigned."},"startDate":{"type":"string","description":"The date from which this compensation record is effective. Format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date on which this compensation record expires. Format YYYY-MM-DD. Absent when it is open-ended."}},"additionalProperties":false,"description":"The person's current active compensation record. Absent when no compensation record exists."},"entityName":{"type":"string","description":"The name of the legal entity this person belongs to."},"locationName":{"type":"string","description":"The name of this person's work location. Absent when none is assigned."},"customFields":{"$ref":"#/components/schemas/UnknownObject","description":"The person's custom field values, as key-value pairs of field name and value."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the person record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It is the fieldName of an existing employee external-identifier configuration."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system. Absent when none is set."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers owned by other systems, at most one per fieldName. Absent when the person has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"createDepartmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created department."}},"additionalProperties":false,"required":["id"]},"createDepartmentInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the department."},"departmentCode":{"type":"string","description":"A short code for the department, for example 'IT', 'HR' or 'FIN'. Must be unique across departments. When omitted, the system-generated department number is used as the code."},"description":{"type":"string","description":"A free-form description of the department's purpose and responsibilities."},"managerId":{"type":"string","description":"The identifier of the employee who manages the department. See id on GET people/person/:id."},"parentId":{"type":"string","description":"The identifier of the parent department. Omit for a top-level department. See id on GET people/departments/:id."},"startDate":{"type":"string","description":"The date the department becomes active. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the department becomes inactive. Use format YYYY-MM-DD. Omit for an open-ended department."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteDepartmentId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The department's identifiers in other systems, one per configured field name. A field name not configured for your tenant fails with UNKNOWN_EXTERNAL_IDENTIFIER."}},"additionalProperties":false,"required":["name","startDate"]},"getManualTaxableDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id of the manual taxable document (a UUID) — the public identifier used by this route."},"type":{"type":"string","description":"Kind of document. One of 'outgoingInvoice', 'outgoingCredit', 'incomingInvoice', 'incomingCredit'. An outgoingInvoice is a customer-facing invoice whose incoming payment can be matched to a bank deposit."},"taxDocumentNumber":{"type":"string","description":"System-generated tax document number, unique per tenant and human-readable. Absent until one has been assigned."},"documentNumber":{"type":"string","description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or the number carried over from an external system. Distinct from taxDocumentNumber, which Everest assigns."},"title":{"type":"string","description":"Title of the document, as shown on the record."},"description":{"type":"string","description":"Free-text description of the document."},"invoiceDate":{"type":"string","format":"date","description":"Date the document was issued, as a calendar date (YYYY-MM-DD)."},"serviceDate":{"type":"string","format":"date","description":"Date the underlying service was provided, as a calendar date (YYYY-MM-DD). Drives the tax point where it differs from the invoice date."},"dueDate":{"type":"string","format":"date","description":"Date payment falls due, as a calendar date (YYYY-MM-DD). Absent when no due date has been set."},"currency":{"type":"string","description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR, GBP). It governs every amount on the record, on the header and on every line alike."},"paymentStatus":{"type":"string","description":"Settlement status of the document. One of 'paid', 'partiallyPaid', 'unpaid', 'noPaymentNeeded', 'voided', 'applied', 'unapplied', 'partiallyApplied', 'noApplicationNeeded'."},"paymentTerms":{"type":"string","description":"Payment terms recorded on the document, as free text (e.g. 'Net 30')."},"totalTaxAmount":{"type":"string","format":"decimal","description":"Sum of the tax amounts of every line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Sum of the total amounts of every line, tax included except the self-assessed VAT of reverse-charge lines, in the document currency (see currency)."},"totalAllocatedAmount":{"type":"string","format":"decimal","description":"Amount already allocated to this document by payments or credits, in the document currency (see currency)."},"totalOpenAmount":{"type":"string","format":"decimal","description":"Remaining unallocated balance on this document, in the document currency (see currency). Greater than zero means the document is still open — this is how an unmatched customer invoice is found."},"hasAttachment":{"type":"boolean","description":"True when the document has at least one attachment. The attachments themselves are not published by this API; document delivery is a separate concern with its own permission."},"customerId":{"type":"string","description":"Id of the customer the document is issued to (a UUID). Set on customer-facing documents; absent on vendor or employee ones."},"customerName":{"type":"string","description":"Display name of the customer. Personal and counterparty data — it is returned here but is not a filter on GET tax-documents/manual-taxable-documents, so it never travels in a URL."},"customerNumber":{"type":"string","description":"System-generated customer number of the customer, unique per tenant."},"entityId":{"type":"string","description":"Id of the legal entity the document belongs to (a UUID)."},"entityName":{"type":"string","description":"Name of the legal entity the document belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the document record last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Poll on this to sync incrementally rather than re-reading the whole collection."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the document line (a UUID)."},"lineNumber":{"type":"string","description":"System-generated line number within the document. Absent until one has been assigned."},"description":{"type":"string","description":"Free-text description of the line item."},"taxableBasis":{"type":"string","format":"decimal","description":"Basis amount the tax is calculated on, in the document currency (see currency)."},"taxAmount":{"type":"string","format":"decimal","description":"Tax charged on the line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Line total including tax, in the document currency (see currency)."}},"additionalProperties":false,"required":["id"]},"description":"Lines of the document, each carrying one taxable position. Empty on a document with no lines. All line amounts are in the document currency (see currency)."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"getAdHocDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id of the ad hoc document (a UUID) — the public identifier used by this route.","examples":["3f2a9c14-7b6d-4e58-9a01-2c8f5d6e7a0b"]},"type":{"oneOf":[{"const":"outgoingInvoice","description":"A customer-facing invoice. Its incoming payment can be matched to a bank deposit."},{"const":"outgoingCredit","description":"A credit issued to a customer, reducing what they owe."},{"const":"incomingInvoice","description":"An invoice received from a vendor, employee or intercompany entity."},{"const":"incomingCredit","description":"A credit received from a vendor, employee or intercompany entity."}],"description":"Kind of document.","examples":["outgoingInvoice"]},"taxDocumentNumber":{"type":"string","description":"System-generated ad hoc document number, unique per tenant and human-readable. Absent until one has been assigned.","examples":["ADH-1042"]},"documentNumber":{"type":"string","description":"Document number as it appears on the source document — the counterparty's own number for an incoming document, or the number carried over from an external system. Distinct from taxDocumentNumber, which Everest assigns.","examples":["INV-2026-0188"]},"title":{"type":"string","description":"Title of the document, as shown on the record.","examples":["Consulting services, October"]},"description":{"type":"string","description":"Free-text description of the document.","examples":["Recharge of advisory hours"]},"invoiceDate":{"type":"string","format":"date","description":"Date the document was issued. Format YYYY-MM-DD.","examples":["2026-10-31"]},"serviceDate":{"type":"string","format":"date","description":"Date the underlying service was provided. Drives the tax point where it differs from the invoice date. Format YYYY-MM-DD.","examples":["2026-10-31"]},"dueDate":{"type":"string","format":"date","description":"Date payment falls due. Absent when no due date has been set. Format YYYY-MM-DD.","examples":["2026-11-30"]},"currency":{"type":"string","description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR, GBP). It governs every amount on the record, on the header and on every line alike.","examples":["EUR"]},"paymentStatus":{"oneOf":[{"const":"paid","description":"Fully settled by payments."},{"const":"partiallyPaid","description":"Settled in part by payments; a balance remains."},{"const":"unpaid","description":"Receivable or payable in full, with nothing settled yet."},{"const":"noPaymentNeeded","description":"Posted to an account that carries no settlement, so no payment is expected."},{"const":"voided","description":"Voided. The journal entry it posted has been reversed and the document can no longer be settled."},{"const":"applied","description":"A credit fully applied against other documents."},{"const":"unapplied","description":"A credit with nothing applied yet."},{"const":"partiallyApplied","description":"A credit applied in part; a balance remains."},{"const":"noApplicationNeeded","description":"A credit posted to an account that carries no application, so none is expected."}],"description":"Settlement status of the document, derived by the server from the document's allocations and the AR-ness of its posting account.","examples":["unpaid"]},"paymentTerms":{"type":"string","description":"Payment terms recorded on the document, as free text (e.g. 'Net 30').","examples":["Net 30"]},"totalTaxAmount":{"type":"string","format":"decimal","description":"Sum of the tax amounts of every line, in the document currency (see currency).","examples":["190.00"]},"totalAmount":{"type":"string","format":"decimal","description":"Sum of the total amounts of every line — the gross document total, in the document currency (see currency).","examples":["1190.00"]},"totalAllocatedAmount":{"type":"string","format":"decimal","description":"Amount already allocated to this document by payments or credits, in the document currency (see currency).","examples":["0.00"]},"totalOpenAmount":{"type":"string","format":"decimal","description":"Remaining unallocated balance on this document, in the document currency (see currency). A voided document keeps its open amount and a noPaymentNeeded one shows its full total here, so this alone does not tell whether a document is still open; use paymentStatus unpaid or partiallyPaid for that.","examples":["1190.00"]},"hasAttachment":{"type":"boolean","description":"True when the document has at least one attachment. The attachments themselves are not published by this API; document delivery is a separate concern with its own permission.","examples":[false]},"accountId":{"type":"string","description":"Id of the account the document posts its offsetting entry to (a UUID). Whether this account is a receivable account is what decides the document's paymentStatus.","examples":["a41b6c70-2d85-4f19-8c03-5e7a9b1d2f46"]},"postingPeriodId":{"type":"string","description":"Id of the accounting period the document posted into (a UUID). Derived by the server from invoiceDate when the document is created, and read-only from then on.","examples":["c82d4e90-1f63-4a27-b5d8-093e6c7a1b45"]},"customerId":{"type":"string","description":"Id of the customer the document is issued to (a UUID). Set on customer-facing documents; absent on vendor, employee or intercompany ones.","examples":["7d1e8f20-3a4b-4c5d-9e60-1f2a3b4c5d6e"]},"customerName":{"type":"string","description":"Display name of the customer. Personal and counterparty data — it is returned here but is not a filter on GET accounting/ad-hoc-documents, so it never travels in a URL.","examples":["Northwind GmbH"]},"customerNumber":{"type":"string","description":"System-generated customer number of the customer, unique per tenant.","examples":["CUST-0231"]},"vendorId":{"type":"string","description":"Id of the vendor the document is received from (a UUID). Set on vendor documents; absent otherwise."},"employeeId":{"type":"string","description":"Id of the employee the document is received from (a UUID). Set on employee documents; absent otherwise."},"intercompanyEntityId":{"type":"string","description":"Id of the intercompany entity the document is exchanged with (a UUID). Set on intercompany documents; absent otherwise."},"entityId":{"type":"string","description":"Id of the legal entity the document belongs to (a UUID).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"Name of the legal entity the document belongs to.","examples":["Everest Europe B.V."]},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the document record last changed. Poll on this to sync incrementally rather than re-reading the whole collection. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ).","examples":["2026-11-02T09:30:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the document line (a UUID)."},"lineNumber":{"type":"string","description":"System-generated line number within the document. Absent until one has been assigned."},"description":{"type":"string","description":"Free-text description of the line item."},"taxableBasis":{"type":"string","format":"decimal","description":"Basis amount the tax is calculated on, in the document currency (see currency)."},"taxAmount":{"type":"string","format":"decimal","description":"Tax charged on the line, in the document currency (see currency)."},"totalAmount":{"type":"string","format":"decimal","description":"Line total, in the document currency (see currency): taxableBasis plus taxAmount, or taxableBasis alone on a reverse-charge line. Computed by the server."},"accountId":{"type":"string","description":"Id of the account this line books its revenue or cost to (a UUID)."},"taxConfigurationLineId":{"type":"string","description":"Id of the tax configuration line that governs this line's tax (a UUID). Absent on a document whose entity has no tax configuration."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this tag points to (a UUID), on the model that dimensionCode names."},"customDimensionId":{"type":"string","description":"The custom dimension this tag belongs to (a UUID). Present only for a custom-dimension tag."},"isActive":{"type":"boolean","description":"Whether the referenced dimension record is currently active. A document can carry tags that point at records since made inactive."}},"additionalProperties":false,"required":["dimensionCode","modelId","isActive"]},"description":"The reporting tags this line carries, in the same shape as a journal entry line's. Includes the customer, vendor or employee tag set from the document's counterparty. Empty when the line has none."}},"additionalProperties":false,"required":["id"]},"description":"Lines of the document, each carrying one taxable position. Empty on a document with no lines. All line amounts are in the document currency (see currency).","examples":[[{"id":"9b0c1d2e-4f5a-4b6c-8d7e-0f1a2b3c4d5e","lineNumber":"1","description":"Advisory hours, October","taxableBasis":"1000.00","taxAmount":"190.00","totalAmount":"1190.00","accountId":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f","taxConfigurationLineId":"2e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b"}]]}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"getBankRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank rule.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"bankRuleNumber":{"type":"string","description":"The bank rule number. Example: 'BR-000014'.","examples":["BR-000014"]},"rule":{"type":"string","description":"The name of the bank rule. Unique within the tenant.","examples":["Stripe payouts"]},"action":{"type":"string","description":"What the rule creates for each bank transaction that meets its criteria. Possible values: 'createBankEntry' (a bank entry), 'createCreditCardEntry' (a credit card entry).","examples":["createBankEntry"]},"status":{"type":"string","description":"The status of the rule. Possible values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run), 'draft' (a rule proposed by the Bank Rules Advisor, which does not run until it is activated).","examples":["active"]},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first.","examples":[10]},"description":{"type":"string","description":"A description of the rule."},"externalId":{"type":"string","description":"The bank rule's identifier in an external system, if provided."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank rule last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-27T09:15:22.000Z"]},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the criterion."},"criteria":{"type":"string","description":"The bank transaction field this criterion tests. Possible values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty)."},"operator":{"type":"string","description":"How the field is compared with value. When criteria is 'amount', it is 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', it is 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'."},"logicalOperator":{"type":"string","description":"How this criterion combines with the next one. Possible values: 'and', 'or'. When absent, 'and' applies. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Not used when the rule has criteria groups."},"value":{"type":"string","description":"The value the field is compared with. A number when criteria is 'amount', and text otherwise."},"groupKey":{"type":"string","description":"The key of the criteria group this criterion belongs to. See key on criteriaGroups. Absent when the rule has no criteria groups."}},"additionalProperties":false,"required":["id","criteria","operator","value"]},"description":"The conditions a bank transaction must meet, in the order they are evaluated. Rules created or updated through the API always have at least one.","examples":[[{"id":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84","criteria":"description","operator":"containsCaseInsensitive","logicalOperator":"and","value":"STRIPE"}]]},"criteriaGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The group's identifier, referenced by groupKey on criteria and by parentKey on child groups."},"parentKey":{"type":"string","description":"The key of the parent group. Absent on the root group."},"logicalOperator":{"type":"string","description":"How the group combines its criteria and child groups. Possible values: 'and', 'or'."}},"additionalProperties":false,"required":["key","logicalOperator"]},"description":"The nested AND/OR groups of the rule's criteria. Empty when the rule combines its criteria with logicalOperator on each criterion. When present, exactly one group has no parentKey and is the root.","examples":[[]]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank account mapping."},"bankAccountId":{"type":"string","description":"The unique identifier for the bank account. See id on GET banking/bank-accounts/:id."},"accountName":{"type":"string","description":"The name of the bank account."}},"additionalProperties":false,"required":["id","bankAccountId"]},"description":"The bank accounts or credit card accounts this rule applies to. Rules created or updated through the API always have at least one. They all belong to the same legal entity, and are all bank accounts or all credit card accounts.","examples":[[{"id":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6","bankAccountId":"8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e","accountName":"Operating account"}]]},"actionObject":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the action object."},"accountId":{"type":"string","description":"The account each bank entry or credit card entry posts to. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name given to each bank entry or credit card entry."},"description":{"type":"string","description":"The description set on each bank entry or credit card entry and on its line."},"billableExpense":{"type":"string","description":"Marks the line of each credit card entry as a billable expense when 'yes'. Possible values: 'yes', 'no'."},"businessUnitId":{"type":"string","description":"The business unit set on each bank entry or credit card entry."},"departmentId":{"type":"string","description":"The department set on each bank entry or credit card entry."},"customerId":{"type":"string","description":"The customer set on each credit card entry. Not applied to bank entries. See id on GET accounting/customers/:id."},"vendorId":{"type":"string","description":"The vendor saved on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id."},"intercompanyPartnerId":{"type":"string","description":"The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account. No endpoint returns intercompany partners."},"valueAllocationTags":{"type":"array","items":{"type":"string"},"description":"The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry."},"taxCodeId":{"type":"string","description":"The tax code set on the line of each bank entry or credit card entry. See lines[].id on GET accounting/tax-configurations/:id."}},"additionalProperties":false,"required":["id"],"description":"The values for the bank entry or credit card entry the rule creates for each bank transaction that meets its criteria. Absent when the rule has no action object, and such a rule is skipped when bank rules run.","examples":[{"id":"e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12","accountId":"6d1e4b27-8a90-4c31-b5f2-7e8a9c0d1b23","name":"Stripe payout","description":"Auto-created by rule"}]}},"additionalProperties":false,"required":["id","rule","action","status","priority","lastModifiedDate","criteria","criteriaGroups","accounts"]},"deleteTeamOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team the call acted on."},"name":{"type":"string","description":"The name of the team."},"outcome":{"enum":["deleted","deactivated"],"description":"What happened to the team. 'deleted' when it was removed. 'deactivated' when something still depends on it, so its end date was set to the date of the request instead."},"reason":{"type":"string","description":"Why the team was deactivated rather than deleted. Absent when outcome is 'deleted'."}},"additionalProperties":false,"required":["id","name","outcome"]},"createAbsenceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created absence."}},"additionalProperties":false,"required":["id"]},"createAbsenceInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee the absence belongs to. See id on GET people/person/:id."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id. Optional when absencePolicyId is sent: the type is then taken from the policy. Send at least one of the two."},"absencePolicyId":{"type":"string","description":"The unique identifier of the absence policy to book the absence against. Needed for a sick leave or other absence type when the employee holds several policies of that type covering the dates. Must belong to absenceTypeId when both are sent. Ignored for vacation and time off in lieu."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Must not precede startDate."},"days":{"type":"string","format":"decimal","description":"The number of absence days. May be fractional for partial days."},"status":{"enum":["requested","approved","rejected","canceled"],"description":"The status to create the absence in. Defaults to 'requested', the only status that enters the approval workflow. Approve a requested absence with POST people/absences/approve. Supplying 'approved' or 'rejected' records the decision directly with no approver behind it, and 'canceled' passes through 'approved' first, firing that transition's side effects. Use the default unless you are importing absences already decided elsewhere."},"leaveDescription":{"type":"string","description":"A free-text reason for the absence."},"leaveCertificate":{"type":"string","description":"The certificate file content, for example a medical certificate for sick leave."},"certificateName":{"type":"string","description":"The file name of the certificate."},"googleEvent":{"type":"boolean","description":"Whether to mirror this absence to the linked Google Calendar."},"timezoneDiff":{"type":"string","description":"The time zone offset used for calendar synchronization."},"timezone":{"type":"string","description":"The time zone the absence dates are expressed in. Format IANA time-zone name, for example 'Europe/Berlin'."}},"additionalProperties":false,"required":["employeeId","startDate","endDate","days"]},"approveAbsencesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the approved absences, in the same order as the input."}},"additionalProperties":false,"required":["ids"]},"approveAbsencesInput":{"type":"object","properties":{"absences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence to approve."}},"additionalProperties":false,"required":["id"]},"description":"The absences to approve."},"approverEmployeeId":{"type":"string","description":"The unique identifier for the employee performing the approval. Omit to let the platform infer it from the session. See id on GET people/person/:id."},"autoApprove":{"type":"boolean","description":"Whether to bypass the remaining approval steps. Defaults to false."}},"additionalProperties":false,"required":["absences"]},"createPersonOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created person."}},"additionalProperties":false,"required":["id"]},"createPersonInput":{"type":"object","properties":{"person":{"type":"object","properties":{"firstName":{"type":"string","description":"The person's first name."},"lastName":{"type":"string","description":"The person's last name."},"email":{"type":"string","description":"The person's work email address."},"startDate":{"type":"string","description":"The employment start date. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The employment end date. Use format YYYY-MM-DD."},"middleName":{"type":"string","description":"The person's middle name."},"gender":{"type":"string","description":"The person's self-identified gender. Any string value is accepted."},"dateOfBirth":{"type":"string","description":"The person's date of birth. Use format YYYY-MM-DD."},"nationality":{"type":"string","description":"The person's nationality. Format ISO 3166-1 alpha-2, for example 'US'."}},"additionalProperties":false,"required":["firstName","lastName","email","startDate"],"description":"The person's personal details."},"employee":{"type":"object","properties":{"entityId":{"type":"string","description":"The identifier of the legal entity this person belongs to. See id on GET base/entities."},"personalEmail":{"type":"string","description":"The person's personal email address."},"employmentCategory":{"type":"string","description":"The person's employment category."},"holidayCalendarId":{"type":"string","description":"The identifier of the holiday calendar. Required when absencePolicies is provided. There is no endpoint for it."}},"additionalProperties":false,"required":["entityId"],"description":"The person's employment details."},"job":{"type":"object","properties":{"departmentId":{"type":"string","description":"The identifier of the department. See id on GET people/departments/:id."},"positionId":{"type":"string","description":"The identifier of the position. See id on GET people/positions/:id."},"jobManagerId":{"type":"string","description":"The identifier of the manager's job assignment, which is the manager's job id and not their person id. There is no endpoint for it."}},"additionalProperties":false,"required":["departmentId"],"description":"The person's job assignment details."},"address":{"type":"object","properties":{"line1":{"type":"string","description":"The first address line: street number and name, or PO box."},"line2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"country":{"type":"string","description":"The country. Format ISO 3166-1 alpha-2, for example 'US'."},"stateProvince":{"type":"string","description":"The state, province or region."},"zipCode":{"type":"string","description":"The postal or ZIP code."}},"additionalProperties":false,"required":["line1","city","country","zipCode"],"description":"The person's home address."},"absencePolicies":{"type":"array","items":{"type":"object","properties":{"absencePolicyId":{"type":"string","description":"The identifier of the absence policy. There is no endpoint for it."}},"additionalProperties":false,"required":["absencePolicyId"]},"description":"The absence policies assigned to the person."},"externalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured key of the external identifier, a camelCase slug such as 'netsuiteEmployeeId'. It must be the fieldName of an existing employee external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER."},"value":{"type":"string","description":"The identifier as the source system holds it."},"externalUrl":{"type":"string","description":"An absolute http(s) link to the object in the source system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"The external identifiers owned by other systems, as the whole initial set. At most one entry per fieldName. Two entries with the same fieldName fail with DUPLICATE_EXTERNAL_IDENTIFIER, and a fieldName with no configuration fails with UNKNOWN_EXTERNAL_IDENTIFIER, which lists every unrecognized key."}},"additionalProperties":false,"required":["person","employee","job"]},"matchDocumentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The file name, as you sent it."},"employee":{"type":"object","properties":{"result":{"oneOf":[{"const":"matched","description":"Exactly one employee matched; see id."},{"const":"none","description":"No employee matched."},{"const":"multiple","description":"Several employees matched equally; see candidates."}],"description":"Whether exactly one employee matched."},"id":{"type":"string","description":"The matched employee. See id on GET people/person/:id. Present only when result is 'matched'."},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The employee's identifier."},"name":{"type":"string","description":"The employee's name."},"employeeNumber":{"type":"string","description":"The employee number."}},"additionalProperties":false,"required":["id","name"]},"description":"The employees that matched: one when result is 'matched', several when it is 'multiple', none when it is 'none'."}},"additionalProperties":false,"required":["result","candidates"],"description":"The employee the file name identifies."},"category":{"type":"object","properties":{"result":{"oneOf":[{"const":"matched","description":"Exactly one document category matched; see id."},{"const":"none","description":"No document category matched."},{"const":"multiple","description":"Several document categories matched equally; see candidates."}],"description":"Whether exactly one document category matched."},"id":{"type":"string","description":"The matched document category. See id on GET people/document-categories. Present only when result is 'matched'."},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The document category's identifier."},"label":{"type":"string","description":"The document category's label."}},"additionalProperties":false,"required":["id","label"]},"description":"The document categories that matched: one when result is 'matched', several when it is 'multiple', none when it is 'none'."}},"additionalProperties":false,"required":["result","candidates"],"description":"The document category the file is filed under."},"expiryDate":{"type":"string","format":"date","description":"The expiry date read from the file name, or defaultExpiryDate. Format YYYY-MM-DD. Absent when neither gives one."},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"oneOf":[{"const":"partCountMismatch","description":"The file name does not have the number of parts fileNameParts describes. 'detail' is the number of parts found."},{"const":"invalidExpiryDate","description":"The expiry date part is not a date in expiryDateFormat. 'detail' is the part."},{"const":"unsupportedExtension","description":"The extension is not pdf, tif, tiff, jpg, jpeg or png. 'detail' is the extension."},{"const":"employeeNotFound","description":"No employee matched."},{"const":"employeeAmbiguous","description":"Several employees matched."},{"const":"externalEmployeeIdNotUnique","description":"Several employees share this external employee id."},{"const":"categoryNotFound","description":"No document category matched."},{"const":"categoryAmbiguous","description":"Several document categories matched."}],"description":"What is wrong."},"detail":{"type":"string","description":"The value the problem is about, where the code describes one."}},"additionalProperties":false,"required":["code"]},"description":"What stops this file from being imported as it is. Empty when the file matched one employee and one category."}},"additionalProperties":false,"required":["fileName","employee","category","problems"]},"description":"One item per file name, in the order you sent them.","examples":[[{"fileName":"EMP-1001_Payslip_2026-12-31.pdf","employee":{"result":"matched","id":"3f2a9c14-6b1d-4f0e-9a52-0c7d8e1b2a34","candidates":[{"id":"3f2a9c14-6b1d-4f0e-9a52-0c7d8e1b2a34","name":"Alex Example","employeeNumber":"EMP-1001"}]},"category":{"result":"matched","id":"8c1e4b27-2d9a-4c63-b0f1-5e7a9d3c6b18","candidates":[{"id":"8c1e4b27-2d9a-4c63-b0f1-5e7a9d3c6b18","label":"Payslip"}]},"expiryDate":"2026-12-31","problems":[]}]]}},"additionalProperties":false,"required":["items"]},"matchDocumentsInput":{"type":"object","properties":{"fileNames":{"type":"array","items":{"type":"string"},"description":"The file names to match, each with its extension. Send 1 to 500 names.","examples":[["EMP-1001_Payslip_2026-12-31.pdf"]]},"employeeIdentifier":{"oneOf":[{"const":"employeeNumber","description":"The employee number."},{"const":"externalEmployeeId","description":"The external employee id."},{"const":"payrollProviderId","description":"The payroll provider's id for the employee."},{"const":"email","description":"The employee's e-mail address, compared case-insensitively."},{"const":"name","description":"The employee's first and last name, compared case-insensitively."}],"description":"What the identifier part of a file name holds. 'name' matches the firstName and lastName parts instead of an identifier part.","examples":["employeeNumber"]},"separator":{"type":"string","description":"The text that separates the parts of a file name. Defaults to '_'. Must not be empty.","examples":["_"]},"fileNameParts":{"type":"array","items":{"oneOf":[{"const":"identifier","description":"Identifies the employee, as set by employeeIdentifier."},{"const":"firstName","description":"The employee's first name."},{"const":"lastName","description":"The employee's last name."},{"const":"category","description":"The document category's label or name, compared case-insensitively."},{"const":"expiryDate","description":"The document's expiry date, read with expiryDateFormat."},{"const":"ignored","description":"Text that is not used."}]},"description":"The parts of a file name, in order. A trailing 'ignored' part takes any number of remaining parts, including none.","examples":[["identifier","category","expiryDate"]]},"categoryId":{"type":"string","description":"The document category for every file. See id on GET people/document-categories. Omit to read the category from the file name's 'category' part."},"expiryDateFormat":{"oneOf":[{"const":"yyyy-MM-dd","description":"For example 2026-12-31."},{"const":"dd.MM.yyyy","description":"For example 31.12.2026."},{"const":"yyyyMMdd","description":"For example 20261231."}],"description":"How an 'expiryDate' part is written. Required when fileNameParts contains 'expiryDate'.","examples":["yyyy-MM-dd"]},"defaultExpiryDate":{"type":"string","format":"date","description":"The expiry date for every file whose name has no expiry date part. Format YYYY-MM-DD."},"employeeStatuses":{"type":"array","items":{"enum":["active","planned","inactive"]},"description":"The statuses of the employees a file name can match. Defaults to ['active']. Cancelled employees never match.","examples":[["active"]]}},"additionalProperties":false,"required":["fileNames","employeeIdentifier","fileNameParts"]},"createTeamOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created team."}},"additionalProperties":false,"required":["id"]},"createTeamInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team. Must be unique across teams."},"teamType":{"enum":["hrTeam","psaTeam"],"description":"The type of the team. Defaults to 'hrTeam'."},"startDate":{"type":"string","description":"The first day the team exists. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The last day the team exists. Use format YYYY-MM-DD. Omit for a team with no planned end. It may not fall before startDate."},"parentId":{"type":"string","description":"The identifier of the parent team. Omit to create a top-level team. See id on GET people/teams/:id."}},"additionalProperties":false,"required":["name","startDate"]},"deleteBankRuleOutput":{"type":"object","properties":{},"additionalProperties":false},"getAbsenceOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence."},"leaveNumber":{"type":"string","description":"The absence number."},"employeeId":{"type":"string","description":"The employee the absence belongs to. See id on GET people/person/:id."},"absenceTypeId":{"type":"string","description":"The type of the absence. See id on GET people/absence-types/:id."},"startDate":{"type":"string","format":"date-time","description":"The date and time the absence starts, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"endDate":{"type":"string","format":"date-time","description":"The date and time the absence ends, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"days":{"type":"string","format":"decimal","description":"The number of absence days. May be fractional for partial days."},"status":{"enum":["requested","approved","rejected","canceled"],"description":"The status of the absence."},"leaveDescription":{"type":"string","description":"The reason for the absence."}},"additionalProperties":false,"required":["id","employeeId","absenceTypeId","startDate","endDate"]},"absenceTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the absence type."},"name":{"type":"string","description":"The name of the absence type."},"category":{"enum":["sickLeave","vacation","other","overtime"],"description":"The category the absence type belongs to."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of the absence type."}},"additionalProperties":false},"updateRecruitmentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateRecruitmentInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the opening."},"category":{"type":"string","description":"A free-text category of the opening, for example internal, external or student."},"deadline":{"type":"string","description":"The application deadline. Use format YYYY-MM-DD. The status is derived from it."},"vacancies":{"type":"number","description":"The number of vacant positions the opening covers, from 0 to 1000."},"departmentId":{"type":"string","description":"The identifier of the department to move the opening to. See id on GET people/departments/:id."},"positionId":{"type":"string","description":"The identifier of the position to recruit for. See id on GET people/positions/:id."},"teamId":{"type":"string","description":"The identifier of the team. See id on GET people/teams/:id."},"locationId":{"type":"string","description":"The identifier of the work location. There is no endpoint for it."},"entityId":{"type":"string","description":"The legal entity that will employ the hire."},"employmentCategoryId":{"type":"string","description":"The identifier of the employment category. There is no endpoint for it."},"hiringManagerId":{"type":"string","description":"The identifier of the employee to make hiring manager. They are granted the permissions to work the opening. See id on GET people/person/:id."},"ownerId":{"type":"string","description":"The identifier of the employee to make recruitment owner, the recruiter. They are granted the permissions to work the opening. See id on GET people/person/:id."},"jobDescription":{"type":"string","description":"The job description, as plain text. Changing it does not re-score applicants already in the pipeline."},"viabilityCriteria":{"type":"string","description":"The internal viability criteria used to screen applicants, as plain text. Changing it does not re-score applicants already in the pipeline."},"website":{"type":"string","description":"The URL of the posting or the hiring team's page."},"relocationRequired":{"type":"string","description":"Whether and how relocation is required. Free text, not a boolean."}},"additionalProperties":false},"createRecruitmentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created recruitment."}},"additionalProperties":false,"required":["id"]},"createRecruitmentInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the opening. When omitted, it is derived from the department or position name."},"category":{"type":"string","description":"A free-text category of the opening, for example internal, external or student."},"deadline":{"type":"string","description":"The application deadline. Use format YYYY-MM-DD. The status is derived from it."},"vacancies":{"type":"number","description":"The number of vacant positions the opening covers, from 0 to 1000."},"departmentId":{"type":"string","description":"The identifier of the department the opening belongs to. Required unless positionId is given. See id on GET people/departments/:id."},"positionId":{"type":"string","description":"The identifier of the position being recruited for. Required unless departmentId is given. See id on GET people/positions/:id."},"teamId":{"type":"string","description":"The identifier of the team. See id on GET people/teams/:id."},"locationId":{"type":"string","description":"The identifier of the work location. There is no endpoint for it."},"entityId":{"type":"string","description":"The legal entity that will employ the hire."},"employmentCategoryId":{"type":"string","description":"The identifier of the employment category. There is no endpoint for it."},"hiringManagerId":{"type":"string","description":"The identifier of the employee who is the hiring manager. They are granted the permissions to work the opening. See id on GET people/person/:id."},"ownerId":{"type":"string","description":"The identifier of the employee who owns the recruitment, the recruiter. They are granted the permissions to work the opening. See id on GET people/person/:id."},"jobDescription":{"type":"string","description":"The job description, as plain text."},"viabilityCriteria":{"type":"string","description":"The internal viability criteria used to screen applicants, as plain text. Stored as an empty string when omitted."},"website":{"type":"string","description":"The URL of the posting or the hiring team's page."},"relocationRequired":{"type":"string","description":"Whether and how relocation is required. Free text, not a boolean."}},"additionalProperties":false},"updateReconciliationInTransitGlTransactionsOutput":{"type":"object","properties":{},"additionalProperties":false},"updateReconciliationInTransitGlTransactionsInput":{"type":"object","properties":{"set":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of journal entry lines to flag as in transit. These are journal entry line ids, not in-transit flag ids. Omit or send an empty array to flag nothing.","examples":[["7c3e91a5-4b28-4f60-9d17-c05a8e2b4361"]]},"reset":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of journal entry lines whose in-transit flag is to be cleared. Applied before `set`, so an id in both lists ends up flagged. Omit or send an empty array to clear nothing."}},"additionalProperties":false},"updateBankRuleOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankRuleInput":{"type":"object","properties":{"rule":{"type":"string","description":"The name of the bank rule. Must be unique within the tenant."},"action":{"enum":["createBankEntry","createCreditCardEntry","createFundTransfer"],"description":"New action. Only these three are implemented. Omit to leave unchanged."},"status":{"enum":["active","inactive"],"description":"The status of the rule. Accepted values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run). Set to 'inactive' to stop a rule running without deleting it.","examples":["inactive"]},"priority":{"type":"number","description":"The order in which this rule runs relative to other rules. Lower numbers run first.","examples":[20]},"description":{"type":"string","description":"A description of the rule."},"bankAccountIds":{"type":"array","items":{"type":"string"},"description":"The bank accounts or credit card accounts this rule applies to. Replaces the whole current list when sent. At least one is required. They must all belong to the same legal entity, and must be all bank accounts or all credit card accounts, not a mix. See id on GET banking/bank-accounts/:id."},"criteria":{"type":"array","items":{"type":"object","properties":{"criteria":{"enum":["amount","description","payeePayor"],"description":"The bank transaction field this criterion tests. Accepted values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty)."},"operator":{"type":"string","description":"How the field is compared with value. When criteria is 'amount', use 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', use 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'."},"logicalOperator":{"enum":["and","or"],"description":"How this criterion combines with the next one. Accepted values: 'and', 'or'. Defaults to 'and'. Ignored on the last criterion. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Ignored when criteriaGroups is sent."},"value":{"type":"string","description":"The value the field is compared with. Cannot be empty. When criteria is 'amount', send a number, for example '-250.00'. Otherwise, send text."},"groupKey":{"type":"string","description":"The key of the criteria group this criterion belongs to. See key on criteriaGroups. Required when criteriaGroups is sent, and left out otherwise."}},"additionalProperties":false,"required":["criteria","operator","value"]},"description":"The conditions a bank transaction must meet. Replaces the whole current list when sent, so a criterion left out is deleted. At least one is required."},"criteriaGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"A key you choose for the group, unique within this request. Criteria refer to it in groupKey and child groups in parentKey."},"parentKey":{"type":"string","description":"The key of the parent group. Left out for the root group."},"logicalOperator":{"enum":["and","or"],"description":"How the group combines its criteria and child groups. Accepted values: 'and', 'or'."}},"additionalProperties":false,"required":["key","logicalOperator"]},"description":"Optional nested AND/OR groups for the criteria. When sent, criteria must be sent too, and both replace the rule's current criteria and groups. When sent, exactly one group has no parentKey and is the root, every criterion names its group in groupKey, and each group combines its criteria and child groups with its own logicalOperator. For example, (A and B) or C is a root 'or' group holding C and a child 'and' group holding A and B. When left out, criteria are combined using logicalOperator on each criterion."},"actionObject":{"type":"object","properties":{"accountId":{"type":"string","description":"The account each bank entry or credit card entry posts to. It must not be a grouping account. See id on GET accounting/accounts/:id."},"name":{"type":"string","description":"The name given to each bank entry or credit card entry."},"description":{"type":"string","description":"The description set on each bank entry or credit card entry and on its line."},"billableExpense":{"enum":["yes","no"],"description":"Marks the line of each credit card entry as a billable expense when 'yes'. Accepted values: 'yes', 'no'. Applies only to rules with the action 'createCreditCardEntry'."},"businessUnitId":{"type":"string","description":"The business unit set on each bank entry or credit card entry."},"departmentId":{"type":"string","description":"The department set on each bank entry or credit card entry."},"customerId":{"type":"string","description":"The customer set on each credit card entry. Use only when billableExpense is 'yes'. Not applied to bank entries. See id on GET accounting/customers/:id."},"vendorId":{"type":"string","description":"A vendor to save on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id."},"intercompanyPartnerId":{"type":"string","description":"The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account, and ignored otherwise. No endpoint returns intercompany partners."},"valueAllocationTags":{"type":"array","items":{"type":"string"},"description":"The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry."},"taxCodeId":{"type":"string","description":"The tax code set on the line of each bank entry or credit card entry, which fills its VAT amount and VAT account. See lines[].id on GET accounting/tax-configurations/:id. While a business partner is required for VAT, it needs a Vendor or Customer tag in valueAllocationTags that a run applies (value allocation tags turned on and that dimension enabled for the entry type), or the request fails with BUSINESS_PARTNER_REQUIRED."},"fromAccountId":{"type":"string","description":"[fk: AccountApi.accounts.id] createFundTransfer only. Source cash account of the transfer, given as its id (a UUID)."},"toAccountId":{"type":"string","description":"[fk: AccountApi.accounts.id] createFundTransfer only. Destination cash account of the transfer, given as its id (a UUID). Required for createFundTransfer. Must differ from fromAccountId."},"fromLineDescription":{"type":"string","description":"createFundTransfer only. Description stamped on the transfer's From line."},"toLineDescription":{"type":"string","description":"createFundTransfer only. Description stamped on the transfer's To line."},"intercompanyProcessId":{"type":"string","description":"[fk: IntercompanyProcessApi.intercompanyProcesses.id] createFundTransfer only, given as its id (a UUID). Required when the two accounts belong to different legal entities."},"transferReason":{"enum":["funding","repayment"],"description":"createFundTransfer only. Required when the two accounts belong to different legal entities."},"intercompanyTransactionalCurrency":{"type":"string","description":"createFundTransfer only. Currency the intercompany balance is carried in. Required when the two accounts belong to different legal entities."},"fromFeeToleranceType":{"enum":["percentage","fixedAmount"],"description":"createFundTransfer only. Whether the sending-side bank fee tolerance is read as a percentage or a fixed amount."},"fromFeeToleranceValue":{"type":"string","format":"decimal","description":"createFundTransfer only. Sending-side tolerance; a shortfall up to this much is booked as a bank fee, beyond it the two transactions are not paired. Left unset, the amounts must match exactly."},"toFeeToleranceType":{"enum":["percentage","fixedAmount"],"description":"createFundTransfer only. Whether the receiving-side bank fee tolerance is read as a percentage or a fixed amount."},"toFeeToleranceValue":{"type":"string","format":"decimal","description":"createFundTransfer only. Receiving-side tolerance; a shortfall up to this much is booked as a bank fee, beyond it the two transactions are not paired. Left unset, the amounts must match exactly."}},"additionalProperties":false,"description":"The values for the bank entry or credit card entry the rule creates. Only the fields you send are changed. A field left out keeps its current value."}},"additionalProperties":false},"teamsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team."},"teamNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The system-generated team number. Absent while none has been assigned."},"name":{"type":"string","description":"The name of the team."},"teamType":{"anyOf":[{"enum":["hrTeam","psaTeam"]},{"type":"null"}],"description":"The type of the team."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the team, derived from its dates. 'planned' before the start date, 'active' between the dates, 'inactive' after the end date."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day the team exists. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day the team exists. Format YYYY-MM-DD. Absent for a team with no planned end."},"employeeCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of active members of the team."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier of the parent team. Absent for a top-level team. See id on GET people/teams/:id."},"parentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the parent team. Absent for a top-level team."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the team record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateDepartmentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateDepartmentInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the department."},"departmentCode":{"type":"string","description":"The short code for the department. Must be unique across departments. Send an empty string to reset it to the system-generated department number."},"description":{"type":"string","description":"A free-form description of the department's purpose and responsibilities."},"managerId":{"type":"string","description":"The identifier of the employee who manages the department. See id on GET people/person/:id."},"parentId":{"type":"string","description":"The identifier of the new parent department. It cannot be cleared through this endpoint, and it must not be a descendant of this department. See id on GET people/departments/:id."},"startDate":{"type":"string","description":"The date the department becomes active. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The date the department becomes inactive. Use format YYYY-MM-DD. It cannot be cleared through this endpoint."},"createExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of the identifier, for example 'netsuiteDepartmentId'."},"value":{"type":"string","description":"The identifier in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to add. A fieldName already present on the record fails with DUPLICATE_EXTERNAL_IDENTIFIER."},"updateExternalIdentifiers":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","description":"The configured field name of an identifier already present on the record."},"value":{"type":"string","description":"The new identifier value in the other system."},"externalUrl":{"type":"string","description":"A link to the record in the other system."}},"additionalProperties":false,"required":["fieldName","value"]},"description":"External identifiers to rewrite, matched by fieldName. A fieldName not present on the record fails with EXTERNAL_IDENTIFIER_NOT_FOUND."},"deleteExternalIdentifiers":{"type":"array","items":{"type":"string"},"description":"The field names of external identifiers to remove. A fieldName not present on the record fails with EXTERNAL_IDENTIFIER_NOT_FOUND. Removal is always explicit, never by omission."}},"additionalProperties":false},"createApplicationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created application."},"applicantNumber":{"type":"string","description":"The system-generated applicant number. Absent while none has been assigned."},"personId":{"type":"string","description":"The identifier of the person the application belongs to."},"recruitmentId":{"type":"string","description":"The identifier of the recruitment applied to. See id on GET people/recruitments/:id."},"status":{"type":"string","description":"The status the application is created in, always 'new'."}},"additionalProperties":false,"required":["id","personId","recruitmentId","status"]},"createApplicationInput":{"type":"object","properties":{"personId":{"type":"string","description":"The identifier of the person who applies."},"recruitmentId":{"type":"string","description":"The identifier of the recruitment being applied to. See id on GET people/recruitments/:id."},"source":{"enum":["appliedDirectly","sourcedInternally","sourcedExternally","employeeReferral","externalRecruiter"],"description":"How the application arrived. When omitted, no source is recorded."},"sourceDetails":{"type":"string","description":"Free-text detail about the source, for example the referring employee or the job board."},"expectedSalary":{"type":"string","description":"The applicant's salary expectation, as free text."},"linkedIn":{"type":"string","description":"The URL of the applicant's LinkedIn profile."},"shortIntroduction":{"type":"string","description":"A short free-text introduction or motivation supplied with the application."}},"additionalProperties":false,"required":["personId","recruitmentId"]},"updateTeamOutput":{"type":"object","properties":{},"additionalProperties":false},"updateTeamInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team."},"teamType":{"enum":["hrTeam","psaTeam"],"description":"The type of the team."},"startDate":{"type":"string","description":"The first day the team exists. Use format YYYY-MM-DD."},"endDate":{"type":"string","description":"The last day the team exists. Use format YYYY-MM-DD. It may not fall before the team's start date, whether you change that start date in the same request or it is already stored."},"parentId":{"type":"string","description":"The identifier of the team to move this one under. It may not be the team itself or one of its descendants. See id on GET people/teams/:id."}},"additionalProperties":false},"matchBankTransactionsOutput":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"matchId":{"type":"string","description":"The unique identifier for the match."},"status":{"type":"string","description":"The status of the match. Possible values: 'matched', 'pending' (a document has no posted journal entry line yet)."},"bankTransactionIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the bank transactions in this match."}},"additionalProperties":false,"required":["matchId","status","bankTransactionIds"]},"description":"The matches created. Usually one. A fund transfer has one for each leg sent.","examples":[[{"matchId":"e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12","status":"matched","bankTransactionIds":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]}]]},"matchedBankTransactionIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for all the bank transactions matched, in the order sent, with repeats removed.","examples":[["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]]},"matchedDocuments":{"type":"array","items":{"type":"object","properties":{"sfdType":{"type":"string","description":"The type of document, as sent."},"sfdId":{"type":"string","description":"The unique identifier for the document, as sent."},"amount":{"type":"string","description":"The amount this document contributed to the match, as a decimal in the bank transaction currency."},"currency":{"type":"string","description":"The currency of amount. Format ISO 4217, for example 'USD'."}},"additionalProperties":false,"required":["sfdType","sfdId","amount","currency"]},"description":"The documents matched, with the amount each one contributed. A fund transfer has one item for each leg.","examples":[[{"sfdType":"bankEntryNew","sfdId":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6","amount":"1200.00","currency":"USD"}]]}},"additionalProperties":false,"required":["matches","matchedBankTransactionIds","matchedDocuments"]},"matchBankTransactionsInput":{"type":"object","properties":{"bankTransactionIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the bank transactions to match. At least one is required. All of them must belong to the same bank account and legal entity, unless the only document is a fund transfer. A repeated identifier is counted once.","examples":[["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]]},"documents":{"type":"array","items":{"type":"object","properties":{"sfdType":{"enum":["outboundPayment","customerPayment","manualJournalEntry","bankEntryNew","creditCardEntry","fundTransfer","payroll"],"description":"The type of document. Accepted values: 'outboundPayment' (an outbound payment), 'customerPayment' (a customer payment), 'manualJournalEntry' (a manual journal entry), 'bankEntryNew' (a bank entry), 'creditCardEntry' (a credit card entry), 'fundTransfer' (a fund transfer), 'payroll' (a payroll detail)."},"sfdId":{"type":"string","description":"The unique identifier for the document, of the type in sfdType. For a bank entry, for example, see id on GET banking/bank-entries/:id."},"journalEntryLineId":{"type":"string","description":"The unique identifier for one journal entry line of the document, to match that line only. Omit to match every line of the document that posts to the bank account's linked chart-of-accounts account. Not used for a fund transfer."}},"additionalProperties":false,"required":["sfdType","sfdId"]},"description":"The documents to match the bank transactions with. At least one is required, and a fund transfer must be the only document.","examples":[[{"sfdType":"bankEntryNew","sfdId":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"}]]}},"additionalProperties":false,"required":["bankTransactionIds","documents"]},"createAdHocDocumentOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id of the created ad hoc document (a UUID). Read it back with GET accounting/ad-hoc-documents/:id for the fields the server filled in.","examples":["3f2a9c14-7b6d-4e58-9a01-2c8f5d6e7a0b"]}},"additionalProperties":false,"required":["id"]},"createAdHocDocumentInput":{"type":"object","properties":{"type":{"oneOf":[{"const":"outgoingInvoice","description":"A customer-facing invoice. Its incoming payment can be matched to a bank deposit."},{"const":"outgoingCredit","description":"A credit issued to a customer, reducing what they owe."},{"const":"incomingInvoice","description":"An invoice received from a vendor, employee or intercompany entity."},{"const":"incomingCredit","description":"A credit received from a vendor, employee or intercompany entity."}],"description":"Kind of document. Decides which tax direction the lines are validated against: the two incoming kinds consume input tax, the two outgoing ones charge output tax.","examples":["outgoingInvoice"]},"title":{"type":"string","description":"Title of the document, as it appears on the record.","examples":["Consulting services, October"]},"description":{"type":"string","description":"Free-text description of the document.","examples":["Recharge of advisory hours"]},"documentNumber":{"type":"string","description":"Document number as it appears on the source document — the counterparty's own number, or one carried over from an external system. Distinct from the taxDocumentNumber Everest assigns, which is not an input.","examples":["INV-2026-0188"]},"entityId":{"type":"string","description":"Id of the legal entity the document belongs to (a UUID). It must have an entity book, or the document cannot be posted.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"currency":{"type":"string","description":"Currency of this document as a 3-letter ISO 4217 code (e.g. USD, EUR, GBP). It governs every amount on the document, on the header and on every line alike.","examples":["EUR"]},"accountId":{"type":"string","description":"Id of the account the document posts its offsetting entry to (a UUID). It must be a posting account of the entity's chart of accounts and must not be a bank or credit-card account. Whether it is a receivable account is what decides the document's paymentStatus.","examples":["a41b6c70-2d85-4f19-8c03-5e7a9b1d2f46"]},"invoiceDate":{"type":"string","format":"date","description":"Date the document is issued. The posting period is derived from it, shifting to the next postable period when the one it falls in is closed or locked for ad hoc documents. Format YYYY-MM-DD.","examples":["2026-10-31"]},"serviceDate":{"type":"string","format":"date","description":"Date the underlying service was provided. Drives the tax point where it differs from the invoice date. Defaults to invoiceDate. Format YYYY-MM-DD.","examples":["2026-10-31"]},"dueDate":{"type":"string","format":"date","description":"Date payment falls due. Omit when no due date applies. Format YYYY-MM-DD.","examples":["2026-11-30"]},"paymentTerms":{"type":"string","description":"Payment terms recorded on the document, as free text (e.g. 'Net 30').","examples":["Net 30"]},"customerId":{"type":"string","description":"Id of the customer the document is issued to (a UUID). Send exactly one of customerId, vendorId, employeeId and intercompanyEntityId.","examples":["7d1e8f20-3a4b-4c5d-9e60-1f2a3b4c5d6e"]},"vendorId":{"type":"string","description":"Id of the vendor the document is received from (a UUID). Send exactly one of customerId, vendorId, employeeId and intercompanyEntityId."},"employeeId":{"type":"string","description":"Id of the employee the document is received from (a UUID). Send exactly one of customerId, vendorId, employeeId and intercompanyEntityId."},"intercompanyEntityId":{"type":"string","description":"Id of the intercompany entity the document is exchanged with (a UUID). Send exactly one of customerId, vendorId, employeeId and intercompanyEntityId."},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Free-text description of the line item."},"taxableBasis":{"type":"string","format":"decimal","description":"Basis amount the tax is calculated on, in the document currency (see currency)."},"taxAmount":{"type":"string","format":"decimal","description":"Tax charged on the line, in the document currency (see currency). Omit to take the computed default, the taxable basis times the tax code's percentage rounded to two places; send a value to override it, as an external system's own rounding may require. Not accepted without taxConfigurationLineId, unless it is zero."},"accountId":{"type":"string","description":"Id of the account this line books its revenue or cost to (a UUID). It must be a posting account of the entity's chart of accounts whose sub-type is income, cost of goods sold or other income, plus any sub-type the tenant's AD_HOC_DOCUMENT_ADDITIONAL_LINE_ACCOUNT_SUB_TYPES configuration adds."},"taxConfigurationLineId":{"type":"string","description":"Id of the tax configuration line that governs this line's tax (a UUID). Required when the document's entity has a tax configuration in this document's tax direction, and rejected when it has none."},"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The reporting dimension this tag is for. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"string","description":"The dimension record this tag points to (a UUID), on the model that dimensionCode names. For 'custom', the id of the custom dimension value."}},"additionalProperties":false,"required":["dimensionCode","modelId"]},"description":"Reporting tags to attach to this line, in the same vocabulary as a journal entry line. At most one tag per dimension (per custom dimension for 'custom'). Customer, vendor and employee tags are rejected here: they are set from the document's own counterparty. The reads return the tags the line ended up with."}},"additionalProperties":false,"required":["taxableBasis","accountId"]},"description":"Lines of the document, each carrying one taxable position. At least one is required. All line amounts are in the document currency (see currency).","examples":[[{"description":"Advisory hours, October","taxableBasis":"1000.00","accountId":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f","taxConfigurationLineId":"2e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b"}]]}},"additionalProperties":false,"required":["type","title","documentNumber","entityId","currency","accountId","invoiceDate","lines"]},"getReconciliationOutstandingBankTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the bank transaction."},"bankTransactionNumber":{"type":"string","description":"Human-readable bank transaction number assigned by the platform."},"transactionDate":{"type":"string","format":"date","description":"Date the transaction was created in the bank's own system. Format YYYY-MM-DD."},"amount":{"type":"string","format":"decimal","description":"Transaction amount in the account currency (see currency): positive for money arriving, negative for money leaving."},"currency":{"type":"string","description":"ISO 4217 currency code governing amount."},"payeeOrPayor":{"type":"string","description":"Name of the payee for an outgoing transaction, or the payor for an incoming one, as the bank reported it."},"description":{"type":"string","description":"Description of the transaction: the one it was created with, or else the text from the bank feed."}},"additionalProperties":false,"required":["id"]},"description":"Outstanding bank transactions for this page, oldest first. Empty when the bank side of the reconciliation is fully accounted for.","examples":[[{"id":"b2f7c418-95a1-4d0e-8a63-7fe0d1c34592","bankTransactionNumber":"BT-004182","transactionDate":"2026-07-28","amount":"-2150.00","currency":"USD","payeeOrPayor":"Cascade Logistics","description":"Freight settlement July"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass back as the `cursor` query parameter for the next page. Absent on the last page, which is how a caller knows to stop."},"hasMore":{"type":"boolean","description":"True when more transactions remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"createPurchaseTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase type.","examples":["b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"]}},"additionalProperties":false,"required":["id"]},"createPurchaseTypeInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the purchase type, for example 'New purchase'. Required. Must be unique across the tenant, ignoring case and surrounding spaces.","examples":["Additional licence"]},"description":{"type":"string","description":"What the purchase type is for. Omit to leave it empty.","examples":["More seats on an existing software contract."]}},"additionalProperties":false,"required":["name"]},"purchaseOrdersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase order."},"poNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The purchase order number, for example 'PO-3'. Absent while none has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description of the order, shown to the vendor."},"internalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Internal notes on the order, not shown to the vendor."},"externalMemo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A memo intended for the vendor."},"externalPONumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The order reference in the vendor's or an upstream system. It is not unique."},"approvalStatus":{"anyOf":[{"enum":["approved","pendingApproval","rejected"]},{"type":"null"}],"description":"The approval status of the order."},"budgetStatus":{"anyOf":[{"enum":["approved","rejected","pendingApproval"]},{"type":"null"}],"description":"The budget-check status of the order. Independent of approvalStatus."},"status":{"anyOf":[{"enum":["open","inprogress","closed","overMatched"]},{"type":"null"}],"description":"The order lifecycle status. This is not the vendor-bill matching status, which is per line in each line's matchStatus."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the order is denominated in. Format ISO 4217, for example 'USD'. Governs every amount on the order and its lines."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total ordered amount, the sum of the line totals, in the order currency."},"invoicedTotalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion of the order already invoiced by vendor bills, in the order currency."},"receivedTotalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The portion of the order already received as goods, in the order currency."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period the order covers. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period the order covers. Format YYYY-MM-DD."},"needByDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment-terms code applied to this order, for example 'net30', 'net60', 'dueOnReceipt' or 'custom'. Inherited from the vendor unless overridden."},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor this order is placed with."},"vendorContactEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The main contact email at the vendor."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this order is placed by."},"purchaseTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The purchase type of the order. See id on GET accounting/purchase-types/:id."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"startReconciliationOutput":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the started or resumed reconciliation. Every other route addresses this value.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"startReconciliationInput":{"type":"object","properties":{"accountId":{"type":"string","description":"Id (a UUID) of the bank or credit-card account to reconcile. Must be a cash account: anything else fails with RECONCILIATION_INVALID_ACCOUNT_TYPE.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"statementEndBalance":{"type":"string","format":"decimal","description":"Closing balance from the bank statement, in the account currency. Omit to default to the account's own balance as of the statement end date. Ignored when an open reconciliation is resumed — adjust that one with PATCH banking/reconciliations/{id}.","examples":["184320.55"]},"statementEndDate":{"type":"string","format":"date","description":"Closing date of the bank statement. Omit to default to the end date of the derived accounting period. Ignored when an open reconciliation is resumed. Format YYYY-MM-DD.","examples":["2026-07-31"]}},"additionalProperties":false,"required":["accountId"]},"updateOutboundPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"updateOutboundPaymentInput":{"type":"object","properties":{"accountId":{"type":"string","description":"The bank or cash account the payment is made from. See id on GET accounting/accounts/:id."},"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Use format YYYY-MM-DD.","examples":["2026-08-28"]},"paymentCurrency":{"type":"string","description":"The currency of the payment. Format ISO 4217, for example 'USD'. Governs each item's amount unless the item names its own currency."},"commonDescription":{"type":"string","description":"A description applied to the payment as a whole.","examples":["August vendor run (revised)"]},"externalUrl":{"type":"string","description":"A link back to the payment in the upstream system."},"origin":{"type":"string","description":"The source system this payment came from."},"senderAccountId":{"type":"string","description":"A bank account identifier for the sender, supplied by an integration. It is free-form text, not a reference to an account record."},"actualExchangeRate":{"type":"string","format":"decimal","description":"The exchange rate the bank actually applied, as a decimal."},"systemExchangeRate":{"type":"string","format":"decimal","description":"The exchange rate the system derived, as a decimal."},"skipJournalEntry":{"type":"boolean","description":"Whether to skip journal-entry creation for this payment."},"createPaymentItems":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","description":"The document being paid, of the kind this payment already pays. See id on GET accounting/vendor-bills/:id or GET accounting/expense-reports/:id."},"entityId":{"type":"string","description":"The legal entity the document is posted under. See id on GET base/entities."},"amount":{"type":"string","format":"decimal","description":"The amount applied to this document, as a decimal."},"currency":{"type":"string","description":"The currency for this item. Format ISO 4217, for example 'USD'. Omit to use the payment's currency."},"description":{"type":"string","description":"What this item pays for. Required."}},"additionalProperties":false,"required":["documentId","entityId","amount","description"]},"description":"Documents to add to this payment. Each has the same shape as on create, without an id."},"updatePaymentItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payment item to change. It must belong to this payment."},"documentId":{"type":"string","description":"The document being paid. See id on GET accounting/vendor-bills/:id or GET accounting/expense-reports/:id."},"entityId":{"type":"string","description":"The legal entity the document is posted under. See id on GET base/entities."},"amount":{"type":"string","format":"decimal","description":"The amount applied to this document, as a decimal."},"currency":{"type":"string","description":"The currency for this item. Format ISO 4217, for example 'USD'."},"description":{"type":"string","description":"What this item pays for."}},"additionalProperties":false,"required":["id"]},"description":"Payment items to change, each addressed by the id the payment publishes."},"deletePaymentItems":{"type":"array","items":{"type":"string"},"description":"The identifiers of payment items to remove, applied before the updates and creates. Each must belong to this payment. Removing them all is refused, so delete the payment instead."}},"additionalProperties":false},"createExpenseReportOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created expense report.","examples":["c7d2e910-3b45-4f68-8a91-2d3e4f5a6b78"]}},"additionalProperties":false,"required":["id"]},"createExpenseReportInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee the report belongs to. See id on GET people/person/:id.","examples":["5f1b8c02-7d34-4e56-9a78-1b2c3d4e5f60"]},"entityId":{"type":"string","description":"The legal entity the report is posted under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"reimbursementCurrency":{"type":"string","description":"The currency the employee is reimbursed in. Format ISO 4217, for example 'USD'. Individual items may be in other currencies.","examples":["EUR"]},"submittedDate":{"type":"string","format":"date","description":"The date the report is submitted. Use format YYYY-MM-DD.","examples":["2026-08-27"]},"departmentId":{"type":"string","description":"The department the report is charged to. See id on GET people/departments/:id."},"offsetAccountId":{"type":"string","description":"The GL offset account for the reimbursement. See id on GET accounting/accounts/:id."},"externalExpenseReportId":{"type":"string","description":"The identifier this report has in the upstream system that produced it. It is not unique."},"externalUrl":{"type":"string","description":"A link to the report in the upstream system that produced it."},"origin":{"type":"string","description":"The source system this report came from, as free-form text."},"markAsPaid":{"type":"boolean","description":"Whether to mark the report paid on creation. Defaults to false."},"skipJournalEntry":{"type":"boolean","description":"Whether to skip journal-entry creation for this report. Defaults to false."},"expenseItems":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount of the expense, as a decimal in this item's own currency."},"currency":{"type":"string","description":"The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency."},"billDate":{"type":"string","format":"date","description":"The date on the receipt. Use format YYYY-MM-DD."},"merchant":{"type":"string","description":"The merchant the expense was paid to, as printed on the receipt."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense."},"categoryId":{"type":"string","description":"The expense category this item is booked under. See id on GET accounting/expense-categories/:id."},"accountId":{"type":"string","description":"The general ledger account this item's journal entry uses. See id on GET accounting/accounts/:id. Omit to let the category decide."},"crossChargeEntityId":{"type":"string","description":"The legal entity this item is cross charged to (Charge to). See id on GET base/entities. The item's cost moves to that entity through an intercompany cross charge journal entry. It must differ from entityId, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursed to the employee. Defaults to true."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"origin":{"type":"string","description":"The source system this item came from, as free-form text."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it. Free text."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createExpenseReport` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createExpenseReport, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Receipts for this item, each an uploaded file sent as `file` (see `file` below). Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the item's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency. It is required here, because a schedule without one cannot be turned into installments when the report posts."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this item over, one per accounting book. An expense item has no line type, so what makes it amortizable is its account: the category or account it books to must be a prepaid-expenses account. Each schedule starts out not started and begins recognizing once the report posts."}},"additionalProperties":false,"required":["amount","currency","billDate","merchant","expenseType"]},"description":"The expense items on the report, in the order they should appear. At least one is expected.","examples":[[{"amount":"48.90","currency":"EUR","billDate":"2026-08-20","merchant":"Deutsche Bahn","expenseType":"Pur"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createExpenseReport` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createExpenseReport, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files for the whole report rather than one item, such as a summary or an approval email. Each is an uploaded file sent as `file` (see `file` below). They appear in the report's attachments on GET accounting/expense-reports/:id, apart from each item's receipts. They do not count toward an item's requireAttachment."}},"additionalProperties":false,"required":["employeeId","entityId","reimbursementCurrency","submittedDate","expenseItems"]},"deleteOutboundPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"getReconciliationOutstandingGlTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the journal entry line behind this transaction."},"postingDate":{"type":"string","format":"date","description":"Date the entry was posted to the ledger. Format YYYY-MM-DD."},"amount":{"type":"string","format":"decimal","description":"Transaction amount in the account currency (see currency), signed as the statement sees it: positive for money arriving in the account."},"currency":{"type":"string","description":"ISO 4217 currency code governing amount."},"businessPartner":{"type":"string","description":"Customer, vendor or other counterparty the entry relates to, when it names one."},"description":{"type":"string","description":"Description carried by the ledger entry."},"journalEntryType":{"type":"string","description":"Type of the journal entry this line belongs to, e.g. 'customerPayment' or 'vendorPayment'."}},"additionalProperties":false,"required":["id"]},"description":"Outstanding GL transactions for this page, oldest first. Empty when the ledger side of the reconciliation is fully accounted for.","examples":[[{"id":"7c3e91a5-4b28-4f60-9d17-c05a8e2b4361","postingDate":"2026-07-30","amount":"43120.00","currency":"USD","businessPartner":"Northwind Traders","description":"Invoice INV-2026-0771 settlement","journalEntryType":"customerPayment"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass back as the `cursor` query parameter for the next page. Absent on the last page, which is how a caller knows to stop."},"hasMore":{"type":"boolean","description":"True when more transactions remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"getReconciliationOutput":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the reconciliation (the public identifier).","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"reconciliationNumber":{"type":"string","description":"Human-readable reconciliation number assigned by the platform, unique per tenant.","examples":["AR-000117"]},"accountId":{"type":"string","description":"Id (a UUID) of the bank or credit-card account being reconciled.","examples":["9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7"]},"accountNumber":{"type":"string","description":"Account number of the reconciled account, as shown in the chart of accounts.","examples":["1010"]},"accountName":{"type":"string","description":"Account name of the reconciled account.","examples":["Operating Account USD"]},"entityId":{"type":"string","description":"Id (a UUID) of the entity owning the account.","examples":["e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]},"entityName":{"type":"string","description":"Name of the entity owning the account.","examples":["Everest US Inc."]},"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the accounting period being reconciled.","examples":["8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"]},"periodName":{"type":"string","description":"Name of the accounting period, e.g. 'Jul 2026'.","examples":["Jul 2026"]},"statementEndDate":{"type":"string","format":"date","description":"Closing date of the bank statement this reconciliation covers. Format YYYY-MM-DD.","examples":["2026-07-31"]},"statementEndBalance":{"type":"string","format":"decimal","description":"Closing balance the statement reports, in the account currency (see currency).","examples":["184320.55"]},"currency":{"type":"string","description":"ISO 4217 currency code of the account, governing statementEndBalance and every amount in balances.","examples":["USD"]},"status":{"type":"string","description":"Lifecycle status: 'created', 'inProgress', 'complete' or 'unreconciled'.","examples":["inProgress"]},"reconciledOn":{"type":"string","format":"date","description":"Date the reconciliation was last submitted; absent until it has been submitted for the first time. A reopened reconciliation keeps the stamps from its last submit until it is submitted again, so read `status` to tell an open one from a closed one. Format YYYY-MM-DD."},"reconciledBy":{"type":"string","description":"Full name of the user who last submitted the reconciliation, resolved from the stored user reference. Personal data: neither filterable nor orderable, and it must not travel in a URL. Absent until it has been submitted for the first time. A reopened reconciliation keeps the stamps from its last submit until it is submitted again, so read `status` to tell an open one from a closed one."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Timestamp of the last change to the reconciliation row. Note that the figures in balances are recomputed on every call and can move without this changing. ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ).","examples":["2026-08-04T14:12:09.418Z"]},"balances":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code governing every amount in this object."},"statementBeginningBalance":{"type":"string","format":"decimal","description":"Opening balance of the statement side: the previous period's closing statement balance, or the account's configured opening balance for a first reconciliation."},"statementEndingBalance":{"type":"string","format":"decimal","description":"Closing balance the statement reports; the same figure as the top-level statementEndBalance, repeated here so the roll-forward reads on its own."},"glBeginningBalance":{"type":"string","format":"decimal","description":"Ledger balance of the account on the day before the period starts."},"glEndingBalance":{"type":"string","format":"decimal","description":"Ledger balance of the account on the period end date."},"clearedIncoming":{"type":"string","format":"decimal","description":"Sum of incoming movements matched on both sides (positive)."},"clearedOutgoing":{"type":"string","format":"decimal","description":"Sum of outgoing movements matched on both sides (negative)."},"incomingBankTransactionsInTransit":{"type":"string","format":"decimal","description":"Incoming bank-feed transactions flagged in transit: on the statement, not yet in the ledger (positive)."},"outgoingBankTransactionsInTransit":{"type":"string","format":"decimal","description":"Outgoing bank-feed transactions flagged in transit: on the statement, not yet in the ledger (negative)."},"incomingGlTransactionsInTransit":{"type":"string","format":"decimal","description":"Incoming ledger transactions flagged in transit: posted in the ledger, not yet on the statement (positive)."},"outgoingGlTransactionsInTransit":{"type":"string","format":"decimal","description":"Outgoing ledger transactions flagged in transit: posted in the ledger, not yet on the statement (negative)."},"difference":{"type":"string","format":"decimal","description":"What remains between the two sides once both are adjusted for what is in transit. A reconciliation balances when this is zero."}},"additionalProperties":false,"required":["currency","statementBeginningBalance","statementEndingBalance","glBeginningBalance","glEndingBalance","clearedIncoming","clearedOutgoing","incomingBankTransactionsInTransit","outgoingBankTransactionsInTransit","incomingGlTransactionsInTransit","outgoingGlTransactionsInTransit","difference"],"description":"Balance roll-forward for this reconciliation, computed on every call. Read it as two columns that must meet: the statement side and the ledger side, each adjusted for what the other has not seen yet. Absent from GET banking/reconciliations, which is a data-set and carries scalars only.","examples":[{"currency":"USD","statementBeginningBalance":"171905.12","statementEndingBalance":"184320.55","glBeginningBalance":"171905.12","glEndingBalance":"186470.55","clearedIncoming":"43120.00","clearedOutgoing":"-30704.57","incomingBankTransactionsInTransit":"0","outgoingBankTransactionsInTransit":"-2150.00","incomingGlTransactionsInTransit":"0","outgoingGlTransactionsInTransit":"0","difference":"0"}]}},"additionalProperties":false,"required":["id","accountId","accountingPeriodId","currency","lastModifiedDate","balances"]},"getVendorCreditOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor credit."},"vendorCreditNumber":{"type":"string","description":"The vendor credit number. Absent until a number has been assigned."},"referenceNumber":{"type":"string","description":"The vendor's credit memo reference number, as printed on the vendor's document."},"creditDate":{"type":"string","format":"date","description":"The date on the vendor's credit memo. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the credit is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"status":{"type":"string","description":"The application status, how much of the credit has been set against vendor bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalAmount":{"type":"string","format":"decimal","description":"The total credit amount, in currency."},"externalId":{"type":"string","description":"The identifier this credit has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this credit is from. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this credit is from."},"entityId":{"type":"string","description":"The legal entity this credit is booked under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this credit is booked under."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor credit last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line item number."},"description":{"type":"string","description":"A description of the credit line item."},"lineType":{"type":"string","description":"The type of line item. Possible values: 'expense', 'prepaid'."},"amount":{"type":"string","format":"decimal","description":"The line credit amount, in the credit currency."},"currency":{"type":"string","description":"The currency for the line. It always matches the credit currency. Format ISO 4217, for example 'USD'."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the credit currency."},"vatAmount":{"type":"string","format":"decimal","description":"The computed VAT amount on the line, in the credit currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted credit reads 'notStarted' until the credit posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in the credit currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaid'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The credit line items, in their order on the credit. An empty array when the credit has none."}},"additionalProperties":false,"required":["id","referenceNumber","creditDate","currency","lastModifiedDate"]},"deleteVendorOutput":{"type":"object","properties":{},"additionalProperties":false},"getReconciliationMatchesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"matchId":{"type":"string","description":"Id (a UUID) of the match group, stable for as long as the match exists. The same value GET banking/bank-transactions/{id} reports as `matchId` for a matched transaction. Opaque here: no route in v1 takes it in a path."},"type":{"enum":["match","netZero"],"description":"Kind of match: 'match' when bank and ledger were tied to each other, 'netZero' when ledger postings were matched against each other because they cancel out and never reach a statement."},"amount":{"type":"string","format":"decimal","description":"Net amount of the match group in the account currency: what the group moved on the account overall."},"matchDate":{"type":"string","format":"date","description":"Date the match was made. Format YYYY-MM-DD."},"documentCount":{"type":"number","description":"Number of documents in the group. Equal to the length of `documents`, and the reason a match is not modelled as a pair."},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the document itself: the bank transaction on the bank side, the journal entry line on the ledger side. Addresses the resource each side's own endpoints take."},"side":{"enum":["bank","ledger"],"description":"Which side of the match the document came from."},"reference":{"type":"string","description":"Human-readable reference of the document: a bank transaction number on the bank side, a journal entry reference on the ledger side."},"amount":{"type":"string","format":"decimal","description":"Amount of this document in the account currency, signed the way the statement sees it: positive for money arriving in the account, on either side. Within an ordinary match the bank and ledger amounts therefore carry the same sign; within a net-zero group the ledger amounts cancel."},"date":{"type":"string","format":"date","description":"Date of the document. Format YYYY-MM-DD."},"payeeOrPayor":{"type":"string","description":"Counterparty the document names, when it names one."},"description":{"type":"string","description":"Description carried by the document."}},"additionalProperties":false},"description":"The documents tied together by this match — bank transactions and ledger postings side by side, each described the same way whichever side it came from."}},"additionalProperties":false,"required":["type","documentCount","documents"]},"description":"Matches in this reconciliation's period for this page, ordinary and net-zero together, oldest match first. Empty when nothing has been matched yet.","examples":[[{"matchId":"8c41d2e7-6f05-4b3a-9e18-d27a5f90c6b3","type":"match","amount":"43120.00","matchDate":"2026-07-30","documentCount":2,"documents":[{"id":"b2f7c418-95a1-4d0e-8a63-7fe0d1c34592","side":"bank","reference":"BT-004182","amount":"43120.00","date":"2026-07-30","payeeOrPayor":"Northwind Traders","description":"Incoming wire"},{"id":"e5a90c3d-2b71-4f6e-b84d-0c3f1a7e9d26","side":"ledger","reference":"JE-2026-0993","amount":"43120.00","date":"2026-07-30","payeeOrPayor":"Northwind Traders","description":"Invoice INV-2026-0771 settlement"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass back as the `cursor` query parameter for the next page. Absent on the last page, which is how a caller knows to stop."},"hasMore":{"type":"boolean","description":"True when more match groups remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"getPayrollDetailOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll run."},"payrollDetailNumber":{"type":"string","description":"The payroll run number. Absent until a number has been assigned."},"description":{"type":"string","description":"A description of the payroll run."},"periodName":{"type":"string","description":"The name of the payroll period this run covers, for example '2026-08'."},"payrollDate":{"type":"string","format":"date","description":"The date the payroll is dated. Format YYYY-MM-DD."},"startDate":{"type":"string","format":"date","description":"The first day of the period the run covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the run covers. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the run is denominated in. Format ISO 4217, for example 'USD'. Governs openAmount and every line amount."},"grouping":{"type":"string","description":"How the payroll run is grouped. Values include 'Employee', 'Department' and 'Multi-level'."},"paymentStatus":{"type":"string","description":"The payment status of the run. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"openAmount":{"type":"string","format":"decimal","description":"The amount still unpaid on this run, in currency."},"isImported":{"type":"boolean","description":"Whether the run was imported from a payroll provider rather than entered by hand."},"entityId":{"type":"string","description":"The legal entity the run belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the run belongs to."},"templateId":{"type":"string","description":"The payroll template this run was created from. See id on GET accounting/payroll-templates/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll run last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"lineLevel":{"type":"string","description":"The level this line sits at."},"employeeName":{"type":"string","description":"The name of the employee this line pays."},"unmatchedEmployeeName":{"type":"string","description":"The employee name as it arrived from the payroll provider when it matched no employee on file."},"departmentName":{"type":"string","description":"The name of the department this line is charged to."},"departmentCode":{"type":"string","description":"The code of that department."},"departmentNumber":{"type":"string","description":"The number of that department."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The cost of the line's cross charged categories moves to that entity through an intercompany cross charge journal entry. Absent when the line is not cross charged."},"totalAmount":{"type":"string","format":"decimal","description":"The total amount on the line, in the run currency."},"totalGrossAmount":{"type":"string","format":"decimal","description":"The gross pay on the line, in the run currency."},"totalNetAmount":{"type":"string","format":"decimal","description":"The net pay on the line, in the run currency."},"totalEmployerAmount":{"type":"string","format":"decimal","description":"The employer-side contributions on the line, in the run currency."},"errorMessage":{"type":"string","description":"Why this line could not be processed, when it failed."}},"additionalProperties":false,"required":["id"]},"description":"The payroll lines, one per employee or department depending on grouping. An empty array when the run has none."}},"additionalProperties":false,"required":["id","payrollDate","currency","lastModifiedDate"]},"createPurchaseOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase order.","examples":["9c4e1b70-8d25-4a63-b19f-5e7c02da3846"]}},"additionalProperties":false,"required":["id"]},"createPurchaseOrderInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity that owns the order. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"vendorId":{"type":"string","description":"The vendor the order is placed with. See id on GET accounting/vendors/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"currency":{"type":"string","description":"The currency of the order. Format ISO 4217, for example 'USD'. Governs every line amount.","examples":["USD"]},"description":{"type":"string","description":"The description of the order, shown to the vendor.","examples":["Q4 office supplies"]},"internalDescription":{"type":"string","description":"An internal description of the order, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo printed on vendor-facing documents."},"externalPONumber":{"type":"string","description":"The reference number this order has in the upstream system."},"paymentTerms":{"type":"string","description":"The payment-terms code agreed with the vendor, for example 'net30'."},"startDate":{"type":"string","format":"date","description":"The date the order starts. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The date the order ends. Use format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are required by. Use format YYYY-MM-DD.","examples":["2026-10-15"]},"requestedById":{"type":"string","description":"The employee who requested the order. There is no endpoint for it."},"purchaseTypeId":{"type":"string","description":"The purchase type of the order, for example 'New purchase'. Must be an active type. See id on GET accounting/purchase-types/:id."},"lines":{"type":"array","items":{"type":"object","properties":{"isItem":{"type":"boolean","description":"Whether this is an item line. True for an item line, priced by quantity times price. False for an expense line, priced by editableAmount."},"description":{"type":"string","description":"A description of what is being ordered."},"itemId":{"type":"string","description":"The item being ordered. Expected on an item line."},"accountId":{"type":"string","description":"The ledger account the line is booked to. See id on GET accounting/accounts/:id. Expected on an expense line."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. Expected on an item line."},"departmentId":{"type":"string","description":"The department the cost is allocated to. See id on GET people/departments/:id."},"quantity":{"type":"string","format":"decimal","description":"The ordered quantity, as a decimal. Expected on an item line."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency, as a decimal. Expected on an item line."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, in the order currency, as a decimal. Expected on an expense line."},"startDate":{"type":"string","format":"date","description":"The date this line starts. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The date this line ends. Use format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Use format YYYY-MM-DD."}},"additionalProperties":false,"required":["isItem"]},"description":"The lines this order places. At least one is required.","examples":[[{"isItem":false,"description":"Stationery","editableAmount":"450.00"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createPurchaseOrder` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createPurchaseOrder, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the order. Upload each file first and send its reference as `file`."}},"additionalProperties":false,"required":["entityId","vendorId","currency","lines"]},"deletePayrollPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"searchExpenseReportOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense report."},"expenseNumber":{"type":"string","description":"The expense number. Absent until one has been assigned."},"status":{"type":"string","description":"The approval status of the report. Values include 'draft', 'pendingApproval', 'approved', 'rejected' and 'paid'."},"paymentStatus":{"type":"string","description":"The payment status of the report. Absent until a payment run has touched it."},"submittedDate":{"type":"string","format":"date","description":"The date the employee submitted the report for approval. Format YYYY-MM-DD."},"reimbursementCurrency":{"type":"string","description":"The currency the report is reimbursed in. Format ISO 4217, for example 'USD'. Governs every header total below."},"reimbursableTotal":{"type":"string","format":"decimal","description":"The total reimbursable amount across the report's items, in reimbursementCurrency."},"reimbursableTotalNetAmount":{"type":"string","format":"decimal","description":"The total reimbursable amount excluding VAT, in reimbursementCurrency."},"amountPaid":{"type":"string","format":"decimal","description":"The amount already reimbursed to the employee, in reimbursementCurrency."},"openAmount":{"type":"string","format":"decimal","description":"The amount still owed to the employee, reimbursableTotal minus amountPaid, in reimbursementCurrency."},"pendingAmount":{"type":"string","format":"decimal","description":"The amount committed to an in-flight payment run but not yet paid, in reimbursementCurrency."},"containsBillableItem":{"type":"boolean","description":"Whether at least one item on the report is marked billable to a customer."},"markAsPaid":{"type":"boolean","description":"Whether the report was flagged as paid without going through a payment run."},"pendingPayment":{"type":"boolean","description":"Whether a payment for this report is in flight."},"skipJournalEntry":{"type":"boolean","description":"Whether the report is configured not to post a journal entry."},"reviewMessage":{"type":"string","description":"The reviewer's note left on approval or rejection."},"externalUrl":{"type":"string","description":"A link to the report in the upstream system that produced it."},"externalExpenseReportId":{"type":"string","description":"The identifier this report has in the upstream system that produced it. It is not unique."},"origin":{"type":"string","description":"The source system this report came from, as free-form text."},"employeeId":{"type":"string","description":"The employee the report belongs to. See id on GET people/person/:id."},"employeeName":{"type":"string","description":"The name of the employee the report belongs to."},"entityId":{"type":"string","description":"The legal entity the report is posted under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity the report is posted under."},"departmentId":{"type":"string","description":"The department the report is charged to. See id on GET people/departments/:id."},"offsetAccountId":{"type":"string","description":"The GL offset account for the reimbursement. See id on GET accounting/accounts/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the expense report last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"expenseItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense item."},"itemNumber":{"type":"string","description":"The expense item number."},"merchant":{"type":"string","description":"The merchant the expense was incurred with."},"billDate":{"type":"string","format":"date","description":"The date the expense was incurred. Format YYYY-MM-DD."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense item."},"amount":{"type":"string","format":"decimal","description":"The amount of the expense item, as a decimal in the item's own currency."},"currency":{"type":"string","description":"The currency this item's amount is in. Format ISO 4217, for example 'USD'. May differ from the report's reimbursementCurrency."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursable to the employee."},"categoryId":{"type":"string","description":"The expense category the item is booked to. See id on GET accounting/expense-categories/:id."},"crossChargeEntityId":{"type":"string","description":"The legal entity this item is cross charged to (Charge to). See id on GET base/entities. Absent when the item is not cross charged."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the attachment record."},"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the stored file. There is no endpoint for it."}},"additionalProperties":false,"required":["id"]},"description":"The receipts on this item."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted report reads 'notStarted' until the report posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in this item's currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this item is deferred over, one per accounting book. Absent when the item is not amortized. An expense item has no line type, so what makes it amortizable is its account: the category or account it books to must be a prepaid-expenses account. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The expense items on the report, in their order on it. An empty array when the report has none."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the attachment. Send it in attachments[].id on PATCH accounting/expense-reports/:id to keep the file."},"fileName":{"type":"string","description":"The display name of the attached file."},"fileId":{"type":"string","description":"The identifier of the stored file. There is no endpoint for it."}},"additionalProperties":false,"required":["id"]},"description":"Files on the whole report rather than one item, such as a summary or an approval email. Each item's receipts are in its own attachments. An empty array when the report has none."}},"additionalProperties":false,"required":["id","status","reimbursementCurrency","lastModifiedDate"]},"description":"The expense reports that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more reports remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchExpenseReportInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the expense report with this identifier."},"expenseNumber":{"type":"string","description":"Limits results to reports with this expense number. It is not unique, so this can match several reports."},"employeeId":{"type":"string","description":"Limits results to reports belonging to this employee, given as the employee id. See id on GET people/person/:id. An id that matches no employee yields an empty page, not an error."},"entityId":{"type":"string","description":"Limits results to reports posted under this legal entity, given as the entity id. See id on GET base/entities. An id that matches no entity yields an empty page, not an error."},"employeeName":{"type":"string","description":"Limits results to reports whose employee has this name. The match is exact and case-sensitive."},"entityName":{"type":"string","description":"Limits results to reports whose legal entity has this name. The match is exact and case-sensitive."},"status":{"type":"string","description":"Limits results to reports in this approval status. Values include 'draft', 'pendingApproval', 'approved', 'rejected' and 'paid'. Any other value matches no report."},"paymentStatus":{"type":"string","description":"Limits results to reports in this payment status. Any other value matches no report."},"externalExpenseReportId":{"type":"string","description":"Limits results to reports with this upstream identifier. It is not unique, so this can match several reports."}},"additionalProperties":false,"description":"The filters to apply. An expense report must match every filter you send. Omit to return all expense reports.","examples":[{"status":"pendingApproval"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of expense reports per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"markVendorDuplicateOutput":{"type":"object","properties":{"foldedCount":{"type":"number","description":"How many vendors were folded into the parent.","examples":[1]}},"additionalProperties":false,"required":["foldedCount"]},"markVendorDuplicateInput":{"type":"object","properties":{"duplicateVendorIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the vendors to mark as duplicates of the parent. At least one is required.","examples":[["9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95"]]}},"additionalProperties":false,"required":["duplicateVendorIds"]},"searchExpenseCategoryOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense category."},"category":{"type":"string","description":"The display name of the expense category, for example 'Meals'. Unique within the tenant."},"categoryType":{"type":"string","description":"The kind of expense. Possible values: 'Pur', 'Dis', 'PerDiem'. 'Dis' is distance traveled."},"reimbursable":{"type":"boolean","description":"Whether expenses in this category are reimbursed to the employee."},"status":{"type":"string","description":"The lifecycle status of the expense category. Possible values: 'active', 'inactive'. An inactive category stays readable so historical expense items still resolve, and is not offered for new ones."},"requireAttachment":{"type":"boolean","description":"Whether an expense in this category must have a receipt attachment."},"requireAttendees":{"type":"boolean","description":"Whether an expense in this category must list attendees."},"externalId":{"type":"string","description":"The identifier this category has in an external system. It is not unique."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the expense category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","category","reimbursable","lastModifiedDate"]},"description":"The expense categories on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchExpenseCategoryInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the category with this identifier."},"category":{"type":"string","description":"Limits results to the category with this exact name, for example 'Meals'. The name is unique within the tenant, so this returns at most one category. The match is case-sensitive."},"categoryType":{"type":"string","description":"Limits results to categories of this kind. Accepted values: 'Pur', 'Dis', 'PerDiem'. Any other value matches no category."},"status":{"type":"string","description":"Limits results to categories in this lifecycle status. Accepted values: 'active', 'inactive'. Any other value matches no category."},"externalId":{"type":"string","description":"Limits results to categories with this external identifier. It is not unique, so this can return several categories."}},"additionalProperties":false,"description":"The filters to apply. A category must match every filter you send. Omit to return all expense categories.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of expense categories per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"purchaseRequestsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase request."},"purchaseRequestNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The purchase request number, for example 'PR-1', unique across purchase requests. Absent until one has been assigned."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A description of what is being requested. It is shown to the vendor."},"internalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Internal notes on the request, not shown to the vendor."},"externalMemo":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A memo intended for the vendor."},"status":{"anyOf":[{"enum":["pendingApproval","approved","rejected","closed"]},{"type":"null"}],"description":"The lifecycle and approval state, in one field. This resource has no separate approvalStatus."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the request is denominated in. Format ISO 4217, for example 'USD'. Governs totalAmount and every line amount."},"totalAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total requested amount, the sum of the line totals, in the request currency."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the period the request covers. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the period the request covers. Format YYYY-MM-DD."},"needByDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment-terms key requested for the resulting order, for example 'net30'."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this request has in the upstream system that produced it. It is not unique."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this request belongs to."},"departmentName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the department raising the request."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase request last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deletePayrollDetailOutput":{"type":"object","properties":{},"additionalProperties":false},"unapplyVendorCreditOutput":{"type":"object","properties":{},"additionalProperties":false},"unapplyVendorCreditInput":{"type":"object","properties":{"vendorBillIds":{"type":"array","items":{"type":"string"},"description":"The vendor bills to detach this credit from. See id on GET accounting/vendor-bills/:id. Omit to detach every application the credit has.","examples":[["9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95"]]}},"additionalProperties":false},"createBankTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bank transaction.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createBankTransactionInput":{"type":"object","properties":{"bankAccountId":{"type":"string","description":"The bank account the transaction belongs to. See id on GET banking/bank-accounts/:id.","examples":["9effa2ff-bc94-44bc-b706-a5f95f792407"]},"amount":{"type":"string","format":"decimal","description":"The transaction amount, as a decimal in the transaction currency. A negative amount is money leaving the account.","examples":["-1250.00"]},"currency":{"type":"string","description":"The currency of the transaction. Format ISO 4217, for example 'USD'. It governs the amount.","examples":["USD"]},"externalCreationDate":{"type":"string","format":"date","description":"The date the transaction was created in the source system. Use format YYYY-MM-DD.","examples":["2026-02-14"]},"externalTransactionId":{"type":"string","description":"The transaction's identifier in the system it was imported from. Must be unique across the tenant.","examples":["ACME-TXN-88213"]},"description":{"type":"string","description":"A human-readable description of the transaction.","examples":["Consulting, February"]},"externalDescription":{"type":"string","description":"The description exactly as the source system supplied it, before any normalization."},"payeeOrPayor":{"type":"string","description":"The name of the counterparty the money went to or came from.","examples":["Acme Consulting LLC"]},"externalId":{"type":"string","description":"Another identifier the source system has for this record, distinct from externalTransactionId and not unique."},"transactionPaymentMethod":{"type":"string","description":"How the payment was made. The values are 'ACH', 'WIRE' and 'Unknown'.","examples":["ACH"]},"notes":{"type":"string","description":"Free-form notes for the transaction."},"externalPaymentId":{"type":"string","description":"The identifier of the payment in the source system this transaction settles."}},"additionalProperties":false,"required":["bankAccountId","amount","currency","externalCreationDate","externalTransactionId"]},"updatePayrollTemplateOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePayrollTemplateInput":{"type":"object","properties":{"name":{"type":"string","description":"The new name. Omit to leave it unchanged. It must stay unique across payroll templates."},"groupBy":{"type":"string","description":"The new grouping. Accepted values: 'Employee', 'Department', 'Multi-level'. Omit to leave it unchanged."},"journalEntryDate":{"type":"string","description":"The new journal entry date rule. Accepted values: 'payrollDate', 'endDate'. Omit to leave it unchanged."},"journalEntryGroupBy":{"type":"string","description":"The new default journal aggregation. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'. Omit to leave it unchanged."},"description":{"type":"string","description":"The new description. Omit to leave it unchanged.","examples":["Revised for 2027"]},"clearingAccountId":{"type":"string","description":"The new clearing account. Omit to leave it unchanged. See id on GET accounting/accounts/:id."},"source":{"type":"string","description":"The new source. Accepted values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'. Omit to leave it unchanged."},"entityIds":{"type":"array","items":{"type":"string"},"description":"The complete set of legal entities this template serves. Sending it replaces the assignment. Omit it to leave the current set unchanged. At least one entity if sent. See id on GET base/entities."},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of an existing category to keep. Omit for a new category. It must belong to this template."},"name":{"type":"string","description":"The name of the category. Unique within the template."},"subType":{"type":"string","description":"What the category represents. Accepted values: 'grossPay', 'deduction', 'netPay', 'employer'. At most one netPay category per template."},"status":{"type":"string","description":"Whether the category is usable. Accepted values: 'active', 'inactive'. Defaults to 'active'."},"payee":{"type":"string","description":"Who gets paid, as a payee code from your tenant's configured payee list, for example 'employee', 'payrollProvider', 'benefitsProvider' or 'taxOffice'."},"isManagedFromPayroll":{"type":"boolean","description":"Whether payment for this category is managed from payroll. Required, the category model has no default."},"crossCharge":{"type":"boolean","description":"Whether the category is cross charged: on payroll lines charged to another entity (crossChargeEntityId), its P&L side moves to that entity through an intercompany cross charge journal entry. Omit to leave it unchanged; a new category is not cross charged."},"debitAccountId":{"type":"string","description":"The account debited for this category. See id on GET accounting/accounts/:id."},"creditAccountId":{"type":"string","description":"The account credited for this category. See id on GET accounting/accounts/:id."},"debitJournalAggregation":{"type":"string","description":"How debit journal lines are aggregated. Accepted values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'. Defaults to the template's setting. 'payrollCategoryByEmployee' requires groupBy 'Employee'."},"creditJournalAggregation":{"type":"string","description":"How credit journal lines are aggregated. The same values and rule as the debit side apply."},"debitTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension. Accepted values: 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category debits, at most one per dimension. Supported dimension: 'vendor'. Requires debitJournalAggregation to be above 'account'."},"creditTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension. Accepted values: 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category credits. The same values and rules as the debit side apply."}},"additionalProperties":false,"required":["name","subType","isManagedFromPayroll"]},"description":"The complete set of categories. Sending it replaces them. Include an existing category with its id to keep it, and leave one out to delete it. Omit the field to leave the stored categories unchanged.","examples":[[{"id":"6c9e2b41-8a35-4f70-b183-2d5a7c04e916","name":"Gross Pay","subType":"grossPay","isManagedFromPayroll":false,"debitAccountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"},{"name":"Pension","subType":"deduction","payee":"benefitsProvider","isManagedFromPayroll":true,"creditAccountId":"7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"}]]}},"additionalProperties":false},"submitReconciliationOutput":{"type":"object","properties":{},"additionalProperties":false},"submitReconciliationInput":{"type":"object","properties":{},"additionalProperties":false},"searchBankTransactionOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank transaction."},"bankTransactionNumber":{"type":"string","description":"The bank transaction number. Absent until one has been assigned."},"externalTransactionId":{"type":"string","description":"The identifier this transaction has in the bank or aggregator it was imported from. Unique across transactions."},"externalPaymentId":{"type":"string","description":"The end-to-end payment identifier supplied by the integration, where the bank provides one."},"endToEndId":{"type":"string","description":"A payment reference recovered from the external transaction data by the integration."},"externalCreationDate":{"type":"string","format":"date","description":"The date the transaction was created in the source bank, not the date it was imported. Format YYYY-MM-DD."},"description":{"type":"string","description":"The description recorded on the transaction."},"externalDescription":{"type":"string","description":"The description as the bank supplied it, unmodified."},"additionalInformation":{"type":"string","description":"Any additional detail the bank supplied with the transaction."},"payeeOrPayor":{"type":"string","description":"The name of the counterparty the money went to or came from."},"amount":{"type":"string","format":"decimal","description":"The transaction amount, as a decimal in the transaction currency. A negative amount is money leaving the account and a positive amount is money arriving."},"currency":{"type":"string","description":"The currency of the transaction. Format ISO 4217, for example 'USD'. It governs the amount."},"matchStatus":{"type":"string","description":"The reconciliation state of the transaction, computed from its matches. The states are 'unmatched', 'suggested', 'pending', 'matched', 'autoMatched' and 'needsAttention'."},"matchId":{"type":"string","description":"The unique identifier for the match this transaction belongs to. Absent when the transaction is unmatched. There is no endpoint for it."},"notes":{"type":"string","description":"Free-form notes recorded against the transaction."},"transactionPaymentMethod":{"type":"string","description":"How the payment was made, as reported by the integration. The values are 'ACH', 'WIRE' and 'Unknown'."},"bankAccountId":{"type":"string","description":"The bank account this transaction belongs to. See id on GET banking/bank-accounts/:id."},"accountName":{"type":"string","description":"The name of the linked chart-of-accounts account. Suffixed with '(Inactive)' when the account link is broken."},"sourceBankName":{"type":"string","description":"The name of the bank the account is held at."},"entityName":{"type":"string","description":"The name of the legal entity the owning bank account belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank transaction last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","externalTransactionId","externalCreationDate","lastModifiedDate"]},"description":"The bank transactions on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchBankTransactionInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the bank transaction with this identifier."},"bankTransactionNumber":{"type":"string","description":"Limits results to the bank transaction with this number. The match is exact."},"externalTransactionId":{"type":"string","description":"Limits results to the transaction with this external identifier. The match is exact."},"externalPaymentId":{"type":"string","description":"Limits results to transactions with this end-to-end payment identifier. The match is exact."},"bankAccountId":{"type":"string","description":"Limits results to transactions on this bank account. See id on GET banking/bank-accounts/:id."},"entityId":{"type":"string","description":"Limits results to transactions whose bank account belongs to this legal entity. See id on GET base/entities."},"currency":{"type":"string","description":"Limits results to transactions in this currency. Format ISO 4217, for example 'USD'."},"matchStatus":{"type":"string","description":"Limits results to transactions in this reconciliation state. The states are 'unmatched', 'suggested', 'pending', 'matched', 'autoMatched' and 'needsAttention'. Any other value matches nothing."}},"additionalProperties":false,"description":"The filters to apply. A bank transaction must match every filter you send. Omit to return all bank transactions.","examples":[{"matchStatus":"unmatched"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of bank transactions per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"bankTransactionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank transaction."},"bankTransactionNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank transaction number. Absent until one has been assigned."},"externalTransactionId":{"type":"string","description":"The identifier this transaction has in the bank or aggregator it was imported from. Unique across transactions."},"externalPaymentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end-to-end payment identifier supplied by the integration, where the bank provides one."},"endToEndId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A payment reference recovered from the external transaction data by the integration."},"externalCreationDate":{"type":"string","format":"date","description":"The date the transaction was created in the source bank, not the date it was imported. Format YYYY-MM-DD."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description recorded on the transaction."},"externalDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description as the bank supplied it, unmodified."},"additionalInformation":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any additional detail the bank supplied with the transaction."},"payeeOrPayor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the counterparty the money went to or came from."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The transaction amount, as a decimal in the transaction currency. A negative amount is money leaving the account and a positive amount is money arriving."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the transaction. Format ISO 4217, for example 'USD'. It governs the amount."},"matchStatus":{"anyOf":[{"enum":["unmatched","suggested","pending","matched","autoMatched","needsAttention"]},{"type":"null"}],"description":"The reconciliation state of the transaction, computed from its matches. The states are 'unmatched', 'suggested', 'pending', 'matched', 'autoMatched' and 'needsAttention'."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes recorded against the transaction."},"transactionPaymentMethod":{"anyOf":[{"enum":["ACH","WIRE","Unknown"]},{"type":"null"}],"description":"How the payment was made, as reported by the integration. The values are 'ACH', 'WIRE' and 'Unknown'."},"accountName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the linked chart-of-accounts account. Suffixed with '(Inactive)' when the account link is broken."},"sourceBankName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the bank the account is held at."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity the owning bank account belongs to."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bank transaction last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"searchVendorBillOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor bill."},"vendorBillNumber":{"type":"string","description":"The vendor bill number. Stable across edits."},"billNumber":{"type":"string","description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors."},"billDate":{"type":"string","format":"date","description":"The date printed on the vendor's invoice. Format YYYY-MM-DD."},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Format YYYY-MM-DD. Absent when not recorded."},"dueDate":{"type":"string","format":"date","description":"The date payment is due. Format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency the bill is denominated in. Format ISO 4217, for example 'USD'. Governs total, amountPaid, openAmount and every line amount."},"status":{"type":"string","description":"The approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'."},"paymentStatus":{"type":"string","description":"The payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"postingStatus":{"type":"string","description":"The accounting posting status, defined by the accounting subsystem, for example 'notPosted', 'posted' or 'postingFailed'."},"paymentTerms":{"type":"string","description":"The payment-terms key applied to this bill, for example 'net30', 'net60' or 'dueOnReceipt'. Inherited from the vendor unless overridden."},"total":{"type":"string","format":"decimal","description":"The total bill amount, gross, in the bill currency."},"amountPaid":{"type":"string","format":"decimal","description":"The cumulative amount paid against this bill so far, in the bill currency."},"openAmount":{"type":"string","format":"decimal","description":"The outstanding amount still owed, total minus amountPaid, in the bill currency."},"externalVendorBillId":{"type":"string","description":"The identifier this bill has in the upstream system that produced it. It is not unique."},"vendorId":{"type":"string","description":"The vendor this bill is from. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this bill is from."},"entityId":{"type":"string","description":"The legal entity this bill is posted under. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this bill is posted under."},"purchaseOrderId":{"type":"string","description":"The purchase order this bill is matched to. See id on GET accounting/purchase-orders/:id. The match is line-level, so it is absent when the bill is matched to no purchase order."},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order."},"externalPurchaseOrderNumber":{"type":"string","description":"The external reference of the purchase order this bill is matched to. Absent when the bill is matched to no purchase order, or when that purchase order has no external reference."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the vendor bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"origin":{"type":"string","description":"The source system this record came from, as free-form text. Absent when none was supplied."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line item number."},"description":{"type":"string","description":"A description of the line item, typically copied from the vendor's invoice."},"lineType":{"type":"string","description":"The type of line item. Values include 'expense' and 'prepaidExpense'."},"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, in the bill currency."},"currency":{"type":"string","description":"The currency for the line. It always matches the bill currency. Format ISO 4217, for example 'USD'."},"netAmount":{"type":"string","format":"decimal","description":"The line amount excluding VAT, in the bill currency."},"vatAmount":{"type":"string","format":"decimal","description":"The computed VAT amount on the line, in the bill currency."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.21 is 21%."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'."},"externalVendorBillItemId":{"type":"string","description":"The identifier this line has in the upstream system that produced it."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. Absent when the line is not cross charged."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the amortization schedule. Pass it as amortizationScheduleHeaderId to GET accounting/amortization-schedule-lines to read its installments."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. It is what distinguishes the entries of this array. See id on GET accounting/books/:id."},"bookName":{"type":"string","description":"The name of the accounting book this schedule posts into."},"status":{"type":"string","description":"How far the schedule has progressed. Values include 'notStarted', 'inProgress', 'completed' and 'voided'. A schedule created alongside an unposted bill reads 'notStarted' until the bill posts."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"The note recorded against the schedule, where one was given."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. It is taken from the schedule's installments, so it is absent on a schedule that has none yet."},"totalRecognized":{"type":"string","format":"decimal","description":"The amount recognized so far across the schedule's posted installments, in the bill currency. Zero until the first installment posts."}},"additionalProperties":false,"required":["id"]},"description":"The amortization schedules this line is deferred over, one per accounting book. Absent when the line is not amortized, which is every line whose lineType is not 'prepaidExpense'. Read the scheduled installments with GET accounting/amortization-schedule-lines, filtering on amortizationScheduleHeaderId."}},"additionalProperties":false,"required":["id"]},"description":"The bill line items, in their order on the bill. An empty array when the bill has none."}},"additionalProperties":false,"required":["id","vendorBillNumber","billNumber","billDate","dueDate","currency","status","lastModifiedDate"]},"description":"The vendor bills that match, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more bills remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchVendorBillInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the vendor bill with this identifier."},"vendorBillNumber":{"type":"string","description":"Limits results to the vendor bill with this number."},"billNumber":{"type":"string","description":"Limits results to bills with this vendor-issued invoice number. It is not unique, so this can match several bills."},"vendorId":{"type":"string","description":"Limits results to bills from this vendor. See id on GET accounting/vendors/:id."},"entityId":{"type":"string","description":"Limits results to bills posted under this legal entity. See id on GET base/entities."},"vendorName":{"type":"string","description":"Limits results to bills from a vendor with this name."},"entityName":{"type":"string","description":"Limits results to bills posted under a legal entity with this name."},"status":{"type":"string","description":"Limits results to bills in this approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'. Any other value matches no bill."},"paymentStatus":{"type":"string","description":"Limits results to bills in this payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'. Any other value matches no bill."},"externalVendorBillId":{"type":"string","description":"Limits results to bills with this upstream identifier. It is not unique, so this can match several bills."},"purchaseOrderId":{"type":"string","description":"Limits results to bills matched to this purchase order. See id on GET accounting/purchase-orders/:id. The match is line-level."},"purchaseOrderNumber":{"type":"string","description":"Limits results to bills matched to the purchase order with this number. The match is line-level."},"externalPurchaseOrderNumber":{"type":"string","description":"Limits results to bills matched to a purchase order with this external reference. It is not unique, and the match is line-level."}},"additionalProperties":false,"description":"The filters to apply. A vendor bill must match every filter you send. Omit to return all vendor bills.","examples":[{"billNumber":"INV-88213"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first request."},"size":{"type":"number","description":"The number of vendor bills per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"createVendorBillOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created vendor bill.","examples":["c41d0b58-2e97-4f6a-8d13-7b5e9c204af6"]}},"additionalProperties":false,"required":["id"]},"createVendorBillInput":{"type":"object","properties":{"vendorId":{"type":"string","description":"The vendor the bill is from. See id on GET accounting/vendors/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"entityId":{"type":"string","description":"The legal entity the bill is posted under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"billNumber":{"type":"string","description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors.","examples":["INV-88213"]},"billDate":{"type":"string","format":"date","description":"The date printed on the vendor's invoice. Use format YYYY-MM-DD.","examples":["2026-08-01"]},"dueDate":{"type":"string","format":"date","description":"The date payment is due. Use format YYYY-MM-DD.","examples":["2026-08-31"]},"currency":{"type":"string","description":"The currency of the bill. Format ISO 4217, for example 'USD'. Governs every line amount and vatAmount, which are decimals.","examples":["EUR"]},"serviceDate":{"type":"string","format":"date","description":"The date the goods or services were delivered. Use format YYYY-MM-DD. Omit to leave it unset. For an entity whose country requires a service date it then defaults to billDate."},"taxReportingDate":{"type":"string","format":"date","description":"The date that decides which tax return the bill is reported in. Use format YYYY-MM-DD. Omit to calculate it from billDate, the posting period and, depending on the entity setting, serviceDate. A date sent here is kept only when taxReportingDateOverridden is true and the entity allows overriding it; otherwise it is calculated."},"taxReportingDateOverridden":{"type":"boolean","description":"Send true with taxReportingDate to keep it as entered manually. Omitted or false, the date is calculated."},"paymentTerms":{"type":"string","description":"The payment-terms key, for example 'net30', 'net60' or 'dueOnReceipt'. The API does not check it against a list. Omit to inherit 'custom'."},"externalVendorBillId":{"type":"string","description":"The identifier this bill has in the upstream system that produced it. It is not unique."},"markAsPaid":{"type":"boolean","description":"Whether to mark the bill paid on creation. Defaults to false."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"lines":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The total line amount, gross, including VAT where applicable, as a decimal in the bill currency."},"description":{"type":"string","description":"A description of the line item, typically copied from the vendor's invoice."},"accountId":{"type":"string","description":"The GL expense account this line posts to. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is charged to. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The line's cost moves to that entity through an intercompany cross charge journal entry. It must differ from entityId, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"customerId":{"type":"string","description":"The customer this expense is rebilled to. See id on GET accounting/customers/:id. It is only meaningful alongside billableExpense."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. It must match exactly one active purchase tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The purchase tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. It fills the VAT rate, VAT account and reverse-charge account the line does not state."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the bill currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it."},"purchaseOrderLineId":{"type":"string","description":"The purchase-order line this line is matched against. There is no endpoint for it."},"billableExpense":{"type":"string","description":"The billable-expense status for this line. Values include 'yes', 'no' and 'skipped'."},"lineType":{"type":"string","description":"The kind of line. Values include 'expense' (a one-time cost) and 'prepaidExpense' (an upfront cost spread over several periods). Defaults to 'expense'."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency. It is required here, because a schedule without one cannot be turned into installments when the bill posts."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. Only a line whose lineType is 'prepaidExpense' may carry them. Each schedule starts out not started and begins recognizing once the bill is approved and posts."}},"additionalProperties":false,"required":["amount"]},"description":"The line items of the bill, in the order they should appear. At least one is expected. A bill with no lines asks for no expense.","examples":[[{"amount":"1200.00","description":"Consulting, August","vatPercentage":"0.19"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The upload reference returned by `POST /public/files/{namespace}/createVendorBill`, for example `u1.fIrOBkgwx7…`. Any other value is refused with 400."}},"additionalProperties":false},"description":"Files to attach to the bill, such as the invoice PDF.\n\n**Attach a file in two steps:**\n\n1. **Upload** it: `POST /public/files/{namespace}/createVendorBill` with a `multipart/form-data` body and the `Api-Version` header. The response returns an upload reference (`u1.…`).\n2. **Send** that reference as `file` in this request.\n\n`{namespace}` is the segment after `/public/api/` in your base URL, as in the request example. A reference works only for createVendorBill, only for you, and for a few minutes, so upload right before this call.\n\nAccepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif. Up to 10 MB each, the same limit as the bill page. The upload route itself accepts up to 15 MB. Required when your tenant requires an attachment on vendor bills.","examples":[[{"file":"u1.fIrOBkgwx7mXZLV3PekHTg.1nIoVCd"}]]}},"additionalProperties":false,"required":["vendorId","entityId","billNumber","billDate","dueDate","currency","lines"]},"updatePurchaseRequestOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePurchaseRequestInput":{"type":"object","properties":{"vendorId":{"type":"string","description":"A new vendor for the request. See id on GET accounting/vendors/:id. Omit to leave unchanged."},"departmentId":{"type":"string","description":"A new department for the request. See id on GET people/departments/:id. Omit to leave unchanged."},"description":{"type":"string","description":"A new public-facing description. Omit to leave unchanged."},"internalDescription":{"type":"string","description":"A new internal description. Omit to leave unchanged."},"externalMemo":{"type":"string","description":"A new external memo. Omit to leave unchanged."},"paymentTerms":{"type":"string","description":"New payment terms, as a payment-terms key. Omit to leave unchanged."},"needByDate":{"type":"string","format":"date","description":"A new need-by date. Use format YYYY-MM-DD. Omit to leave unchanged.","examples":["2026-11-01"]},"startDate":{"type":"string","format":"date","description":"A new start date. Use format YYYY-MM-DD. Omit to leave unchanged."},"endDate":{"type":"string","format":"date","description":"A new end date. Use format YYYY-MM-DD. Omit to leave unchanged."},"createLines":{"type":"array","items":{"type":"object","properties":{"isItem":{"type":"boolean","description":"True for an item line, priced by quantity times price. False for an expense line. Omit for an expense line."},"description":{"type":"string","description":"A description of what is being requested."},"itemId":{"type":"string","description":"The item being requested. See id on GET inventory/items/:id."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. See id on GET inventory/unit-of-measures/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"quantity":{"type":"string","format":"decimal","description":"The requested quantity, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, as a decimal."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, as a decimal."},"needByDate":{"type":"string","format":"date","description":"The date this line is needed by. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The expected delivery date. Use format YYYY-MM-DD."},"priority":{"type":"string","description":"The urgency of this line. Accepted values: 'high', 'medium', 'low'."}},"additionalProperties":false},"description":"Lines to add to this request. Same shape as on create, with no id, because the line does not exist yet. Omit for no additions."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. It must belong to this request."},"isItem":{"type":"boolean","description":"A new line kind. Omit to leave unchanged."},"description":{"type":"string","description":"A new description. Omit to leave unchanged."},"itemId":{"type":"string","description":"A new item. See id on GET inventory/items/:id. Omit to leave unchanged."},"unitOfMeasureId":{"type":"string","description":"A new unit of measure. See id on GET inventory/unit-of-measures/:id. Omit to leave unchanged."},"departmentId":{"type":"string","description":"A new department. See id on GET people/departments/:id. Omit to leave unchanged."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, as a decimal. Omit to leave unchanged."},"price":{"type":"string","format":"decimal","description":"A new unit price, as a decimal. Omit to leave unchanged."},"editableAmount":{"type":"string","format":"decimal","description":"A new manually entered amount, as a decimal. Omit to leave unchanged."},"needByDate":{"type":"string","format":"date","description":"A new need-by date. Use format YYYY-MM-DD. Omit to leave unchanged."},"deliveryDate":{"type":"string","format":"date","description":"A new expected delivery date. Use format YYYY-MM-DD. Omit to leave unchanged."},"priority":{"type":"string","description":"A new urgency. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Lines to change, each addressed by the id the request publishes. Every field but the id is optional and omitting it leaves that field unchanged. Omit for no changes.","examples":[[{"id":"8b3c1d02-7e46-4f95-b2a7-6d04e1c9f378","editableAmount":"1950.00"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The ids of lines to remove, applied before the updates and creates. Each must belong to this request, and none may already be ordered on a purchase order."}},"additionalProperties":false},"reopenReconciliationOutput":{"type":"object","properties":{},"additionalProperties":false},"reopenReconciliationInput":{"type":"object","properties":{},"additionalProperties":false},"deleteEmployeeAdvanceRequestOutput":{"type":"object","properties":{},"additionalProperties":false},"approvePurchaseOrderOutput":{"type":"object","properties":{"status":{"type":"string","description":"The approval status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"approvePurchaseOrderInput":{"type":"object","properties":{},"additionalProperties":false},"deleteAdvancePaymentCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"rejectPurchaseOrderOutput":{"type":"object","properties":{"status":{"type":"string","description":"The approval status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"rejectPurchaseOrderInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the order is being rejected, recorded against the approval decision. Omit for none.","examples":["Budget not approved for this quarter"]}},"additionalProperties":false},"employeeAdvancesRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the advance request — the public identifier used by GET accounting/employee-advances/:id. Filter e.g. filter[id][in]=<id1>,<id2>."},"advanceRequestNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated document number (ADV-...). Filter target: filter[advanceRequestNumber][eq]=ADV-1042."},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the requesting employee. Filter e.g. filter[employeeId][eq]=<uuid>."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the entity the request belongs to."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the AdvancePaymentCategory this request draws from."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Requested amount, in currency. Orderable, e.g. sort=-amount."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 4217 three-letter currency code that governs amount. Filter target: filter[currency][in]=USD,EUR."},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the advance is for."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Lifecycle status: draft, pendingApproval, approved, rejected or issued. Filter target: filter[status][eq]=pendingApproval."},"requestDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the request was submitted, as YYYY-MM-DD. Filter target: filter[requestDate][gte]=2026-01-01."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Instant the request last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). filter[lastModifiedDate][gte]=… plus sort=lastModifiedDate is a complete incremental-sync cursor."}},"additionalProperties":false},"applyStandalonePaymentOutput":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the created application."},"outboundPaymentId":{"type":"string","description":"Id (a UUID) of the outbound payment this application belongs to."},"appliedDocumentType":{"type":"string","description":"Kind of document settled."},"appliedDocumentId":{"type":"string","description":"Id of the settled document."},"amount":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"additionalProperties":false,"required":["amount","currency"],"description":"Amount applied."},"appliedDate":{"type":"string","format":"date","description":"Date of application."}},"additionalProperties":false,"required":["id","outboundPaymentId","appliedDocumentType","appliedDocumentId","amount","appliedDate"]},"description":"The created applications, one per input line, in the same order."}},"additionalProperties":false,"required":["applications"]},"applyStandalonePaymentInput":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"outboundPaymentId":{"type":"string","description":"Id (a UUID) of the standalone outbound payment being applied."},"appliedDocumentType":{"type":"string","description":"Kind of document this line settles: 'VendorBillHeaderBase', 'ExpenseReportBase' or 'WithholdingTaxEntry'."},"appliedDocumentId":{"type":"string","description":"Id (a UUID) of the target document."},"amount":{"type":"string","format":"decimal","description":"Amount applied, in the payment's currency. Must be greater than zero and not exceed the lesser of the payment's remaining unapplied amount and the document's open balance."},"appliedDate":{"type":"string","format":"date","description":"Date of application. Must not precede the payment's own date. Omit to default to the payment's date."}},"additionalProperties":false,"required":["outboundPaymentId","appliedDocumentType","appliedDocumentId","amount"]},"description":"One or more application lines. All-or-nothing: the whole batch is rejected if any line fails a check.","examples":[[{"outboundPaymentId":"c91f4a22-6d90-4c53-8e17-9f2a4b6c8d06","appliedDocumentType":"VendorBillHeaderBase","appliedDocumentId":"d02f4a22-6d90-4c53-8e17-9f2a4b6c8d07","amount":"500.00"}]]}},"additionalProperties":false,"required":["lines"]},"deleteExpenseCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"approveExpenseReportOutput":{"type":"object","properties":{"status":{"type":"string","description":"The approval status after the operation. The approval workflow decides it, so it is read back."}},"additionalProperties":false,"required":["status"]},"approveExpenseReportInput":{"type":"object","properties":{},"additionalProperties":false},"updateReconciliationOutput":{"type":"object","properties":{},"additionalProperties":false},"updateReconciliationInput":{"type":"object","properties":{"statementEndBalance":{"type":"string","format":"decimal","description":"Corrected closing balance from the bank statement, in the account currency. Omit to leave unchanged; the value cannot be cleared once set. Changing it moves the computed difference.","examples":["184320.55"]},"statementEndDate":{"type":"string","format":"date","description":"Corrected closing date of the bank statement; must fall inside the reconciliation's accounting period. Omit to leave unchanged; the value cannot be cleared once set. Format YYYY-MM-DD."}},"additionalProperties":false},"getOutboundPaymentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the outbound payment."},"outboundPaymentNumber":{"type":"string","description":"The outbound payment number. Absent until a number has been assigned."},"description":{"type":"string","description":"A description of the payment."},"paymentDate":{"type":"string","format":"date","description":"The date the payment was made. Format YYYY-MM-DD."},"paymentCurrency":{"type":"string","description":"The currency the payment is denominated in. Format ISO 4217, for example 'USD'. Governs totalPaid, appliedAmount and unappliedAmount."},"paymentType":{"type":"string","description":"How the money was sent, for example 'ach', 'wire' or 'check'."},"status":{"type":"string","description":"The processing status of the payment."},"approvalStatus":{"type":"string","description":"Where the payment sits in the approval workflow."},"applicationStatus":{"type":"string","description":"How much of the payment has been applied to bills. Values include 'unapplied', 'partiallyApplied' and 'applied'."},"totalPaid":{"type":"string","format":"decimal","description":"The total amount paid, in the payment currency."},"appliedAmount":{"type":"string","format":"decimal","description":"The portion already applied against vendor bills, in the payment currency."},"unappliedAmount":{"type":"string","format":"decimal","description":"The portion not yet applied to any bill, in the payment currency."},"bankCurrency":{"type":"string","description":"The currency of the bank account the money left, when it differs from the payment currency. Format ISO 4217, for example 'USD'."},"paymentId":{"type":"string","description":"The payment reference assigned by the bank or payment provider."},"externalId":{"type":"string","description":"The identifier this payment has in the upstream system that produced it. It is not unique."},"externalUrl":{"type":"string","description":"A link to the payment in an external system, when one is stored."},"origin":{"type":"string","description":"The source system this payment came from. Recorded when an integration created the payment."},"singlePayment":{"type":"boolean","description":"Whether the payment covers a single bill rather than a batch."},"paymentAccountId":{"type":"string","description":"The bank general ledger account the money left. See id on GET accounting/accounts/:id."},"paymentAccountName":{"type":"string","description":"The name of the bank general ledger account the money left."},"entityId":{"type":"string","description":"The legal entity that made the payment. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity that made the payment."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line."},"lineNumber":{"type":"string","description":"The line number."},"description":{"type":"string","description":"A description of the line."},"amount":{"type":"string","format":"decimal","description":"The amount paid on this line, in the line currency."},"currency":{"type":"string","description":"The currency for the line. Format ISO 4217, for example 'USD'."},"paymentDate":{"type":"string","format":"date","description":"The date this line was paid, when it differs from the header. Format YYYY-MM-DD."},"paymentType":{"type":"string","description":"How this line was sent, for example 'ach', 'wire' or 'check'."},"receiverName":{"type":"string","description":"The name of the payee."},"receiverAccount":{"type":"string","description":"The payee bank account number. It is returned here and on search but never on the collection endpoint and never filterable."},"receiverBankCode":{"type":"string","description":"The payee sort or routing code. It is returned here and on search but never on the collection endpoint and never filterable."},"customReference":{"type":"string","description":"A reference you supplied, carried on the line."}},"additionalProperties":false,"required":["id","description","currency","receiverName"]},"description":"The payment lines, one per payee or bill covered. An empty array when the payment has none."}},"additionalProperties":false,"required":["id","paymentDate","paymentCurrency","paymentType","status","lastModifiedDate"]},"cancelExpenseReportSubmissionOutput":{"type":"object","properties":{},"additionalProperties":false},"cancelExpenseReportSubmissionInput":{"type":"object","properties":{},"additionalProperties":false},"updateExpenseReportOutput":{"type":"object","properties":{},"additionalProperties":false},"updateExpenseReportInput":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee the report belongs to, given as an id. See id on GET people/person/:id. Omit to leave unchanged."},"entityId":{"type":"string","description":"The legal entity the report is posted under, given as an id. See id on GET base/entities. Omit to leave unchanged."},"reimbursementCurrency":{"type":"string","description":"The currency the employee is reimbursed in. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"submittedDate":{"type":"string","format":"date","description":"The date the report is submitted. Use format YYYY-MM-DD. Omit to leave unchanged."},"departmentId":{"type":"string","description":"The department the report is charged to, given as an id. See id on GET people/departments/:id. Omit to leave unchanged."},"offsetAccountId":{"type":"string","description":"The GL offset account for the reimbursement, given as an id. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"externalExpenseReportId":{"type":"string","description":"The identifier this report has in the upstream system that produced it. Omit to leave unchanged."},"externalUrl":{"type":"string","description":"A link to the report in the upstream system that produced it. Omit to leave unchanged."},"origin":{"type":"string","description":"The source system this report came from, as free-form text. Omit to leave unchanged."},"markAsPaid":{"type":"boolean","description":"Whether the report is marked paid. Omit to leave unchanged."},"createExpenseItems":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The amount of the expense, as a decimal in this item's own currency."},"currency":{"type":"string","description":"The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency."},"billDate":{"type":"string","format":"date","description":"The date on the receipt. Use format YYYY-MM-DD."},"merchant":{"type":"string","description":"The merchant the expense was paid to, as printed on the receipt."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense."},"categoryId":{"type":"string","description":"The expense category this item is booked under. See id on GET accounting/expense-categories/:id."},"accountId":{"type":"string","description":"The general ledger account this item's journal entry uses. See id on GET accounting/accounts/:id. Omit to let the category decide."},"crossChargeEntityId":{"type":"string","description":"The legal entity this item is cross charged to (Charge to). See id on GET base/entities. It must differ from the report's entity, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursed to the employee. Defaults to true."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"origin":{"type":"string","description":"The source system this item came from, as free-form text."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it. Free text."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/updateExpenseReport` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for updateExpenseReport, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Receipts for this item, each an uploaded file sent as `file` (see `file` below). Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the item's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this item over, one per accounting book. A new item has nothing to change or remove, so this is a plain array, the same shape POST accounting/expense-reports takes."}},"additionalProperties":false,"required":["amount","currency","billDate","merchant","expenseType"]},"description":"The expense items to add. Omit for no additions.","examples":[[{"amount":"12.50","currency":"EUR","billDate":"2026-08-21","merchant":"Taxi","expenseType":"Pur"}]]},"updateExpenseItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense item to change. It must belong to this report."},"amount":{"type":"string","format":"decimal","description":"The amount of the expense, as a decimal in this item's own currency."},"currency":{"type":"string","description":"The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency."},"billDate":{"type":"string","format":"date","description":"The date on the receipt. Use format YYYY-MM-DD."},"merchant":{"type":"string","description":"The merchant the expense was paid to, as printed on the receipt."},"expenseType":{"type":"string","description":"The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'."},"description":{"type":"string","description":"A description of the expense."},"categoryId":{"type":"string","description":"The expense category this item is booked under. See id on GET accounting/expense-categories/:id."},"accountId":{"type":"string","description":"The general ledger account this item's journal entry uses. See id on GET accounting/accounts/:id. Omit to let the category decide."},"crossChargeEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this item is cross charged to (Charge to). See id on GET base/entities. Omit to leave unchanged, or send null to clear it. It must differ from the report's entity, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"reimbursable":{"type":"boolean","description":"Whether this item is reimbursed to the employee. Defaults to true."},"externalExpenseItemId":{"type":"string","description":"The identifier this item has in the upstream system that produced it."},"origin":{"type":"string","description":"The source system this item came from, as free-form text."},"attendees":{"type":"string","description":"Who attended, when the item's category requires it. Free text."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/updateExpenseReport` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for updateExpenseReport, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Receipts for this item, each an uploaded file sent as `file` (see `file` below). Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them."},"createAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the item's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"Amortization schedules to add to this item, each with no id. Omit for no additions. Send none of the three amortization arrays to leave this item's schedules exactly as they are."},"updateAmortizationSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the schedule to change. It must be one this item already carries."},"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit to leave unchanged."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'. Omit to leave unchanged."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. Omit to leave unchanged."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD. Omit to leave unchanged."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. Omit to leave unchanged."},"description":{"type":"string","description":"A note to record against the schedule. Omit to leave unchanged."}},"additionalProperties":false,"required":["id"]},"description":"Amortization schedules to change, each addressed by the id the report publishes. A schedule that has already started recognizing is refused with AMORTIZATION_SCHEDULE_POSTED. Omit for no changes."},"deleteAmortizationSchedules":{"type":"array","items":{"type":"string"},"description":"The identifiers of amortization schedules to remove from this item. Each must be one this item carries, and one that has not started recognizing. Removing a schedule leaves this item's other books untouched."}},"additionalProperties":false,"required":["id"]},"description":"The expense items to change, each addressed by the id the report publishes. Every field but the id is optional, and omitting one leaves it unchanged. Omit for no changes."},"deleteExpenseItems":{"type":"array","items":{"type":"string"},"description":"The ids of expense items to remove, applied before the updates and creates. Each must belong to this report. Omit for no deletions. Removing an item also removes the amortization schedules it carried."},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of a file already on the report, to keep it. Send it alone, without `file`, `fileId` or `fileName`."},"fileName":{"type":"string","description":"The display name of a new file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `id`, `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"A new file, as the upload reference returned by `POST /public/files/{namespace}/updateExpenseReport` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for updateExpenseReport, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files for the whole report rather than one item. Leave it out to keep them. A list you send **replaces the report's files**: keep an existing one by its `id` from GET accounting/expense-reports/:id, add a new one as `file`. Send `null` or `[]` to remove them all. Item receipts are not affected; they change through each item's attachments. Once the report is approved or paid, files can be added but not removed, on the report or on an item (ATTACHMENT_REMOVAL_LOCKED)."}},"additionalProperties":false},"searchPurchaseOrderOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase order."},"poNumber":{"type":"string","description":"The purchase order number, for example 'PO-3'. Absent while none has been assigned."},"description":{"type":"string","description":"The description of the order, shown to the vendor."},"internalDescription":{"type":"string","description":"Internal notes on the order, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo intended for the vendor."},"externalPONumber":{"type":"string","description":"The order reference in the vendor's or an upstream system. It is not unique."},"approvalStatus":{"type":"string","description":"The approval status of the order. Possible values: 'approved', 'pendingApproval', 'rejected'."},"budgetStatus":{"type":"string","description":"The budget-check status of the order. Possible values: 'approved', 'rejected', 'pendingApproval'. Independent of approvalStatus."},"status":{"type":"string","description":"The order lifecycle status. Possible values: 'open', 'inprogress', 'closed', 'overMatched'. This is not the vendor-bill matching status, which is per line in each line's matchStatus."},"currency":{"type":"string","description":"The currency the order is denominated in. Format ISO 4217, for example 'USD'. Governs every amount on the order and its lines."},"totalAmount":{"type":"string","format":"decimal","description":"The total ordered amount, the sum of the line totals, in the order currency."},"invoicedTotalAmount":{"type":"string","format":"decimal","description":"The portion of the order already invoiced by vendor bills, in the order currency."},"receivedTotalAmount":{"type":"string","format":"decimal","description":"The portion of the order already received as goods, in the order currency."},"startDate":{"type":"string","format":"date","description":"The first day of the period the order covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the order covers. Format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment-terms code applied to this order, for example 'net30', 'net60', 'dueOnReceipt' or 'custom'. Inherited from the vendor unless overridden."},"hasInventoryItems":{"type":"boolean","description":"Whether any line references an inventory item."},"vendorId":{"type":"string","description":"The vendor this order is placed with. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this order is placed with."},"vendorContactEmail":{"type":"string","description":"The main contact email at the vendor."},"entityId":{"type":"string","description":"The legal entity this order is placed by. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this order is placed by."},"purchaseTypeId":{"type":"string","description":"The purchase type of the order. See id on GET accounting/purchase-types/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line number, for example 'POL-3'."},"description":{"type":"string","description":"A description of the line item."},"isItem":{"type":"boolean","description":"Whether the line is an item line. True when the line references an item, false when it is an expense line."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency. Set on item lines. On an expense line the amount is in editableAmount instead."},"editableAmount":{"type":"string","format":"decimal","description":"The directly entered line amount, in the order currency. Used on expense lines, where there is no unit price to multiply."},"total":{"type":"string","format":"decimal","description":"The line total, in the order currency: price times quantity on an item line, editableAmount on an expense line."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount applied to the line, as a percentage. 10 means 10%, not 0.10."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. It always matches the order currency."},"status":{"type":"string","description":"The delivery status of the line. Possible values: 'undelivered', 'delivering', 'delivered'."},"matchStatus":{"type":"string","description":"The vendor-bill matching status of the line. Possible values: 'unmatched', 'partiallyMatched', 'matched', 'overMatched'."},"invoicedStatus":{"type":"string","description":"The invoicing status of the line. Possible values: 'uninvoiced', 'partiallyInvoiced', 'invoiced', 'overInvoiced'."},"receivedStatus":{"type":"string","description":"The goods-receipt status of the line. Possible values: 'unreceived', 'partiallyReceived', 'received', 'overReceived'."},"invoicedQuantity":{"type":"string","format":"decimal","description":"The quantity invoiced against this line so far, as a decimal."},"invoicedAmount":{"type":"string","format":"decimal","description":"The amount invoiced against this line so far, in the order currency."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity received against this line so far, as a decimal."},"receivedAmount":{"type":"string","format":"decimal","description":"The amount received against this line so far, in the order currency."},"remainingAmount":{"type":"string","format":"decimal","description":"The amount still open on this line, in the order currency: the line total less what has been invoiced."},"startDate":{"type":"string","format":"date","description":"The first day of the period this line covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period this line covers. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date this line was delivered. Format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Format YYYY-MM-DD."},"unitOfMeasure":{"type":"string","description":"The name of the unit of measure for the quantity."},"unitOfMeasureId":{"type":"string","description":"The unit of measure for the quantity."},"itemId":{"type":"string","description":"The item this line orders. Present on item lines."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."}},"additionalProperties":false,"required":["id"]},"description":"The order line items, in their order on the order. An empty array when the order has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"description":"The purchase orders on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPurchaseOrderInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the purchase order with this identifier. GET accounting/purchase-orders/:id does the same more cheaply."},"poNumber":{"type":"string","description":"Limits results to the purchase order with this number, for example 'PO-3'. The match is exact."},"externalPONumber":{"type":"string","description":"Limits results to purchase orders with this external reference. The match is exact. It is not unique, so it can match several orders."},"approvalStatus":{"type":"string","description":"Limits results to orders in this approval status. Accepted values: 'approved', 'pendingApproval', 'rejected'. Any other value matches no purchase order."},"budgetStatus":{"type":"string","description":"Limits results to orders in this budget-check status. Accepted values: 'approved', 'rejected', 'pendingApproval'. Any other value matches no purchase order."},"currency":{"type":"string","description":"Limits results to orders denominated in this currency. Format ISO 4217, for example 'USD'."},"paymentTerms":{"type":"string","description":"Limits results to orders with this payment-terms code, for example 'net30'. The match is exact."},"vendorId":{"type":"string","description":"Limits results to orders placed with this vendor. See id on GET accounting/vendors/:id. An id that matches no vendor returns an empty page, not an error."},"entityId":{"type":"string","description":"Limits results to orders placed by this legal entity. See id on GET base/entities. An id that matches no entity returns an empty page, not an error."},"vendorName":{"type":"string","description":"Limits results to orders whose vendor name is exactly this. The match is case-sensitive. Use vendorId when you already have the id."},"entityName":{"type":"string","description":"Limits results to orders whose legal entity name is exactly this. The match is case-sensitive. Use entityId when you already have the id."}},"additionalProperties":false,"description":"The filters to apply. A purchase order must match every filter you send. Omit to return all purchase orders.","examples":[{"approvalStatus":"pendingApproval"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of purchase orders per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"updateBankTransactionOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBankTransactionInput":{"type":"object","properties":{"externalCreationDate":{"type":"string","format":"date","description":"The new date the transaction was created in the source system. Use format YYYY-MM-DD. Omit to leave it unchanged.","examples":["2026-02-17"]}},"additionalProperties":false},"createEmployeeAdvanceRequestOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) assigned to the newly created advance request.","examples":["b81f4a22-6d90-4c53-8e17-9f2a4b6c8d05"]}},"additionalProperties":false,"required":["id"]},"createEmployeeAdvanceRequestInput":{"type":"object","properties":{"categoryId":{"type":"string","description":"Id (a UUID) of the AdvancePaymentCategory this request draws from. Must belong to the calling employee's own entity.","examples":["5c8e2f14-9a3b-4d67-8e21-1b4c6a9d3e02"]},"amount":{"type":"string","format":"decimal","description":"Requested amount, in the calling employee's entity functional currency. Must be greater than zero. Stored as the request's single purpose line.","examples":["750.00"]},"purpose":{"type":"string","description":"What the advance is for, e.g. the trip or event. Required, non-blank. Stored as the request's single purpose line.","examples":["Client site visit — flights and hotel"]},"tripStart":{"type":"string","format":"date","description":"First day of the trip the advance covers. Optional.","examples":["2026-09-10"]},"tripEnd":{"type":"string","format":"date","description":"Last day of the trip the advance covers. Must not be before tripStart. Optional.","examples":["2026-09-13"]},"notes":{"type":"string","description":"Free-text notes from the requester. Optional."},"requestDate":{"type":"string","format":"date","description":"The requester's own calendar day, as observed client-side. Omit to default to the appserver's current day."},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createEmployeeAdvanceRequest` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createEmployeeAdvanceRequest, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the request. Upload each file first and send its reference as `file`. A tenant may require at least one; see ATTACHMENT_REQUIRED.","examples":[[{"fileName":"itinerary.pdf","file":"u1.fIrOBkgwx7mXZLV3PekHTg.1nIoVCd"}]]}},"additionalProperties":false,"required":["categoryId","amount","purpose"]},"searchPurchaseTypeOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase type."},"name":{"type":"string","description":"The name of the purchase type, for example 'New purchase'. Unique within the tenant, ignoring case."},"description":{"type":"string","description":"What the purchase type is for."},"status":{"type":"string","description":"The lifecycle status of the purchase type. Possible values: 'active', 'inactive'. Only an active type can be chosen for a new purchase order. An inactive type stays readable so orders that carry it still resolve."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase type last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name","status","lastModifiedDate"]},"description":"The purchase types on this page, most recently created first. An empty array when nothing matches."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchPurchaseTypeInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"id":{"type":"string","description":"Limits results to the purchase type with this identifier."},"name":{"type":"string","description":"Limits results to the purchase type with this exact name, for example 'New purchase'. The name is unique within the tenant, so this returns at most one type. The match is case-sensitive."},"status":{"type":"string","description":"Limits results to purchase types in this lifecycle status. Accepted values: 'active', 'inactive'. Any other value matches no type."}},"additionalProperties":false,"description":"The filters to apply. A purchase type must match every filter you send. Omit to return all purchase types.","examples":[{"status":"active"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of purchase types per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false},"getPurchaseOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase order."},"poNumber":{"type":"string","description":"The purchase order number, for example 'PO-3'. Absent while none has been assigned."},"description":{"type":"string","description":"The description of the order, shown to the vendor."},"internalDescription":{"type":"string","description":"Internal notes on the order, not shown to the vendor."},"externalMemo":{"type":"string","description":"A memo intended for the vendor."},"externalPONumber":{"type":"string","description":"The order reference in the vendor's or an upstream system. It is not unique."},"approvalStatus":{"type":"string","description":"The approval status of the order. Possible values: 'approved', 'pendingApproval', 'rejected'."},"budgetStatus":{"type":"string","description":"The budget-check status of the order. Possible values: 'approved', 'rejected', 'pendingApproval'. Independent of approvalStatus."},"status":{"type":"string","description":"The order lifecycle status. Possible values: 'open', 'inprogress', 'closed', 'overMatched'. This is not the vendor-bill matching status, which is per line in each line's matchStatus."},"currency":{"type":"string","description":"The currency the order is denominated in. Format ISO 4217, for example 'USD'. Governs every amount on the order and its lines."},"totalAmount":{"type":"string","format":"decimal","description":"The total ordered amount, the sum of the line totals, in the order currency."},"invoicedTotalAmount":{"type":"string","format":"decimal","description":"The portion of the order already invoiced by vendor bills, in the order currency."},"receivedTotalAmount":{"type":"string","format":"decimal","description":"The portion of the order already received as goods, in the order currency."},"startDate":{"type":"string","format":"date","description":"The first day of the period the order covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period the order covers. Format YYYY-MM-DD."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are needed by. Format YYYY-MM-DD."},"paymentTerms":{"type":"string","description":"The payment-terms code applied to this order, for example 'net30', 'net60', 'dueOnReceipt' or 'custom'. Inherited from the vendor unless overridden."},"hasInventoryItems":{"type":"boolean","description":"Whether any line references an inventory item."},"vendorId":{"type":"string","description":"The vendor this order is placed with. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this order is placed with."},"vendorContactEmail":{"type":"string","description":"The main contact email at the vendor."},"entityId":{"type":"string","description":"The legal entity this order is placed by. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of the legal entity this order is placed by."},"purchaseTypeId":{"type":"string","description":"The purchase type of the order. See id on GET accounting/purchase-types/:id."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase order last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"approvals":{"type":"array","items":{"type":"object","properties":{"decision":{"type":"string","description":"What was decided. Values include 'approve' and 'reject'."},"employeeName":{"type":"string","description":"The name of the employee who decided."},"message":{"type":"string","description":"The reviewer's note, where one was given."},"decidedAt":{"type":"string","format":"date-time","description":"The date and time the decision was recorded, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["decision","decidedAt"]},"description":"The approval decisions on this order, oldest first. An empty array when no approval policy has matched the order."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line item."},"lineNumber":{"type":"string","description":"The line number, for example 'POL-3'."},"description":{"type":"string","description":"A description of the line item."},"isItem":{"type":"boolean","description":"Whether the line is an item line. True when the line references an item, false when it is an expense line."},"quantity":{"type":"string","format":"decimal","description":"The quantity ordered, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the order currency. Set on item lines. On an expense line the amount is in editableAmount instead."},"editableAmount":{"type":"string","format":"decimal","description":"The directly entered line amount, in the order currency. Used on expense lines, where there is no unit price to multiply."},"total":{"type":"string","format":"decimal","description":"The line total, in the order currency: price times quantity on an item line, editableAmount on an expense line."},"discountPercentage":{"type":"string","format":"decimal","description":"The discount applied to the line, as a percentage. 10 means 10%, not 0.10."},"currency":{"type":"string","description":"The currency of the line. Format ISO 4217, for example 'USD'. It always matches the order currency."},"status":{"type":"string","description":"The delivery status of the line. Possible values: 'undelivered', 'delivering', 'delivered'."},"matchStatus":{"type":"string","description":"The vendor-bill matching status of the line. Possible values: 'unmatched', 'partiallyMatched', 'matched', 'overMatched'."},"invoicedStatus":{"type":"string","description":"The invoicing status of the line. Possible values: 'uninvoiced', 'partiallyInvoiced', 'invoiced', 'overInvoiced'."},"receivedStatus":{"type":"string","description":"The goods-receipt status of the line. Possible values: 'unreceived', 'partiallyReceived', 'received', 'overReceived'."},"invoicedQuantity":{"type":"string","format":"decimal","description":"The quantity invoiced against this line so far, as a decimal."},"invoicedAmount":{"type":"string","format":"decimal","description":"The amount invoiced against this line so far, in the order currency."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity received against this line so far, as a decimal."},"receivedAmount":{"type":"string","format":"decimal","description":"The amount received against this line so far, in the order currency."},"remainingAmount":{"type":"string","format":"decimal","description":"The amount still open on this line, in the order currency: the line total less what has been invoiced."},"startDate":{"type":"string","format":"date","description":"The first day of the period this line covers. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the period this line covers. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date this line was delivered. Format YYYY-MM-DD."},"estimatedDeliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Format YYYY-MM-DD."},"unitOfMeasure":{"type":"string","description":"The name of the unit of measure for the quantity."},"unitOfMeasureId":{"type":"string","description":"The unit of measure for the quantity."},"itemId":{"type":"string","description":"The item this line orders. Present on item lines."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."}},"additionalProperties":false,"required":["id"]},"description":"The order line items, in their order on the order. An empty array when the order has none."}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"createVendorCreditOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created vendor credit.","examples":["d52e1c69-3fa8-4b17-9e24-8c6fa0315bd7"]}},"additionalProperties":false,"required":["id"]},"createVendorCreditInput":{"type":"object","properties":{"vendorId":{"type":"string","description":"The vendor being credited. See id on GET accounting/vendors/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"entityId":{"type":"string","description":"The legal entity the credit is booked under. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"referenceNumber":{"type":"string","description":"The vendor's credit memo reference number, as printed on the document.","examples":["CN-4471"]},"creditDate":{"type":"string","format":"date","description":"The date on the vendor's credit memo. Use format YYYY-MM-DD.","examples":["2026-08-01"]},"currency":{"type":"string","description":"The currency of the credit. Format ISO 4217, for example 'USD'. Governs every line amount and vatAmount, which are decimals.","examples":["EUR"]},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"lines":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"string","format":"decimal","description":"The gross credit amount for the line, as a decimal in the credit currency."},"description":{"type":"string","description":"A description of the credit line."},"accountId":{"type":"string","description":"The general ledger account this line credits. See id on GET accounting/accounts/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"businessUnitId":{"type":"string","description":"The business unit this line is allocated to. There is no endpoint for it."},"crossChargeEntityId":{"type":"string","description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The line's amount moves to that entity through an intercompany cross charge journal entry. It must differ from entityId, and cross charging must be set up for both entities, or the request fails with CROSS_CHARGE_INVALID."},"vatPercentage":{"type":"string","format":"decimal","description":"The VAT rate applied, as a decimal fraction. For example, 0.19 is 19%. It must match exactly one active purchase tax code of the entity's tax configuration, or the request fails with TAX_CODE_NOT_FOUND or TAX_CODE_AMBIGUOUS. Send taxCodeId when several tax codes share the rate."},"taxCodeId":{"type":"string","description":"The purchase tax code this line is taxed under. See lines[].id on GET accounting/tax-configurations/:id. It fills the VAT rate, VAT account and reverse-charge account the line does not state."},"vatAccountId":{"type":"string","description":"The general ledger account the VAT posts to. See id on GET accounting/accounts/:id."},"reverseVatAccountId":{"type":"string","description":"The general ledger account reverse-charge VAT posts to. See id on GET accounting/accounts/:id."},"vatAmount":{"type":"string","format":"decimal","description":"The explicit VAT amount, as a decimal in the credit currency. Omit to derive it from vatPercentage."},"valueAllocationId":{"type":"string","description":"The value-allocation rule distributing this line across dimensions. There is no endpoint for it."},"lineType":{"type":"string","description":"The kind of line. Accepted values: 'expense' (a one-time credit) or 'prepaid' (a credit spread over several periods). Defaults to 'expense'."},"amortizationSchedules":{"type":"array","items":{"type":"object","properties":{"bookId":{"type":"string","description":"The accounting book this schedule posts into. See id on GET accounting/books/:id. Omit it on a single-book entity to use that entity's default transaction book; send one entry per book otherwise. Two entries for the same book are refused with DUPLICATE_AMORTIZATION_BOOK."},"deferredAccountId":{"type":"string","description":"The general ledger account the deferred balance sits on until it is recognized. See id on GET accounting/accounts/:id. Defaults to the line's own accountId."},"recognitionAccountId":{"type":"string","description":"The general ledger account each installment recognizes the expense into. See id on GET accounting/accounts/:id."},"amortizationMethod":{"type":"string","description":"How the schedule spreads its total. Values include 'exactDays', 'pointInTime', 'straightLine', 'straightLineProRateFirstLast' and 'usageBased'."},"amortizationStartDate":{"type":"string","format":"date","description":"The first day the schedule amortizes over. Format YYYY-MM-DD. It must not be after amortizationEndDate."},"amortizationEndDate":{"type":"string","format":"date","description":"The last day the schedule amortizes over, inclusive. Format YYYY-MM-DD."},"term":{"type":"string","format":"decimal","description":"The number of months the schedule spreads over. A count, not an amount, so it carries no currency. It is required here, because a schedule without one cannot be turned into installments when the credit posts."},"description":{"type":"string","description":"A note to record against the schedule."}},"additionalProperties":false,"required":["recognitionAccountId","amortizationMethod","amortizationStartDate","amortizationEndDate","term"]},"description":"The amortization schedules to defer this line over, one per accounting book. Only a line whose lineType is 'prepaid' may carry them. Each schedule starts out not started and begins recognizing once the credit posts."}},"additionalProperties":false,"required":["amount"]},"description":"The line items of the credit, in the order they should appear. At least one is expected. A credit with no lines credits nothing.","examples":[[{"amount":"300.00","description":"Returned goods","vatPercentage":"0.19"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createVendorCredit` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createVendorCredit, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the credit. Upload each file first and send its reference as `file`."}},"additionalProperties":false,"required":["vendorId","entityId","referenceNumber","creditDate","currency","lines"]},"updatePayrollPaymentOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePayrollPaymentInput":{"type":"object","properties":{"paymentDate":{"type":"string","format":"date","description":"The date the payment is made. Use format YYYY-MM-DD. Omit to leave unchanged."},"paymentCurrency":{"type":"string","description":"The currency of the payment. Format ISO 4217, for example 'USD'. Omit to leave unchanged."},"paymentStatus":{"type":"string","description":"The status of the payment, for example 'manuallyRecorded' or 'scheduled'. Omit to leave unchanged."},"paymentType":{"type":"string","description":"How the payment is made. Values include 'manual' and 'bank'. Omit to leave unchanged."},"accountId":{"type":"string","description":"The bank or cash account the payment is drawn from. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"commonDescription":{"type":"string","description":"A description applied to the payment as a whole. Omit to leave unchanged.","examples":["August payroll run (revised)"]},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"createApplications":{"type":"array","items":{"type":"object","properties":{"payrollDetailId":{"type":"string","description":"The payroll detail being paid. See id on GET accounting/payroll-details/:id."},"accountId":{"type":"string","description":"The account the payment is booked against. See id on GET accounting/accounts/:id."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration, for example 'employee' or 'taxOffice'."},"amountPaid":{"type":"string","format":"decimal","description":"The amount applied to this payroll detail, as a decimal in the payment's currency."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a third party. See id on GET accounting/vendors/:id."},"employeeId":{"type":"string","description":"The employee being paid. There is no endpoint for it."},"description":{"type":"string","description":"A description for this application."}},"additionalProperties":false,"required":["payrollDetailId","accountId","payeeCode","amountPaid"]},"description":"Applications to add to this payment, each with the same shape as on create and no id. Omit for no additions."},"updateApplications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the application to change. It must belong to this payment."},"payrollDetailId":{"type":"string","description":"The payroll detail being paid. See id on GET accounting/payroll-details/:id. Omit to leave unchanged."},"accountId":{"type":"string","description":"The account the payment is booked against. See id on GET accounting/accounts/:id. Omit to leave unchanged."},"payeeCode":{"type":"string","description":"The payee, as a payroll-payee code from your tenant's configuration. Omit to leave unchanged."},"amountPaid":{"type":"string","format":"decimal","description":"The amount applied to this payroll detail, as a decimal. Omit to leave unchanged."},"vendorId":{"type":"string","description":"The vendor being paid, when the payee is a third party. See id on GET accounting/vendors/:id."},"employeeId":{"type":"string","description":"The employee being paid. There is no endpoint for it."},"description":{"type":"string","description":"A description for this application."}},"additionalProperties":false,"required":["id"]},"description":"Applications to change, each addressed by the id this payment publishes. Every field but the id is optional and left unchanged when omitted. Omit for no changes.","examples":[[{"id":"9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95","amountPaid":"12750.00"}]]},"deleteApplications":{"type":"array","items":{"type":"string"},"description":"The identifiers of applications to remove, applied before the updates and creates. Each must belong to this payment. Removing them all is refused. Delete the payment instead."}},"additionalProperties":false},"getPayrollTemplateOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll template."},"name":{"type":"string","description":"The name of the payroll template. Unique across payroll templates."},"description":{"type":"string","description":"A free-form description of the payroll template."},"groupBy":{"type":"string","description":"The level at which payroll amounts are entered. Possible values: 'Employee', 'Department', 'Multi-level'."},"journalEntryDate":{"type":"string","description":"The date the generated journal entry is posted on. Possible values: 'payrollDate', 'endDate'."},"journalEntryGroupBy":{"type":"string","description":"The default consolidation level for generated journal lines. Possible values: 'account', 'accountAndPayrollCategory', 'payrollCategory', 'payrollCategoryByEmployee'."},"deductionsType":{"type":"string","description":"Whether deduction amounts in imported data arrive positive or negative. Possible values: 'positive', 'negative'."},"source":{"type":"string","description":"The payroll system this template imports from. Possible values: 'datev', 'datevEmployeePayroll', 'datevEmployeePayrollPersonLevel', 'rippling', 'lexware', 'briars', 'gusto', 'adpGLReport', 'adpPayrollHistory', 'sage', 'none'."},"status":{"type":"string","description":"The lifecycle status of the payroll template. Possible values: 'create', 'active', 'inactive'. It is computed from the template's categories, not set through the API."},"clearingAccountId":{"type":"string","description":"The general ledger account payroll amounts are cleared through. See id on GET accounting/accounts/:id."},"entities":{"type":"array","items":{"type":"string"},"description":"The names of the legal entities this template is mapped to. An empty array when it is mapped to none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the payroll template last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the payroll category."},"name":{"type":"string","description":"The name of the category, for example 'Gross Salary'. Unique within the template."},"subType":{"type":"string","description":"The kind of payroll amount this category represents. Possible values: 'grossPay', 'deduction', 'netPay', 'employer'."},"status":{"type":"string","description":"The lifecycle status of the category. Possible values: 'active', 'inactive'."},"payee":{"type":"string","description":"Who the amount is paid to, as a payee code from your tenant's configured payee list, for example 'employee', 'payrollProvider', 'benefitsProvider' or 'taxOffice'."},"isManagedFromPayroll":{"type":"boolean","description":"Whether payments for this category are recorded through payroll rather than separately."},"crossCharge":{"type":"boolean","description":"Whether the category is cross charged: on payroll lines charged to another entity (crossChargeEntityId), its P&L side moves to that entity through an intercompany cross charge journal entry."},"debitAccountId":{"type":"string","description":"The general ledger account this category debits. See id on GET accounting/accounts/:id."},"debitJournalAggregation":{"type":"string","description":"The consolidation level for journal lines posted to the debit account. Absent means the template default applies."},"creditAccountId":{"type":"string","description":"The general ledger account this category credits. See id on GET accounting/accounts/:id."},"creditJournalAggregation":{"type":"string","description":"The consolidation level for journal lines posted to the credit account. Absent means the template default applies."},"debitTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension, e.g. 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category debits, one per dimension. Absent when none."},"creditTags":{"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","description":"The tag dimension, e.g. 'vendor'."},"id":{"type":"string","description":"The tagged record. For 'vendor', see id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["dimension","id"]},"description":"Tags stamped on every journal line this category credits, one per dimension. Absent when none."}},"additionalProperties":false,"required":["id","name","subType"]},"description":"The payroll categories defined on this template, each mapping one payroll line type onto a debit and a credit account. An empty array when the template has none."}},"additionalProperties":false,"required":["id","name","groupBy","journalEntryDate","journalEntryGroupBy","deductionsType","entities","lastModifiedDate"]},"purchaseTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase type."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the purchase type, for example 'New purchase'. Unique within the tenant, ignoring case."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the purchase type is for."},"status":{"anyOf":[{"enum":["active","inactive"]},{"type":"null"}],"description":"The lifecycle status of the purchase type. Only an active type can be chosen for a new purchase order. An inactive type stays readable so orders that carry it still resolve."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the purchase type last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"getExpenseCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the expense category."},"category":{"type":"string","description":"The display name of the expense category, for example 'Meals'. Unique within the tenant."},"categoryType":{"type":"string","description":"The kind of expense. Possible values: 'Pur', 'Dis', 'PerDiem'. 'Dis' is distance traveled."},"reimbursable":{"type":"boolean","description":"Whether expenses in this category are reimbursed to the employee."},"status":{"type":"string","description":"The lifecycle status of the expense category. Possible values: 'active', 'inactive'. An inactive category stays readable so historical expense items still resolve, and is not offered for new ones."},"requireAttachment":{"type":"boolean","description":"Whether an expense in this category must have a receipt attachment."},"requireAttendees":{"type":"boolean","description":"Whether an expense in this category must list attendees."},"externalId":{"type":"string","description":"The identifier this category has in an external system. It is not unique."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the expense category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","category","reimbursable","lastModifiedDate"]},"createPayrollDetailOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created payroll run.","examples":["4d8f2b61-7a09-4c35-8e12-9b3d5f0a6c47"]}},"additionalProperties":false,"required":["id"]},"createPayrollDetailInput":{"type":"object","properties":{"templateId":{"type":"string","description":"The payroll template this run uses. See id on GET accounting/payroll-templates/:id. It supplies the categories, the journal-entry-date rule, the group-by and the clearing account.","examples":["b7e4c1a9-3f52-4d86-9017-5a2c8e0b4d61"]},"entityId":{"type":"string","description":"The legal entity that owns the payroll. See id on GET base/entities.","examples":["7c1a9e40-2b53-4d68-9f01-3a5b7c9d1e24"]},"grouping":{"type":"string","description":"How the payroll is grouped. Values include 'Employee', 'Department' and 'Multi-level'.","examples":["Employee"]},"status":{"type":"string","description":"The status of the payroll. Defaults to 'pendingApproval' when omitted."},"payrollDate":{"type":"string","format":"date","description":"The issue date of the payroll. Use format YYYY-MM-DD.","examples":["2026-08-31"]},"startDate":{"type":"string","format":"date","description":"The first day of the payroll period. Use format YYYY-MM-DD.","examples":["2026-08-01"]},"endDate":{"type":"string","format":"date","description":"The last day of the payroll period, which must not be before the start date. Use format YYYY-MM-DD.","examples":["2026-08-31"]},"currency":{"type":"string","description":"The currency the payroll is denominated in. Format ISO 4217, for example 'USD'.","examples":["USD"]},"description":{"type":"string","description":"A description of the payroll.","examples":["August 2026 payroll"]},"isNetPayCategoryMapped":{"type":"boolean","description":"Whether the net-pay category is matched in the account mapping. Defaults to false."},"origin":{"type":"string","description":"The source system this record came from, as free-form text, for example 'Ramp'. Omit it and it stays unset. The server does not set a value."},"lines":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","description":"The employee this line is for. There is no endpoint for it. With grouping 'Employee', a line that names an employee but no department has the department backfilled from that employee's primary job."},"departmentId":{"type":"string","description":"The department this line is charged to. See id on GET people/departments/:id."},"crossChargeEntityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity this line is cross charged to (Charge to). See id on GET base/entities. The cost of the line's cross charged categories moves to that entity through an intercompany cross charge journal entry. Omit it to default it from the employee's legal entity when that entity can be charged; send null for no charge. It must differ from entityId, cross charging must be set up for both entities, and the template needs a cross charged category, or the request fails with CROSS_CHARGE_INVALID."},"lineItems":{"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","description":"The payroll category this amount belongs to. There is no endpoint for it. It must be an active category of the payroll's template."},"amount":{"type":"string","format":"decimal","description":"The amount for this category, as a decimal in the payroll's currency."}},"additionalProperties":false,"required":["categoryId","amount"]},"description":"The amounts on this line, one per payroll category. Each category must be reachable from the payroll's template. An item whose amount is null is dropped before the payroll is saved."}},"additionalProperties":false,"required":["lineItems"]},"description":"The payroll's lines, one per employee or department depending on the grouping.","examples":[[{"employeeId":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84","lineItems":[{"categoryId":"9b2d5e10-4c78-4a36-8f51-6e0a3c7b2d95","amount":"5000.00"},{"categoryId":"e5c7a390-1d64-4b28-9a07-2f8b6d4c1e53","amount":"5000.00"}]}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createPayrollDetail` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createPayrollDetail, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the payroll. Omit for none, unless your tenant requires an attachment, in which case omitting them fails with ATTACHMENT_REQUIRED."}},"additionalProperties":false,"required":["templateId","entityId","grouping","payrollDate","currency","lines"]},"updatePurchaseTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePurchaseTypeInput":{"type":"object","properties":{"name":{"type":"string","description":"The new name. Omit to leave it unchanged. It must stay unique across the tenant, ignoring case and surrounding spaces. The type's own current name is not a collision."},"description":{"type":"string","description":"The new description. Omit to leave it unchanged."},"status":{"enum":["active","inactive"],"description":"The new lifecycle status. Accepted values: 'active', 'inactive'. Omit to leave it unchanged.","examples":["inactive"]}},"additionalProperties":false},"vendorBillsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the vendor bill."},"vendorBillNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor bill number. Stable across edits."},"billNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor-issued invoice number, as printed on the bill. It is not unique across vendors."},"billDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date printed on the vendor's invoice. Format YYYY-MM-DD."},"serviceDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the goods or services were delivered. Format YYYY-MM-DD. Absent when not recorded."},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date payment is due. Format YYYY-MM-DD."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the bill is denominated in. Format ISO 4217, for example 'USD'. Governs total, amountPaid and openAmount."},"status":{"anyOf":[{"enum":["pendingApproval","approved","rejected","voided","reversed"]},{"type":"null"}],"description":"The approval status. Values include 'pendingApproval', 'approved', 'rejected', 'voided' and 'reversed'."},"paymentStatus":{"anyOf":[{"enum":["unpaid","partiallyPaid","fullyPaid","pending","notApplicable","voided"]},{"type":"null"}],"description":"The payment status. Values include 'unpaid', 'partiallyPaid', 'fullyPaid', 'pending', 'notApplicable' and 'voided'."},"postingStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The accounting posting status, defined by the accounting subsystem, for example 'notPosted', 'posted' or 'postingFailed'."},"paymentTerms":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment-terms key applied to this bill, for example 'net30', 'net60' or 'dueOnReceipt'."},"total":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total bill amount, gross, in the bill currency."},"amountPaid":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cumulative amount paid against this bill so far, in the bill currency."},"openAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The outstanding amount still owed, total minus amountPaid, in the bill currency."},"payableAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"Amount owed to the vendor, in the bill currency (see `currency`): the bill lines — a reverse-charge line at its net amount, any other at its gross amount — less withholding tax. An AP aging starts from it."},"markAsPaid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True when the bill was marked as paid without a recorded payment. An AP aging leaves such bills out."},"externalVendorBillId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identifier this bill has in the upstream system that produced it. It is not unique."},"vendorName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the vendor this bill is from."},"vendorId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The vendor the bill is from."},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity this bill is posted under."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity the bill is addressed to."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the vendor bill last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"deleteVendorBillOutput":{"type":"object","properties":{},"additionalProperties":false},"deleteBankAccountOutput":{"type":"object","properties":{},"additionalProperties":false},"getReconciliationInTransitGlTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Platform id (a UUID) of the journal entry line. This is the id to pass to PATCH on this path, not the id of the in-transit flag itself."},"amount":{"type":"string","format":"decimal","description":"Amount in the account currency (see currency), signed as the statement will see it: positive for money arriving in the account."},"currency":{"type":"string","description":"ISO 4217 currency code governing amount."},"automaticallySet":{"type":"boolean","description":"True when the platform carried this posting forward on its own, false when a person flagged it. PATCH on this path leaves the automatic ones alone."},"nextAccountingPeriodId":{"type":"string","description":"Id (a UUID) of the accounting period the posting is expected to clear the bank in. Derived when it was flagged, not chosen."}},"additionalProperties":false,"required":["id"]},"description":"GL transactions flagged in transit for this reconciliation.","examples":[[{"id":"7c3e91a5-4b28-4f60-9d17-c05a8e2b4361","amount":"-8400.00","currency":"USD","automaticallySet":false,"nextAccountingPeriodId":"6f9a2b1c-3d47-4a80-b5e2-91c8d0374fab"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass back as the `cursor` query parameter for the next page. Absent on the last page, which is how a caller knows to stop."},"hasMore":{"type":"boolean","description":"True when more transactions remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"deactivatePurchaseTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"deactivatePurchaseTypeInput":{"type":"object","properties":{},"additionalProperties":false},"updateAdvancePaymentCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAdvancePaymentCategoryInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the category. Required — renaming is the primary purpose of an update call.","examples":["Standard Advance (renamed)"]},"allowManualPayment":{"type":"boolean","description":"Whether an employee may be paid this advance manually (outside the standard payment run). Omit to default to true.","examples":[true]},"status":{"type":"string","description":"Lifecycle status. Accepted values: 'active', 'inactive'. Omit to default to 'active'.","examples":["active"]}},"additionalProperties":false,"required":["name"]},"getBankTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bank transaction."},"bankTransactionNumber":{"type":"string","description":"The bank transaction number. Absent until one has been assigned."},"externalTransactionId":{"type":"string","description":"The identifier this transaction has in the bank or aggregator it was imported from. Unique across transactions."},"externalPaymentId":{"type":"string","description":"The end-to-end payment identifier supplied by the integration, where the bank provides one."},"endToEndId":{"type":"string","description":"A payment reference recovered from the external transaction data by the integration."},"externalCreationDate":{"type":"string","format":"date","description":"The date the transaction was created in the source bank, not the date it was imported. Format YYYY-MM-DD."},"description":{"type":"string","description":"The description recorded on the transaction."},"externalDescription":{"type":"string","description":"The description as the bank supplied it, unmodified."},"additionalInformation":{"type":"string","description":"Any additional detail the bank supplied with the transaction."},"payeeOrPayor":{"type":"string","description":"The name of the counterparty the money went to or came from."},"amount":{"type":"string","format":"decimal","description":"The transaction amount, as a decimal in the transaction currency. A negative amount is money leaving the account and a positive amount is money arriving."},"currency":{"type":"string","description":"The currency of the transaction. Format ISO 4217, for example 'USD'. It governs the amount."},"matchStatus":{"type":"string","description":"The reconciliation state of the transaction, computed from its matches. The states are 'unmatched', 'suggested', 'pending', 'matched', 'autoMatched' and 'needsAttention'."},"matchId":{"type":"string","description":"The unique identifier for the match this transaction belongs to. Absent when the transaction is unmatched. There is no endpoint for it."},"notes":{"type":"string","description":"Free-form notes recorded against the transaction."},"transactionPaymentMethod":{"type":"string","description":"How the payment was made, as reported by the integration. The values are 'ACH', 'WIRE' and 'Unknown'."},"bankAccountId":{"type":"string","description":"The bank account this transaction belongs to. See id on GET banking/bank-accounts/:id."},"accountName":{"type":"string","description":"The name of the linked chart-of-accounts account. Suffixed with '(Inactive)' when the account link is broken."},"sourceBankName":{"type":"string","description":"The name of the bank the account is held at."},"entityName":{"type":"string","description":"The name of the legal entity the owning bank account belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bank transaction last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","externalTransactionId","externalCreationDate","lastModifiedDate"]},"rejectEmployeeAdvanceRequestOutput":{"type":"object","properties":{"status":{"type":"string","description":"Status after the operation. The workflow decides it, so it is read back rather than assumed.","examples":["rejected"]}},"additionalProperties":false,"required":["status"]},"rejectEmployeeAdvanceRequestInput":{"type":"object","properties":{"reviewMessage":{"type":"string","description":"Why the request is being rejected. Recorded as the request's decisionNote and shown to the requester. Omit to leave no note.","examples":["Trip was cancelled"]}},"additionalProperties":false},"deleteBankTransactionOutput":{"type":"object","properties":{},"additionalProperties":false},"reverseVendorBillOutput":{"type":"object","properties":{},"additionalProperties":false},"reverseVendorBillInput":{"type":"object","properties":{"reversalDate":{"type":"string","format":"date","description":"The date the reversing journal entry is posted on. Use format YYYY-MM-DD. Choose a date whose period is open.","examples":["2026-09-30"]}},"additionalProperties":false,"required":["reversalDate"]},"createPurchaseRequestOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase request.","examples":["5f8a2c31-6b07-4d92-a4e8-1c93b0f7d254"]}},"additionalProperties":false,"required":["id"]},"createPurchaseRequestInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The legal entity that owns the request. See id on GET base/entities.","examples":["8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e"]},"currency":{"type":"string","description":"The currency of the request. Format ISO 4217, for example 'USD'. Governs every line amount.","examples":["EUR"]},"vendorId":{"type":"string","description":"The vendor the request is aimed at, when one is known. See id on GET accounting/vendors/:id."},"departmentId":{"type":"string","description":"The department the request is raised for. See id on GET people/departments/:id."},"description":{"type":"string","description":"A public-facing description of the request.","examples":["Replacement laptops"]},"internalDescription":{"type":"string","description":"An internal description, visible only to internal users."},"externalMemo":{"type":"string","description":"A memo carried onto vendor-facing documents."},"paymentTerms":{"type":"string","description":"The payment-terms key requested for the resulting order, for example 'net30'. These are tenant data, not a fixed list of values."},"externalId":{"type":"string","description":"The identifier this request has in the upstream system that produced it."},"needByDate":{"type":"string","format":"date","description":"The date the goods or services are required by. Use format YYYY-MM-DD.","examples":["2026-10-15"]},"startDate":{"type":"string","format":"date","description":"The date the request starts. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The date the request ends. Use format YYYY-MM-DD."},"lines":{"type":"array","items":{"type":"object","properties":{"isItem":{"type":"boolean","description":"True for an item line, priced by quantity times price. False for an expense line, priced by editableAmount. Omit for an expense line."},"description":{"type":"string","description":"A description of what is being requested."},"itemId":{"type":"string","description":"The item being requested. See id on GET inventory/items/:id."},"unitOfMeasureId":{"type":"string","description":"The unit the quantity is expressed in. See id on GET inventory/unit-of-measures/:id."},"departmentId":{"type":"string","description":"The department this line is allocated to. See id on GET people/departments/:id."},"quantity":{"type":"string","format":"decimal","description":"The requested quantity, as a decimal."},"price":{"type":"string","format":"decimal","description":"The unit price, in the request currency, as a decimal."},"editableAmount":{"type":"string","format":"decimal","description":"The manually entered line amount, in the request currency, as a decimal."},"needByDate":{"type":"string","format":"date","description":"The date this line is needed by. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The expected delivery date for this line. Use format YYYY-MM-DD."},"priority":{"type":"string","description":"The urgency of this line. Accepted values: 'high', 'medium', 'low'."}},"additionalProperties":false},"description":"The lines this request asks for. At least one is required.","examples":[[{"isItem":false,"description":"Laptop","editableAmount":"1800.00","priority":"high"}]]},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string","description":"The display name of the attached file. Defaults to the uploaded file's name. Required with `fileId`."},"fileId":{"type":"string","description":"**Deprecated:** an already-stored file's identifier. Use `file` instead. Send exactly one of `file` or `fileId`."},"file":{"type":"string","x-file":true,"description":"The file, as the upload reference returned by `POST /public/files/{namespace}/createPurchaseRequest` (multipart/form-data, `Api-Version` header). `{namespace}` is the segment after `/public/api/` in your base URL. Upload right before this call: a reference works only for createPurchaseRequest, only for you, and for a few minutes. Up to 15 MB each; accepted types: pdf, tiff, jpeg, jpg, png, xls, xlsx, csv, xml, doc, docx, heic, heif."}},"additionalProperties":false},"description":"Files to attach to the request. Upload each file first and send its reference as `file`."}},"additionalProperties":false,"required":["entityId","currency","lines"]},"bulkDeleteUnitOfMeasuresOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted unit of measure."},"unitCode":{"type":"string","description":"The short code the deleted unit of measure held."}},"additionalProperties":false,"required":["id","unitCode"]},"description":"The deleted units of measure, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteUnitOfMeasuresInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the units of measure to delete. If any identifier matches nothing or its unit is still in use, nothing is deleted and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"deleteInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]}},"additionalProperties":false,"required":["id"]},"bulkCreateBinsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bin."},"binCode":{"type":"string","description":"The bin's code."}},"additionalProperties":false,"required":["id"]},"description":"The created bins, in the same order as the input. Match entries to inputs by index.","examples":[[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1"},{"id":"f0472b19-8c35-4e61-b7a2-6d05e83c1947","binCode":"A-01-2"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateBinsInput":{"type":"object","properties":{"bins":{"type":"array","items":{"type":"object","properties":{"binCode":{"type":"string","description":"The short code that identifies the bin, for example 'A-01-1'. Required. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the bin is in. Required. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id."},"barcode":{"type":"string","description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created."},"aisle":{"type":"string","description":"The aisle in the warehouse layout."},"rack":{"type":"string","description":"The rack within the aisle."},"shelfLevel":{"type":"string","description":"The shelf level within the rack."},"zone":{"type":"string","description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'."},"itemPosition":{"type":"string","description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments."},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"type":"number","description":"The largest number of units the bin will hold, above zero. Leave it out for no quantity limit. It is meaningful only when everything in the bin is counted in the same unit."},"maxWeight":{"type":"string","format":"decimal","description":"The largest weight the bin will hold, in maxWeightUnit, above zero. Send it together with maxWeightUnit, or leave both out for no weight limit."},"maxWeightUnit":{"type":"string","description":"The unit maxWeight is given in. Accepted values: 'G', 'Kg', 'Lbs'. Send it together with maxWeight, or leave both out."},"maxVolume":{"type":"string","format":"decimal","description":"The largest volume the bin will hold, in maxVolumeUnit, above zero. Send it together with maxVolumeUnit, or leave both out for no volume limit."},"maxVolumeUnit":{"type":"string","description":"The unit maxVolume is given in. Accepted values: 'L'. Send it together with maxVolume, or leave both out."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Accepted values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it."},"tempZone":{"type":"string","description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'."},"tempMin":{"type":"string","format":"decimal","description":"The lowest temperature kept in the bin, in degrees Celsius. It must not be above tempMax."},"tempMax":{"type":"string","format":"decimal","description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin."},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. Defaults to true."}},"additionalProperties":false,"required":["binCode","locationId"]},"description":"The bins to create. If any entry is invalid, nothing is created and the whole call fails.","examples":[[{"binCode":"A-01-1","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"1","isPickingBin":true},{"binCode":"A-01-2","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","aisle":"A","rack":"01","shelfLevel":"2","isPickingBin":true}]]}},"additionalProperties":false,"required":["bins"]},"commitReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentStatus":{"type":"string","description":"The status of the receipt after committing.","examples":["COMMITTED"]},"journalEntryId":{"type":"string","description":"The journal entry the commit posted, where it posted one.","examples":["7c1b9a34-2e05-4d68-b930-5f8c6a1d2e07"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-fatal advisories from the commit. An empty array on a clean run. The commit succeeded regardless of what is listed here.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"commitReceiptInput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteShipmentCarriersOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted shipment carrier."},"name":{"type":"string","description":"The name the deleted carrier held."}},"additionalProperties":false,"required":["id","name"]},"description":"The deleted shipment carriers, in the same order as the input."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteShipmentCarriersInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the shipment carriers to delete. If any id is unknown or its carrier is still named on a shipment, the whole call is rejected and nothing is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"deleteLandedCostItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted landed cost item. Format: UUID.","examples":["5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"]}},"additionalProperties":false,"required":["id"]},"itemTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item type.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the item type, for example 'Stocked good'. Two item types cannot share a name.","examples":["Stocked good"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the item type.","examples":["Physical goods held in a warehouse"]},"procurable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether items of this type can appear on purchase documents.","examples":[true]},"stockable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether items of this type hold stock.","examples":[true]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item type can be chosen for new items.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the item type was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the item type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"binsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]},"binCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code that identifies the bin, for example 'A-01-1'. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created.","examples":["A-01-1"]},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created.","examples":["BIN-A011"]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse the bin is in. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id.","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-02"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Main warehouse"]},"aisle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The aisle in the warehouse layout.","examples":["A"]},"rack":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The rack within the aisle.","examples":["01"]},"shelfLevel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The shelf level within the rack.","examples":["1"]},"zone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'.","examples":["Picking"]},"itemPosition":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments.","examples":[true]},"isReceivingBin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the bin feeds or receives production."},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The largest number of units the bin will hold. It is meaningful only when everything in the bin is counted in the same unit.","examples":[500]},"maxWeight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The largest weight the bin will hold, in maxWeightUnit.","examples":["250"]},"maxWeightUnit":{"anyOf":[{"enum":["Kg","G","Lbs"]},{"type":"null"}],"description":"The unit maxWeight is given in.","examples":["Kg"]},"maxVolume":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The largest volume the bin will hold, in maxVolumeUnit."},"maxVolumeUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit maxVolume is given in. Possible values: 'L'."},"capacityCheckMode":{"anyOf":[{"enum":["HardBlock","SoftWarning"]},{"type":"null"}],"description":"What happens when a movement would exceed a limit. Possible values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it.","examples":["HardBlock"]},"tempZone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'.","examples":["Ambient"]},"tempMin":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The lowest temperature kept in the bin, in degrees Celsius."},"tempMax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether perishable stock may be kept in the bin."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the bin may be chosen for new movements. When false, the stock already in the bin stays there but no new movement can be assigned to it.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bin was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the bin record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"createWarehouseTransferOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer.","examples":["c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6"]},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'.","examples":["WTR-2291"]},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer line. updateLines and deleteLines address lines by it."},"itemId":{"type":"string","description":"The item being moved. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from, the document's warehouse applied to every line. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much moves, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"transferCost":{"type":"string","format":"decimal","description":"What one unit left the source warehouse at, in the transfer's currency. The valuation method sets it at commit. Absent on a draft."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit on an intercompany transfer, in the contractual currency. Supplied on create."},"totalTransferValue":{"type":"string","format":"decimal","description":"The line's total on an intercompany transfer, in the contractual currency: totalTransferValue = unitTransferValue x quantity. Written by the platform."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this line has come back on an intercompany return."},"status":{"type":"string","description":"The status of the line."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number. See id on GET inventory/batch-numbers/:id."},"batchNumber":{"type":"string","description":"The batch number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"What this batch moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The batches that make up the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number. See id on GET inventory/serial-numbers/:id."},"serialNumber":{"type":"string","description":"The serial number."},"quantity":{"type":"string","format":"decimal","description":"Always one, for a serialized unit."},"unitCost":{"type":"string","format":"decimal","description":"What this unit moved at, in the transfer's currency. Set at commit."}},"additionalProperties":false},"description":"The serialized units that move."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"fromBinLocationCode":{"type":"string","description":"The code of that bin."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"toBinLocationCode":{"type":"string","description":"The code of that bin."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer. The collection GET inventory/warehouse-transfers returns lineCount in place of these.","examples":[[{"id":"7d2b48e1-95c3-4a06-8f17-3e5a9c06b2d4","itemCode":"WIDGET-01","quantity":"24","inventoryQuantity":"24"}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"createWarehouseTransferInput":{"type":"object","properties":{"locationId":{"type":"string","description":"The warehouse the goods leave, applied to every line. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. It must differ from locationId. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"entityId":{"type":"string","description":"The legal entity. Defaults to the entity that owns the source warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer. Defaults to today. Use format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"notes":{"type":"string","description":"Free text on the document."},"transferType":{"type":"string","description":"The type of transfer to create. Accepted values: 'NORMAL', 'INTERCOMPANY'. Defaults to 'NORMAL'. 'INTERCOMPANY_RETURN' is created by the intercompany return flow, not here."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods. Required when transferType is 'INTERCOMPANY'. See id on GET base/entities."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Required when transferType is 'INTERCOMPANY'. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. Defaults to the item's inventory unit; an item without one needs it, or the call is refused with WAREHOUSE_TRANSFER_LINE_UNIT_REQUIRED. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit, in the transfer's contractual currency. Required on an intercompany transfer. The two entities agree the price, and the API cannot derive it from a cost."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the goods leave. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches that make up the line's quantity. Required for a batch-tracked item, and they must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the goods leave. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units that move. Required for a serialized item, one entry per unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false,"required":["quantity"]},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one. Leave both names off for a quantity that moves at line level."}},"additionalProperties":false,"required":["itemId","quantity"]},"description":"The lines of the transfer. At least one is required.","examples":[[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"24"}]]}},"additionalProperties":false,"required":["locationId","targetLocationId","lines"]},"searchBinsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bin."},"binCode":{"type":"string","description":"The short code that identifies the bin, for example 'A-01-1'. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created."},"barcode":{"type":"string","description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the bin is in. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"aisle":{"type":"string","description":"The aisle in the warehouse layout."},"rack":{"type":"string","description":"The rack within the aisle."},"shelfLevel":{"type":"string","description":"The shelf level within the rack."},"zone":{"type":"string","description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'."},"itemPosition":{"type":"string","description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments."},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"type":"number","description":"The largest number of units the bin will hold. It is meaningful only when everything in the bin is counted in the same unit."},"maxWeight":{"type":"string","format":"decimal","description":"The largest weight the bin will hold, in maxWeightUnit."},"maxWeightUnit":{"type":"string","description":"The unit maxWeight is given in. Possible values: 'G', 'Kg', 'Lbs'."},"maxVolume":{"type":"string","format":"decimal","description":"The largest volume the bin will hold, in maxVolumeUnit."},"maxVolumeUnit":{"type":"string","description":"The unit maxVolume is given in. Possible values: 'L'."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Possible values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it."},"tempZone":{"type":"string","description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'."},"tempMin":{"type":"string","format":"decimal","description":"The lowest temperature kept in the bin, in degrees Celsius."},"tempMax":{"type":"string","format":"decimal","description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin."},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. When false, the stock already in the bin stays there but no new movement can be assigned to it."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the bin was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the bin record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The bins on this page, oldest first. An empty array when nothing matches.","examples":[[{"id":"8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02","binCode":"A-01-1","barcode":"BIN-A011","locationId":"f5272ae0-0f0b-47d2-b78a-2158fec2cc32","locationCode":"WH-02","locationName":"Main warehouse","aisle":"A","rack":"01","shelfLevel":"1","zone":"Picking","isPickingBin":true,"isReceivingBin":false,"maxQuantity":500,"maxWeight":"250","maxWeightUnit":"Kg","capacityCheckMode":"HardBlock","tempZone":"Ambient","supportsPerishable":false,"active":true,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more bins remain beyond this page."}},"additionalProperties":false,"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchBinsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"binCode":{"type":"string","description":"Limits results to the bin with this code. The match is exact. Codes are unique, so this matches at most one bin."},"barcode":{"type":"string","description":"Limits results to the bin with this barcode. The match is exact. Barcodes are unique, so this matches at most one bin."},"locationId":{"type":"string","description":"Limits results to bins in the warehouse with this identifier. An identifier that is not a warehouse matches nothing. See id on GET inventory/warehouses/:id."},"aisle":{"type":"string","description":"Limits results to bins in this aisle. The match is exact."},"rack":{"type":"string","description":"Limits results to bins on this rack. The match is exact."},"zone":{"type":"string","description":"Limits results to bins in this zone. The match is exact."},"isPickingBin":{"type":"boolean","description":"Limits results to picking locations when true, or to bins that are not when false. Omit to match both."},"isReceivingBin":{"type":"boolean","description":"Limits results to bins that stage newly received goods when true, or to bins that do not when false. Omit to match both."},"isProductionBin":{"type":"boolean","description":"Limits results to bins that feed or receive production when true, or to bins that do not when false. Omit to match both."},"supportsPerishable":{"type":"boolean","description":"Limits results to bins that may keep perishable stock when true, or to bins that may not when false. Omit to match both."},"capacityCheckMode":{"type":"string","description":"Limits results to bins with this capacity check mode. Accepted values: 'HardBlock', 'SoftWarning'."},"tempZone":{"type":"string","description":"Limits results to bins in this temperature zone. The match is exact."},"active":{"type":"boolean","description":"Limits results to bins that may be chosen for new movements when true, or to retired ones when false. Omit to match both."},"withoutLimits":{"type":"boolean","description":"True to return only bins with no quantity, weight or volume limit above zero, the ones no capacity check can protect."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to bins changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A bin must match every filter you send. Send an empty object to return all bins.","examples":[{"withoutLimits":true,"isPickingBin":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of bins per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"unitOfMeasuresRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"type":"string","description":"The short code of the unit of measure, for example 'KG'. It is unique within the tenant.","examples":["KG"]},"unitName":{"type":"string","description":"The display name of the unit of measure, for example 'Kilogram'.","examples":["Kilogram"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the unit of measure record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"bulkCreateReasonCodesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created reason code."}},"additionalProperties":false,"required":["id"]},"description":"The created reason codes, in the same order as the input. Match entries to inputs by index.","examples":[[{"id":"7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"},{"id":"1f5b83d0-6c47-4a92-b8e1-0d472a95c3f6"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateReasonCodesInput":{"type":"object","properties":{"reasonCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. Required. It must be unique within the tenant and within this request."},"description":{"type":"string","description":"A free-form description of what the reason code means. Omit for none."},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. Defaults to true."},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect. Defaults to false."},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The document types this reason code may be selected on. Required, but may be empty. An unrecognized value fails the whole call with UNKNOWN_DOCUMENT_TYPES, which names this entry's index."}},"additionalProperties":false,"required":["code","documentTypes"]},"description":"The reason codes to create. If any entry is invalid, nothing is created and the whole call fails.","examples":[[{"code":"DAMAGE","description":"Stock damaged in the warehouse","requiresApproval":true,"documentTypes":["InventoryDecrease","SalesReturn"]},{"code":"CYCLECOUNT","description":"Correction from a cycle count","documentTypes":["InventoryIncrease","InventoryDecrease"]}]]}},"additionalProperties":false,"required":["reasonCodes"]},"getLandedCostItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost item. Format: UUID.","examples":["9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"]},"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. Absent when the landed cost item covers only an account. See `id` on GET inventory/items/:id (getItem).","examples":["3d81e07c-95a2-4f63-b1c8-27e5a94d0b36"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["SVC-FREIGHT"]},"itemName":{"type":"string","description":"The name of the item in `itemId`.","examples":["Inbound freight"]},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. Absent when the landed cost item covers only an item. See `id` on GET accounting/accounts/:id (getAccount)."},"accountNumber":{"type":"string","description":"The number of the account in `accountId`."},"accountName":{"type":"string","description":"The name of the account in `accountId`."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'.","examples":["Weight"]},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type. Absent when the landed cost item has none.","examples":["c4a90e21-7b35-4d18-9e02-6f13a85c7d40"]},"costingElementTypeCode":{"type":"string","description":"The code of the costing element type in `costingElementTypeId`.","examples":["FRT"]},"costingElementTypeName":{"type":"string","description":"The name of the costing element type in `costingElementTypeId`.","examples":["Freight"]},"active":{"type":"boolean","description":"Whether the landed cost item is active.","examples":[true]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the landed cost item was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the landed cost item last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"bulkDeleteItemCategoriesOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted item category."},"name":{"type":"string","description":"The display name the deleted category held, echoed so you can log the removal without a prior read."}},"additionalProperties":false,"required":["id","name"]},"description":"The deleted item categories, in input order. Match rows to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteItemCategoriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the item categories to delete. If any id is unknown or its category is still referenced, the whole call is rejected and nothing is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"searchItemCategoriesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item category."},"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not unique: two categories can share a name, so use id to address one."},"description":{"type":"string","description":"A free-form description of what the category covers. Absent when none was set."},"active":{"type":"boolean","description":"Whether the category can be chosen on new items. When false the category is retired: existing items keep it and new ones cannot be assigned to it."},"idealTurnoverRatio":{"type":"string","format":"decimal","description":"The target inventory turnover for items in this category, in times per year. For analytics only. A ratio rather than an amount, so it has no currency."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the category last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"parentId":{"type":"string","description":"The identifier of the category this one sits under. Absent for a top-level category. See id on GET inventory/item-categories/:id."}},"additionalProperties":false,"required":["id","name"]},"description":"The item categories on this page, ordered by id. The same schema as GET inventory/item-categories/:id. An empty array when nothing matches.","examples":[[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","name":"Hardware","description":"Fasteners, fittings and tooling","active":true,"idealTurnoverRatio":"6.50","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination details for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchItemCategoriesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Limits results to item categories with this exact name, for example 'Hardware'. Names are not unique, so this can match several."},"active":{"type":"boolean","description":"Limits results to categories that can be chosen on new items (true) or to retired ones (false). Omit to match both."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to categories changed at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. Omit to return all item categories.","examples":[{"active":true,"modifiedSince":"2026-08-01T00:00:00.000Z"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of item categories per page. Defaults to 50, capped at 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"getReasonCodeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the reason code.","examples":["7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"]},"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. It is unique within the tenant.","examples":["DAMAGE"]},"description":{"type":"string","description":"A free-form description of what the reason code means. Absent when none was given.","examples":["Stock damaged in the warehouse"]},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. When false, existing documents keep it and new ones cannot select it.","examples":[true]},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect.","examples":[true]},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The document types this reason code may be selected on, in a stable order. An empty array when it is linked to none. It is not returned by the collection GET inventory/reason-codes.","examples":[["InventoryDecrease","SalesReturn"]]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the reason code record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Adding or removing a document type does not change it.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","code","documentTypes"]},"createBinOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]},"binCode":{"type":"string","description":"The bin's code.","examples":["A-01-1"]}},"additionalProperties":false,"required":["id"]},"createBinInput":{"type":"object","properties":{"binCode":{"type":"string","description":"The short code that identifies the bin, for example 'A-01-1'. Required. It is unique within the tenant, not per warehouse, and cannot be changed after the bin is created.","examples":["A-01-1"]},"locationId":{"type":"string","description":"The unique identifier for the warehouse the bin is in. Required. It cannot be changed after the bin is created. See id on GET inventory/warehouses/:id.","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"barcode":{"type":"string","description":"The barcode printed on the bin label. It is unique within the tenant and cannot be changed after the bin is created."},"aisle":{"type":"string","description":"The aisle in the warehouse layout.","examples":["A"]},"rack":{"type":"string","description":"The rack within the aisle.","examples":["01"]},"shelfLevel":{"type":"string","description":"The shelf level within the rack.","examples":["1"]},"zone":{"type":"string","description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'.","examples":["Picking"]},"itemPosition":{"type":"string","description":"The position within the shelf, where a bin is subdivided further."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments.","examples":[true]},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"type":"number","description":"The largest number of units the bin will hold, above zero. Leave it out for no quantity limit. It is meaningful only when everything in the bin is counted in the same unit."},"maxWeight":{"type":"string","format":"decimal","description":"The largest weight the bin will hold, in maxWeightUnit, above zero. Send it together with maxWeightUnit, or leave both out for no weight limit.","examples":["250"]},"maxWeightUnit":{"type":"string","description":"The unit maxWeight is given in. Accepted values: 'G', 'Kg', 'Lbs'. Send it together with maxWeight, or leave both out.","examples":["Kg"]},"maxVolume":{"type":"string","format":"decimal","description":"The largest volume the bin will hold, in maxVolumeUnit, above zero. Send it together with maxVolumeUnit, or leave both out for no volume limit."},"maxVolumeUnit":{"type":"string","description":"The unit maxVolume is given in. Accepted values: 'L'. Send it together with maxVolume, or leave both out."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Accepted values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it.","examples":["HardBlock"]},"tempZone":{"type":"string","description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'."},"tempMin":{"type":"string","format":"decimal","description":"The lowest temperature kept in the bin, in degrees Celsius. It must not be above tempMax."},"tempMax":{"type":"string","format":"decimal","description":"The highest temperature kept in the bin, in degrees Celsius."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin."},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. Defaults to true."}},"additionalProperties":false,"required":["binCode","locationId"]},"bulkCreateShipmentsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment."},"documentNumber":{"type":"string","description":"The shipment's document number, for example 'SD-8841'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the shipment. Possible values: 'DRAFT', 'PACKED', 'PARTIALLY_SHIPPED', 'SHIPPED', 'COMMITTED', 'DELIVERED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', 'PARTIALLY_RETURNED'."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The planned or actual delivery date. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the shipment belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"businessPartnerName":{"type":"string","description":"The display name of that customer."},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id."},"shipmentCarrierName":{"type":"string","description":"The name of that carrier."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the goods."},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment."},"returnStatus":{"type":"string","description":"How much of the shipment has come back on sales returns. Possible values: 'OPEN', 'PARTIALLY_RETURNED', 'FULLY_RETURNED'. The return process maintains it."},"currency":{"type":"string","description":"The currency of every amount on the shipment. Format ISO 4217, for example 'EUR'."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the shipment, in the shipment's currency."},"notes":{"type":"string","description":"Free text on the shipment."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the shipment was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the shipment record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment line."},"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line of a shipment must use the same warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity going out, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"pickedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been picked. This API does not set it."},"packedQuantity":{"type":"string","format":"decimal","description":"How much of the line has been packed. This API does not set it."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of the line has come back on a sales return."},"openReturnQuantity":{"type":"string","format":"decimal","description":"How much of the line may still be returned."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency."},"status":{"type":"string","description":"Where the line sits in the warehouse process. This is free text with no fixed set of values."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of document line the source line is."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch going out, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this batch has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches going out on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"returnedQuantity":{"type":"string","format":"decimal","description":"How much of this unit has come back on a sales return."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit at shipment, in the shipment's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units going out, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the goods come out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the shipment. A shipment always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The created shipments, in input order. Match them to inputs by position.","examples":[[{"id":"2f7c9b31-8a05-4d16-b47e-903c5f1a86d2","documentNumber":"SD-8841","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-19","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","businessPartnerName":"Bakker Retail B.V.","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","shipmentCarrierName":"PostNL","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","returnStatus":"OPEN","currency":"EUR","totalAmount":"960.00","notes":"Palletised","createdDate":"2026-08-14T08:30:00.000Z","lastModifiedDate":"2026-08-14T08:30:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40.00","inventoryQuantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","sourceDocumentLineType":"SalesOrderProductItem","notes":"Ship complete"}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateShipmentsInput":{"type":"object","properties":{"shipments":{"type":"array","items":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier for the customer the goods go to. Required. Despite the name, this is a customer id. See id on GET accounting/customers/:id."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it and the first line's warehouse decides it. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the shipment is dated. Defaults to today. Use format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The planned delivery date. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency for every amount on the shipment. Format ISO 4217, for example 'EUR'. Omit it to use the currency of the legal entity's default accounting book, and creation fails when the entity has no default book."},"shipmentCarrierId":{"type":"string","description":"The unique identifier for the carrier taking the goods. See id on GET inventory/shipment-carriers/:id."},"trackingNumber":{"type":"string","description":"The carrier's tracking number."},"referenceNumber":{"type":"string","description":"The customer's own reference for the shipment."},"notes":{"type":"string","description":"Free text on the shipment."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item going out. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the goods leave from. Every line must use the same warehouse. See id on GET inventory/warehouses/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to ship, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the shipment's currency. Omit it to take the price from the sales order line."},"sourceDocumentLineId":{"type":"string","description":"The sales order line this line ships against. Each order publishes its lines as items[].id on GET accounting/sales-orders/:id. Naming it links the shipment to the order it fulfills."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch going out. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the line ships from. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to ship, in the item's inventory unit. The batch quantities of a line must add up to the line's quantity in that unit."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches going out on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity in the item's inventory unit."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit going out. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the line ships from. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units going out, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the goods from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the item's inventory unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods come out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","locationId","unitId","quantity"]},"description":"The lines of the shipment. At least one is required."}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"description":"The shipments to create. At least one, and each is exactly what POST inventory/shipments takes.","examples":[[{"businessPartnerId":"c73f2b81-5d94-4e60-a812-0f9b6d3e45c7","documentDate":"2026-08-14","deliveryDate":"2026-08-19","shipmentCarrierId":"9d0a5e26-b183-4c47-92f5-6a4e17b0c853","trackingNumber":"3SABCD1234567","referenceNumber":"PO-BAKKER-4417","currency":"EUR","notes":"Palletised","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"40.00","unitPrice":"24.00","sourceDocumentLineId":"f9a4cdef-6095-425e-84f1-7f8192801ea2","notes":"Ship complete"}]}]]}},"additionalProperties":false,"required":["shipments"]},"commitTransferOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"]},"documentStatus":{"type":"string","description":"The status of the transfer order, read back from the document. 'IN_TRANSFER' on success: the transfer this created has the open quantity and has yet to commit.","examples":["IN_TRANSFER"]},"transferId":{"type":"string","description":"The warehouse transfer this created. See id on GET inventory/warehouse-transfers/:id. It is a draft and moves nothing until it is committed in its own right.","examples":["5b2e9d14-8a37-4c06-91f5-2d7b3e08a6c9"]},"transferDocumentNumber":{"type":"string","description":"The number of that transfer.","examples":["WT-2287"]}},"additionalProperties":false,"required":["id","documentStatus"]},"commitTransferOrderInput":{"type":"object","properties":{},"additionalProperties":false},"serialNumbersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial number. Format: UUID.","examples":["c3f80a41-6d29-4b57-8e10-92a4d7b05f63"]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity.","examples":["SN-000418"]},"manufacturerSerialNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The manufacturer's serial number."},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item this serial number belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["afb4492d-52fc-44c5-ab10-71ad4a615496"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["SERIAL-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse the unit is in, or was last in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-02"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the legal entity the unit belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"inStock":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The current quantity of the unit in stock. It is 1 when the unit is in stock and 0 when it is not, including before the unit is received.","examples":["1"]},"isSold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the unit has been sold.","examples":[false]},"lastCostChangeDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the `cost` or `afterSaleCost` of the unit last changed. It is the date the change was committed, not the date of the document. Format: YYYY-MM-DD."},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the unit expires. Format: YYYY-MM-DD."},"entryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the unit's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase receives the unit, it is the date entered for the unit on that document, or the document's date when none was entered. Each later receipt or inventory increase for the unit sets a new date. A warehouse transfer does not change the date, including a transfer between legal entities."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the serial number is active.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the serial number record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the serial number record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"updateItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]}},"additionalProperties":false,"required":["id"]},"updateItemInput":{"type":"object","properties":{"itemCode":{"type":"string","description":"The item code. Accepted on a draft item only; a real item's code can't change and sending it is FIELD_NOT_UPDATABLE. Uniqueness is checked when the draft is activated."},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. Accepted on a draft item only; a real item's type can't change and sending it is FIELD_NOT_UPDATABLE. See id on GET inventory/item-types/:id."},"itemName":{"type":"string","description":"The display name of the item."},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id."},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction will be in this unit. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. Moving the item to another group re-checks the units it keeps as well as any sent here, because their conversions live in the group, and a unit with no conversion fails with UNIT_NOT_IN_UNIT_GROUP. See id on GET inventory/unit-of-measure-groups/:id."},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. It must be one of the units in unitGroupId. See id on GET inventory/unit-of-measures/:id."},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Accepted values: 'movingAverage', 'batch', 'serials', 'none'. Use 'none' for an item that is not stocked. 'batch' requires isBatch, 'serials' requires isSerial, and 'none' requires isInventory false, and each contradiction fails with TRACKING_MISMATCH. Changing it is checked against the tracking flags the item already has, not only the ones in this request. 'fifo' is under development and fails with VALUATION_METHOD_UNAVAILABLE."},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch."},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number."},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. Set false for a service or charge item."},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents."},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents."},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. Setting it false retires the item without deleting it."},"notes":{"type":"string","description":"Free text on the item."},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image."},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Omit for no restriction. Omitting it is not the same as sending 1."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning. State its currency in currency."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price. State its currency in currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Required when either is given. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. Set it if the item may be received under a landed cost that uses Weight allocation, because that mode fails rather than falling back when an item has no weight.","examples":["1.6"]},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Accepted values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Accepted values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge billed as this item falls back to when it names none. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest storage temperature, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest storage temperature, in degrees Celsius."}},"additionalProperties":false},"getUnitOfMeasureGroupOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the unit of measure group.","examples":["2c7e5a91-6d38-4b04-8f72-1e9c03d5b846"]},"name":{"type":"string","description":"The display name of the unit of measure group. Names are not unique.","examples":["Packaging"]},"description":{"type":"string","description":"A free-form description of what the group covers. Absent when none was given.","examples":["Eaches, boxes and pallets"]},"baseUnitOfMeasureId":{"type":"string","description":"The unique identifier for the base unit of measure that every conversion factor in the group is relative to. Absent when the group has no lines. See id on GET inventory/unit-of-measures/:id.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"baseUnitCode":{"type":"string","description":"The code of the base unit of measure. Absent when the group has no lines.","examples":["EA"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the conversion line. This is what updateLines and deleteLines address on PATCH inventory/unit-of-measure-groups/:id, not the unit."},"unitOfMeasureId":{"type":"string","description":"The unique identifier for the unit of measure this line converts. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit of measure."},"unitName":{"type":"string","description":"The display name of that unit of measure."},"conversionFactor":{"type":"string","format":"decimal","description":"How many base units of measure make up one of this unit. It is always greater than zero, and 1 on the base unit's own line."},"isBaseUnit":{"type":"boolean","description":"Whether this line is for the group's own base unit of measure. Exactly one line has it, and its conversionFactor is 1."}},"additionalProperties":false,"required":["id","unitOfMeasureId","unitCode","unitName","conversionFactor","isBaseUnit"]},"description":"The group's conversion lines, ordered by line id. An empty array when the group has none.","examples":[[{"id":"9f1b60d4-27ac-4e53-b8f1-05d3e79a2c68","unitOfMeasureId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","unitName":"Each","conversionFactor":"1.00","isBaseUnit":true},{"id":"e04a83f5-91c6-4d27-a5b0-73f2e618d94c","unitOfMeasureId":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8","unitCode":"BOX","unitName":"Box","conversionFactor":"12.00","isBaseUnit":false}]]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the unit of measure group or its conversion lines last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","name","lines"]},"updateBinOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the bin.","examples":["8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"]}},"additionalProperties":false,"required":["id"]},"updateBinInput":{"type":"object","properties":{"aisle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The aisle in the warehouse layout. Send null to clear it."},"rack":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The rack within the aisle. Send null to clear it."},"shelfLevel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The shelf level within the rack. Send null to clear it."},"zone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'. Send null to clear it."},"itemPosition":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The position within the shelf, where a bin is subdivided further. Send null to clear it."},"isPickingBin":{"type":"boolean","description":"Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments."},"isReceivingBin":{"type":"boolean","description":"Whether the bin stages newly received goods before they are put away."},"isProductionBin":{"type":"boolean","description":"Whether the bin feeds or receives production."},"maxQuantity":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The largest number of units the bin will hold, above zero. It is meaningful only when everything in the bin is counted in the same unit. Send null to remove the limit."},"maxWeight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The largest weight the bin will hold, in maxWeightUnit, above zero. The bin must have a maxWeightUnit, from this request or already. Send null to remove the limit; its maxWeightUnit is removed with it.","examples":["300"]},"maxWeightUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit maxWeight is given in. Accepted values: 'G', 'Kg', 'Lbs'. Send it together with maxWeight, or leave both out. It can be null only when maxWeight is null too, and a null maxWeight already removes it."},"maxVolume":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The largest volume the bin will hold, in maxVolumeUnit, above zero. The bin must have a maxVolumeUnit, from this request or already. Send null to remove the limit; its maxVolumeUnit is removed with it."},"maxVolumeUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit maxVolume is given in. Accepted values: 'L'. Send it together with maxVolume, or leave both out. It can be null only when maxVolume is null too, and a null maxVolume already removes it."},"capacityCheckMode":{"type":"string","description":"What happens when a movement would exceed a limit. Accepted values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it.","examples":["HardBlock"]},"tempZone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'. Send null to clear it."},"tempMin":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The lowest temperature kept in the bin, in degrees Celsius. It must not be above tempMax. Send null to remove the lower bound."},"tempMax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The highest temperature kept in the bin, in degrees Celsius. Send null to remove the upper bound."},"supportsPerishable":{"type":"boolean","description":"Whether perishable stock may be kept in the bin."},"active":{"type":"boolean","description":"Whether the bin may be chosen for new movements. Set it to false to retire the bin without deleting it: the stock already in it stays where it is."}},"additionalProperties":false},"bulkCreateReceiptsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt."},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created."},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The legal entity the receipt belongs to."},"entityName":{"type":"string","description":"The name of that legal entity."},"businessPartnerId":{"type":"string","description":"The vendor the goods came from."},"businessPartnerName":{"type":"string","description":"The name of that vendor."},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"What the receipt takes in: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns, valued at and cleared against those returns)."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency."},"notes":{"type":"string","description":"Free text on the receipt."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, the purchase return line this line replaces, as its id under lines on GET inventory/purchase-returns/:id. The line carries that return line's unit price and the return's functional value."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The created receipts, in input order. Match them to inputs by index.","examples":[[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"GR-2291","documentStatus":"DRAFT","documentDate":"2026-08-14","deliveryDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","businessPartnerName":"Van Dijk Components B.V.","referenceNumber":"DN-77120","currency":"EUR","totalAmount":"725.00","notes":"Received at the back dock","createdDate":"2026-08-14T09:20:00.000Z","lastModifiedDate":"2026-08-14T09:20:00.000Z","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateReceiptsInput":{"type":"object","properties":{"receipts":{"type":"array","items":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The vendor the goods came from. Required."},"entityId":{"type":"string","description":"The legal entity. Omit it and the first line's warehouse decides it, but a receipt of only service lines has no warehouse, so supply it there."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Use format YYYY-MM-DD. Defaults to today."},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived. Use format YYYY-MM-DD."},"currency":{"type":"string","description":"The currency for every amount on the receipt. Format ISO 4217, for example 'EUR'. Defaults to the vendor's or the entity's, as the platform resolves it."},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number."},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment. Free text: no format check, and no lookup against a carrier."},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"What the receipt takes in: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns, valued at and cleared against those returns). Defaults to NORMAL on create."},"notes":{"type":"string","description":"Free text on the document."},"lines":{"type":"array","items":{"type":"object","properties":{"lineType":{"enum":["Inventory","Service","Expense"],"description":"What this line receives. Defaults to Inventory. An Inventory line needs itemId, unitId, locationId and quantity, because it moves stock into a warehouse. A Service or Expense line needs serviceDescription and an amount, and has no item or warehouse. A line with a description and no item is taken as a Service line."},"itemId":{"type":"string","description":"The item received. Required on an Inventory line, and not used on a Service or Expense line."},"serviceDescription":{"type":"string","description":"What was bought. Required on a Service or Expense line, and not used on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods go into. Required on an Inventory line."},"unitId":{"type":"string","description":"The unit the quantity is counted in. Required on an Inventory line."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in that unit. Required on an Inventory line, and greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency. Leave it out to have it calculated as quantity × unitPrice, rounded to the currency's decimals. When quantity and unitPrice are also given it must equal that, once rounded the same way, or the request fails with LINE_TOTAL_MISMATCH. On a Service or Expense line without a quantity or unitPrice it is taken as given, and such a line needs this or a unitPrice."},"expenseAccountId":{"type":"string","description":"The general ledger account to charge. Required on a Service or Expense line, or the request fails with INCOMPLETE_LINE. Not used on an Inventory line."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, the purchase return line this line replaces, as its id under lines on GET inventory/purchase-returns/:id; its numeric id in string form is also accepted. It must be an open line of a shipped UNCREDITED_REPLACEMENT return of the same purchase order line, item, unit and currency. The line is then priced at that return line's unit price and valued at the return's functional amount; any unitPrice or lineTotal given is replaced. Required on every line of a replacement receipt before commit."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line receives against, as its id under lines on GET accounting/purchase-orders/:id. Its numeric id in string form is also accepted. The line type is set from it."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."}},"additionalProperties":false},"description":"The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods go into."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries."}},"additionalProperties":false},"description":"The lines of the receipt. At least one is required."}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"description":"The receipts to create. At least one, and each is exactly what POST inventory/receipts takes.","examples":[[{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-14","deliveryDate":"2026-08-14","referenceNumber":"DN-77120","currency":"EUR","notes":"Received at the back dock","lines":[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]}]]}},"additionalProperties":false,"required":["receipts"]},"createReceiptOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the receipt.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The receipt number, for example 'GR-2291'. Assigned when the receipt is created.","examples":["GR-2291"]},"documentStatus":{"type":"string","description":"The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format YYYY-MM-DD.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived or are expected. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The legal entity the receipt belongs to.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"businessPartnerId":{"type":"string","description":"The vendor the goods came from.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of that vendor.","examples":["Van Dijk Components B.V."]},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number.","examples":["DN-77120"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment."},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"What the receipt takes in: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns, valued at and cleared against those returns)."},"currency":{"type":"string","description":"ISO 4217 code governing every amount on the document. The VENDOR's currency, which need not be the entity's functional one — see functionalUnitPrice on the line.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the receipt, in the receipt's currency.","examples":["725.00"]},"notes":{"type":"string","description":"Free text on the receipt.","examples":["Received at the back dock"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:20:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Use it in updateLines and deleteLines."},"lineType":{"type":"string","description":"The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item."},"itemId":{"type":"string","description":"The item received. Absent on a Service or Expense line."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The name of that item."},"serviceDescription":{"type":"string","description":"What a Service or Expense line is for. Absent on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods went into. Absent on a Service or Expense line."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is counted in."},"unitCode":{"type":"string","description":"The short code of that unit."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"receivedQuantity":{"type":"string","format":"decimal","description":"The quantity actually received, where the receiving process records it separately."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity that has gone back on a purchase return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The unit price in the entity's functional currency. Present when the receipt is in another currency."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The line total in the entity's functional currency."},"expenseAccountId":{"type":"string","description":"The general ledger account a Service or Expense line is charged to. Absent on an Inventory line."},"expenseAccountNumber":{"type":"string","description":"The number of that account."},"expenseAccountName":{"type":"string","description":"The name of that account."},"status":{"type":"string","description":"Where the line is in the receiving process. This is free text, with no fixed set of values."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, the purchase return line this line replaces, as its id under lines on GET inventory/purchase-returns/:id. The line carries that return line's unit price and the return's functional value."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The kind of source document line this receipt line was created from."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this batch that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the receipt's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number as stamped on the unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit still to be invoiced."},"returnedQuantity":{"type":"string","format":"decimal","description":"The quantity of this unit that has gone back to the vendor."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the receipt's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units received, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods went into."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity put into this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt, oldest first. A receipt always has at least one line.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"200.00","inventoryQuantity":"200.00","openQuantity":"200.00","unitPrice":"3.20","lineTotal":"640.00","sourceDocumentLineId":"551043","sourceDocumentLineType":"PurchaseOrderLine","notes":"Two pallets"},{"id":"d0a7e3b5-2f61-4c98-b704-1a5e9c86d243","lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604","expenseAccountNumber":"615200","expenseAccountName":"Inbound freight"}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"createReceiptInput":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The vendor the goods came from. Required.","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"entityId":{"type":"string","description":"The legal entity. Omit it and the first line's warehouse decides it, but a receipt of only Service or Expense lines has no warehouse, so send it for those. Every line's locationId must belong to this entity or the request fails with LOCATION_ENTITY_MISMATCH."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Use format YYYY-MM-DD. Defaults to today.","examples":["2026-08-14"]},"deliveryDate":{"type":"string","format":"date","description":"The date the goods arrived. Use format YYYY-MM-DD.","examples":["2026-08-14"]},"currency":{"type":"string","description":"The currency for every amount on the receipt. Format ISO 4217, for example 'EUR'. Defaults to the vendor's or the entity's, as the platform resolves it.","examples":["EUR"]},"referenceNumber":{"type":"string","description":"The vendor's own reference, typically their delivery note number.","examples":["DN-77120"]},"trackingNumber":{"type":"string","description":"The carrier's tracking number for the inbound shipment. Free text: no format check, and no lookup against a carrier."},"receiptType":{"enum":["NORMAL","UNCREDITED_REPLACEMENT"],"description":"What the receipt takes in: NORMAL (goods ordered on the purchase order) or UNCREDITED_REPLACEMENT (replacement goods for uncredited replacement purchase returns, valued at and cleared against those returns). Defaults to NORMAL on create."},"notes":{"type":"string","description":"Free text on the document.","examples":["Received at the back dock"]},"lines":{"type":"array","items":{"type":"object","properties":{"lineType":{"enum":["Inventory","Service","Expense"],"description":"What this line receives. Defaults to Inventory. An Inventory line needs itemId, unitId, locationId and quantity, because it moves stock into a warehouse. A Service or Expense line needs serviceDescription and an amount, and has no item or warehouse. A line with a description and no item is taken as a Service line."},"itemId":{"type":"string","description":"The item received. Required on an Inventory line, and not used on a Service or Expense line."},"serviceDescription":{"type":"string","description":"What was bought. Required on a Service or Expense line, and not used on an Inventory line."},"locationId":{"type":"string","description":"The warehouse the goods go into. Required on an Inventory line, and it must belong to the receipt's legal entity."},"unitId":{"type":"string","description":"The unit the quantity is counted in. Required on an Inventory line."},"quantity":{"type":"string","format":"decimal","description":"The quantity received, in that unit. Required on an Inventory line, and greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the receipt's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the receipt's currency. Leave it out to have it calculated as quantity × unitPrice, rounded to the currency's decimals. When quantity and unitPrice are also given it must equal that, once rounded the same way, or the request fails with LINE_TOTAL_MISMATCH. On a Service or Expense line without a quantity or unitPrice it is taken as given, and such a line needs this or a unitPrice."},"expenseAccountId":{"type":"string","description":"The general ledger account to charge. Required on a Service or Expense line, or the request fails with INCOMPLETE_LINE. Not used on an Inventory line."},"replacedReturnLineId":{"type":"string","description":"On an UNCREDITED_REPLACEMENT receipt, the purchase return line this line replaces, as its id under lines on GET inventory/purchase-returns/:id; its numeric id in string form is also accepted. It must be an open line of a shipped UNCREDITED_REPLACEMENT return of the same purchase order line, item, unit and currency. The line is then priced at that return line's unit price and valued at the return's functional amount; any unitPrice or lineTotal given is replaced. Required on every line of a replacement receipt before commit."},"sourceDocumentLineId":{"type":"string","description":"The purchase order line this line receives against, as its id under lines on GET accounting/purchase-orders/:id. Its numeric id in string form is also accepted. The line type is set from it."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."}},"additionalProperties":false},"description":"The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The bin the goods go into."},"quantity":{"type":"string","format":"decimal","description":"The quantity going into this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries."}},"additionalProperties":false},"description":"The lines of the receipt. At least one is required.","examples":[[{"lineType":"Inventory","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"200.00","unitPrice":"3.20","sourceDocumentLineId":"551043","notes":"Two pallets"},{"lineType":"Service","serviceDescription":"Inbound freight","lineTotal":"85.00","expenseAccountId":"4b7c0e29-6d15-4830-9f42-8a3e57c1d604"}]]}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"createAccountDeterminationRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]}},"additionalProperties":false,"required":["id"]},"createAccountDeterminationRuleInput":{"type":"object","properties":{"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique.","examples":["Finished goods — receipts"]},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used.","examples":[10]},"isActive":{"type":"boolean","description":"Whether the rule is active. Defaults to true."},"matching":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"The unique identifier of the accounting book this rule applies to. Format: UUID. Required: leaving it out returns BOOK_REQUIRED. See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"type":"string","description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' applies to every transaction type. Leave the field out to store 'DEFAULT'. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"required":["entityId"],"description":"The dimensions this rule applies to. If you leave out the item type, item category, location, or transaction type, the rule applies to every value of it.","examples":[{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"}]},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"type":"string","description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"type":"string","description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"type":"string","description":"Deprecated: no journal entry or preview reads this account; it is kept so existing v1 callers keep working. The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"type":"string","description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"type":"string","description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"type":"string","description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"type":"string","description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"type":"string","description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"type":"string","description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"type":"string","description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryVarianceAccountId":{"type":"string","description":"The unique identifier of the inventory variance account. Format: UUID. It takes the difference between a document's own cost and the item's current cost when committed stock leaves again after its cost has moved. Three postings resolve it: a receipt cancellation, through rules for 'RECEIPT'; and, through rules for 'INTERCOMPANY_TRANSFER', an intercompany warehouse transfer cancellation (the receiving entity's stock leaves at its current cost) and an intercompany return (the returning entity's stock leaves at its current cost). It is looked up only when such a difference exists; if the matching rule then has no account, the posting fails with a missing-account error. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"type":"string","description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"type":"string","description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"type":"string","description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"type":"string","description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"type":"string","description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"type":"string","description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches.","examples":[{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}]},"reasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the rule's accounts can be overridden."}},"additionalProperties":false,"required":["reasonCodeId","accountId","parentAccountType"]},"description":"The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by `parentAccountType`. An inventory increase or decrease created by manufacturing that has its own offset account (`offsetAccountId` on GET inventory/inventory-increases/:id and GET inventory/inventory-decreases/:id) uses that account instead of an override. Each combination of `reasonCodeId` and `parentAccountType` can appear only once on a rule."}},"additionalProperties":false,"required":["ruleName","matching"]},"bulkCreatePurchaseReturnsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase return. Format: UUID."},"documentNumber":{"type":"string","description":"The purchase return number."},"documentStatus":{"type":"string","description":"The status of the purchase return. It is always 'DRAFT' on a created purchase return."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD."},"deliveryDate":{"type":"string","format":"date","description":"The delivery date of the purchase return. Format: YYYY-MM-DD."},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"Deprecated, and always empty. A purchase return is created from a purchase order. Use `purchaseOrderId`."},"purchaseOrderId":{"type":"string","description":"The unique identifier of the purchase order the purchase return was created from. Format: UUID. See `id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"purchaseOrderNumber":{"type":"string","description":"The number of the purchase order the purchase return was created from."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217."},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the purchase return was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the purchase return last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"locationName":{"type":"string","description":"The name of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"unitCode":{"type":"string","description":"The code of the unit of measure for the line's quantity."},"quantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the line's unit of measure."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity being returned, in the item's stocking unit."},"openQuantity":{"type":"string","format":"decimal","description":"The quantity of the line still outstanding, in the line's unit of measure."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency."},"functionalUnitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the legal entity's functional currency. It is `functionalLineTotal` divided by `quantity`. Absent until the purchase return is shipped."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the line, in the legal entity's functional currency. It is calculated from the receipts the quantity was taken from, at their original prices. Absent until the purchase return is shipped."},"status":{"type":"string","description":"The status of the line. It is 'PENDING' until the purchase return is shipped, and 'SHIPPED' after."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the purchase order line that this line returns goods from. Format: UUID. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Possible values: 'PurchaseOrderLine'."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"expirationDate":{"type":"string","format":"date","description":"The date the batch expires. Format: YYYY-MM-DD. See `expirationDate` on GET inventory/batch-numbers/:id (getBatchNumber)."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The purchase return line's `unitPrice` when the batch was added to that line, in the purchase return's currency. It is per unit of the line's unit of measure, not per stocking unit like `quantity`."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of one stocking unit of the batch, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches being returned."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."},"unitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the purchase return's currency. It is the purchase return line's `unitPrice` when the serialized unit was added to that line."},"relievedUnitCost":{"type":"string","format":"decimal","description":"The cost of the serialized unit, in the legal entity's functional currency, as taken off the inventory's value (relieved) when the purchase return was shipped. Unlike `unitCost`, it is what the inventory was valued at, not the line's price. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units being returned, one entry for each unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"binLocationCode":{"type":"string","description":"The code of the bin the stock is taken from."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the stock on this purchase return line is taken from, with the quantity taken from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return."},"applications":{"type":"array","items":{"type":"object","properties":{"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line the quantity was taken from. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the receipt line, in the purchase return line's unit of measure."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the quantity taken from the receipt line, in the purchase return line's unit of measure, as taken off the inventory's value (relieved) when the purchase return was shipped. It is `totalCost` divided by `quantity`, not rounded."},"totalCost":{"type":"string","format":"decimal","description":"The cost of the whole quantity taken from the receipt line, as taken off the inventory's value (relieved) when the purchase return was shipped."}},"additionalProperties":false,"required":["receiptLineId","quantity"]},"description":"The receipt lines that the returned quantity was taken from. A purchase order line can be received on several receipts, so shipping records which receipt lines the quantity came from. Absent until the purchase return is shipped."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines"]},"description":"The created purchase returns, in the order you sent them.","examples":[[{"id":"6a1f30c9-4d82-4b57-9e60-83c25f0a71b4","documentNumber":"PRTR-1043","documentStatus":"DRAFT","documentDate":"2026-08-20","returnType":"NORMAL","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","currency":"EUR","lines":[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","quantity":"30.00","unitPrice":"3.20"}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreatePurchaseReturnsInput":{"type":"object","properties":{"returns":{"type":"array","items":{"type":"object","properties":{"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor)."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD. Defaults to today's date in UTC. It cannot be in the future."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217, for example 'EUR'. If this currency differs from the legal entity's functional currency, an exchange rate between the two currencies must exist for the `documentDate`."},"returnType":{"type":"string","description":"The type of the purchase return. Defaults to 'NORMAL'. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Shipping an 'UNINVOICED_CANCELLATION' purchase return fails when a line returns more of its purchase order line than is received, not invoiced, and not already canceled. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'."},"referenceNumber":{"type":"string","description":"The reference number of the purchase return."},"originalReceiptId":{"type":"string","description":"Deprecated, and ignored. Kept so existing requests that send it are still accepted. A purchase return is created from a purchase order, which is taken from the lines' `sourceDocumentLineId`."},"notes":{"type":"string","description":"Notes on the purchase return."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It must belong to the purchase return's legal entity. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. Required. It must be the same unit as on the purchase order line. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It must be greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It can be zero, but not less than zero."},"sourceDocumentLineId":{"type":"string","description":"The identifier of the purchase order line that this line returns goods from. Send the line's unique identifier or its numeric `id`. Required. All lines must belong to the same purchase order. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. Defaults to 'PurchaseOrderLine'. Accepted values: 'PurchaseOrderLine'."},"notes":{"type":"string","description":"Notes on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned. To identify the batch, send `batchNumberId`. To take this batch from a bin, send the same value in `binLocations[].batchNumber`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch to return, in the item's stocking unit. It must be greater than zero."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches being returned. Required when the item is batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned. To identify the unit, send `serialNumberId`. To take this unit from a bin, send the same value in `binLocations[].serialNumber`."}},"additionalProperties":false},"description":"The serialized units being returned, one entry for each unit. Required when the item is serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier of the bin the stock is taken from. Format: UUID. See `id` on GET inventory/bins/:id (getBin)."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from the bin, in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch number of the batch this bin quantity is for. It must match the `batchNumber` of one of the line's batches."},"serialNumber":{"type":"string","description":"The serial number of the unit this bin quantity is for. It must match the `serialNumber` of one of the line's serials."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins to take the stock on this purchase return line from, with the quantity to take from each bin. An entry with a `batchNumber` or `serialNumber` is for that batch or serialized unit. An entry with neither is for part of the line's quantity, not a particular batch or serialized unit."}},"additionalProperties":false,"required":["itemId","locationId","quantity"]},"description":"The lines of the purchase return. Send at least one."}},"additionalProperties":false,"required":["businessPartnerId","lines"]},"description":"The purchase returns to create. Send at least one.","examples":[[{"businessPartnerId":"b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6","documentDate":"2026-08-20","returnType":"NORMAL","referenceNumber":"RMA-4471","notes":"Damaged in transit","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"30.00","unitPrice":"3.20","sourceDocumentLineId":"6b02f4d8-91c3-4e57-a8f6-3c1d9e70b254","sourceDocumentLineType":"PurchaseOrderLine","notes":"Cracked casings"}]}]]}},"additionalProperties":false,"required":["returns"]},"updateWarehouseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the warehouse.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]}},"additionalProperties":false,"required":["id"]},"updateWarehouseInput":{"type":"object","properties":{"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. It must stay unique within the tenant. Reusing the warehouse's own current code is not a collision."},"name":{"type":"string","description":"The site name of the warehouse."},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. See id on GET base/entities. A warehouse that already has inventory transactions cannot be moved to another entity: the platform refuses it and the call fails with a validation error."},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location. WAREHOUSE is the only value accepted; the other values are kept for compatibility with existing integrations and are refused. Use API version v2, which declares WAREHOUSE only."},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. Set it to false to retire the warehouse without deleting it: its transactions and bins keep pointing at it, and every inventory document then refuses it. The warehouse must first hold no stock and no draft document may still name it; otherwise the call fails with WAREHOUSE_DEACTIVATION_BLOCKED. Sending false on a warehouse that is already inactive is not checked again.","examples":[false]},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse. At most one warehouse per entity is meant to be the primary receiving warehouse. It is not enforced."},"warehouseTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Pass null to clear it, which lets the warehouse allow every document type again. An unknown identifier fails the call with WAREHOUSE_TYPE_NOT_FOUND. There is no endpoint for it."},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box."},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"postalCode":{"type":"string","description":"The postal or ZIP code."},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. It is not validated against the ISO list."},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state."}},"additionalProperties":false},"getItemOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"isDraft":{"type":"boolean","description":"True when the item is a system draft: created with POST inventory/items/drafts or saved as a draft in the item form, not offered on any document, and made a real item by POST inventory/items/:id/activate."},"itemCode":{"type":"string","description":"The item code, for example 'WIDGET-01'. Unique within the tenant. It is set when the item is created and cannot be changed.","examples":["WIDGET-01"]},"itemName":{"type":"string","description":"The display name of the item.","examples":["Standard widget"]},"externalItemId":{"type":"string","description":"Your own identifier for this item in an external system."},"brandName":{"type":"string","description":"The display name of the brand."},"notes":{"type":"string","description":"Free text on the item."},"imageAvatar":{"type":"string","description":"The URL of the item's avatar image. Absent when none is set."},"itemTypeId":{"type":"string","description":"The unique identifier of the item's type. It is set when the item is created and cannot be changed. See id on GET inventory/item-types/:id.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"itemTypeName":{"type":"string","description":"The display name of the item's type.","examples":["Stocked good"]},"categoryId":{"type":"string","description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id.","examples":["6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b"]},"categoryName":{"type":"string","description":"The display name of the item's category.","examples":["Components"]},"inventoryUnitId":{"type":"string","description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction is in this unit. See id on GET inventory/unit-of-measures/:id.","examples":["77bd4c16-e1f0-426d-a98f-07b063df2d9c"]},"inventoryUnitCode":{"type":"string","description":"The code of the inventory unit.","examples":["EA"]},"salesUnitId":{"type":"string","description":"The unique identifier of the unit used on sales documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"salesUnitCode":{"type":"string","description":"The code of the sales unit."},"purchaseUnitId":{"type":"string","description":"The unique identifier of the unit used on purchase documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitCode":{"type":"string","description":"The code of the purchase unit."},"unitGroupId":{"type":"string","description":"The unique identifier of the unit of measure group that has the conversions between the item's units. See id on GET inventory/unit-of-measure-groups/:id.","examples":["38b5454a-c3fe-452b-9754-61f9ead49e87"]},"unitGroupName":{"type":"string","description":"The display name of the unit of measure group.","examples":["Each"]},"valuationMethod":{"type":"string","description":"How the item's stock is valued. Possible values: 'movingAverage', 'batch', 'serials', 'none'. 'none' is for an item that is not stocked. 'fifo' can be returned but cannot be written, because it is under development.","examples":["movingAverage"]},"isBatch":{"type":"boolean","description":"Whether the item is tracked by batch. Receipts and shipments of it name batches.","examples":[false]},"isSerial":{"type":"boolean","description":"Whether the item is tracked by serial number. Receipts and shipments of it name one serial per unit.","examples":[false]},"isInventory":{"type":"boolean","description":"Whether stock levels are kept for the item. False for a service or charge item.","examples":[true]},"isSalesItem":{"type":"boolean","description":"Whether the item can appear on sales documents.","examples":[true]},"isPurchaseItem":{"type":"boolean","description":"Whether the item can appear on purchase documents.","examples":[true]},"active":{"type":"boolean","description":"Whether the item can be selected on new documents. False means it is retired, and historical records keep it.","examples":[true]},"eccnNumber":{"type":"string","description":"The Export Control Classification Number."},"htsCode":{"type":"string","description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"type":"string","description":"The country the item originates from."},"minStockLevel":{"type":"string","format":"decimal","description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"type":"string","format":"decimal","description":"The smallest quantity any document can move. Absent when there is no restriction."},"leadTime":{"type":"string","format":"decimal","description":"The number of weeks between ordering the item and receiving it."},"standardCost":{"type":"string","format":"decimal","description":"The standard cost carried for planning, in the item's currency. It is not the value of the stock on hand. Read that from GET inventory/inventory-levels."},"itemPurchasePrice":{"type":"string","format":"decimal","description":"The expected purchase price, in the item's currency."},"currency":{"type":"string","description":"The currency of standardCost and itemPurchasePrice. Format ISO 4217, for example 'USD'."},"weight":{"type":"string","format":"decimal","description":"The weight of one item, in weightUnit. A landed cost Weight allocation fails rather than falling back when an item on the receipt has none.","examples":["1.4"]},"weightUnit":{"type":"string","description":"The unit weight is expressed in. Possible values: 'G', 'Kg', 'Lbs'.","examples":["Kg"]},"grossWeight":{"type":"string","format":"decimal","description":"The weight including packaging, in weightUnit."},"netWeight":{"type":"string","format":"decimal","description":"The weight excluding packaging, in weightUnit."},"length":{"type":"string","format":"decimal","description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"type":"string","format":"decimal","description":"The width of one item."},"height":{"type":"string","format":"decimal","description":"The height of one item."},"volumePerUnit":{"type":"string","format":"decimal","description":"The volume of one item, in volumeUnit."},"volumeUnit":{"type":"string","description":"The unit volumePerUnit is expressed in. Possible values: 'L'."},"defaultAllocationMode":{"type":"string","description":"The allocation mode a landed cost charge for this item falls back to when it names none. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"isPerishable":{"type":"boolean","description":"Whether the item expires."},"shelfLifeDays":{"type":"number","description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"type":"number","description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"type":"number","description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"type":"number","description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"type":"string","format":"decimal","description":"The lowest temperature the item can be stored at, in degrees Celsius."},"storageTempMax":{"type":"string","format":"decimal","description":"The highest temperature the item can be stored at, in degrees Celsius."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the item was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the item record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false,"required":["id"]},"shipPurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentStatus":{"type":"string","description":"The status of the purchase return after the shipment. It is 'COMMITTED'.","examples":["COMMITTED"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings about the shipment. Empty when there are no warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"shipPurchaseReturnInput":{"type":"object","properties":{"shippedDate":{"type":"string","format":"date","description":"The date the goods left for the vendor. Format: YYYY-MM-DD. Defaults to today in the calendar of the purchase return's entity. It is stored as the purchase return's `shippedDate`. It does not set the date of the inventory transaction or of the journal entry.","examples":["2026-08-21"]}},"additionalProperties":false},"searchShipmentCarriersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment carrier."},"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. Names are not unique, so use id to address one carrier."},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments. Absent on carriers created before the active flag existed."},"vendorId":{"type":"string","description":"The unique identifier for the vendor this carrier bills through. Absent when the carrier has no vendor. See id on GET accounting/vendors/:id."},"vendorName":{"type":"string","description":"The name of the vendor this carrier bills through. Absent when the carrier has no vendor. It is resolved from the vendor at read time and is not stored on the carrier."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the carrier record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","name"]},"description":"The shipment carriers on this page, ordered by id. An empty array when nothing matches.","examples":[[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332","name":"DHL Express","active":true,"vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47","vendorName":"DHL International GmbH","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more shipment carriers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchShipmentCarriersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Limits results to carriers with this name. The match is exact. Names are not unique, so this can match several carriers."},"active":{"type":"boolean","description":"Limits results to carriers that can be selected on new shipments when true, and to retired carriers when false."},"vendorId":{"type":"string","description":"Limits results to carriers linked to this vendor. An identifier matching no vendor returns an empty page. See id on GET accounting/vendors/:id."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to carriers changed on or after this time. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A shipment carrier must match every filter you send. Send an empty object to return all shipment carriers.","examples":[{"active":true,"modifiedSince":"2026-08-01T00:00:00.000Z"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit for the first page."},"size":{"type":"number","description":"The number of shipment carriers per page. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"searchAccountDeterminationRulesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule. Format: UUID."},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique."},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used. A rule with no `priority` counts as 0."},"isActive":{"type":"boolean","description":"Whether the rule is active."},"matching":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"The unique identifier of the accounting book this rule applies to. Format: UUID. Absent only on some rules created before a book was required. Set a book on such a rule with PATCH inventory/account-determination-rules/:id (updateAccountDeterminationRule). See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"type":"string","description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' means every transaction type. A rule stored with no transaction type is returned as 'DEFAULT'. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"required":["entityId"],"description":"The dimensions this rule applies to. When the item type, item category, location, or transaction type is absent, the rule applies to every value of it."},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"type":"string","description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"type":"string","description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"type":"string","description":"Deprecated: no journal entry or preview reads this account; it is kept so existing v1 callers keep working. The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"type":"string","description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"type":"string","description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"type":"string","description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"type":"string","description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"type":"string","description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"type":"string","description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"type":"string","description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryVarianceAccountId":{"type":"string","description":"The unique identifier of the inventory variance account. Format: UUID. It takes the difference between a document's own cost and the item's current cost when committed stock leaves again after its cost has moved. Three postings resolve it: a receipt cancellation, through rules for 'RECEIPT'; and, through rules for 'INTERCOMPANY_TRANSFER', an intercompany warehouse transfer cancellation (the receiving entity's stock leaves at its current cost) and an intercompany return (the returning entity's stock leaves at its current cost). It is looked up only when such a difference exists; if the matching rule then has no account, the posting fails with a missing-account error. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"type":"string","description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"type":"string","description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"type":"string","description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"type":"string","description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"type":"string","description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"type":"string","description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches. Only the accounts set on the rule are included in the response."},"reasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the override. Format: UUID."},"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the rule's accounts can be overridden."}},"additionalProperties":false,"required":["id","reasonCodeId","accountId","parentAccountType"]},"description":"The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by `parentAccountType`. An inventory increase or decrease created by manufacturing that has its own offset account (`offsetAccountId` on GET inventory/inventory-increases/:id and GET inventory/inventory-decreases/:id) uses that account instead of an override. An empty array when the rule has none."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the rule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Requests that change only the reason-code overrides do not update this field."}},"additionalProperties":false,"required":["id","ruleName","matching","accounts","reasonCodeOverrides"]},"description":"The matching rules in this response. When more rules match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"8d3f1a60-4c27-4e95-b013-6f2a89d47c5e","ruleName":"Finished goods — receipts","priority":10,"isActive":true,"matching":{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"},"accounts":{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"},"reasonCodeOverrides":[],"lastModifiedDate":"2026-05-12T09:30:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchAccountDeterminationRulesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"entityId":{"type":"string","description":"Limits results to rules of the legal entity with this unique identifier. Format: UUID. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"Limits results to rules for the accounting book with this unique identifier. Format: UUID. Rules without a book are not returned. See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"Limits results to rules for the item type with this unique identifier. Format: UUID. Wildcard rules are not returned. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"Limits results to rules for the item category with this unique identifier. Format: UUID. Wildcard rules and rules for a parent category are not returned. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"Limits results to rules for the warehouse location with this unique identifier. Format: UUID. Wildcard rules are not returned. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"Limits results to rules for this transaction type. Filtering on 'DEFAULT' returns the rules that apply to every transaction type, including rules stored with no transaction type."},"isActive":{"type":"boolean","description":"Limits results to active rules when true, and to inactive rules when false."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to rules whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A rule must match every filter you send. Send an empty object to return all rules.","examples":[{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","isActive":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of rules per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"deleteShipmentCarrierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted shipment carrier.","examples":["b81f4c60-27da-4e15-9f33-6c0a5d82e714"]},"name":{"type":"string","description":"The name the deleted carrier held.","examples":["In-house fleet"]}},"additionalProperties":false,"required":["id","name"]},"bulkCreateInventoryDecreasesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease."},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse location."},"locationName":{"type":"string","description":"The display name of that warehouse location."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The short code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'."},"notes":{"type":"string","description":"Free text on the inventory decrease."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"description":"The created inventory decreases, in input order. Match them to inputs by position.","examples":[[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"DEC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"12.00","inventoryQuantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"12.00","inventoryQuantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"12.00","inventoryQuantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateInventoryDecreasesInput":{"type":"object","properties":{"decreases":{"type":"array","items":{"type":"object","properties":{"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line comes out of it. Required. See id on GET inventory/warehouses/:id."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it to use the location's owning entity. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period. Defaults to today. Use format YYYY-MM-DD."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code explaining the adjustment. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the inventory decrease."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to remove, in that unit. A positive number greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency. Optional: omit it to value the stock at the cost it already has, which is what a write-off ordinarily wants. A supplied value must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch being removed. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the document's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to remove, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches to take the quantity from. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Every batch named must already exist for the item, since a decrease removes lots and does not create them."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit being removed. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the document's warehouse. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The units to remove, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Every unit named must already exist."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the quantity from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number the line does not have is rejected rather than reinterpreted."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity comes out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. At least one is required."}},"additionalProperties":false,"required":["locationId","lines"]},"description":"The inventory decreases to create. At least one, and each is exactly what POST inventory/inventory-decreases takes.","examples":[[{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"Forklift damage, aisle 4","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"12.00","notes":"Crushed by a forklift","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"12.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"12.00","batchNumber":"LOT-2026-08-14"}]}]}]]}},"additionalProperties":false,"required":["decreases"]},"deleteWarehouseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted warehouse.","examples":["b5390f6a-1c72-4e84-9a03-8f2d61c74e59"]},"locationCode":{"type":"string","description":"The location code the deleted warehouse held.","examples":["WH-02"]}},"additionalProperties":false,"required":["id","locationCode"]},"warehouseTransferOrdersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order.","examples":["7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transfer order's number, for example 'WTO-1043'.","examples":["WTO-1043"]},"documentStatus":{"enum":["DRAFT","PROCESSED","IN_TRANSFER","PARTIALLY_PROCESSED"],"description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open.","examples":["DRAFT"]},"documentDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the transfer order is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"referenceNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your own reference on the transfer order.","examples":["REPLEN-2026-33"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity the transfer order belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id.","examples":["b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-CENTRAL"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Central warehouse"]},"targetLocationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id.","examples":["e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"]},"targetLocationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of that warehouse.","examples":["WH-NORTH"]},"targetLocationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of that warehouse.","examples":["Northern depot"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the document."},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines on the transfer order.","examples":[1]},"openLineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"How many lines still have quantity left to transfer. Zero means everything has been taken.","examples":[1]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.104Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"cancelPurchaseReturnOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentStatus":{"type":"string","description":"The status of the purchase return after the cancellation. It is 'CANCELLED'.","examples":["CANCELLED"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings about the cancellation. Empty when there are no warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","warnings"]},"cancelPurchaseReturnInput":{"type":"object","properties":{},"additionalProperties":false},"updateAccountDeterminationRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]}},"additionalProperties":false,"required":["id"]},"updateAccountDeterminationRuleInput":{"type":"object","properties":{"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique."},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used."},"isActive":{"type":"boolean","description":"Whether the rule is active."},"matching":{"type":"object","properties":{"bookId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the accounting book this rule applies to. Format: UUID. To move the rule to another book, send that book's identifier. Every rule must have a book. See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"anyOf":[{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"]},{"type":"null"}],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' applies to every transaction type. Null is refused with TRANSACTION_TYPE_REQUIRED, because every rule has a transaction type; omit the field to keep the current one. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"description":"Changes to the dimensions this rule applies to. Send null for the item type, item category, location, or transaction type to make the rule apply to every value of it."},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deprecated: no journal entry or preview reads this account; it is kept so existing v1 callers keep working. The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryVarianceAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the inventory variance account. Format: UUID. It takes the difference between a document's own cost and the item's current cost when committed stock leaves again after its cost has moved. Three postings resolve it: a receipt cancellation, through rules for 'RECEIPT'; and, through rules for 'INTERCOMPANY_TRANSFER', an intercompany warehouse transfer cancellation (the receiving entity's stock leaves at its current cost) and an intercompany return (the returning entity's stock leaves at its current cost). It is looked up only when such a difference exists; if the matching rule then has no account, the posting fails with a missing-account error. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches.","examples":[{"cogsAccountId":"9a4d18e2-70bc-4f51-8d36-2e0b74f9a3c1"}]},"createReasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the rule's accounts can be overridden."}},"additionalProperties":false,"required":["reasonCodeId","accountId","parentAccountType"]},"description":"The reason-code overrides to add to the rule. Each combination of `reasonCodeId` and `parentAccountType` can appear only once on a rule."},"updateReasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the override you want to change. Format: UUID. See `reasonCodeOverrides[].id` on GET inventory/account-determination-rules/:id (getAccountDeterminationRule)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the rule's accounts can be overridden."}},"additionalProperties":false,"required":["id"]},"description":"The reason-code overrides to change. Each item names an existing override by its `id` and can change its `accountId` or `parentAccountType`. To change an override's `reasonCodeId`, delete the override and add a new one."},"deleteReasonCodeOverrides":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the reason-code overrides to delete. Format: UUID. Deletions happen before the additions in `createReasonCodeOverrides`, so one request can replace an override with a new one for the same `reasonCodeId` and `parentAccountType`."}},"additionalProperties":false},"searchLandedCostsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost. Format: UUID."},"documentNumber":{"type":"string","description":"The landed cost number, for example 'LC-1007'."},"documentStatus":{"type":"string","description":"The status of the landed cost. Possible values: 'DRAFT', 'COMMITTED'."},"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"entityName":{"type":"string","description":"The name of the legal entity in `entityId`."},"currency":{"type":"string","description":"The currency of every amount on the landed cost, which is the functional currency of its legal entity. Format: ISO 4217, for example 'GBP'."},"notes":{"type":"string","description":"Free text on the landed cost."},"totalChargeAmount":{"type":"string","format":"decimal","description":"The total of the selected charges, in the landed cost's currency."},"receiptCount":{"type":"number","description":"The number of receipts on the landed cost."},"chargeCount":{"type":"number","description":"The number of charges on the landed cost."},"allocationLineCount":{"type":"number","description":"The number of allocation lines on the landed cost."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the landed cost was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the landed cost last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"receiptNumber":{"type":"string","description":"The receipt's number."},"documentDate":{"type":"string","format":"date","description":"The date of the receipt. Format: YYYY-MM-DD."},"documentStatus":{"type":"string","description":"The status of the receipt. See `documentStatus` on GET inventory/receipts/:id (getReceipt)."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the receipt line. Format: UUID. It is the `id` you send in `selectedLineIds`. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"isSelected":{"type":"boolean","description":"Whether the charges are spread over the line."},"itemId":{"type":"string","description":"The unique identifier of the item received on the line. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that received the stock on the receipt line. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure `quantity` is counted in, the receipt line's own unit. Format: UUID. See `lines[].unitId` on GET inventory/receipts/:id (getReceipt)."},"unitCode":{"type":"string","description":"The code of the unit in `unitId`."},"quantity":{"type":"string","format":"decimal","description":"The quantity of stock the receipt line brought in, in the unit in `unitId`. It is the quantity received, not the quantity in stock now."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The quantity of stock the receipt line brought in, in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The price the line was received at, per unit in `unitId`, in the landed cost's currency."},"lineTotal":{"type":"string","format":"decimal","description":"The total for the line, in the landed cost's currency."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the receipt. Every line is included, whether or not the charges are spread over it."}},"additionalProperties":false,"required":["id"]},"description":"The receipts whose stock the charges are spread over, with their lines."},"charges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"vendorBillId":{"type":"string","description":"The unique identifier of the vendor bill the line belongs to. Format: UUID. See `id` on GET accounting/vendor-bills/:id (getVendorBill)."},"vendorBillNumber":{"type":"string","description":"The vendor bill's number."},"itemId":{"type":"string","description":"The unique identifier of the item on the vendor bill line. Format: UUID. Absent when the line has no item. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`. When the vendor bill line has no item, the line's description is used."},"allocationMode":{"type":"string","description":"How this charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the charge this landed cost takes, in the landed cost's currency."},"allocatedAmount":{"type":"string","format":"decimal","description":"The amount of the charge that the commit used (allocated), in the landed cost's currency. After the commit, it equals `amount`. It is absent before the commit, and on charges whose `isSelected` is false."},"isSelected":{"type":"boolean","description":"Whether the charge is spread over the receipt lines. A charge set to false is kept in the landed cost's charges, but the commit does not spread it."}},"additionalProperties":false,"required":["id"]},"description":"The charges of the landed cost. Each charge comes from a line of a vendor bill."},"allocationLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identifier of the allocation line. It is a number sent as a string, not a UUID."},"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"receiptLineId":{"type":"string","description":"The unique identifier of the receipt line. Format: UUID. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."},"itemId":{"type":"string","description":"The unique identifier of the item on the receipt line. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that received the stock on the receipt line. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure `quantity` is counted in, the item's stocking unit. Format: UUID. See `inventoryUnitId` on GET inventory/items/:id (getItem)."},"unitCode":{"type":"string","description":"The code of the unit in `unitId`."},"quantity":{"type":"string","format":"decimal","description":"The quantity received on the receipt line, in the item's stocking unit, the unit in `unitId`."},"currentUnitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item in the warehouse before the charges, in the landed cost's currency, at the time the landed cost was created or last updated. It is the item's average cost, or the receipt line's unit price when there is no average cost. When you commit the landed cost, the commit uses the item's cost at that moment, which can differ from this cost."},"additionalCostAmount":{"type":"string","format":"decimal","description":"This receipt line's share of the charges, in the landed cost's currency. It is the share for the whole line, not for one unit."},"newUnitCost":{"type":"string","format":"decimal","description":"The cost of one unit of the item with the charges, in the landed cost's currency. It is `currentUnitCost` plus this line's share of the charges for one unit. The share for one unit is `additionalCostAmount` divided by `quantity`. The commit can end with a different cost, because it uses the item's cost at the time of the commit."},"revaluationDocuments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the inventory revaluation. Format: UUID. See `id` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation)."},"documentNumber":{"type":"string","description":"The inventory revaluation number."},"documentStatus":{"type":"string","description":"The status of the inventory revaluation."}},"additionalProperties":false,"required":["id"]},"description":"The inventory revaluations that the commit created for this allocation line. It is empty before the commit. It has more than one inventory revaluation when the line's charges have different expense accounts or costing element types."}},"additionalProperties":false,"required":["id"]},"description":"The allocation of the charges over the receipt lines, with one allocation line for each selected receipt line that has an inventory item. It is calculated when the landed cost is created or updated."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The matching landed costs in this response. When more landed costs match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64","documentNumber":"LC-1007","documentStatus":"DRAFT","documentDate":"2026-08-18","entityId":"7039b992-696a-40c7-a181-51759304ef83","entityName":"Flow UK","currency":"GBP","totalChargeAmount":"240","receiptCount":1,"chargeCount":1,"allocationLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","receipts":[{"id":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68","receiptNumber":"REC-2210","documentStatus":"COMMITTED","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","isSelected":true,"itemCode":"WIDGET-01","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"40","unitPrice":"12","lineTotal":"480"}]}],"charges":[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillNumber":"VB-8842","itemCode":"SVC-FREIGHT","allocationMode":"Quantity","amount":"240","isSelected":true}],"allocationLines":[{"id":"41","receiptLineId":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","currentUnitCost":"12","additionalCostAmount":"240","newUnitCost":"18","revaluationDocuments":[]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchLandedCostsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the landed cost with this number, for example 'LC-1007'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to landed costs with this status. Accepted values: 'DRAFT', 'COMMITTED'."},"entityId":{"type":"string","description":"Limits results to landed costs of the legal entity with this unique identifier. Format: UUID. See `id` on GET base/entities (entities)."},"receiptId":{"type":"string","description":"Limits results to landed costs that include the receipt with this unique identifier. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"vendorBillId":{"type":"string","description":"Limits results to landed costs with a charge from the vendor bill with this unique identifier. Format: UUID. See `id` on GET accounting/vendor-bills/:id (getVendorBill)."},"itemId":{"type":"string","description":"Limits results to landed costs with an allocation line for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"fromDate":{"type":"string","format":"date","description":"Limits results to landed costs with a `documentDate` on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to landed costs with a `documentDate` on or before this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to landed costs whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A landed cost must match every filter you send. Send an empty object to return all landed costs.","examples":[{"documentStatus":"DRAFT"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of landed costs per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"batchNumbersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the batch number. Format: UUID.","examples":["7a4e91c3-2b58-4d06-9f31-c85e207a4b19"]},"batchNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The batch number, such as a lot number printed on the goods. It is entered on the receipt, inventory increase, or other document that first recorded the batch's stock. The same batch number can be used for other items and in other warehouses, so it identifies a batch only together with the item and the warehouse.","examples":["LOT-2026-0448"]},"manufacturerBatchNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The manufacturer's batch number."},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item this batch belongs to. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`."},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the warehouse the batch is in. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["f5272ae0-0f0b-47d2-b78a-2158fec2cc32"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-02"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`."},"quantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total quantity received into the batch, in the item's stocking unit. When a receipt, inventory increase, or inventory count creates the batch, it is 0 until the document that brings in the stock is committed. For a batch created by a production order, it does not show the quantity received, so use `inStock` instead. Unlike `inStock`, it does not change when stock leaves the batch or comes back on a sales return. Only canceling a receipt, inventory increase, or warehouse transfer that brought stock into the batch lowers it.","examples":["400"]},"inStock":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity of the batch currently in stock, in the item's stocking unit. It counts all of the batch's stock, whatever its `batchStatus`, so quarantined, expired, and disposed stock are included. To take stock out, create and commit a document that moves it out, such as an inventory decrease.","examples":["260"]},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the batch expires. Format: YYYY-MM-DD.","examples":["2027-03-31"]},"manufactureDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the manufacturer made the batch. Format: YYYY-MM-DD."},"bestBeforeDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The best-before date of the batch. Format: YYYY-MM-DD."},"entryDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the batch's age is counted from. Format: YYYY-MM-DD. When a receipt or inventory increase creates the batch, it is the date entered for the batch on that document, or the document's date when none was entered. When a warehouse transfer creates the batch, it is the `entryDate` of the batch in the sending warehouse. Each later receipt or inventory increase for the batch sets a new date. The age of all the batch's stock is then counted from the new date, including stock received earlier. A warehouse transfer that adds stock to an existing batch does not change the date."},"batchStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the batch. Changing the status does not change the batch's `quantity`, `inStock`, or `cost`. Possible values: 'ACTIVE', 'QUARANTINED', 'EXPIRED', 'DISPOSED'.","examples":["ACTIVE"]},"temperatureBreach":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the batch has been outside its storage temperature range."},"qcStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The quality-control status of the batch, as free text."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the batch is active.","examples":[true]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the batch record was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the batch record last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"deleteItemCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted item category.","examples":["9d61b0af-3c58-4e17-b942-06ea8c73f215"]},"name":{"type":"string","description":"The display name the deleted category held, echoed so you can log the removal without a prior read.","examples":["Pilot programme"]}},"additionalProperties":false,"required":["id","name"]},"readItemCategoryTreeOutput":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item category."},"name":{"type":"string","description":"The display name of the category, for example 'Hardware'. Not unique: two categories can share a name, so use id to address one."},"description":{"type":"string","description":"A free-form description of what the category covers. Absent when none was set."},"parentId":{"type":"string","description":"The identifier of the category this one sits under. Absent for a top-level category. See id on GET inventory/item-categories/:id."},"level":{"type":"number","description":"The depth in the tree: 0 for a top-level category, 1 for its children, and so on, up to 5."},"path":{"type":"array","items":{"type":"string"},"description":"The ancestor names from the root down, ending with this category's own name. A root's path is its own name alone."},"hasChildren":{"type":"boolean","description":"Whether any category sits beneath this one."}},"additionalProperties":false,"required":["id","name","level","path","hasChildren"]},"description":"Every item category, each with its position in the tree, ordered by name.","examples":[[{"id":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","name":"Hardware","description":"Fasteners, fittings and tooling","level":0,"path":["Hardware"],"hasChildren":true},{"id":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8","name":"Servers","parentId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","level":1,"path":["Hardware","Servers"],"hasChildren":true},{"id":"9d61b0af-3c58-4e17-b942-06ea8c73f215","name":"Rack","parentId":"4e08c752-9b1f-4a63-8d20-c5f7134e9ab8","level":2,"path":["Hardware","Servers","Rack"],"hasChildren":false}]]}},"additionalProperties":false,"required":["data"]},"inventoryTransactionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory transaction. Format: UUID.","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the item in `itemId`.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the item in `itemId`.","examples":["Standard widget"]},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"unitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit of measure the inventory transaction was recorded in. Format: UUID. For receipts, shipments, and warehouse transfers, it is the unit on the document line. For inventory increases, inventory decreases, and inventory revaluations, it is the item's stocking unit. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure).","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"unitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the unit of measure in `unitId`.","examples":["EA"]},"unitName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the unit of measure in `unitId`.","examples":["Each"]},"transactionDate":{"type":"string","format":"date","description":"The date the stock came in or went out, or its value changed. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"type":"string","format":"decimal","description":"The quantity that this inventory transaction brought into stock, in the item's stocking unit. It is 0 when the inventory transaction takes stock out or changes only the value of the stock.","examples":["500.00"]},"outQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that this inventory transaction took out of stock, in the item's stocking unit. It is 0 when the inventory transaction brings stock in or changes only the value of the stock.","examples":["0.00"]},"unitInQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that this inventory transaction brought into stock, in the unit of measure named by `unitId`. It can differ from `inQuantity`, which is in the item's stocking unit.","examples":["500.00"]},"unitOutQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The quantity that this inventory transaction took out of stock, in the unit of measure named by `unitId`. It can differ from `outQuantity`, which is in the item's stocking unit."},"unitCost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost of one unit of the item, in the item's stocking unit and in the currency named by `currency`. When stock goes out, it is the item's cost at that time, from its valuation method.","examples":["3.75"]},"totalCost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total cost of the stock that this inventory transaction brought in or took out, in the currency named by `currency`. It is positive whichever way the stock moved, so use `inQuantity` and `outQuantity` to tell the direction. On an inventory revaluation, it is the change in the value of the stock: a positive amount raises the value and a negative amount lowers it.","examples":["1875.00"]},"salesAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total selling price of the stock on the shipment line, in the currency named by `currency`. It is the line's unit price multiplied by the quantity. Only inventory transactions created by shipments have it."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency that `unitCost`, `totalCost`, and `salesAmount` are in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"anyOf":[{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"]},{"type":"null"}],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"sourceDocumentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"isReturn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the inventory transaction comes from a sales return or a purchase return, including the inventory transactions created when a return is canceled.","examples":[false]},"isPriceDiff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the inventory transaction changes only the value of stock, without moving any, such as an inventory revaluation or a landed cost.","examples":[false]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the item, warehouse, or unit of measure do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false},"searchInventoryRevaluationsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation."},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'."},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock."},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'."},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet."},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation."},"lineCount":{"type":"number","description":"How many lines the revaluation has."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation line. Pass it in updateLines or deleteLines on PATCH inventory/inventory-revaluations/:id to change or remove the line."},"itemId":{"type":"string","description":"The unique identifier for the item being revalued. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock this line restates. The same item may be carried at a different cost in each warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates the cost of, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the revaluation's currency. You supply it and the platform checks it rather than deriving it. Read it from GET inventory/inventory-levels."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the revaluation's currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document, in the revaluation's currency. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize, in the revaluation's currency. Moving-average direct cost capitalization only."},"revaluationAmount":{"type":"string","format":"decimal","description":"The value this line moves on the balance sheet, in the revaluation's currency: (newUnitCost - currentUnitCost) x quantity."},"status":{"type":"string","description":"Where the line sits in the platform's own process. This is free text with no fixed set of values."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number."},"batchNumber":{"type":"string","description":"The batch number itself."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number."},"serialNumber":{"type":"string","description":"The serial number itself."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document. Direct cost capitalization on a sold serial only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit, so there must be exactly as many as the quantity says."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the revaluation."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The revaluations on this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4","documentNumber":"REV-1187","documentStatus":"COMMITTED","currency":"EUR","totalRevaluationAmount":"-450","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor to pass as page.cursor for the next page. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryRevaluationsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"The exact document number, for example 'REV-1187'. The match is exact, not a substring."},"documentStatus":{"type":"string","description":"Limits results to revaluations with this status. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'. The match is exact."},"costingValuationType":{"type":"string","description":"Limits results to revaluations of this kind. Possible values: 'revaluation', 'directCostCapitalisation'. The match is exact."},"entityId":{"type":"string","description":"Limits results to revaluations for this legal entity. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to revaluations that have a line for this warehouse. The warehouse is a line field, so the collection endpoint cannot answer this. See id on GET inventory/warehouses/:id."},"itemId":{"type":"string","description":"Limits results to revaluations that have a line for this item. See id on GET inventory/items/:id."},"reasonCodeId":{"type":"string","description":"Limits results to revaluations with this reason code. See id on GET inventory/reason-codes/:id."},"fromDate":{"type":"string","format":"date","description":"The inclusive lower bound on documentDate. Omit for an open-ended start. Use format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"The inclusive upper bound on documentDate. Omit for an open-ended end. Use format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"The inclusive lower bound on lastModifiedDate, the incremental-sync filter, distinct from the documentDate window. Use format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The search criteria, combined with AND. An empty object returns every revaluation, page by page.","examples":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","documentStatus":"COMMITTED"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of revaluations per page. Defaults to 50. The maximum is 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkCreateInventoryIncreasesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase."},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The short code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'."},"notes":{"type":"string","description":"Free text on the inventory increase."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth, and unitPrice is calculated from it as lineValue divided by quantity. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit, when one was recorded. Format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"description":"The created inventory increases, in input order. Match them to inputs by position.","examples":[[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]]}},"additionalProperties":false,"required":["items"]},"bulkCreateInventoryIncreasesInput":{"type":"object","properties":{"increases":{"type":"array","items":{"type":"object","properties":{"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase, and every line is added to it. Required. See id on GET inventory/warehouses/:id."},"entityId":{"type":"string","description":"The unique identifier for the legal entity. Omit it to use the warehouse's owning entity. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. Defaults to today. It sets the posting period. Use format YYYY-MM-DD."},"reasonCodeId":{"type":"string","description":"The unique identifier for a reason code explaining the adjustment. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the inventory increase."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in that unit. Greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency. Greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch, when it already exists. Optional: the number decides the lot. Given, it must be the batch batchNumber names for the item in this warehouse."},"batchNumber":{"type":"string","description":"The batch number as printed. Required. It names the lot within the item and the warehouse, and a number new to both creates the batch record."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the batch."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Use format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch, in the line's unit. The batch quantities of a line must add up to the line's quantity."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches making up this line's quantity. Required for a batch-tracked item, and the quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the unit, when it already exists. Optional: the number decides the unit. Given, it must be the unit serialNumber names for the item in this warehouse."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Required. It names the unit within the item and the warehouse, and a number new to both creates the serial record."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the unit."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit. Use format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency. Defaults to the line's unitPrice."}},"additionalProperties":false},"description":"The serialized units, one entry per unit. Required for a serialized item, and the count must equal the line's quantity."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity lands in. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number not on the line is rejected."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity","unitPrice"]},"description":"The lines of the inventory increase. At least one is required."}},"additionalProperties":false,"required":["locationId","lines"]},"description":"The inventory increases to create. At least one, and each is exactly what POST inventory/inventory-increases takes.","examples":[[{"locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","documentDate":"2026-08-14","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","notes":"August cycle count","lines":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","quantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]]}},"additionalProperties":false,"required":["increases"]},"deleteInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]}},"additionalProperties":false,"required":["id"]},"createReasonCodeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created reason code.","examples":["7a1c9e42-8b30-4d67-9f15-3c8e02a74b61"]}},"additionalProperties":false,"required":["id"]},"createReasonCodeInput":{"type":"object","properties":{"code":{"type":"string","description":"The business code of the reason code, for example 'DAMAGE'. Required. It must be unique within the tenant.","examples":["DAMAGE"]},"description":{"type":"string","description":"A free-form description of what the reason code means. Omit for none.","examples":["Stock damaged in the warehouse"]},"isActive":{"type":"boolean","description":"Whether the reason code can be selected on new documents. Defaults to true. Set it to false to stage a reason code before it goes into use."},"requiresApproval":{"type":"boolean","description":"Whether documents using this reason code require approval before they take effect. Defaults to false.","examples":[true]},"documentTypes":{"type":"array","items":{"enum":["InventoryIncrease","InventoryDecrease","SalesReturn","PurchaseReturn","Disposal"]},"description":"The document types this reason code may be selected on. Required, but may be empty. An empty array creates a reason code that is not yet selectable anywhere. An unrecognized value fails the call with UNKNOWN_DOCUMENT_TYPES, which names every value it did not recognize. Repeated values are collapsed.","examples":[["InventoryDecrease","SalesReturn"]]}},"additionalProperties":false,"required":["code","documentTypes"]},"bulkCreateShipmentCarriersOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created shipment carrier."}},"additionalProperties":false,"required":["id"]},"description":"The created shipment carriers, in the same order as the input.","examples":[[{"id":"5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"},{"id":"b81f4c60-27da-4e15-9f33-6c0a5d82e714"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateShipmentCarriersInput":{"type":"object","properties":{"shipmentCarriers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. It is not checked for uniqueness, within the batch or against existing carriers."},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments. Defaults to true."},"vendorId":{"type":"string","description":"The unique identifier for the vendor this carrier bills through. Omit for a carrier with no vendor. An identifier matching no vendor fails the whole call with VENDOR_NOT_FOUND naming this row's index. See id on GET accounting/vendors/:id."}},"additionalProperties":false,"required":["name"]},"description":"The shipment carriers to create. If any row is invalid, the whole call is rejected and nothing is created.","examples":[[{"name":"DHL Express","vendorId":"d4a71e08-6b95-4f23-b7c1-52e08a936d47"},{"name":"In-house fleet","active":false}]]}},"additionalProperties":false,"required":["shipmentCarriers"]},"deleteReasonCodeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted reason code.","examples":["c30b6f18-4a92-4e05-8d73-1b6f95e2043c"]},"code":{"type":"string","description":"The business code the deleted reason code held.","examples":["RECOUNT"]}},"additionalProperties":false,"required":["id","code"]},"itemsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the item.","examples":["517a93e4-cbb4-4571-9e3d-2343e56cfd84"]},"itemCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The item code, for example 'WIDGET-01'. Unique within the tenant. It is set when the item is created and cannot be changed.","examples":["WIDGET-01"]},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the item.","examples":["Standard widget"]},"externalItemId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your own identifier for this item in an external system."},"brandName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the brand."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the item."},"imageAvatar":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The URL of the item's avatar image. Absent when none is set."},"itemTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item's type. It is set when the item is created and cannot be changed. See id on GET inventory/item-types/:id.","examples":["66aea173-07b8-4c4e-bc4a-5c35dedfdc16"]},"itemTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the item's type.","examples":["Stocked good"]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the item's category. See id on GET inventory/item-categories/:id.","examples":["6709e2bf-d6cf-4800-9ffa-d5a496ec4d0b"]},"categoryName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the item's category.","examples":["Components"]},"inventoryUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit stock is counted in. Every quantity on an inventory level or transaction is in this unit. See id on GET inventory/unit-of-measures/:id.","examples":["77bd4c16-e1f0-426d-a98f-07b063df2d9c"]},"inventoryUnitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the inventory unit.","examples":["EA"]},"salesUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit used on sales documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"salesUnitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the sales unit."},"purchaseUnitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit used on purchase documents. Absent when it is the same as the inventory unit. See id on GET inventory/unit-of-measures/:id."},"purchaseUnitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The code of the purchase unit."},"unitGroupId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier of the unit of measure group that has the conversions between the item's units. See id on GET inventory/unit-of-measure-groups/:id.","examples":["38b5454a-c3fe-452b-9754-61f9ead49e87"]},"unitGroupName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the unit of measure group.","examples":["Each"]},"valuationMethod":{"anyOf":[{"enum":["none","fifo","movingAverage","batch","serials"]},{"type":"null"}],"description":"How the item's stock is valued. Possible values: 'movingAverage', 'batch', 'serials', 'none'. 'none' is for an item that is not stocked. 'fifo' can be returned but cannot be written, because it is under development.","examples":["movingAverage"]},"isBatch":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item is tracked by batch. Receipts and shipments of it name batches.","examples":[false]},"isSerial":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item is tracked by serial number. Receipts and shipments of it name one serial per unit.","examples":[false]},"isInventory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether stock levels are kept for the item. False for a service or charge item.","examples":[true]},"isSalesItem":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item can appear on sales documents.","examples":[true]},"isPurchaseItem":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item can appear on purchase documents.","examples":[true]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item can be selected on new documents. False means it is retired, and historical records keep it.","examples":[true]},"eccnNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The Export Control Classification Number."},"htsCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The Harmonized Tariff Schedule code."},"countryOfOrigin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The country the item originates from."},"minStockLevel":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The stock level below which the item should be reordered, in the inventory unit."},"minimumTransactionQuantity":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The smallest quantity any document can move. Absent when there is no restriction."},"leadTime":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The number of weeks between ordering the item and receiving it."},"weight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The weight of one item, in weightUnit. A landed cost Weight allocation fails rather than falling back when an item on the receipt has none.","examples":["1.4"]},"weightUnit":{"anyOf":[{"enum":["Kg","G","Lbs"]},{"type":"null"}],"description":"The unit weight is expressed in.","examples":["Kg"]},"grossWeight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The weight including packaging, in weightUnit."},"netWeight":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The weight excluding packaging, in weightUnit."},"length":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The length of one item. A landed cost Volume allocation needs length, width and height together, and fails when the set is incomplete."},"width":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The width of one item."},"height":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The height of one item."},"volumePerUnit":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The volume of one item, in volumeUnit."},"volumeUnit":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit volumePerUnit is expressed in. Possible values: 'L'."},"defaultAllocationMode":{"anyOf":[{"enum":["Quantity","LineTotal","Weight","Volume","Equal"]},{"type":"null"}],"description":"The allocation mode a landed cost charge for this item falls back to when it names none."},"isPerishable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the item expires."},"shelfLifeDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days the item keeps from production."},"minShelfLifeDaysOnReceipt":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The least remaining shelf life a receipt of this item will accept."},"minShelfLifeDaysOnDispatch":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The least remaining shelf life a dispatch of this item will accept."},"bestBeforeOffsetDays":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of days between the expiry date and the best-before date printed on it."},"storageTempMin":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The lowest temperature the item can be stored at, in degrees Celsius."},"storageTempMax":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The highest temperature the item can be stored at, in degrees Celsius."},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the item was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the item record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]}},"additionalProperties":false},"bulkCreateLandedCostItemsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created landed cost item. Format: UUID."}},"additionalProperties":false,"required":["id"]},"description":"The created landed cost items, in the order you sent them.","examples":[[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1"},{"id":"5b0e94a7-1c36-4d82-a5f7-38e2c07b9d14"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateLandedCostItemsInput":{"type":"object","properties":{"landedCostItems":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. See `id` on GET inventory/items/:id (getItem)."},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. See `id` on GET accounting/accounts/:id (getAccount)."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type."},"active":{"type":"boolean","description":"Whether the landed cost item is active. Defaults to true."}},"additionalProperties":false,"required":["allocationMode"]},"description":"The landed cost items to create. Each landed cost item needs an `itemId`, an `accountId`, or both.","examples":[[{"itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","allocationMode":"Weight"},{"accountId":"7e21b508-4a93-4c67-b0d5-19f6a3e84c72","allocationMode":"LineTotal"}]]}},"additionalProperties":false,"required":["landedCostItems"]},"bulkDeleteReceiptsOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted receipts, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteReceiptsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the receipts to delete. If any is missing or is not in draft status, none are deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"searchInventoryIncreasesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase."},"documentNumber":{"type":"string","description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned."},"documentStatus":{"type":"string","description":"The status of the inventory increase. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD."},"entityId":{"type":"string","description":"The unique identifier for the legal entity the inventory increase belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The display name of that legal entity."},"locationId":{"type":"string","description":"The unique identifier for the warehouse the stock is added to. One warehouse for the whole inventory increase. Absent only on a document with no lines. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The short code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The short code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"offsetAccountId":{"type":"string","description":"The unique identifier for the account the journal entry posts against instead of the account determination rule's adjustment gain account. Absent on an ordinary inventory increase, which uses the rule's account; only increases created by manufacturing carry one, and it can't be set through this API. See id on GET accounting/accounts/:id."},"offsetKind":{"type":"string","description":"Whether a later document is expected to clear the offset account. Possible values: 'clearing', 'final'. Absent means the same as 'final'."},"currency":{"type":"string","description":"The currency of every amount on the inventory increase. Format ISO 4217, for example 'EUR'."},"notes":{"type":"string","description":"Free text on the inventory increase."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase line."},"itemId":{"type":"string","description":"The unique identifier for the item this line adds to stock. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity added, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory increase's currency."},"lineValue":{"type":"string","format":"decimal","description":"The total value of the line, in the inventory increase's currency, when the line was valued as a whole rather than per unit. When present it is what the line is worth, and unitPrice is calculated from it as lineValue divided by quantity. Absent on a line valued by unitPrice."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record this entry created or matched."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch on the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitCost":{"type":"string","format":"decimal","description":"The cost of one unit of this batch, in the inventory increase's currency."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record this entry created or matched."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the unit, when one was recorded. Format YYYY-MM-DD."},"unitCost":{"type":"string","format":"decimal","description":"The cost of this unit, in the inventory increase's currency."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity landed in. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity landing in this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity lands in, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory increase. An inventory increase always has at least one."}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"description":"The inventory increases on this page, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64","documentNumber":"INC-42","documentStatus":"DRAFT","documentDate":"2026-08-14","entityId":"1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43","entityName":"Acme Netherlands B.V.","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","reasonCodeId":"6f2b58c1-9d47-4e03-a815-70c9d2e46b38","reasonCode":"COUNT","reasonCodeDescription":"Count correction","currency":"EUR","notes":"August cycle count","createdDate":"2026-08-14T09:12:00.000Z","lastModifiedDate":"2026-08-14T09:12:00.000Z","lines":[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"120.00","inventoryQuantity":"120.00","unitPrice":"3.75","notes":"Found during the August count","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"120.00","inventoryQuantity":"120.00","unitCost":"3.75"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"120.00","inventoryQuantity":"120.00","batchNumber":"LOT-2026-08-14"}]}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryIncreasesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the inventory increase with this document number, for example 'INC-42'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to inventory increases with this status. Accepted values: 'DRAFT', 'COMMITTED', 'CANCELLED'. Any other value matches no inventory increase."},"entityId":{"type":"string","description":"Limits results to inventory increases for this legal entity. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to inventory increases at this warehouse. See id on GET inventory/warehouses/:id."},"reasonCodeId":{"type":"string","description":"Limits results to inventory increases with this reason code. See id on GET inventory/reason-codes/:id."},"itemId":{"type":"string","description":"Limits results to inventory increases that have a line for this item. See id on GET inventory/items/:id."},"fromDate":{"type":"string","format":"date","description":"Limits results to inventory increases dated on or after this date. Omit for an open-ended start. Format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to inventory increases dated on or before this date. Omit for an open-ended end. Format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to inventory increases changed on or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The search criteria. An inventory increase must match every criterion you send. Omit to return every inventory increase.","examples":[{"documentStatus":"DRAFT","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of inventory increases per page, between 1 and 200. Defaults to 50. A value above 200 is treated as 200."}},"additionalProperties":false,"description":"The pagination controls. Omit for the first page."}},"additionalProperties":false,"required":["filters"]},"bulkDeleteUnitOfMeasureGroupsOutput":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted unit of measure group."},"name":{"type":"string","description":"The display name the deleted unit of measure group held."}},"additionalProperties":false,"required":["id","name"]},"description":"The deleted unit of measure groups, in the same order as the input. Match entries to inputs by index."}},"additionalProperties":false,"required":["deleted"]},"bulkDeleteUnitOfMeasureGroupsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers for the unit of measure groups to delete. Each must already be empty, with no items pointing at it and no conversion lines left. If any identifier matches nothing or any group is still in use, nothing is deleted and the whole call fails.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"getSerialTransactionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial transaction. Format: UUID.","examples":["b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92"]},"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit this transaction is for. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber).","examples":["7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537"]},"serialNumber":{"type":"string","description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity. Example: 'SN-000412'.","examples":["SN-000412"]},"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number. It shows the unit's current value, not the value at the time of the serial transaction.","examples":["ACME-77-000412"]},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. It shows the unit's current value, not the value at the time of the serial transaction. Format: YYYY-MM-DD.","examples":["2029-05-31"]},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. It is the unit's current `entryDate`, not the date at the time of this serial transaction.","examples":["2026-08-03"]},"isSold":{"type":"boolean","description":"Whether the unit has been sold. It shows the unit's current value, not the value at the time of the serial transaction. A unit that was sold and then returned has the value false.","examples":[true]},"transactionId":{"type":"string","description":"The unique identifier of the inventory transaction this serial transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction).","examples":["3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63"]},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem).","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The code of the item in `itemId`.","examples":["LAPTOP-14"]},"itemName":{"type":"string","description":"The name of the item in `itemId`.","examples":["14-inch laptop"]},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse).","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`.","examples":["WH-01"]},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`.","examples":["Rotterdam Distribution Centre"]},"transactionDate":{"type":"string","format":"date","description":"The date of the inventory transaction this serial transaction belongs to. Format: YYYY-MM-DD.","examples":["2026-08-03"]},"inQuantity":{"type":"string","format":"decimal","description":"The quantity of the unit that came into stock. It is 1 when the unit came in, and 0 when only the unit's cost changed. Absent when the unit went out.","examples":["1.00"]},"outQuantity":{"type":"string","format":"decimal","description":"The quantity of the unit that went out of stock. It is 1 when the unit went out. Absent when the unit came in or only its cost changed."},"cost":{"type":"string","format":"decimal","description":"The cost of the unit, in the currency named by `currency`. When the unit comes in, it is the cost the unit was received at. When the unit goes out, it is the unit's cost at that time. On an inventory revaluation, it is the unit's new cost.","examples":["742.50"]},"currency":{"type":"string","description":"The currency that `cost` is in. Format: ISO 4217, for example 'USD'.","examples":["EUR"]},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from.","examples":["InvPurchaseDeliveryLine"]},"sourceDocumentId":{"type":"string","description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the serial transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the unit itself, such as its `isSold` or `entryDate`, do not update this field.","examples":["2026-08-03T11:15:00.000Z"]}},"additionalProperties":false,"required":["id","serialNumberId"]},"createPurchaseReturnFromPurchaseOrderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created purchase return. Format: UUID.","examples":["6a1f30c9-4d82-4b57-9e60-83c25f0a71b4"]},"documentNumber":{"type":"string","description":"The purchase return number.","examples":["PRTR-1044"]},"documentStatus":{"type":"string","description":"The status of the purchase return. It is always 'DRAFT' on a created purchase return.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD.","examples":["2026-08-22"]},"returnType":{"type":"string","description":"The type of the purchase return. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Possible values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]},"entityId":{"type":"string","description":"The unique identifier of the legal entity the purchase return belongs to. Format: UUID. See `id` on GET base/entities (entities).","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The name of the legal entity the purchase return belongs to."},"businessPartnerId":{"type":"string","description":"The unique identifier of the vendor the goods go back to. Format: UUID. See `id` on GET accounting/vendors/:id (getVendor).","examples":["b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6"]},"businessPartnerName":{"type":"string","description":"The name of the vendor the goods go back to."},"currency":{"type":"string","description":"The currency of the purchase return's amounts. Format: ISO 4217.","examples":["EUR"]},"totalAmount":{"type":"string","format":"decimal","description":"The total value of the purchase return, in its currency. It is the sum, over all lines, of each line's `unitPrice` multiplied by its `quantity`. Absent until the purchase return is shipped."},"notes":{"type":"string","description":"Notes on the purchase return."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. Format: UUID. Use it in `updateLines` and `deleteLines`."},"itemId":{"type":"string","description":"The unique identifier of the item being returned. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item being returned."},"itemName":{"type":"string","description":"The name of the item being returned."},"locationId":{"type":"string","description":"The unique identifier of the warehouse that the stock on this line leaves from. Format: UUID. It is the warehouse that the purchase order line was received into, taken from a committed receipt for that line. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse that the stock on this line leaves from."},"unitId":{"type":"string","description":"The unique identifier of the unit of measure for the line's quantity. Format: UUID. See `id` on GET inventory/unit-of-measures/:id (getUnitOfMeasure)."},"quantity":{"type":"string","format":"decimal","description":"The quantity to return, in the line's unit of measure. It is the quantity received on the purchase order line minus the quantity already returned. For a batch-tracked or serialized item, it is no more than the batches or serialized units that are still available to return."},"unitPrice":{"type":"string","format":"decimal","description":"The price of one unit, in the purchase return's currency. It is the purchase order line's price."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the purchase order line this line returns goods from. Format: UUID. See `lines[].id` on GET accounting/purchase-orders/:id (getPurchaseOrder)."},"sourceDocumentLineType":{"type":"string","description":"The type of line that `sourceDocumentLineId` points to. It is always 'PurchaseOrderLine'."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier of the batch being returned. Format: UUID. See `id` on GET inventory/batch-numbers/:id (getBatchNumber)."},"batchNumber":{"type":"string","description":"The batch number of the batch being returned."},"quantity":{"type":"string","format":"decimal","description":"The quantity of the batch being returned, in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches chosen for this purchase return line. They come from the batches received on the purchase order line that have not been returned yet."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit being returned. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit being returned."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units chosen for this purchase return line. They come from the units received on the purchase order line that have not been returned yet."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the purchase return, one for each purchase order line for an item with a quantity still to return.","examples":[[{"id":"8c14a6f2-3b70-4d59-9e02-6f5a1d38b47c","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","quantity":"30.00","sourceDocumentLineId":"a3e7c915-62d4-4f08-b1a9-7d5c24e8f063","sourceDocumentLineType":"PurchaseOrderLine"}]]},"warnings":{"type":"array","items":{"type":"string"},"description":"Warnings about the purchase return, such as a purchase order line that was left out because it has nothing left to return, or a purchase order that is still pending approval. Empty when there are no warnings.","examples":[[]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","businessPartnerId","lines","warnings"]},"createPurchaseReturnFromPurchaseOrderInput":{"type":"object","properties":{"purchaseOrderId":{"type":"string","description":"The unique identifier of the purchase order to create the purchase return from. Format: UUID. See `id` on GET accounting/purchase-orders/:id (getPurchaseOrder).","examples":["c74b1e08-2a95-4f63-b8d1-6e30f9a25c47"]},"documentDate":{"type":"string","format":"date","description":"The date of the purchase return. Format: YYYY-MM-DD. Defaults to today's date in UTC."},"returnType":{"type":"string","description":"The type of the purchase return. Defaults to 'NORMAL'. 'NORMAL' means the vendor is expected to credit the goods. 'UNCREDITED_REPLACEMENT' means the vendor sends replacement goods, and the quantity can be received again on the purchase order line. 'UNINVOICED_CANCELLATION' means the quantity is canceled from the purchase order before it is invoiced. Shipping an 'UNINVOICED_CANCELLATION' purchase return fails when a line returns more of its purchase order line than is received, not invoiced, and not already canceled. Accepted values: 'NORMAL', 'UNCREDITED_REPLACEMENT', 'UNINVOICED_CANCELLATION'.","examples":["NORMAL"]}},"additionalProperties":false,"required":["purchaseOrderId"]},"warehousesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the warehouse.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. It is unique within the tenant.","examples":["WH-01"]},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'.","examples":["Rotterdam Distribution Centre"]},"inventoryLocationType":{"type":"string","description":"The kind of location. WAREHOUSE is the only value.","examples":["WAREHOUSE"]},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. When false, existing stock and history keep pointing at it and new documents cannot select it.","examples":[true]},"isPrimaryReceiving":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this is the entity's primary receiving warehouse. Open purchase-order on-order quantity for the entity is attributed here for replenishment. At most one warehouse per entity is the primary receiving warehouse.","examples":[true]},"addressLine1":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The first address line: street number and name, or PO box. Absent when unset.","examples":["Waalhaven 12"]},"addressLine2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The second address line: apartment, suite, unit, building or floor. Absent when unset."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The city or locality. Absent when unset.","examples":["Rotterdam"]},"stateProvince":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The state, province or region. Absent when unset."},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The postal or ZIP code. Absent when unset.","examples":["3087 BM"]},"countryCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. Absent when unset.","examples":["NL"]},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-text business region grouping, independent of country and state. Absent when unset.","examples":["Benelux"]},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the legal entity that owns this warehouse. See id on GET base/entities.","examples":["81e8beb1-1415-4012-9012-8138580f43dc"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity that owns this warehouse.","examples":["Acme GmbH"]},"warehouseTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Absent when the warehouse allows every type. There is no endpoint for it."},"warehouseTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the warehouse type. Absent when the warehouse allows every document type."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the warehouse record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"searchTransferOrdersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer order."},"documentNumber":{"type":"string","description":"The transfer order's number, for example 'WTO-1043'."},"documentStatus":{"type":"string","description":"The status of the transfer order, computed from the lines and set by no endpoint directly. Possible values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. 'DRAFT' while the order is being written, 'IN_TRANSFER' while a transfer created from it has yet to commit, 'PARTIALLY_PROCESSED' once a transfer has moved part of what was asked for and a remainder is still open, and 'PROCESSED' once nothing is open."},"documentDate":{"type":"string","format":"date","description":"The date the transfer order is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer order."},"entityId":{"type":"string","description":"The legal entity the transfer order belongs to. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave, where the order names one for the whole document. A line may name its own. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer order."},"openLineCount":{"type":"number","description":"How many lines still have quantity left to transfer. Zero means everything has been taken."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer order was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer order record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line. updateLines and deleteLines address a line by it."},"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The name of that item."},"locationId":{"type":"string","description":"The warehouse this line draws from. See id on GET inventory/warehouses/:id. Absent while no source warehouse has been resolved, and such a line blocks the conversion."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse this line delivers to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"unitId":{"type":"string","description":"The unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Always greater than zero."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit, which is what the warehouse counts."},"openQuantity":{"type":"string","format":"decimal","description":"How much of the line is still to be transferred."},"processedQuantity":{"type":"string","format":"decimal","description":"How much of the line a transfer has already taken."},"status":{"type":"string","description":"The state of the line. 'NEEDS_SOURCE' means no source warehouse has been resolved, and the transfer order cannot be converted until it is."},"notes":{"type":"string","description":"Free text on the line."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the transfer order."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The transfer orders that match, oldest first, each with its lines. An empty array when nothing matches.","examples":[[{"id":"7c1e5a90-3d24-4f68-b0a7-91e5d2c46f38","documentNumber":"WTO-1043","documentStatus":"DRAFT","documentDate":"2026-08-18","lineCount":1,"openLineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z","lines":[{"id":"2d5b81f7-4c93-4a16-8e70-5f1c9d3a82b4","itemCode":"WIDGET-01","quantity":"40","status":"DRAFT"}]}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"Whether more results remain beyond this page."}},"additionalProperties":false,"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchTransferOrdersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"documentNumber":{"type":"string","description":"Limits results to the transfer order with this document number, for example 'WTO-1043'. The match is exact."},"documentStatus":{"type":"string","description":"Limits results to transfer orders in this status. Accepted values: 'DRAFT', 'IN_TRANSFER', 'PARTIALLY_PROCESSED', 'PROCESSED'. Any other value matches no transfer order."},"entityId":{"type":"string","description":"Limits results to transfer orders for this legal entity. See id on GET base/entities."},"locationId":{"type":"string","description":"Limits results to transfer orders with this source warehouse on the header. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"Limits results to transfer orders with this target warehouse on the header. See id on GET inventory/warehouses/:id."},"itemId":{"type":"string","description":"Limits results to transfer orders that have a line for this item. See id on GET inventory/items/:id. The collection GET inventory/warehouse-transfer-orders cannot filter by item, because it does not return the lines."},"referenceNumber":{"type":"string","description":"Limits results to the transfer order with this reference. The match is exact."},"fromDate":{"type":"string","format":"date","description":"Limits results to transfer orders dated on or after this date. Omit for an open-ended start. Format YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to transfer orders dated on or before this date. Omit for an open-ended end. Format YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to transfer orders whose record changed on or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A transfer order must match every filter you send. Omit to return all transfer orders.","examples":[{"documentStatus":"DRAFT","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The number of transfer orders per page. Defaults to 50, capped at 200."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"bulkDeleteWarehouseTransfersOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The ids of the deleted transfers, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteWarehouseTransfersInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The ids of the transfers to delete. All or nothing: if any is missing or not a draft, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"searchLandedCostItemsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the landed cost item. Format: UUID."},"itemId":{"type":"string","description":"The unique identifier of the item this landed cost item covers, such as a freight, handling, or insurance service item. Format: UUID. A vendor bill line for this item counts as a landed cost charge. Absent when the landed cost item covers only an account. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"accountId":{"type":"string","description":"The unique identifier of the general ledger account this landed cost item covers. Format: UUID. A vendor bill line with this expense account counts as a landed cost charge. Absent when the landed cost item covers only an item. See `id` on GET accounting/accounts/:id (getAccount)."},"accountNumber":{"type":"string","description":"The number of the account in `accountId`."},"accountName":{"type":"string","description":"The name of the account in `accountId`."},"allocationMode":{"type":"string","description":"How a charge is spread (allocated) over the receipt lines. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"costingElementTypeId":{"type":"string","description":"The unique identifier of the costing element type for this landed cost item's charges. Format: UUID. A costing element type is a category of inventory cost, such as duties. When a landed cost is committed, its inventory revaluations for these charges get this costing element type. Absent when the landed cost item has none."},"costingElementTypeCode":{"type":"string","description":"The code of the costing element type in `costingElementTypeId`."},"costingElementTypeName":{"type":"string","description":"The name of the costing element type in `costingElementTypeId`."},"active":{"type":"boolean","description":"Whether the landed cost item is active."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the landed cost item was created, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the landed cost item last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id"]},"description":"The matching landed cost items in this response. When more landed cost items match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"9f3c71a4-2e58-4b06-8d19-5a7e0c34b2f1","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Weight","costingElementTypeId":"c4a90e21-7b35-4d18-9e02-6f13a85c7d40","costingElementTypeCode":"FRT","costingElementTypeName":"Freight","active":true,"createdDate":"2026-08-01T11:02:19.880Z","lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchLandedCostItemsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"itemId":{"type":"string","description":"Limits results to landed cost items for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"accountId":{"type":"string","description":"Limits results to landed cost items for the general ledger account with this unique identifier. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"allocationMode":{"type":"string","description":"Limits results to landed cost items with this allocation mode. Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"costingElementTypeId":{"type":"string","description":"Limits results to landed cost items for the costing element type with this unique identifier. Format: UUID."},"active":{"type":"boolean","description":"Limits results to active landed cost items when true, and to inactive landed cost items when false."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to landed cost items whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A landed cost item must match every filter you send. Send an empty object to return all landed cost items.","examples":[{"allocationMode":"Weight","active":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of landed cost items per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"getInventoryRevaluationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation.","examples":["8e4b17c0-5d92-4a63-b0f7-1c8e35a029d4"]},"documentNumber":{"type":"string","description":"The revaluation's document number, for example 'REV-1187'.","examples":["REV-1187"]},"documentStatus":{"type":"string","description":"The status of the revaluation. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the revaluation is dated. Format YYYY-MM-DD.","examples":["2026-08-18"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity whose books this moves. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"costingValuationType":{"type":"string","description":"How the value change is recorded. Possible values: 'revaluation', 'directCostCapitalisation'. 'revaluation' restates the cost outright, and 'directCostCapitalisation' adds a cost that was expensed elsewhere onto the stock.","examples":["revaluation"]},"capitalisationExpenseAccountId":{"type":"string","description":"The unique identifier for the general ledger account a direct cost capitalization takes the expense off. Absent on an ordinary revaluation. See id on GET accounting/chart-of-accounts/:id."},"costingElementTypeId":{"type":"string","description":"The unique identifier for the costing element type the cost breakdown rows are recorded against. Required to commit.","examples":["f2a58c31-9d47-4e06-8b25-3c7f1a94e5d8"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id."},"reasonCode":{"type":"string","description":"The code of that reason code."},"reasonCodeDescription":{"type":"string","description":"The description of that reason code."},"currency":{"type":"string","description":"The currency of every amount on the revaluation, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"totalRevaluationAmount":{"type":"string","format":"decimal","description":"The sum of every line's revaluationAmount, in the revaluation's currency. This is what the document moves on the balance sheet.","examples":["-450"]},"active":{"type":"boolean","description":"Whether the document is active."},"notes":{"type":"string","description":"Free text on the revaluation."},"lineCount":{"type":"number","description":"How many lines the revaluation has.","examples":[1]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the revaluation was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the revaluation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-18T09:14:22.517Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the revaluation line. Pass it in updateLines or deleteLines on PATCH inventory/inventory-revaluations/:id to change or remove the line."},"itemId":{"type":"string","description":"The unique identifier for the item being revalued. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"locationId":{"type":"string","description":"The unique identifier for the warehouse whose stock this line restates. The same item may be carried at a different cost in each warehouse. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The display name of that warehouse."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The code of that unit."},"quantity":{"type":"string","format":"decimal","description":"How much stock this line restates the cost of, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same amount in the item's stocking unit."},"currentUnitCost":{"type":"string","format":"decimal","description":"What the stock is carried at today, in the revaluation's currency. You supply it and the platform checks it rather than deriving it. Read it from GET inventory/inventory-levels."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at after this posts, in the revaluation's currency."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The accrued after-sale cost before this document, in the revaluation's currency. Moving-average direct cost capitalization only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize, in the revaluation's currency. Moving-average direct cost capitalization only."},"revaluationAmount":{"type":"string","format":"decimal","description":"The value this line moves on the balance sheet, in the revaluation's currency: (newUnitCost - currentUnitCost) x quantity."},"status":{"type":"string","description":"Where the line sits in the platform's own process. This is free text with no fixed set of values."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch number."},"batchNumber":{"type":"string","description":"The batch number itself."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this batch is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."}},"additionalProperties":false},"description":"The batches being restated. Their quantities must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial number."},"serialNumber":{"type":"string","description":"The serial number itself."},"currentUnitCost":{"type":"string","format":"decimal","description":"What this unit is carried at today, in the revaluation's currency."},"newUnitCost":{"type":"string","format":"decimal","description":"What it should be carried at."},"previousAfterSaleCost":{"type":"string","format":"decimal","description":"The unit's accrued after-sale cost before this document. Direct cost capitalization on a sold serial only."},"newAfterSaleCost":{"type":"string","format":"decimal","description":"The after-sale cost to capitalize on it."}},"additionalProperties":false},"description":"The serialized units being restated, one entry per unit, so there must be exactly as many as the quantity says."}},"additionalProperties":false,"required":["id"]},"description":"The lines of the revaluation. Absent from the collection endpoint, which publishes lineCount instead.","examples":[[{"id":"6c2f9a41-7b58-4d30-91e6-4a0d8c25f3b7","itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","itemCode":"WIDGET-01","locationCode":"WH-CENTRAL","unitCode":"EA","quantity":"150","currentUnitCost":"12","newUnitCost":"9","revaluationAmount":"-450"}]]}},"additionalProperties":false,"required":["id","documentStatus"]},"deleteInventoryIncreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the deleted inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]}},"additionalProperties":false,"required":["id"]},"getAvailableChargesOutput":{"type":"object","properties":{"charges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the vendor bill line. Format: UUID. Send it as `chargeId` when you create or update a landed cost."},"vendorBillId":{"type":"string","description":"The unique identifier of the vendor bill the line belongs to. Format: UUID. See `id` on GET accounting/vendor-bills/:id (getVendorBill)."},"vendorBillNumber":{"type":"string","description":"The vendor bill's number."},"description":{"type":"string","description":"The description of the vendor bill line, for example 'Sea freight, Shanghai to Felixstowe'."},"poNumber":{"type":"string","description":"The number of the purchase order the vendor bill line is matched to. Absent when the line is not matched to a purchase order."},"billStatus":{"type":"string","description":"The status of the vendor bill. It is always 'approved'."},"billDate":{"type":"string","format":"date","description":"The date of the vendor bill. Format: YYYY-MM-DD. When the bill is in another `currency`, `functionalLineTotal` is converted to the legal entity's functional currency at the exchange rate on this date."},"dueDate":{"type":"string","format":"date","description":"The due date of the vendor bill. Format: YYYY-MM-DD."},"vendorName":{"type":"string","description":"The name of the vendor on the vendor bill."},"entityId":{"type":"string","description":"The unique identifier of the legal entity the vendor bill belongs to. Format: UUID. See `id` on GET base/entities (entities)."},"itemId":{"type":"string","description":"The unique identifier of the item on the vendor bill line. Format: UUID. Absent when the line has no item. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`. When the vendor bill line has no item, the line's description is used."},"allocationMode":{"type":"string","description":"The allocation mode of the landed cost item that the vendor bill line matches. To use it, send it as the charge's `allocationMode` when you create or update a landed cost. When the line's item matches one landed cost item and the line's general ledger account matches another, the mode of the item match is used. Possible values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"lineTotal":{"type":"string","format":"decimal","description":"The line's total, in the vendor bill's currency."},"allocatedAmount":{"type":"string","format":"decimal","description":"The amount of the line's total that committed landed costs have already used (allocated), in the vendor bill's currency."},"currency":{"type":"string","description":"The currency of the vendor bill. Format: ISO 4217, for example 'GBP'. It can differ from `functionalCurrency`."},"functionalLineTotal":{"type":"string","format":"decimal","description":"The total of the vendor bill line in the functional currency of the legal entity, converted at the exchange rate on `billDate`."},"functionalAllocatedAmount":{"type":"string","format":"decimal","description":"The amount of the line's total that committed landed costs have already used (allocated), in the functional currency of the legal entity."},"functionalCurrency":{"type":"string","description":"The functional currency of the legal entity. Format: ISO 4217, for example 'GBP'."}},"additionalProperties":false,"required":["id"]},"description":"The vendor bill lines you can add to a landed cost, newest bill date first. An empty array when there are none.","examples":[[{"id":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","vendorBillId":"e0b41f76-38c9-4d52-9a1e-7c5b02d6a834","vendorBillNumber":"VB-8842","description":"Sea freight, Shanghai to Felixstowe","poNumber":"PO-4471","billStatus":"approved","billDate":"2026-08-10","vendorName":"Meridian Logistics","entityId":"7039b992-696a-40c7-a181-51759304ef83","itemId":"3d81e07c-95a2-4f63-b1c8-27e5a94d0b36","itemCode":"SVC-FREIGHT","itemName":"Inbound freight","allocationMode":"Quantity","lineTotal":"300","allocatedAmount":"60","currency":"GBP","functionalLineTotal":"300","functionalAllocatedAmount":"60","functionalCurrency":"GBP"}]]}},"additionalProperties":false,"required":["charges"]},"getAccountDeterminationRuleOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the rule. Format: UUID.","examples":["8d3f1a60-4c27-4e95-b013-6f2a89d47c5e"]},"ruleName":{"type":"string","description":"The name of the rule. It does not have to be unique.","examples":["Finished goods — receipts"]},"priority":{"type":"number","description":"The priority of the rule. When two matching rules are equally specific, the one with the lower number is used. A rule with no `priority` counts as 0.","examples":[10]},"isActive":{"type":"boolean","description":"Whether the rule is active.","examples":[true]},"matching":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity this rule belongs to. Format: UUID. The rule applies only to inventory documents of this legal entity. See `id` on GET base/entities (entities)."},"bookId":{"type":"string","description":"The unique identifier of the accounting book this rule applies to. Format: UUID. Absent only on some rules created before a book was required. Set a book on such a rule with PATCH inventory/account-determination-rules/:id (updateAccountDeterminationRule). See `id` on GET accounting/books/:id (getBook)."},"itemTypeId":{"type":"string","description":"The unique identifier of the item type this rule applies to. Format: UUID. See `id` on GET inventory/item-types/:id (getItemType)."},"itemCategoryId":{"type":"string","description":"The unique identifier of the item category this rule applies to. Format: UUID. The rule also matches items in child categories of this category. See `id` on GET inventory/item-categories/:id (getItemCategory)."},"locationId":{"type":"string","description":"The unique identifier of the warehouse location this rule applies to. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"inventoryLocationType":{"type":"string","description":"The type of location this rule is meant for, such as a warehouse or a store. It is for reference only and does not affect which rule is used."},"transactionTypeContext":{"enum":["RECEIPT","SHIPMENT","SALES_RETURN","SALES_INVOICE","SALES_CREDIT_MEMO","PURCHASE_RETURN","PURCHASE_INVOICE","PURCHASE_CREDIT_MEMO","INVENTORY_INCREASE","INVENTORY_DECREASE","INVENTORY_REVALUATION","WAREHOUSE_TRANSFER","INTERCOMPANY_TRANSFER","DEFAULT"],"description":"The type of transaction this rule applies to, such as 'RECEIPT' or 'SHIPMENT'. 'DEFAULT' means every transaction type. A rule stored with no transaction type is returned as 'DEFAULT'. Some journal entries use a different type from their document. For example, a purchase return looks up its goods-returned-not-credited account as 'RECEIPT'. Transfers use 'WAREHOUSE_TRANSFER' or 'INTERCOMPANY_TRANSFER'. 'SALES_INVOICE', 'SALES_CREDIT_MEMO', and 'PURCHASE_INVOICE' are accepted, but no journal entry uses them."}},"additionalProperties":false,"required":["entityId"],"description":"The dimensions this rule applies to. When the item type, item category, location, or transaction type is absent, the rule applies to every value of it.","examples":[{"entityId":"81e8beb1-1415-4012-9012-8138580f43dc","bookId":"b7c19e04-3f52-4a86-9d13-5e8f2a6c0b47","itemCategoryId":"a2f47b91-0c6d-4e38-95b1-7d3e6a428c50","transactionTypeContext":"RECEIPT"}]},"accounts":{"type":"object","properties":{"inventoryAssetAccountId":{"type":"string","description":"The unique identifier of the balance sheet account for inventory value. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"cogsClearingAccountId":{"type":"string","description":"The unique identifier of the cost of goods sold clearing account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"deferredCogsAccountId":{"type":"string","description":"The unique identifier of the deferred cost of goods sold account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesRevenueAccountId":{"type":"string","description":"Deprecated: no journal entry or preview reads this account; it is kept so existing v1 callers keep working. The unique identifier of the sales revenue account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"salesReturnAccountId":{"type":"string","description":"The unique identifier of the sales return account. Format: UUID. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"salesStockInTransitAccountId":{"type":"string","description":"The unique identifier of the sales stock-in-transit account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"grniClearingAccountId":{"type":"string","description":"The unique identifier of the goods-received-not-invoiced clearing account, for inventory items. Format: UUID. A receipt uses it to hold the value of goods received until the vendor bill arrives. See `id` on GET accounting/accounts/:id (getAccount)."},"grncClearingAccountId":{"type":"string","description":"The unique identifier of the goods-returned-not-credited clearing account. Format: UUID. A purchase return uses it to hold the value of goods returned to a vendor until the vendor's credit arrives. Set it on a rule for 'RECEIPT', not 'PURCHASE_RETURN', because purchase returns look it up with 'RECEIPT'. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"servicesReceivedNotInvoicedAccountId":{"type":"string","description":"The unique identifier of the clearing account for services received but not yet invoiced, and for non-inventory items. Format: UUID. A receipt uses it to hold the value of services and non-inventory items received until the vendor bill arrives. For a receipt line with no item, it comes from the general rule for the legal entity and accounting book. If there are several general rules, the one with the lowest priority number is used, whatever its transaction type. See `id` on GET accounting/accounts/:id (getAccount)."},"expenseAccountId":{"type":"string","description":"The unique identifier of the expense account for non-inventory items. Format: UUID. An account on a receipt line for a service or expense replaces it for that line. See `id` on GET accounting/accounts/:id (getAccount)."},"purchasePriceVarianceAccountId":{"type":"string","description":"The unique identifier of the purchase price variance account, under standard costing. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentGainAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock added by an inventory increase, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory increase created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryAdjustmentLossAccountId":{"type":"string","description":"The unique identifier of the account for the value of stock removed by an inventory decrease, including one created from an inventory count. Format: UUID. Two things can replace it: a reason-code override in `reasonCodeOverrides`, or an offset account on an inventory decrease created by manufacturing. When both apply, the offset account is used. See `id` on GET accounting/accounts/:id (getAccount)."},"inventoryVarianceAccountId":{"type":"string","description":"The unique identifier of the inventory variance account. Format: UUID. It takes the difference between a document's own cost and the item's current cost when committed stock leaves again after its cost has moved. Three postings resolve it: a receipt cancellation, through rules for 'RECEIPT'; and, through rules for 'INTERCOMPANY_TRANSFER', an intercompany warehouse transfer cancellation (the receiving entity's stock leaves at its current cost) and an intercompany return (the returning entity's stock leaves at its current cost). It is looked up only when such a difference exists; if the matching rule then has no account, the posting fails with a missing-account error. See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationGainAccountId":{"type":"string","description":"The unique identifier of the account for gains from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"revaluationLossAccountId":{"type":"string","description":"The unique identifier of the account for losses from inventory revaluation. Format: UUID. When an inventory revaluation's `costingValuationType` is 'directCostCapitalisation', its `capitalisationExpenseAccountId` replaces it. See `costingValuationType` on GET inventory/inventory-revaluations/:id (getInventoryRevaluation). See `id` on GET accounting/accounts/:id (getAccount)."},"soldQuantitiesRevaluationAccountId":{"type":"string","description":"The unique identifier of the account for the revaluation of quantities already sold. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceGainAccountId":{"type":"string","description":"The unique identifier of the account for gains on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth more than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"purchaseReturnVarianceLossAccountId":{"type":"string","description":"The unique identifier of the account for losses on purchase returns. Format: UUID. A purchase return uses it when the goods returned are worth less than their original cost. A reason-code override in `reasonCodeOverrides` can replace it. See `id` on GET accounting/accounts/:id (getAccount)."},"fxRateDiffAccountId":{"type":"string","description":"The unique identifier of the account for exchange rate differences between the receipt and the vendor bill. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."}},"additionalProperties":false,"description":"The general ledger accounts that journal entries use when this rule matches. Only the accounts set on the rule are included in the response.","examples":[{"inventoryAssetAccountId":"1c9e4b07-52da-4f38-9016-3b7e05c2a94f","grniClearingAccountId":"4f0b7d29-6e13-4a85-b2c7-90d1f83e6a52"}]},"reasonCodeOverrides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the override. Format: UUID."},"reasonCodeId":{"type":"string","description":"The unique identifier of the reason code that triggers this override. Format: UUID. See `id` on GET inventory/reason-codes/:id (getReasonCode)."},"accountId":{"type":"string","description":"The unique identifier of the account the journal entry uses instead of the rule's account. Format: UUID. See `id` on GET accounting/accounts/:id (getAccount)."},"parentAccountType":{"enum":["inventoryAdjustmentGainAccount","inventoryAdjustmentLossAccount","salesReturnAccount","purchaseReturnVarianceGainAccount","purchaseReturnVarianceLossAccount","grncClearingAccount"],"description":"Which rule account this override replaces. Only six of the rule's accounts can be overridden."}},"additionalProperties":false,"required":["id","reasonCodeId","accountId","parentAccountType"]},"description":"The rule's reason-code overrides. When a document line has one of these reason codes, the override's account replaces the rule account named by `parentAccountType`. An inventory increase or decrease created by manufacturing that has its own offset account (`offsetAccountId` on GET inventory/inventory-increases/:id and GET inventory/inventory-decreases/:id) uses that account instead of an override. An empty array when the rule has none.","examples":[[]]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the rule last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Requests that change only the reason-code overrides do not update this field.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","ruleName","matching","accounts","reasonCodeOverrides"]},"bulkDeleteInventoryDecreasesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the deleted inventory decreases, in input order."}},"additionalProperties":false,"required":["ids"]},"bulkDeleteInventoryDecreasesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the inventory decreases to delete. All or nothing: if any is missing or committed, none is deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]}},"additionalProperties":false,"required":["ids"]},"bulkCreateWarehouseTransfersOutput":{"type":"object","properties":{"warehouseTransfers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transfer."},"documentNumber":{"type":"string","description":"The transfer's number, for example 'WTR-2291'."},"documentStatus":{"type":"string","description":"The status of the transfer. Possible values: 'DRAFT', 'COMMITTED', 'CANCELLED'."},"documentDate":{"type":"string","format":"date","description":"The date the transfer is dated. Format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"transferType":{"type":"string","description":"The type of transfer. Possible values: 'NORMAL', 'INTERCOMPANY', 'INTERCOMPANY_RETURN'. An intercompany transfer sells the goods to another legal entity and can be billed."},"entityId":{"type":"string","description":"The legal entity the goods leave. See id on GET base/entities."},"entityName":{"type":"string","description":"The name of that legal entity."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods, on an intercompany transfer. See id on GET base/entities."},"toEntityName":{"type":"string","description":"The name of that legal entity."},"locationId":{"type":"string","description":"The warehouse the goods leave. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The code of that warehouse."},"locationName":{"type":"string","description":"The name of that warehouse."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. See id on GET inventory/warehouses/:id."},"targetLocationCode":{"type":"string","description":"The code of that warehouse."},"targetLocationName":{"type":"string","description":"The name of that warehouse."},"billingStatus":{"type":"string","description":"The billing status of the transfer. Possible values: 'NOT_BILLED', 'BILLED'. Only an intercompany transfer is billed, through POST inventory/warehouse-transfers/:id/bill."},"intercompanyBillId":{"type":"string","description":"The numeric id of the intercompany bill this transfer created, not a UUID. It does not match id on GET accounting/intercompany-bills/:id."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"currency":{"type":"string","description":"The currency sourceAmount is stated in, the source entity's functional currency. Format ISO 4217, for example 'EUR'."},"sourceAmount":{"type":"string","format":"decimal","description":"What the goods were worth leaving the source entity, in currency. Written by the commit."},"destinationCurrency":{"type":"string","description":"The currency destinationAmount is stated in, the destination entity's functional currency. Format ISO 4217, for example 'GBP'. Differs from currency on an intercompany transfer between entities with different functional currencies."},"destinationAmount":{"type":"string","format":"decimal","description":"What the goods were worth arriving at the destination entity, in destinationCurrency. Written by the commit. On an intercompany transfer it differs from sourceAmount; when both share a currency, the difference is the margin."},"notes":{"type":"string","description":"Free text on the document."},"lineCount":{"type":"number","description":"The number of lines on the transfer."},"createdDate":{"type":"string","format":"date-time","description":"The date and time the transfer was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the transfer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","documentStatus"]},"description":"The created transfers, in input order. Headers only. Read one in full on GET inventory/warehouse-transfers/:id.","examples":[[{"id":"c41f9a08-6b23-4e57-90d8-2f7a5c31e0b6","documentNumber":"WTR-2291","documentStatus":"DRAFT","lineCount":1,"lastModifiedDate":"2026-08-18T09:14:22.517Z"}]]}},"additionalProperties":false,"required":["warehouseTransfers"]},"bulkCreateWarehouseTransfersInput":{"type":"object","properties":{"warehouseTransfers":{"type":"array","items":{"type":"object","properties":{"locationId":{"type":"string","description":"The warehouse the goods leave, applied to every line. See id on GET inventory/warehouses/:id."},"targetLocationId":{"type":"string","description":"The warehouse the goods go to. It must differ from locationId. See id on GET inventory/warehouses/:id."},"entityId":{"type":"string","description":"The legal entity. Defaults to the entity that owns the source warehouse. See id on GET base/entities."},"documentDate":{"type":"string","format":"date","description":"The date to give the transfer. Defaults to today. Use format YYYY-MM-DD."},"referenceNumber":{"type":"string","description":"Your own reference on the transfer."},"notes":{"type":"string","description":"Free text on the document."},"transferType":{"type":"string","description":"The type of transfer to create. Accepted values: 'NORMAL', 'INTERCOMPANY'. Defaults to 'NORMAL'. 'INTERCOMPANY_RETURN' is created by the intercompany return flow, not here."},"toEntityId":{"type":"string","description":"The legal entity receiving the goods. Required when transferType is 'INTERCOMPANY'. See id on GET base/entities."},"contractualCurrency":{"type":"string","description":"The currency an intercompany transfer is contracted in. Required when transferType is 'INTERCOMPANY'. Format ISO 4217, for example 'EUR'. Each line's unitTransferValue is stated in it."},"lines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The item to move. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unit the quantity is in. Defaults to the item's inventory unit; an item without one needs it, or the call is refused with WAREHOUSE_TRANSFER_LINE_UNIT_REQUIRED. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"How much to move, in the line's unit. Must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"unitTransferValue":{"type":"string","format":"decimal","description":"The contractual price of one unit, in the transfer's contractual currency. Required on an intercompany transfer. The two entities agree the price, and the API cannot derive it from a cost."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the warehouse the goods leave. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"How much of the line this batch accounts for."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches that make up the line's quantity. Required for a batch-tracked item, and they must add up to the line's quantity."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the warehouse the goods leave. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The serialized units that move. Required for a serialized item, one entry per unit."},"binLocations":{"type":"array","items":{"type":"object","properties":{"fromBinLocationId":{"type":"string","description":"The bin the goods leave, in the source warehouse. See id on GET inventory/bins/:id."},"toBinLocationId":{"type":"string","description":"The bin the goods arrive in, in the target warehouse. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"How much moves between these two bins."},"batchNumber":{"type":"string","description":"The batch this entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this entry belongs to, when it belongs to one of the line's serials."}},"additionalProperties":false,"required":["quantity"]},"description":"The bins the goods leave and arrive in. Each entry names both ends of the move, and the batch or serial it belongs to where it belongs to one. Leave both names off for a quantity that moves at line level."}},"additionalProperties":false,"required":["itemId","quantity"]},"description":"The lines of the transfer. At least one is required."}},"additionalProperties":false,"required":["locationId","targetLocationId","lines"]},"description":"The transfers to create. All or nothing: if any is rejected, none is created.","examples":[[{"locationId":"b6f0d2a4-77c1-4e39-8a52-0c4e1f9b73d5","targetLocationId":"e94a17c3-5b28-4d60-91f7-3a8c2e05b6d1","lines":[{"itemId":"517a93e4-cbb4-4571-9e3d-2343e56cfd84","quantity":"24"}]}]]}},"additionalProperties":false,"required":["warehouseTransfers"]},"searchInventoryLevelsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory level."},"itemId":{"type":"string","description":"The unique identifier for the item this level is for. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The item's short code."},"itemName":{"type":"string","description":"The item's name."},"locationId":{"type":"string","description":"The unique identifier for the location this level is at. See id on GET inventory/warehouses/:id."},"locationCode":{"type":"string","description":"The location's short code."},"locationName":{"type":"string","description":"The location's name."},"onHandQuantity":{"type":"string","format":"decimal","description":"The total physical quantity on hand at this location, in the item's stocking unit of measure."},"availableQuantity":{"type":"string","format":"decimal","description":"The quantity free to allocate: onHandQuantity minus allocatedQuantity and reservedQuantity."},"allocatedQuantity":{"type":"string","format":"decimal","description":"The quantity allocated to outbound demand."},"reservedQuantity":{"type":"string","format":"decimal","description":"The quantity reserved."},"inTransitQuantity":{"type":"string","format":"decimal","description":"The quantity in transit to this location."},"damagedQuantity":{"type":"string","format":"decimal","description":"The quantity flagged as damaged."},"qualityHoldQuantity":{"type":"string","format":"decimal","description":"The quantity on quality hold."},"averageCost":{"type":"string","format":"decimal","description":"The moving-average unit cost, in the currency given by currency."},"onHandValue":{"type":"string","format":"decimal","description":"The value of the stock on hand, in the currency given by currency."},"currency":{"type":"string","description":"The currency of averageCost and onHandValue. Format ISO 4217, for example 'EUR'. Absent when the level has no valuation yet."},"lastTransactionTimestamp":{"type":"string","format":"date-time","description":"The date and time a stock movement last touched this level. Format YYYY-MM-DDTHH:mm:ss. Unlike lastModifiedDate, it changes only when stock moves."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory-level record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"required":["id","itemId","locationId","availableQuantity"]},"description":"The inventory levels that match, ordered by id. An empty array when nothing matches.","examples":[[{"id":"0b6d4c93-71ea-4f28-9c05-83a1e7f6204d","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","onHandQuantity":"1200.00","availableQuantity":"1150.00","allocatedQuantity":"50.00","averageCost":"3.75","onHandValue":"4500.00","currency":"EUR","lastTransactionTimestamp":"2026-08-03T11:15:00","lastModifiedDate":"2026-08-03T11:15:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as page.cursor. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more matches remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchInventoryLevelsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"itemId":{"type":"string","description":"Limits results to levels for the item with this identifier. An identifier that matches no item returns an empty page. See id on GET inventory/items/:id."},"locationId":{"type":"string","description":"Limits results to levels at the location with this identifier. Combine with itemId to identify at most one level. An identifier that matches no location returns an empty page. See id on GET inventory/warehouses/:id."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to levels with lastModifiedDate at or after this time, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A level must match every filter you send. Omit to return all inventory levels.","examples":[{"itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's pagination.nextCursor. Omit on the first request."},"size":{"type":"number","description":"The maximum number of inventory levels to return. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"Pagination controls. Omit for the first page.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"searchSerialTransactionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the serial transaction. Format: UUID."},"serialNumberId":{"type":"string","description":"The unique identifier of the serialized unit this transaction is for. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"The serial number of the unit, such as the one printed on its label. It is entered on the receipt, inventory increase, or other document that first recorded the unit. The same serial number can be used for other items and in other legal entities, so it identifies a unit only together with the item and the legal entity. Example: 'SN-000412'."},"manufacturerSerialNumber":{"type":"string","description":"The manufacturer's serial number. It shows the unit's current value, not the value at the time of the serial transaction."},"expirationDate":{"type":"string","format":"date","description":"The date the unit expires. It shows the unit's current value, not the value at the time of the serial transaction. Format: YYYY-MM-DD."},"entryDate":{"type":"string","format":"date","description":"The date the unit's age is counted from. Format: YYYY-MM-DD. It is the unit's current `entryDate`, not the date at the time of this serial transaction."},"isSold":{"type":"boolean","description":"Whether the unit has been sold. It shows the unit's current value, not the value at the time of the serial transaction. A unit that was sold and then returned has the value false."},"transactionId":{"type":"string","description":"The unique identifier of the inventory transaction this serial transaction belongs to. Format: UUID. See `id` on GET inventory/inventory-transactions/:id (getInventoryTransaction)."},"itemId":{"type":"string","description":"The unique identifier of the item. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"itemCode":{"type":"string","description":"The code of the item in `itemId`."},"itemName":{"type":"string","description":"The name of the item in `itemId`."},"locationId":{"type":"string","description":"The unique identifier of the warehouse. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"locationCode":{"type":"string","description":"The code of the warehouse in `locationId`."},"locationName":{"type":"string","description":"The name of the warehouse in `locationId`."},"transactionDate":{"type":"string","format":"date","description":"The date of the inventory transaction this serial transaction belongs to. Format: YYYY-MM-DD."},"inQuantity":{"type":"string","format":"decimal","description":"The quantity of the unit that came into stock. It is 1 when the unit came in, and 0 when only the unit's cost changed. Absent when the unit went out."},"outQuantity":{"type":"string","format":"decimal","description":"The quantity of the unit that went out of stock. It is 1 when the unit went out. Absent when the unit came in or only its cost changed."},"cost":{"type":"string","format":"decimal","description":"The cost of the unit, in the currency named by `currency`. When the unit comes in, it is the cost the unit was received at. When the unit goes out, it is the unit's cost at that time. On an inventory revaluation, it is the unit's new cost."},"currency":{"type":"string","description":"The currency that `cost` is in. Format: ISO 4217, for example 'USD'."},"sourceDocumentLineType":{"enum":["IMInventorySalesOrderLine","IMInventorySalesDeliveryLine","IMSalesOrderLine","IMInventoryPurchaseReturnLine","IMInventorySalesReturnLine","IMWarehouseTransferLine","IMInventoryDecreaseLine","IMInventoryIncreaseLine","IMInventoryRevaluationLine","IMInventoryTransferLine","IMInventoryAdjustmentLine","IMInventoryCountLine","IMInventoryPutAwayTask","IMInventoryPurchaseReturnReversal","PurchaseOrderLine","IMLandedCostAllocationLine","SalesOrderProductItem","IMWarehouseTransferOrderLine","VendorBillItemBase","InvPurchaseDeliveryLine"],"description":"The type of document line the inventory transaction came from."},"sourceDocumentId":{"type":"string","description":"The unique identifier of the document the inventory transaction came from. Format: UUID. `sourceDocumentLineType` says which kind of document it is: a receipt for 'InvPurchaseDeliveryLine' (GET inventory/receipts/:id), a shipment for 'IMInventorySalesDeliveryLine' (GET inventory/shipments/:id), a purchase return for 'IMInventoryPurchaseReturnLine' (GET inventory/purchase-returns/:id), a sales return for 'IMInventorySalesReturnLine' (GET inventory/sales-returns/:id), a warehouse transfer for 'IMWarehouseTransferLine' (GET inventory/warehouse-transfers/:id), a warehouse transfer order for 'IMWarehouseTransferOrderLine' (GET inventory/warehouse-transfer-orders/:id), an inventory increase for 'IMInventoryIncreaseLine' (GET inventory/inventory-increases/:id), an inventory decrease for 'IMInventoryDecreaseLine' (GET inventory/inventory-decreases/:id), an inventory count for 'IMInventoryCountLine', an inventory revaluation for 'IMInventoryRevaluationLine' (GET inventory/inventory-revaluations/:id), and, for 'IMInventoryPutAwayTask', the receipt whose stock was put away (GET inventory/receipts/:id). It is empty for every other `sourceDocumentLineType`, and when the document no longer exists."},"sourceDocumentLineId":{"type":"string","description":"The unique identifier of the line, on the document in `sourceDocumentId`, that the inventory transaction came from. Format: UUID. It is the `id` of that line in `lines` on the document's GET route. It is empty whenever `sourceDocumentId` is, and when the line no longer exists."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the serial transaction last changed, in UTC. Format: YYYY-MM-DDTHH:mm:ss.sssZ. Changes to the unit itself, such as its `isSold` or `entryDate`, do not update this field."}},"additionalProperties":false,"required":["id","serialNumberId"]},"description":"The matching serial transactions in this response. When more serial transactions match than fit in one response, use `pagination` to get the rest. Empty when nothing matches.","examples":[[{"id":"b41e7c05-2d68-4f13-9a70-5c8e1b3d0f92","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"3a7c1f95-04eb-4d62-8917-5c0e2b8d4a63","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-03","inQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"InvPurchaseDeliveryLine","lastModifiedDate":"2026-08-03T11:15:00.000Z"},{"id":"c9a2f610-8b34-4e07-a5d1-2f6b93e4c018","serialNumberId":"7e05c3a9-64b1-4d82-b0f7-19a4c8e2b537","serialNumber":"SN-000412","manufacturerSerialNumber":"ACME-77-000412","expirationDate":"2029-05-31","entryDate":"2026-08-03","isSold":true,"transactionId":"8d17b4e2-3c95-4a60-b7f8-01e5d9c26a43","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"LAPTOP-14","itemName":"14-inch laptop","locationId":"e1d84c07-5b39-4a26-9f70-2c8b613ad495","locationCode":"WH-01","locationName":"Rotterdam Distribution Centre","transactionDate":"2026-08-11","outQuantity":"1.00","cost":"742.50","currency":"EUR","sourceDocumentLineType":"IMInventorySalesDeliveryLine","lastModifiedDate":"2026-08-11T09:02:00.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor that marks where this response stopped. To get the next results, send it as `page.cursor` in your next request. Absent when there are no more results."},"hasMore":{"type":"boolean","description":"Whether there are more results than are in this response."}},"additionalProperties":false,"required":["hasMore"],"description":"Whether there are more results than are in this response, and the cursor you use to get the next ones.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"searchSerialTransactionsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"Limits results to serial transactions for the serialized unit with this unique identifier. Format: UUID. See `id` on GET inventory/serial-numbers/:id (getSerialNumber)."},"serialNumber":{"type":"string","description":"Limits results to serial transactions for units with this serial number. The match is exact. Example: 'SN-000412'."},"manufacturerSerialNumber":{"type":"string","description":"Limits results to serial transactions for units with this manufacturer's serial number. The match is exact."},"isSold":{"type":"boolean","description":"Limits results to serial transactions for units that have been sold when true, and for units that have not been sold when false. It uses the unit's current value, not the value at the time of the serial transaction. A unit that was sold and then returned counts as not sold."},"itemId":{"type":"string","description":"Limits results to serial transactions for the item with this unique identifier. Format: UUID. See `id` on GET inventory/items/:id (getItem)."},"locationId":{"type":"string","description":"Limits results to serial transactions for the warehouse with this unique identifier. Format: UUID. See `id` on GET inventory/warehouses/:id (getWarehouse)."},"fromDate":{"type":"string","format":"date","description":"Limits results to serial transactions with a `transactionDate` on or after this date. Format: YYYY-MM-DD."},"toDate":{"type":"string","format":"date","description":"Limits results to serial transactions with a `transactionDate` on or before this date. Format: YYYY-MM-DD."},"modifiedSince":{"type":"string","format":"date-time","description":"Limits results to serial transactions whose `lastModifiedDate` is on or after this time. Format: YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false,"description":"The filters to apply. A serial transaction must match every filter you send. Send an empty object to return all serial transactions.","examples":[{"serialNumber":"SN-000412"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"The cursor from the previous response's `pagination.nextCursor`. Send it exactly as you received it. Omit on the first request."},"size":{"type":"number","description":"The number of serial transactions per page, from 1 to 200. Defaults to 50. A value above 200 is treated as 200, not rejected."}},"additionalProperties":false,"description":"The page to return and its size. Omit to get the first page at the default size."}},"additionalProperties":false,"required":["filters"]},"bulkCreateWarehousesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created warehouse."}},"additionalProperties":false,"required":["id"]},"description":"The created warehouses, in the same order as the input. Match entries to inputs by index.","examples":[[{"id":"e1d84c07-5b39-4a26-9f70-2c8b613ad495"},{"id":"b5390f6a-1c72-4e84-9a03-8f2d61c74e59"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateWarehousesInput":{"type":"object","properties":{"warehouses":{"type":"array","items":{"type":"object","properties":{"locationCode":{"type":"string","description":"The location code of the warehouse, for example 'WH-01'. Required. It must be unique within the tenant and within this request."},"name":{"type":"string","description":"The site name of the warehouse, for example 'Rotterdam Distribution Center'. Required."},"entityId":{"type":"string","description":"The unique identifier for the legal entity that owns this warehouse. Required. An unknown identifier fails the whole call with ENTITY_NOT_FOUND, which names this entry's index. See id on GET base/entities."},"inventoryLocationType":{"enum":["WAREHOUSE","STORE","VIRTUAL_QC","VIRTUAL_RECEIVING","VIRTUAL_SHIPPING","EXTERNAL_3PL","EXTERNAL_CONSIGNMENT"],"description":"The kind of location. Required. WAREHOUSE is the only value accepted; the other values are kept for compatibility with existing integrations and are refused. Use API version v2, which declares WAREHOUSE only."},"isActive":{"type":"boolean","description":"Whether the warehouse can be selected on new inventory documents. Defaults to true."},"isPrimaryReceiving":{"type":"boolean","description":"Whether this is the entity's primary receiving warehouse. Defaults to false. At most one warehouse per entity is meant to be the primary receiving warehouse. It is not enforced, and a request setting it on several is accepted."},"warehouseTypeId":{"type":"string","description":"The unique identifier for the warehouse type, which limits the document types the warehouse allows. Omit to allow every document type. There is no endpoint for it."},"addressLine1":{"type":"string","description":"The first address line: street number and name, or PO box."},"addressLine2":{"type":"string","description":"The second address line: apartment, suite, unit, building or floor."},"city":{"type":"string","description":"The city or locality."},"stateProvince":{"type":"string","description":"The state, province or region."},"postalCode":{"type":"string","description":"The postal or ZIP code."},"countryCode":{"type":"string","description":"The country of the address. Format ISO 3166-1 alpha-2, for example 'NL'. It is not validated against the ISO list."},"region":{"type":"string","description":"A free-text business region grouping, independent of country and state."}},"additionalProperties":false,"required":["locationCode","name","entityId","inventoryLocationType"]},"description":"The warehouses to create. If any entry is invalid, nothing is created and the whole call fails.","examples":[[{"locationCode":"WH-01","name":"Rotterdam Distribution Centre","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","countryCode":"NL"},{"locationCode":"WH-02","name":"Antwerp Overflow","entityId":"3f9c1e28-7b45-4d60-a913-5e07c286bd41","inventoryLocationType":"WAREHOUSE","countryCode":"BE"}]]}},"additionalProperties":false,"required":["warehouses"]},"inventoryIncreasesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory increase.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The inventory increase's document number, for example 'INC-42'. Absent while none has been assigned.","examples":["INC-42"]},"documentStatus":{"enum":["DRAFT","COMMITTED","CANCELLED"],"description":"The status of the inventory increase. 'DRAFT' covers every uncommitted inventory increase, including one that has been posted and numbered but not yet committed.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the inventory increase is dated. It sets the posting period. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the warehouse the stock is added to. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code of that warehouse.","examples":["WH-01"]},"locationName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of that warehouse.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the reason code. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The description of that reason code.","examples":["Count correction"]},"offsetAccountId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unique identifier for the account the journal entry posts against instead of the account determination rule's adjustment gain account. Absent on an ordinary inventory increase; only increases created by manufacturing carry one. See id on GET accounting/accounts/:id."},"offsetKind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whether a later document is expected to clear the offset account. Possible values: 'clearing', 'final'. Absent means the same as 'final'."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency the inventory increase is valued in. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"lineCount":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The number of lines the inventory increase has. The collection does not return the lines themselves.","examples":[1]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text on the inventory increase.","examples":["August cycle count"]},"createdDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory increase was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the inventory increase record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]}},"additionalProperties":false},"getShipmentCarrierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the shipment carrier.","examples":["5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"]},"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. Names are not unique, so use id to address one carrier.","examples":["DHL Express"]},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments. Absent on carriers created before the active flag existed.","examples":[true]},"vendorId":{"type":"string","description":"The unique identifier for the vendor this carrier bills through. Absent when the carrier has no vendor. See id on GET accounting/vendors/:id.","examples":["d4a71e08-6b95-4f23-b7c1-52e08a936d47"]},"vendorName":{"type":"string","description":"The name of the vendor this carrier bills through. Absent when the carrier has no vendor. It is resolved from the vendor at read time and is not stored on the carrier.","examples":["DHL International GmbH"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the carrier record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","name"]},"createShipmentCarrierOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created shipment carrier.","examples":["5c2e9a71-3f48-4b02-8d6e-9a1c74b0e332"]}},"additionalProperties":false,"required":["id"]},"createShipmentCarrierInput":{"type":"object","properties":{"name":{"type":"string","description":"The name of the carrier, for example 'DHL Express'. It is not checked for uniqueness.","examples":["DHL Express"]},"active":{"type":"boolean","description":"Whether the carrier can be selected on new shipments. Defaults to true.","examples":[true]},"vendorId":{"type":"string","description":"The unique identifier for the vendor this carrier bills through. Omit for a carrier with no vendor. An identifier matching no vendor fails the call with VENDOR_NOT_FOUND. See id on GET accounting/vendors/:id.","examples":["d4a71e08-6b95-4f23-b7c1-52e08a936d47"]}},"additionalProperties":false,"required":["name"]},"createItemAttributeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the new item attribute.","examples":["9f2c1d77-5b41-4e0a-9a33-8c5d2e61b704"]},"itemId":{"type":"string","description":"The identifier of the item carrying the attribute.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"itemCode":{"type":"string","description":"The item's code, for example 'WIDGET-01'.","examples":["WIDGET-01"]},"attributeId":{"type":"string","description":"The identifier of the attribute definition.","examples":["c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48"]},"attributeName":{"type":"string","description":"The attribute's name, for example 'Colour'.","examples":["Colour"]},"valueId":{"type":"string","description":"The identifier of the chosen value.","examples":["2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03"]},"value":{"type":"string","description":"The chosen value's text, for example 'Red'.","examples":["Red"]}},"additionalProperties":false,"required":["id","itemId","attributeId"]},"createItemAttributeInput":{"type":"object","properties":{"itemId":{"type":"string","description":"The identifier of the item to tag. See id on GET inventory/items/:id.","examples":["5f21c8b0-9d34-4a76-8e12-04b93c7de5a8"]},"attributeId":{"type":"string","description":"The identifier of the attribute definition to assign.","examples":["c7a84f92-1e63-4d55-b0a1-6f7e3b9c2d48"]},"valueId":{"type":"string","description":"The identifier of the value to assign. It must be a value the attribute defines.","examples":["2b6d0e14-8f77-4a91-95c3-1d4e8a7f6b03"]}},"additionalProperties":false,"required":["itemId","attributeId","valueId"]},"updateInventoryDecreaseOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease.","examples":["d4a17f28-6b93-4c50-8e71-2a5d0c9b3e64"]},"documentNumber":{"type":"string","description":"The inventory decrease's document number, for example 'DEC-42'. Absent while none has been assigned.","examples":["DEC-42"]},"documentStatus":{"type":"string","description":"The status of the inventory decrease. Possible values: 'DRAFT' (no number yet), 'OPEN' (posted and numbered, still editable), 'COMMITTED', 'CANCELLED'.","examples":["DRAFT"]},"documentDate":{"type":"string","format":"date","description":"The date the adjustment is dated. It drives the posting period, so it is not the same as when the record was created. Format YYYY-MM-DD.","examples":["2026-08-14"]},"entityId":{"type":"string","description":"The unique identifier for the legal entity the document belongs to. See id on GET base/entities.","examples":["1a9c4e70-38b5-4d26-9f01-7c2e5b8a6d43"]},"entityName":{"type":"string","description":"The display name of that legal entity.","examples":["Acme Netherlands B.V."]},"locationId":{"type":"string","description":"The unique identifier for the warehouse location. One location for the whole document, and every line uses it. Absent only on a document with no lines. See id on GET inventory/warehouses/:id.","examples":["e1d84c07-5b39-4a26-9f70-2c8b613ad495"]},"locationCode":{"type":"string","description":"The short code of that warehouse location.","examples":["WH-01"]},"locationName":{"type":"string","description":"The display name of that warehouse location.","examples":["Rotterdam Distribution Centre"]},"reasonCodeId":{"type":"string","description":"The unique identifier for the reason code, when one was given. See id on GET inventory/reason-codes/:id.","examples":["6f2b58c1-9d47-4e03-a815-70c9d2e46b38"]},"reasonCode":{"type":"string","description":"The short code of that reason code.","examples":["COUNT"]},"reasonCodeDescription":{"type":"string","description":"The description of that reason code.","examples":["Count correction"]},"currency":{"type":"string","description":"The currency the inventory decrease is valued in, the legal entity's functional currency. Format ISO 4217, for example 'EUR'.","examples":["EUR"]},"notes":{"type":"string","description":"Free text on the inventory decrease.","examples":["Forklift damage, aisle 4 — two more found"]},"createdDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:00.000Z"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the inventory decrease record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:40:00.000Z"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the inventory decrease line."},"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"itemCode":{"type":"string","description":"The short code of that item."},"itemName":{"type":"string","description":"The display name of that item."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"unitCode":{"type":"string","description":"The short code of that unit, for example 'BOX'."},"quantity":{"type":"string","format":"decimal","description":"The quantity removed, in the line's unit. A positive number."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency, when one was recorded. Usually absent, since stock leaving is valued at the cost it already has."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch record."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'."},"manufacturerBatchNumber":{"type":"string","description":"The maker's own number for the same batch, when one was recorded."},"expirationDate":{"type":"string","format":"date","description":"The expiration date of the batch. Format YYYY-MM-DD."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch removed by the line, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."}},"additionalProperties":false,"required":["batchNumber","quantity"]},"description":"The batches making up this line's quantity, for a batch-tracked item. Absent when the item is not batch-tracked."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the serial record."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit."},"manufacturerSerialNumber":{"type":"string","description":"The maker's own number for the same unit, when one was recorded."}},"additionalProperties":false,"required":["serialNumber"]},"description":"The serialized units making up this line's quantity, one entry per unit. Absent when the item is not serialized."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin the quantity came out of. See id on GET inventory/bins/:id."},"binLocationCode":{"type":"string","description":"The short code of that bin."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"inventoryQuantity":{"type":"string","format":"decimal","description":"The same quantity in the item's stocking unit."},"batchNumber":{"type":"string","description":"The batch this bin entry belongs to, when it belongs to one of the line's batches."},"serialNumber":{"type":"string","description":"The serialized unit this bin entry belongs to, when it belongs to one of the line's units."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity came out of, in a bin-tracked warehouse. Each entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line."}},"additionalProperties":false,"required":["id","itemId","unitId","quantity"]},"description":"The lines of the inventory decrease. An inventory decrease always has at least one.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","itemId":"5f21c8b0-9d34-4a76-8e12-04b93c7de5a8","itemCode":"WIDGET-01","itemName":"Standard widget","unitId":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","unitCode":"EA","quantity":"14.00","inventoryQuantity":"14.00","notes":"Crushed by a forklift","batches":[{"batchNumberId":"9c31f5a8-6b02-4e79-b354-8d1a67e0f2b9","batchNumber":"LOT-2026-08-14","expirationDate":"2027-08-14","quantity":"14.00","inventoryQuantity":"14.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","binLocationCode":"A-01-02","quantity":"14.00","inventoryQuantity":"14.00","batchNumber":"LOT-2026-08-14"}]}]]}},"additionalProperties":false,"required":["id","documentStatus","documentDate","entityId","lines"]},"updateInventoryDecreaseInput":{"type":"object","properties":{"documentDate":{"type":"string","format":"date","description":"A new document date. Changing it moves the posting period. Use format YYYY-MM-DD."},"reasonCodeId":{"type":"string","description":"A new reason code. See id on GET inventory/reason-codes/:id."},"notes":{"type":"string","description":"Free text on the inventory decrease. Pass an empty string to clear it.","examples":["Forklift damage, aisle 4 — two more found"]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of lines to remove. Applied before updateLines and createLines."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the line to change. A line belonging to another document is rejected, not skipped."},"itemId":{"type":"string","description":"A new item for the line. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"A new unit for the line's quantity. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"A new quantity, in the line's unit. Must be greater than zero when given."},"unitPrice":{"type":"string","format":"decimal","description":"A new value of one unit, in the inventory decrease's currency. Must be greater than zero when given. Omit it to keep valuing the stock at the cost it already has."},"notes":{"type":"string","description":"Free text on the line. Pass an empty string to clear it."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch being removed. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the document's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to remove, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches to take the quantity from. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Every batch named must already exist for the item, since a decrease removes lots and does not create them. On update, this replaces the line's batches."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit being removed. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the document's warehouse. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The units to remove, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Every unit named must already exist. On update, this replaces the line's serials."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the quantity from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number the line does not have is rejected rather than reinterpreted."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity comes out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line. On update, this replaces the line's bin entries."}},"additionalProperties":false,"required":["id"]},"description":"The lines to change, addressed by id. Applied after deleteLines and before createLines.","examples":[[{"id":"9b3f5a10-7c24-4e68-8d05-1f6a92b4c837","quantity":"14.00","batches":[{"batchNumber":"LOT-2026-08-14","quantity":"14.00"}],"binLocations":[{"binLocationId":"0c7e91d3-4a58-4b26-9e10-63f8a2c5d704","quantity":"14.00","batchNumber":"LOT-2026-08-14"}]}]]},"createLines":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","description":"The unique identifier for the item whose stock this line removes. See id on GET inventory/items/:id."},"unitId":{"type":"string","description":"The unique identifier for the unit the quantity is counted in. See id on GET inventory/unit-of-measures/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity to remove, in that unit. A positive number greater than zero."},"unitPrice":{"type":"string","format":"decimal","description":"The value of one unit, in the inventory decrease's currency. Optional: omit it to value the stock at the cost it already has, which is what a write-off ordinarily wants. A supplied value must be greater than zero."},"notes":{"type":"string","description":"Free text on the line."},"batches":{"type":"array","items":{"type":"object","properties":{"batchNumberId":{"type":"string","description":"The unique identifier for the batch being removed. See id on GET inventory/batch-numbers. Either this or batchNumber is required."},"batchNumber":{"type":"string","description":"The batch number as printed, for example 'LOT-2026-08-14'. Either this or batchNumberId is required; alone, it must name exactly one batch of the item in the document's warehouse. Given beside batchNumberId, it must be that batch's own number."},"quantity":{"type":"string","format":"decimal","description":"The quantity of this batch to remove, in the line's unit. The batch quantities of a line must add up to the line's quantity."}},"additionalProperties":false,"required":["quantity"]},"description":"The batches to take the quantity from. Required for a batch-tracked item, and the quantities must add up to the line's quantity. Every batch named must already exist for the item, since a decrease removes lots and does not create them."},"serials":{"type":"array","items":{"type":"object","properties":{"serialNumberId":{"type":"string","description":"The unique identifier for the unit being removed. See id on GET inventory/serial-numbers. Either this or serialNumber is required."},"serialNumber":{"type":"string","description":"The serial number stamped on the unit. Either this or serialNumberId is required; alone, it must name exactly one unit of the item in the document's warehouse. Given beside serialNumberId, it must be that unit's own number."}},"additionalProperties":false},"description":"The units to remove, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. Every unit named must already exist."},"binLocations":{"type":"array","items":{"type":"object","properties":{"binLocationId":{"type":"string","description":"The unique identifier for the bin to take the quantity from. See id on GET inventory/bins/:id."},"quantity":{"type":"string","format":"decimal","description":"The quantity taken from this bin, in the line's unit."},"batchNumber":{"type":"string","description":"Names one of this line's batches, when the bin entry belongs to it. A number the line does not have is rejected rather than reinterpreted."},"serialNumber":{"type":"string","description":"Names one of this line's serialized units, when the bin entry belongs to it."}},"additionalProperties":false,"required":["binLocationId","quantity"]},"description":"The bins the quantity comes out of, in a bin-tracked warehouse. An entry may name a batchNumber or serialNumber of its own line."}},"additionalProperties":false,"required":["itemId","unitId","quantity"]},"description":"The lines to add. They use the document's existing location, so a document with no lines yet cannot take new ones."}},"additionalProperties":false},"createLandedCostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created landed cost. Format: UUID.","examples":["6d18b2f0-49c7-4a35-9e81-2f0c5a7d3b64"]},"documentNumber":{"type":"string","description":"The landed cost number, for example 'LC-1007'.","examples":["LC-1007"]},"documentStatus":{"type":"string","description":"The status of the created landed cost. It is always 'DRAFT'.","examples":["DRAFT"]},"allocationLineCount":{"type":"number","description":"The number of allocation lines on the landed cost. There is one allocation line for each selected receipt line that has an inventory item and takes a share of the charges. When it is 0, no stock takes a share of the charges, and committing the landed cost fails.","examples":[1]}},"additionalProperties":false,"required":["id","documentStatus"]},"createLandedCostInput":{"type":"object","properties":{"entityId":{"type":"string","description":"The unique identifier of the legal entity the landed cost belongs to. Format: UUID. It cannot be changed later. See `id` on GET base/entities (entities).","examples":["7039b992-696a-40c7-a181-51759304ef83"]},"documentDate":{"type":"string","format":"date","description":"The date of the landed cost. Format: YYYY-MM-DD. Defaults to today's date in UTC. The inventory revaluations that the commit creates have this date, so it sets the date of the change in the stock's value. It must fall in an open accounting period."},"notes":{"type":"string","description":"Free text on the landed cost."},"receipts":{"type":"array","items":{"type":"object","properties":{"receiptId":{"type":"string","description":"The unique identifier of the receipt. Format: UUID. See `id` on GET inventory/receipts/:id (getReceipt)."},"selectedLineIds":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the receipt lines to spread the charges over. Format: UUID. Each identifier must be the `id` of a line of the receipt named by `receiptId`. Omit to spread the charges over all of the receipt's lines. See `lines[].id` on GET inventory/receipts/:id (getReceipt)."}},"additionalProperties":false,"required":["receiptId"]},"description":"The receipts whose stock the charges are spread over. Send at least one. Every receipt must have the `documentStatus` 'COMMITTED' and belong to the landed cost's legal entity.","examples":[[{"receiptId":"b1a7c930-5e46-4f82-8d05-71c3e9a24f68"}]]},"charges":{"type":"array","items":{"type":"object","properties":{"chargeId":{"type":"string","description":"The unique identifier of the vendor bill line the charge comes from. Format: UUID. The vendor bill is taken from the line, so you do not send it. See `id` on GET inventory/landed-costs/vendor-bill-lines (getAvailableCharges)."},"allocationMode":{"type":"string","description":"How the charge is spread (allocated) over the receipt lines. Defaults to the `allocationMode` of the active landed cost item that matches the vendor bill line, by its item first and then by its general ledger account. This is the `allocationMode` GET inventory/landed-costs/vendor-bill-lines reports for the line. With no matching landed cost item, it defaults to the `defaultAllocationMode` of the item on the vendor bill line, or to 'Equal' when there is no such default. 'Weight' needs a gross weight, weight, or net weight on the item of every selected receipt line. 'Volume' needs a volume per unit on the item of every selected receipt line, or else a length, width, and height on every one. Weights and volumes are converted to the same unit before the charge is spread. See `defaultAllocationMode`, `grossWeight`, `weight`, `netWeight`, `weightUnit`, `volumePerUnit`, `volumeUnit`, `length`, `width`, and `height` on GET inventory/items/:id (getItem). Accepted values: 'Equal', 'Quantity', 'LineTotal', 'Weight', 'Volume'."},"amount":{"type":"string","format":"decimal","description":"The amount of the vendor bill line to use, in the functional currency of the landed cost's legal entity. It must be more than 0. To use what is left on the line, send `functionalLineTotal` minus `functionalAllocatedAmount` from GET inventory/landed-costs/vendor-bill-lines. The commit fails if this amount is more than what is left on the line."},"isSelected":{"type":"boolean","description":"Whether to spread the charge over the receipt lines. Defaults to true. A charge set to false is kept in the landed cost's charges, so you can set it back to true later, but the commit does not spread it."}},"additionalProperties":false,"required":["chargeId","amount"]},"description":"The charges to spread over the stock. Each charge comes from a line of an approved vendor bill of the landed cost's legal entity, and the line must match an active landed cost item. Send at least one.","examples":[[{"chargeId":"9c47e1b8-2a63-4d05-b7f9-04e28d5a1c37","allocationMode":"Quantity","amount":"240"}]]}},"additionalProperties":false,"required":["entityId","receipts","charges"]},"deletePsaProjectsOutput":{"type":"object","properties":{},"additionalProperties":false},"deletePsaProjectsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the projects to delete. If any id does not match a project, nothing is deleted. If any project has been invoiced (or has an invoiced milestone), the call fails and nothing is archived or deleted.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45","e57a0d34-9f62-4b18-bc25-71a6e8039d4b"]]},"irreversible":{"type":"boolean","description":"Whether to delete the projects permanently. Defaults to false, which archives them instead. Archived projects can be restored with POST psa/projects/bulk-restore."}},"additionalProperties":false,"required":["ids"]},"deletePlaceholderOutput":{"type":"object","properties":{},"additionalProperties":false},"getPsaPositionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position.","examples":["7c2e91a4-58fd-4b30-9e17-3a6d05fb824c"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this position belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"name":{"type":"string","description":"The display name of the position.","examples":["Senior Consultant"]},"description":{"type":"string","description":"A free-form description of the position's responsibilities.","examples":["Leads the delivery workstream on site."]},"salesOrderProductLineId":{"type":"number","description":"The id of the sales order product line this position fulfills. It is a numeric key. There is no endpoint for it."},"salesOrderProductLineRateCardEntryId":{"type":"number","description":"The id of the sales order product line rate card entry used for billing. It is a numeric key. There is no endpoint for it."},"productId":{"type":"number","description":"The id of the product this position is billed against. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"type":"number","description":"The id of the product line this position is billed against. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"productLineRateCardEntryId":{"type":"number","description":"The id of the product line rate card entry. It is a numeric key. There is no endpoint for it."},"billable":{"type":"boolean","description":"Whether work in this position is billable to the customer.","examples":[true]},"unitOfMeasure":{"type":"string","description":"The unit the stored bill rate, cost rate and budget are expressed in. It is a member of the UnitOfMeasureType enum, in practice 'hour' or 'day' for a position, with 'hour' the default.","examples":["hour"]},"hourlyBillRate":{"type":"string","format":"decimal","description":"The bill rate for this position, as an hourly amount, in the currency given by hourlyBillRateCurrency.","examples":["185.00"]},"hourlyBillRateCurrency":{"type":"string","description":"The currency of hourlyBillRate. Format ISO 4217, for example 'USD'.","examples":["USD"]},"hourlyCostRate":{"type":"string","format":"decimal","description":"The cost rate for this position, as an hourly amount, in the currency given by hourlyCostRateCurrency.","examples":["110.00"]},"hourlyCostRateCurrency":{"type":"string","description":"The currency of hourlyCostRate. Format ISO 4217, for example 'USD'.","examples":["USD"]},"hoursBudget":{"type":"string","format":"decimal","description":"The budgeted hours for this position. It is a quantity in hours and has no currency.","examples":["120.00"]},"invoiced":{"type":"boolean","description":"Whether work in this position has been invoiced.","examples":[false]},"hrPositionId":{"type":"number","description":"The id of the HR position this PSA position maps to. It is a numeric key, not the UUID that GET people/positions/:id takes."},"skillLevelId":{"type":"number","description":"The id of the skill level (position seniority) this PSA position maps to. It is a numeric key. There is no endpoint for it."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the position record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id","psaProjectId","lastModifiedDate"]},"createTeamMembersOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the created position assignment. This is the id GET psa/team-member-positions returns."}},"additionalProperties":false,"required":["id"]},"description":"The ids of the position assignments created, in the order the entries were sent. An entry that created no position assignment contributes no id, so this can be shorter than the input. Read a record back with GET psa/team-member-positions/:id.","examples":[[{"id":"5f2e1c40-9a3b-4d71-8e05-6b4c2d1a7f93"}]]}},"additionalProperties":false,"required":["created"]},"createTeamMembersInput":{"type":"object","properties":{"psaProjectId":{"type":"number","description":"The PSA project to add the people to. It is a numeric key, not the UUID that GET psa/projects/:id takes. Adding people needs edit permission on this project.","examples":[32341]},"assignments":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"number","description":"The employee to add. Give either employeeId or placeholderId, not both. The employee joins the team even when projectPositionId is omitted; someone who left the team is brought back. Must be Active or Planned. It is a numeric key."},"placeholderId":{"type":"number","description":"The placeholder to assign. Give either employeeId or placeholderId, not both. A placeholder item with no projectPositionId creates nothing. The anonymization placeholder cannot be assigned. It is a numeric key."},"projectPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The project position to assign this person or placeholder to. Omit it to add the person to the team without a position assignment. It must belong to the project, and the person or placeholder must not hold it already. It is a numeric key."}},"additionalProperties":false},"description":"One entry per person or placeholder to add. Each entry needs exactly one of employeeId or placeholderId. Every entry is checked before anything is written; either all are added, or none are, and every problem is returned with its entry's index.","examples":[[{"employeeId":3845142,"projectPositionId":7},{"placeholderId":91}]]}},"additionalProperties":false,"required":["psaProjectId","assignments"]},"psaPositionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position.","examples":["7c2e91a4-58fd-4b30-9e17-3a6d05fb824c"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this position belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the position.","examples":["Senior Consultant"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the position's responsibilities.","examples":["Leads the delivery workstream on site."]},"salesOrderProductLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the sales order product line this position fulfills. It is a numeric key. There is no endpoint for it."},"salesOrderProductLineRateCardEntryId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the sales order product line rate card entry used for billing. It is a numeric key. There is no endpoint for it."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product this position is billed against. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line this position is billed against. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"productLineRateCardEntryId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line rate card entry. It is a numeric key. There is no endpoint for it."},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether work in this position is billable to the customer.","examples":[true]},"unitOfMeasure":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The unit the stored bill rate, cost rate and budget are expressed in. It is a member of the UnitOfMeasureType enum, in practice 'hour' or 'day' for a position, with 'hour' the default.","examples":["hour"]},"hourlyBillRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The bill rate for this position, as an hourly amount, in the currency given by hourlyBillRateCurrency.","examples":["185.00"]},"hourlyBillRateCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of hourlyBillRate. Format ISO 4217, for example 'USD'.","examples":["USD"]},"hourlyCostRate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost rate for this position, as an hourly amount, in the currency given by hourlyCostRateCurrency.","examples":["110.00"]},"hourlyCostRateCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of hourlyCostRate. Format ISO 4217, for example 'USD'.","examples":["USD"]},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The budgeted hours for this position. It is a quantity in hours and has no currency.","examples":["120.00"]},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether work in this position has been invoiced.","examples":[false]},"hrPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the HR position this PSA position maps to. It is a numeric key, not the UUID that GET people/positions/:id takes."},"skillLevelId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the skill level (position seniority) this PSA position maps to. It is a numeric key. There is no endpoint for it."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the position record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"approveTimeEntriesOutput":{"type":"object","properties":{"approved":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entry."}},"additionalProperties":false,"required":["id"]},"description":"The entries whose status was set to approved.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}]]}},"additionalProperties":false,"required":["approved"]},"approveTimeEntriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the time entries to approve.","examples":[["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]]}},"additionalProperties":false,"required":["ids"]},"updateActivityOutput":{"type":"object","properties":{},"additionalProperties":false},"updateActivityInput":{"type":"object","properties":{"name":{"type":"string","description":"A new display name. Must not be blank.","examples":["Discovery workshop (2 days)"]},"description":{"type":"string","description":"A new free-form description."},"billingType":{"enum":["Hours","Milestone","FixedFee"],"description":"A new billing type. A stored milestone or fixed fee the new type cannot use is cleared; the same rules as on create apply to the result."},"category":{"enum":["ClientBillable","NonBillable","NonValuable","Valuable"],"description":"A new category, with the same rules as on create. On a billable project a fixed-fee or milestone activity's category is always set from the billing type, and a value sent is ignored: it is re-set whenever the request changes the category, billingType or milestone."},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"A new hours budget, a non-negative count of hours; null clears it. When members carry hoursBudget, it must not be less than their total; every assigned member needs an hoursBudget once the activity has one (MEMBER_BUDGET_REQUIRED)."},"milestoneId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A milestone of the same project; null clears it."},"fixedFeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A fixed fee of the same project; null clears it."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"A new start date, format YYYY-MM-DD; null clears it. The resulting dates must be both set or both empty, the start not after the end."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"A new end date, format YYYY-MM-DD; null clears it.","examples":["2026-09-03"]},"activityStatusId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An active activity status; null clears it.","examples":["8b3f0d62-17ce-4a95-b2e4-6d09a1c35f70"]},"parentActivityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A new parent activity on the same project; null makes the activity top-level. It cannot be the activity itself or one of its sub-tasks, and sub-tasks nest at most two levels."}},"additionalProperties":false},"getTeamMemberOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team-roster row.","examples":["5f2e1c40-9a3b-4d71-8e05-6b4c2d1a7f93"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this record belongs to. It is a numeric key you can filter on here, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"employeeId":{"type":"number","description":"The id of the employee this roster record is for. It is a numeric key, not a UUID any public endpoint returns as a fetchable id.","examples":[3845142]},"isTeamLead":{"type":"boolean","description":"Whether this team member is the team lead.","examples":[false]},"startDate":{"type":"string","format":"date","description":"The first day of this person's membership of the team. Format YYYY-MM-DD. Absent when not set.","examples":["2026-01-06"]},"endDate":{"type":"string","format":"date","description":"The last day of this person's membership of the team. Format YYYY-MM-DD. Absent when not set.","examples":["2026-12-31"]},"allocation":{"type":"string","format":"decimal","description":"The share of the person's capacity allocated to this team, as a percentage. For example, 50 means 50%.","examples":["50"]},"name":{"type":"string","description":"The full name of the team member. It is returned but cannot be filtered or sorted on, and there is no endpoint to find a member by name.","examples":["Alex Moreau"]},"displayName":{"type":"string","description":"The preferred display name of the team member. Like name, it cannot be filtered or sorted on.","examples":["Alex"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this roster row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","employeeId","lastModifiedDate"]},"getExpensesSummaryOutput":{"type":"object","properties":{"expenses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier for the expense entry."},"expenseReportId":{"type":"number","description":"The id of the expense report this expense belongs to. It is a numeric key, not the UUID that GET accounting/expense-reports/:id takes."},"employeeName":{"type":"string","description":"The name of the employee who incurred the expense."},"categoryName":{"type":"string","description":"The name of the expense category."},"amount":{"type":"string","format":"decimal","description":"The gross amount of the expense, in the currency given by amountCurrency."},"amountCurrency":{"type":"string","description":"The currency of amount. Format ISO 4217, for example 'USD'."},"reimbursableNetAmount":{"type":"string","format":"decimal","description":"The reimbursable net amount of the expense, after tax and any company-paid portions, in the currency given by reimbursableNetAmountCurrency."},"reimbursableNetAmountCurrency":{"type":"string","description":"The currency of reimbursableNetAmount. Format ISO 4217, for example 'USD'."},"status":{"type":"string","description":"The status of the expense entry."},"notes":{"type":"string","description":"Free-form notes on the expense."},"billDate":{"type":"string","format":"date","description":"The date the expense was incurred. Format YYYY-MM-DD."},"billableExpense":{"type":"string","description":"The billable classification of the expense."},"expenseReportNumber":{"type":"string","description":"The human-readable number of the expense report."}},"additionalProperties":false},"description":"The expense entries on this page, each linked to the project through its assigned budget.","examples":[[{"id":88213,"employeeName":"Priya Natarajan","categoryName":"Airfare","amount":"412.50","amountCurrency":"USD","status":"Approved","billDate":"2026-07-02"}]]},"budgetMappings":{"type":"array","items":{"type":"object","properties":{"expenseItemBaseId":{"type":"number","description":"The id of the expense this mapping is for. It matches an id in the expenses array of this response."},"expenseBudgetId":{"type":"number","description":"The id of the budget this expense is mapped to. It matches an id in the expenseBudgets array of this response."},"name":{"type":"string","description":"The display name of the budget."},"budget":{"type":"string","format":"decimal","description":"The budget amount, in the currency given by currency. Absent when the budget has no amount."},"currency":{"type":"string","description":"The currency of budget. Format ISO 4217, for example 'USD'. Absent when the budget has no amount."},"isDefault":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this is the project's default catch-all budget."},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether expenses against this budget are billable to the customer."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product tied to this budget. It is a numeric key, not the UUID that GET accounting/products/:id takes. Absent when the budget is not tied to a product."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line tied to this budget. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes. Absent when the budget is not tied to a product line."},"salesOrderId":{"type":"number","description":"The id of the sales order this budget bills against. It is a numeric key, not the UUID that GET accounting/sales-orders/:id takes."}},"additionalProperties":false,"required":["expenseItemBaseId","expenseBudgetId","name"]},"description":"The mapping of each expense on this page to its assigned budget. It covers only the expenses in this page's expenses array.","examples":[[{"expenseItemBaseId":88213,"expenseBudgetId":501,"name":"Travel","budget":"10000.00","currency":"USD"}]]},"expenseBudgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier for the budget."},"name":{"type":"string","description":"The display name of the budget."},"budget":{"type":"string","format":"decimal","description":"The budget amount, in the currency given by currency. Absent when the budget has no amount."},"currency":{"type":"string","description":"The currency of budget. Format ISO 4217, for example 'USD'. Absent when the budget has no amount."},"isDefault":{"type":"boolean","description":"Whether this is the project's default catch-all budget."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the budget definition last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether expenses against this budget are billable to the customer."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product tied to this budget. It is a numeric key, not the UUID that GET accounting/products/:id takes. Absent when the budget is not tied to a product."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line tied to this budget. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes. Absent when the budget is not tied to a product line."},"salesOrderId":{"type":"number","description":"The id of the sales order this budget bills against. It is a numeric key, not the UUID that GET accounting/sales-orders/:id takes."}},"additionalProperties":false,"required":["id","name","isDefault"]},"description":"Every budget defined for the project. This array is never paginated.","examples":[[{"id":501,"name":"Travel","budget":"10000.00","currency":"USD","isDefault":false,"lastModifiedDate":"2026-07-02T09:14:22.000Z"}]]},"defaultBudget":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier for the budget."},"name":{"type":"string","description":"The display name of the budget."},"budget":{"type":"string","format":"decimal","description":"The budget amount, in the currency given by currency. Absent when the budget has no amount."},"currency":{"type":"string","description":"The currency of budget. Format ISO 4217, for example 'USD'. Absent when the budget has no amount."},"isDefault":{"type":"boolean","description":"Always true, because this is the default budget."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the budget definition last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether expenses against this budget are billable to the customer."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product tied to this budget. It is a numeric key, not the UUID that GET accounting/products/:id takes. Absent when the budget is not tied to a product."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line tied to this budget. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes. Absent when the budget is not tied to a product line."},"salesOrderId":{"type":"number","description":"The id of the sales order this budget bills against. It is a numeric key, not the UUID that GET accounting/sales-orders/:id takes."}},"additionalProperties":false,"required":["id","name","isDefault"],"description":"The project's default catch-all budget for expenses with no explicit mapping. Absent when the project has no default budget."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the pageCursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more expenses remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for the expenses array.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["expenses","budgetMappings","expenseBudgets","pagination"]},"createAllocationsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created allocation."}},"additionalProperties":false,"required":["id"]},"description":"The created allocations, in the order the request sent them. Read a record with GET psa/allocations/:id for its stored state.","examples":[[{"id":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"}]]}},"additionalProperties":false,"required":["created"]},"createAllocationsInput":{"type":"object","properties":{"allocations":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"number","description":"The id of the timetracking member assignment the daily hours are booked against. It determines the project, the person, and the permission check. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"projectActivityId":{"type":"number","description":"The id of the project activity the allocation is booked against. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"startDate":{"type":"string","format":"date","description":"The first day of the allocation period, inclusive. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the allocation period, inclusive. Use format YYYY-MM-DD."},"totalHours":{"type":"string","format":"decimal","description":"The planned hours, interpreted according to method. For 'totalHours' and 'hoursPerDay', this is the total for the whole period, spread evenly over the working days in range. For 'hoursPerWeek', it is the period total, divided across the weeks and then the working days. For 'hoursPerMonth', it is a per-month rate, with a working month approximated as 21 days. Days that compute to zero hours produce no daily entry."},"method":{"enum":["totalHours","hoursPerDay","hoursPerWeek","hoursPerMonth"],"description":"The distribution method for the planned hours."},"notes":{"type":"string","description":"Free-form notes stored on the allocation."},"workingDays":{"type":"array","items":{"enum":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},"description":"The days of the week the allocation applies to."},"psaProjectId":{"type":"number","description":"The id of the PSA project the allocation belongs to. It must be the project the member belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes."}},"additionalProperties":false,"required":["memberId","projectActivityId","startDate","endDate","totalHours","method","psaProjectId"]},"description":"The allocations to create.","examples":[[{"memberId":4021,"projectActivityId":91,"startDate":"2026-09-01","endDate":"2026-09-12","totalHours":"40.00","method":"totalHours","psaProjectId":32341},{"memberId":4022,"projectActivityId":91,"startDate":"2026-10-01","endDate":"2026-12-31","totalHours":"160.00","method":"hoursPerWeek","psaProjectId":32341,"notes":"Phase 2 delivery capacity.","workingDays":["Monday","Tuesday","Wednesday","Thursday"]}]]}},"additionalProperties":false,"required":["allocations"]},"assignEmployeesToPlaceholdersOutput":{"type":"object","properties":{"assigned":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resulting position assignment. This is the id GET psa/team-member-positions returns."}},"additionalProperties":false,"required":["id"]},"description":"The ids of the position assignments now held by the employee. A placeholder assignment merged into one the employee already held is removed and contributes no id, so this can be shorter than the input. Read a record back with GET psa/team-member-positions/:id.","examples":[[{"id":"5f2e1c40-9a3b-4d71-8e05-6b4c2d1a7f93"}]]}},"additionalProperties":false,"required":["assigned"]},"assignEmployeesToPlaceholdersInput":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"number","description":"The employee taking over the placeholder's assignments. They are added to the team if not already a member. Must be Active or Planned. It is a numeric key."},"placeholderId":{"type":"number","description":"The placeholder being replaced. It must hold a position on the project, and cannot be the anonymization placeholder. It is a numeric key."},"psaProjectId":{"type":"number","description":"The PSA project the placeholder belongs to. Needs edit permission on this project. It is a numeric key, not the UUID that GET psa/projects/:id takes."}},"additionalProperties":false,"required":["employeeId","placeholderId","psaProjectId"]},"description":"One entry per placeholder-to-employee conversion. Each entry re-points the placeholder's position assignments to the employee. Every entry is checked before anything is written; if any fails, nothing changes and every problem is returned with its entry's index.","examples":[[{"employeeId":3845142,"placeholderId":91,"psaProjectId":32341}]]}},"additionalProperties":false,"required":["assignments"]},"getProjectTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the project type.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"name":{"type":"string","description":"The display name of the project type.","examples":["Retainer"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the project type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","name"]},"restorePsaProjectsOutput":{"type":"object","properties":{},"additionalProperties":false},"restorePsaProjectsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the archived projects to restore. If any id does not match, nothing is restored.","examples":[["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]]}},"additionalProperties":false,"required":["ids"]},"getActivityOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the activity.","examples":["c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"]},"name":{"type":"string","description":"The display name of the activity.","examples":["Discovery workshop"]},"description":{"type":"string","description":"A free-form description of the activity. Absent when none was set.","examples":["Two-day onsite requirements workshop."]},"hoursBudget":{"type":"string","format":"decimal","description":"The budgeted hours for this activity, as a count of hours. It is not a monetary amount.","examples":["40.00"]},"billable":{"type":"boolean","description":"Whether the activity is billable to a customer. Derived from category being 'ClientBillable'.","examples":[true]},"invoiced":{"type":"boolean","description":"Whether the activity has been invoiced.","examples":[false]},"startDate":{"type":"string","format":"date","description":"The activity's start date. Format YYYY-MM-DD. It is within the owning project's date range when the project's enforceActivityDateRange setting is on.","examples":["2026-09-01"]},"endDate":{"type":"string","format":"date","description":"The activity's end date. Format YYYY-MM-DD.","examples":["2026-09-02"]},"billingType":{"type":"string","description":"The activity's billing type. Possible values: 'Hours', 'Milestone', 'FixedFee'.","examples":["Hours"]},"category":{"type":"string","description":"The activity's category. Possible values: 'ClientBillable', 'NonBillable', 'NonValuable', 'Valuable'.","examples":["ClientBillable"]},"milestoneId":{"type":"number","description":"The id of the milestone this activity is billed against. Absent unless billingType is 'Milestone'. It is a numeric key, not the UUID that GET psa/milestones/:id takes."},"fixedFeeId":{"type":"number","description":"The id of the fixed fee this activity is billed against. Absent unless billingType is 'FixedFee'. It is a numeric key, not the UUID that GET psa/fixed-fees/:id takes."},"activityStatusId":{"type":"number","description":"The id of the activity's progress status. Absent when no status is set. Status values are tenant-configured, and there is no endpoint that lists them. Use statusName for the label.","examples":[3]},"statusName":{"type":"string","description":"The name of the activity's progress status, for example 'In progress'. Absent when no status is set.","examples":["In progress"]},"parentActivityId":{"type":"number","description":"The id of the parent activity when this is a sub-task. Absent when the activity is top-level. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"psaProjectId":{"type":"number","description":"The id of the PSA project that owns this activity. Absent for a timetracking project with no PSA layer. It is a numeric key you can filter on here, but not the UUID that GET psa/projects/:id takes.","examples":[32341]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this activity last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id","name","billingType","lastModifiedDate"]},"teamMemberPositionsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position assignment."},"psaProjectId":{"type":"number","description":"The id of the PSA project this record belongs to. It is a numeric key you can filter on here, not the UUID that GET psa/projects/:id takes."},"projectPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the project position this assignment fills. It is a numeric key you can filter on here, not the UUID that GET psa/positions/:id takes."},"positionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the project position, paired with projectPositionId. It is returned but cannot be filtered or sorted on, and there is no endpoint to find an assignment by position name."},"teamMemberId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the assigned person's team-roster record. Absent for placeholder-only assignments. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"placeholderId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the placeholder filling this position, when it is filled by a placeholder rather than a person. It is a numeric key, not the UUID that GET psa/placeholders/:id takes."},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this assignment's work has been invoiced. An invoiced assignment cannot be deleted."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time this assignment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"placeholdersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the placeholder.","examples":["3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"]},"name":{"type":"string","description":"The display name of the placeholder, for example 'Unassigned Backend Engineer'. Unique within the tenant.","examples":["Unassigned Backend Engineer"]},"weeklyWorkingHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The weekly working hours used for planning, as a non-negative number of hours, for example 40.00. Absent when none was set.","examples":["40.00"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the placeholder last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.184Z"]}},"additionalProperties":false},"unassignActivityMembersOutput":{"type":"object","properties":{"hoursBudget":{"type":"string","format":"decimal","description":"The activity's hours budget after the change. Absent when the remaining members carry no budget.","examples":["16.00"]}},"additionalProperties":false},"unassignActivityMembersInput":{"type":"object","properties":{"memberIds":{"type":"array","items":{"type":"string"},"description":"The members to unassign. Each must currently be assigned to the activity. See memberId on GET psa/team-member-positions.","examples":[["0f6a3c95-2e71-4d8b-9c40-b5d81e27a6f3"]]}},"additionalProperties":false,"required":["memberIds"]},"updatePsaPositionOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePsaPositionInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name. Must not be blank. When omitted with a new sales order line, it is derived from the line as on POST psa/positions."},"description":{"type":"string","description":"A free-form description of the position's responsibilities."},"billable":{"type":"boolean","description":"Whether work in this position is billable to the customer. Internal and NonBillable projects cannot have billable positions. Making a position non-billable clears its sales order links."},"unitOfMeasure":{"enum":["hour","day"],"description":"The billing unit: 'hour' or 'day'. With a sales order line it must equal that line's (or its rate card entry's) unit, or be left out."},"hourlyBillRate":{"type":"string","format":"decimal","description":"The bill rate per hour, non-negative. Not allowed with a sales order line, which supplies the rate. A non-billable position takes only 0.","examples":["195.00"]},"hourlyBillRateCurrency":{"type":"string","description":"The currency of hourlyBillRate. Format ISO 4217. Must be the project currency."},"hourlyCostRate":{"type":"string","format":"decimal","description":"The cost rate per hour, non-negative."},"hourlyCostRateCurrency":{"type":"string","description":"The currency of hourlyCostRate. Format ISO 4217. Must be the project currency."},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The budgeted hours, a non-negative count of hours. null clears it.","examples":["400"]},"salesOrderProductLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order product line to bill, as on GET psa/positions. Billable positions only; a billable time line of a sales order under the project's sales arrangement that no other project of that arrangement uses. null clears it."},"salesOrderProductLineRateCardEntryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The rate card entry of the sales order line, as on GET psa/positions. Required when that line has rate card entries. null clears it."},"hrPositionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The HR position this project role maps to. See id on GET people/positions/:id. null clears it. When omitted with a new sales order line, it is taken from the role catalog of the line's product line."},"skillLevelId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The skill level (position seniority) this project role maps to, as skillLevelId on GET psa/positions. null clears it. When omitted with a new sales order line, it is taken from the role catalog of the line's product line."}},"additionalProperties":false},"rejectTimeEntriesOutput":{"type":"object","properties":{"rejected":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entry."}},"additionalProperties":false,"required":["id"]},"description":"The entries whose status was set to rejected.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}]]}},"additionalProperties":false,"required":["rejected"]},"rejectTimeEntriesInput":{"type":"object","properties":{"timeEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the time entry to reject."},"rejectionReason":{"type":"string","description":"The reason for rejection. Only the value on the first entry is used, and it overwrites the notes field of every rejected entry."}},"additionalProperties":false,"required":["id","rejectionReason"]},"description":"The time entries to reject.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","rejectionReason":"Hours exceed activity budget."}]]}},"additionalProperties":false,"required":["timeEntries"]},"createActivitiesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the created activity."}},"additionalProperties":false,"required":["id"]},"description":"The created activities, in the order the request sent them.","examples":[[{"id":"c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"},{"id":"e2b7d9c1-4a63-4f08-b2d5-1c9e7a30f486"}]]}},"additionalProperties":false,"required":["created"]},"createActivitiesInput":{"type":"object","properties":{"projectId":{"type":"string","description":"The PSA project the activities belong to. See id on GET psa/projects/:id. Creating activities needs edit permission on this project.","examples":["2d9e4f71-0b38-4c6a-a5d2-71e8c3f90b46"]},"activities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name. Must not be blank (NAME_REQUIRED)."},"description":{"type":"string","description":"A free-form description."},"billingType":{"enum":["Hours","Milestone","FixedFee"],"description":"How the activity is billed. 'Milestone' needs milestoneId and 'FixedFee' needs fixedFeeId; 'Hours' takes neither. Internal and non-billable projects do not allow 'FixedFee'."},"category":{"enum":["ClientBillable","NonBillable","NonValuable","Valuable"],"description":"The activity category. On a billable project it is always set from the billing type, as in the Tasks tab, and any value sent is ignored: 'FixedFee' is 'ClientBillable'; 'Milestone' is 'ClientBillable' for a billable milestone and 'NonBillable' otherwise. For 'Hours' on a billable project send 'ClientBillable' or 'NonBillable' (default 'ClientBillable'). Internal and non-billable projects allow 'Valuable' or 'NonValuable' (default 'Valuable'), and only 'Valuable' when the project does not distinguish valuable work."},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The budgeted hours, a non-negative count of hours. When members carry hoursBudget, their total must not exceed a value sent here (BUDGET_MISMATCH); without one, the activity budget is their total."},"milestoneId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The milestone to bill against, a milestone of the same project. See id on GET psa/milestones/:id. Only with billingType 'Milestone'."},"fixedFeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fixed fee to bill against, a fixed fee of the same project. See id on GET psa/fixed-fees/:id. Only with billingType 'FixedFee'. The activity's dates must lie within the fee's period."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The start date. Format YYYY-MM-DD. Send both dates or neither; the start must not be after the end."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The end date. Format YYYY-MM-DD."},"activityStatusId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The progress status, an active activity status. Omit it to use the active status marked Initial, if there is one; send null for no status."},"parentActivityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An existing activity of the same project to make this a sub-task of. Sub-tasks nest at most two levels below a top-level activity."},"members":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string","description":"The member's position assignment. See memberId on GET psa/team-member-positions."},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours budgeted for this member, a non-negative count of hours. Required for every member once the activity has an hours budget, given here or on any member (MEMBER_BUDGET_REQUIRED)."}},"additionalProperties":false,"required":["memberId"]},"description":"The members to assign. Each must be a current member of the project team, listed once. On a 'ClientBillable' activity billed by 'Hours', every member must hold a billable position."}},"additionalProperties":false,"required":["name","billingType"]},"description":"The activities to create. Either all are created, or none are.","examples":[[{"name":"Discovery workshop","billingType":"Milestone","category":"ClientBillable","milestoneId":"5e81c2d4-9a37-4b06-8f12-3c7d0a94e1b8","startDate":"2026-09-01","endDate":"2026-09-02","members":[{"memberId":"0f6a3c95-2e71-4d8b-9c40-b5d81e27a6f3","hoursBudget":"16.00"}]},{"name":"Implementation","billingType":"Hours","category":"ClientBillable","hoursBudget":"120.00"}]]}},"additionalProperties":false,"required":["projectId","activities"]},"getPlaceholderOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the placeholder.","examples":["3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13"]},"name":{"type":"string","description":"The display name of the placeholder, for example 'Unassigned Backend Engineer'. Unique within the tenant.","examples":["Unassigned Backend Engineer"]},"weeklyWorkingHours":{"type":"string","format":"decimal","description":"The weekly working hours used for planning, as a non-negative number of hours, for example 40.00. Absent when none was set.","examples":["40.00"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the placeholder last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.184Z"]}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"timeEntriesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the time entry.","examples":["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]},"date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the time was logged for. Format YYYY-MM-DD.","examples":["2026-08-10"]},"hours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total hours logged in this entry.","examples":["8"]},"billableHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours classified as billable to a customer, derived from projectActivityCategory.","examples":["8"]},"nonBillableHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours classified as non-billable to a customer, derived from projectActivityCategory.","examples":["0"]},"internalValuableHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours classified as internal valuable work, derived from projectActivityCategory.","examples":["0"]},"internalNonValuableHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours classified as internal non-valuable work, derived from projectActivityCategory.","examples":["0"]},"invoicedHours":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours that have been invoiced, a subset of billableHours.","examples":["0"]},"revenue":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue from this time entry, in the currency given by currency.","examples":["1250.00"]},"cost":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost of this time entry: hours times the employee's effective cost rate, or the project position's hourly cost rate when the employee has none. It is in that cost rate's currency, which this endpoint does not expose and which is not necessarily `currency`.","examples":["800.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of revenue. Format ISO 4217, for example 'USD'. It is the currency of the project position's bill rate; cost is not necessarily in it.","examples":["USD"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes on the time entry.","examples":["Sprint 14 backend work"]},"submissionStatus":{"anyOf":[{"enum":["draft","pending","approved","rejected","submittedForInvoicing","invoiced"]},{"type":"null"}],"description":"The submission and approval status of the entry.","examples":["draft"]},"submissionDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the entry was submitted for approval. Format YYYY-MM-DD.","examples":["2026-08-11"]},"month":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the month the entry is reported under. Format YYYY-MM-DD.","examples":["2026-08-01"]},"memberId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the PSA member assignment the time was logged for. GET psa/team-members/:id takes the member's UUID, not this key, so it cannot fetch the member.","examples":[5001]},"memberEmployeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the employee who logged the time. There is no endpoint for it.","examples":[3845142]},"memberEmployeeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the employee who logged the time.","examples":["Alex Rivera"]},"projectActivityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the activity the time was logged against. GET psa/activities/:id takes the activity's UUID, not this key, so it cannot fetch the activity.","examples":[7001]},"projectActivityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the activity the time was logged against.","examples":["Implementation"]},"projectActivityCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billability category of the activity the time was logged against. The billable, non-billable and internal-hour fields are derived from it. See category on GET psa/activities/:id.","examples":["ClientBillable"]},"projectPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the position the time was logged against. GET psa/positions/:id takes the position's UUID, not this key, so it cannot fetch the position.","examples":[9001]},"projectPositionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the position the time was logged against.","examples":["Senior Engineer"]},"psaProjectId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric key of the PSA project the entry belongs to. GET psa/projects/:id takes the project's UUID, not this key, so it cannot fetch the project.","examples":[32341]},"projectName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the PSA project the entry belongs to.","examples":["Atlas rollout"]},"psaProjectStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the PSA project this entry belongs to.","examples":["active"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"getPsaProjectOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the project.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the project last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-12T09:30:00.000Z"]},"name":{"type":"string","description":"The display name of the project.","examples":["Spire Digital Rollout"]},"code":{"type":"string","description":"The project code, for example 'PSA-29767'. Absent when none has been set.","examples":["PSA-29767"]},"category":{"type":"string","description":"The project category. Possible values: 'Billable', 'Internal', 'NonBillable'.","examples":["Billable"]},"status":{"type":"string","description":"The project status. Possible values: 'Tentative', 'Planning', 'PlanningDraft', 'NotStarted', 'InProgress', 'Paused', 'Completed', 'Cancelled'.","examples":["NotStarted"]},"currency":{"type":"string","description":"The project's default currency. Format ISO 4217, for example 'USD'. It applies to revenueRecordedTimeToDate, revenueAccomplishedMilestones, revenueFixedFeeToDate, revenueToDate, and budgetRemaining.","examples":["USD"]},"invoiced":{"type":"boolean","description":"Whether the project is marked as invoiced.","examples":[false]},"startDate":{"type":"string","format":"date","description":"The project start date. Format YYYY-MM-DD.","examples":["2026-08-03"]},"endDate":{"type":"string","format":"date","description":"The project end date. Format YYYY-MM-DD.","examples":["2026-12-18"]},"notes":{"type":"string","description":"Free-form notes about the project."},"enforceActivityDateRange":{"type":"boolean","description":"Whether time entries must fall within the project's startDate and endDate."},"budgetAmount":{"type":"string","format":"decimal","description":"The project budget amount, in budgetCurrency."},"budgetCurrency":{"type":"string","description":"The currency of budgetAmount. Format ISO 4217, for example 'USD'."},"departmentId":{"type":"number","description":"The numeric identifier of the department the project is allocated to. GET people/departments/:id takes a UUID, so the number cannot be used to fetch the department."},"teamId":{"type":"number","description":"The numeric identifier of the team assigned to this project. GET people/teams/:id takes a UUID, so the number cannot be used to fetch the team.","examples":[89969]},"teamName":{"type":"string","description":"The display name of the team."},"teamStartDate":{"type":"string","format":"date","description":"The team's start date, which may differ from startDate. Format YYYY-MM-DD."},"teamEndDate":{"type":"string","format":"date","description":"The team's end date, which may differ from endDate. Format YYYY-MM-DD."},"salesRepresentativeId":{"type":"number","description":"The numeric identifier of the sales representative, an employee. There is no endpoint for it."},"salesRepresentativeName":{"type":"string","description":"The display name of the sales representative."},"projectTypeId":{"type":"number","description":"The numeric identifier of the project type. GET psa/project-types/:id takes a UUID, so the number cannot be used to fetch the project type."},"projectTypeName":{"type":"string","description":"The display name of the project type."},"quoteId":{"type":"number","description":"The numeric identifier of the CRM quote this project was created from. GET crm/quotes/:id takes a UUID, so the number cannot be used to fetch the quote."},"quoteNumber":{"type":"string","description":"The quote number."},"opportunityId":{"type":"number","description":"The numeric identifier of the CRM opportunity this project is linked to. GET crm/opportunities/:id takes a UUID, so the number cannot be used to fetch the opportunity."},"opportunityName":{"type":"string","description":"The display name of the opportunity."},"opportunityCurrency":{"type":"string","description":"The currency of the opportunity. Format ISO 4217, for example 'USD'."},"salesArrangementId":{"type":"number","description":"The numeric identifier of the sales arrangement that links the project to billing terms. There is no endpoint for it."},"salesArrangementCurrency":{"type":"string","description":"The functional currency of the sales arrangement. Format ISO 4217, for example 'USD'."},"salesArrangementCustomerId":{"type":"number","description":"The numeric identifier of the customer on the sales arrangement. GET accounting/customers/:id takes a UUID, so the number cannot be used to fetch the customer."},"salesArrangementCustomerName":{"type":"string","description":"The display name of the customer on the sales arrangement."},"salesArrangementEntityId":{"type":"number","description":"The numeric identifier of the legal entity on the sales arrangement. There is no endpoint for it."},"salesArrangementEntityName":{"type":"string","description":"The display name of the legal entity on the sales arrangement."},"revenueRecordedTimeToDate":{"type":"string","format":"decimal","description":"The revenue from recorded time up to today, in the project currency. Absent when the project has no time entries."},"revenueAccomplishedMilestones":{"type":"string","format":"decimal","description":"The revenue from accomplished and invoiced milestones, in the project currency. Absent when the project has no completed milestones."},"revenueFixedFeeToDate":{"type":"string","format":"decimal","description":"The fixed-fee revenue to date, in the project currency. Absent when the project has no fixed fees."},"revenueToDate":{"type":"string","format":"decimal","description":"The total revenue to date, in the project currency: revenueRecordedTimeToDate + revenueAccomplishedMilestones + revenueFixedFeeToDate."},"budgetRemaining":{"type":"string","format":"decimal","description":"The budget remaining, in the project currency: budgetAmount - revenueToDate."}},"additionalProperties":false,"required":["id","lastModifiedDate","name","category","status","currency","invoiced","startDate","endDate","teamId"]},"bulkCreateProjectTypesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for a created project type."}},"additionalProperties":false,"required":["id"]},"description":"The identifiers of the created project types, in the order their distinct names were sent. A repeated name produces one entry, so a request that repeats a name returns fewer entries than it sent.","examples":[[{"id":"3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"},{"id":"8c1f4a72-6b09-4d15-a3e7-40d2b6915cf8"}]]}},"additionalProperties":false,"required":["created"]},"bulkCreateProjectTypesInput":{"type":"object","properties":{"projectTypes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the project type."}},"additionalProperties":false,"required":["name"]},"description":"The project types to create. Naming the same project type twice creates it once. If any entry is invalid, the whole call is rejected and nothing is written.","examples":[[{"name":"Retainer"},{"name":"Fixed Bid"}]]}},"additionalProperties":false,"required":["projectTypes"]},"assignActivityMembersOutput":{"type":"object","properties":{"hoursBudget":{"type":"string","format":"decimal","description":"The activity's hours budget after the change. Absent when the activity has none.","examples":["40.00"]}},"additionalProperties":false},"assignActivityMembersInput":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string","description":"The member's position assignment. See memberId on GET psa/team-member-positions."},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The hours budgeted for this member, a non-negative count of hours; null for none. Required once the activity has an hours budget, of its own or on any member (MEMBER_BUDGET_REQUIRED)."}},"additionalProperties":false,"required":["memberId"]},"description":"The members to assign, or whose hours to change. Each must be a current member of the project team (a member who left stays allowed on an activity they are still assigned to), listed once.","examples":[[{"memberId":"0f6a3c95-2e71-4d8b-9c40-b5d81e27a6f3","hoursBudget":"24.00"},{"memberId":"a7c2e819-4f05-4b3d-8e61-92d0f3b75c18","hoursBudget":"16.00"}]]}},"additionalProperties":false,"required":["members"]},"updatePlaceholderOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePlaceholderInput":{"type":"object","properties":{"name":{"type":"string","description":"A new display name. Omit to leave it unchanged. Must be unique within the tenant. A blank name fails with NAME_REQUIRED, and a name another placeholder already has fails with DUPLICATE_NAME."},"weeklyWorkingHours":{"type":"string","format":"decimal","description":"New weekly working hours, as a non-negative number of hours, for example 32.00. Omit to leave the stored value unchanged. A zero is stored as zero.","examples":["32.00"]}},"additionalProperties":false},"createPsaPositionsOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the created position."}},"additionalProperties":false,"required":["id"]},"description":"The created positions, in the order the request sent them.","examples":[[{"id":"5c1e0a7d-3b92-4f64-8e21-d07a9b4c6f15"},{"id":"a8d43f20-6c1b-4e97-b5a2-1f3e9c7d0b48"}]]}},"additionalProperties":false,"required":["created"]},"createPsaPositionsInput":{"type":"object","properties":{"projectId":{"type":"string","description":"The PSA project the positions belong to. See id on GET psa/projects/:id. Creating positions needs edit permission on this project.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"positions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name. When omitted with a sales order line, it is the rate card entry's 'identifier - description' (or identifier), otherwise the line's product name. Must not end up blank (NAME_REQUIRED)."},"description":{"type":"string","description":"A free-form description of the position's responsibilities."},"billable":{"type":"boolean","description":"Whether work in this position is billable to the customer. Defaults to true on a Billable project and false otherwise. Internal and NonBillable projects cannot have billable positions."},"unitOfMeasure":{"enum":["hour","day"],"description":"The billing unit: 'hour' (default) or 'day'. With a sales order line it must equal that line's (or its rate card entry's) unit, or be left out."},"hourlyBillRate":{"type":"string","format":"decimal","description":"The bill rate per hour, non-negative, in hourlyBillRateCurrency. Required for a billable position without a sales order line; not allowed with one, since the line supplies it. A non-billable position takes only 0 and stores 0."},"hourlyBillRateCurrency":{"type":"string","description":"The currency of hourlyBillRate. Format ISO 4217. Must be the project currency, which is also the default."},"hourlyCostRate":{"type":"string","format":"decimal","description":"The cost rate per hour, non-negative, in hourlyCostRateCurrency. When omitted on a billable position with a sales order line, it is taken from the role catalog of that line's product line; otherwise it defaults to 0."},"hourlyCostRateCurrency":{"type":"string","description":"The currency of hourlyCostRate. Format ISO 4217. Must be the project currency, which is also the default."},"hoursBudget":{"type":"string","format":"decimal","description":"The budgeted hours, a non-negative count of hours."},"salesOrderProductLineId":{"type":"string","description":"The sales order product line to bill, as salesOrderProductLineId on GET psa/positions. Billable positions only. It must be a billable time line of a sales order under the project's sales arrangement that no other project of that arrangement uses."},"salesOrderProductLineRateCardEntryId":{"type":"string","description":"The rate card entry of salesOrderProductLineId to bill, as on GET psa/positions. Required when that line has rate card entries."},"hrPositionId":{"type":"string","description":"The HR position this project role maps to. See id on GET people/positions/:id. When omitted with a sales order line, it is taken from the role catalog of the line's product line."},"skillLevelId":{"type":"string","description":"The skill level (position seniority) this project role maps to, as skillLevelId on GET psa/positions. When omitted with a sales order line, it is taken from the role catalog of the line's product line."}},"additionalProperties":false},"description":"The positions to create. Either all are created, or none are.","examples":[[{"name":"Senior Consultant","billable":true,"hourlyBillRate":"180.00","hourlyCostRate":"95.00","hoursBudget":"320"},{"salesOrderProductLineId":"0f6a3c95-2e71-4d8b-9c40-b5d81e27a6f3"}]]}},"additionalProperties":false,"required":["projectId","positions"]},"deletePsaProjectOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePsaProjectOutput":{"type":"object","properties":{},"additionalProperties":false},"updatePsaProjectInput":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the project."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The project start date. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The project end date. Format YYYY-MM-DD."},"teamStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The team assignment start date. Format YYYY-MM-DD."},"teamEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The team assignment end date. Format YYYY-MM-DD. Send null to remove it, so time and expenses stay open indefinitely."},"teamLeadIds":{"anyOf":[{"type":"array","items":{"type":"number"}},{"type":"null"}],"description":"The numeric identifiers of the employees to set as project and team leads. This replaces the current set of leads; an empty list removes every lead. There is no endpoint for them. Each must be an Active or Planned employee."},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the underlying timetracking project is active."},"notifyProjectLeads":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether to notify the project leads."},"category":{"enum":["Billable","Internal","NonBillable"],"description":"Ignored. The category is set when the project is created and cannot be changed."},"status":{"enum":["Tentative","Planning","PlanningDraft","NotStarted","InProgress","Paused","Completed","Cancelled"],"description":"The project status. Accepted values: 'Tentative', 'Planning', 'PlanningDraft', 'NotStarted', 'InProgress', 'Paused', 'Completed', 'Cancelled'."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project's default currency. Format ISO 4217, for example 'USD'."},"budgetAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The project budget amount, in budgetCurrency."},"budgetCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of budgetAmount. Format ISO 4217, for example 'USD'. It should match the project's default currency."},"departmentId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the department to allocate the project to. GET people/departments/:id takes a UUID, so the number cannot be used to fetch the department."},"entityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the legal entity the project belongs to. While the project has a sales arrangement, it must be the arrangement's entity, and null resets it to that entity; a different value fails with the message 'The project's entity must match the entity of its sales arrangement'. Without a sales arrangement, null clears it. When salesArrangementId changes and entityId is not sent, the entity follows the new sales arrangement. Inactive entities cannot be used."},"customerId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of a customer to link directly to the project. It is forced to null whenever a sales arrangement is set; when sent with salesArrangementId, it must be that sales arrangement's customer. GET accounting/customers/:id takes a UUID, so the number cannot be used to fetch the customer."},"enforceActivityDateRange":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether time entries must fall within the project's startDate and endDate."},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the project is marked as invoiced."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes about the project.","examples":["Kickoff moved to next sprint."]},"opportunityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Ignored. Opportunity links cannot be set through this API."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Ignored. The project code is generated automatically and cannot be changed."},"quoteId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Ignored. Quote links cannot be set through this API."},"salesArrangementId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of a sales arrangement that links the project to billing terms. There is no endpoint for it. Changing or removing it fails with INVOICED_SALES_ARRANGEMENT_CHANGE_BLOCKED when a linked position, milestone, or fixed fee has already been invoiced."},"salesRepresentativeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the sales representative, an employee. There is no endpoint for it. Must be an Active or Planned employee."},"projectTypeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the project type. GET psa/project-types/:id takes a UUID, so the number cannot be used to fetch the project type."},"externalLink":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A link to an external system for this project."},"projectSettings":{"anyOf":[{"type":"object","properties":{"projectSettingsId":{"anyOf":[{"type":"number"},{"type":"null"}]},"disableTimetrackingOnHolidays":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"disableTimetrackingOnWeekends":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"maxHoursPerDay":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}]},"maxHoursPerMonth":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}]},"maxHoursPerWeek":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}]},"billableHoursPerDay":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}]},"notifyNewMembers":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"requireNotes":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}],"description":"The timetracking settings for the project. Only the settings you send change. projectSettingsId is not needed."}},"additionalProperties":false},"updateAllocationsOutput":{"type":"object","properties":{},"additionalProperties":false},"updateAllocationsInput":{"type":"object","properties":{"allocations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the allocation to update. The call is all-or-nothing: if any identifier matches no allocation, nothing is updated."},"memberId":{"type":"number","description":"A new timetracking member assignment to book the allocation against. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"projectActivityId":{"type":"number","description":"A new project activity for the allocation. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"startDate":{"type":"string","format":"date","description":"A new first day of the allocation period, inclusive. Use format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"A new last day of the allocation period, inclusive. Use format YYYY-MM-DD."},"totalHours":{"type":"string","format":"decimal","description":"New planned hours, interpreted according to method as on create. Changing this regenerates the allocation's daily entries."},"method":{"enum":["totalHours","hoursPerDay","hoursPerWeek","hoursPerMonth"],"description":"The distribution method for the planned hours."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes stored on the allocation."},"workingDays":{"anyOf":[{"type":"array","items":{"enum":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},{"type":"null"}],"description":"The days of the week the allocation applies to."},"psaProjectId":{"type":"number","description":"The PSA project of the allocation. It's ignored on update, because an allocation can't change project. It's a numeric key, not the UUID that GET psa/projects/:id takes."},"memberEmployeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The employee on the allocation. It's ignored on update. To reassign the allocation, send memberId."},"memberPlaceholderId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The placeholder on the allocation. It's ignored on update. To reassign the allocation, send memberId."}},"additionalProperties":false,"required":["id"]},"description":"The allocations to update.","examples":[[{"id":"3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13","totalHours":"32.00"},{"id":"b7c40e29-1af6-42d8-8e55-6d3b9c018a74","memberId":51204,"projectActivityId":8317,"startDate":"2026-09-01","endDate":"2026-11-30","totalHours":"160.00","method":"hoursPerWeek","notes":"Rescoped after the change order.","workingDays":["Monday","Tuesday","Wednesday","Thursday"],"memberEmployeeId":3889611,"psaProjectId":32341}]]}},"additionalProperties":false,"required":["allocations"]},"fixedFeesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed fee.","examples":["7c2e1b90-4a53-4f16-8de2-9b1035c7ef42"]},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The fixed fee amount, in the currency given by currency.","examples":["5000.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"frequency":{"anyOf":[{"enum":["Monthly","BiMonthly","Once","Quarterly","SemiAnnually","Annually"]},{"type":"null"}],"description":"The billing frequency of the fixed fee.","examples":["Monthly"]},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the fixed fee's billing period, inclusive. Format YYYY-MM-DD.","examples":["2026-01-01"]},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the fixed fee's billing period, inclusive. Format YYYY-MM-DD.","examples":["2026-12-01"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this fixed fee belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"salesOrderProductLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the sales order product line this fixed fee fulfills. It is a numeric key. There is no endpoint for it.","examples":[8812]},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product this fixed fee is associated with. It is a numeric key, not the UUID that GET accounting/products/:id takes.","examples":[1001]},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line this fixed fee is associated with. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes.","examples":[201]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the fixed fee record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"createPsaProjectOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created project.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createPsaProjectInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name for the project.","examples":["Acme Rollout"]},"startDate":{"type":"string","format":"date","description":"The project start date. Format YYYY-MM-DD.","examples":["2026-09-01"]},"endDate":{"type":"string","format":"date","description":"The project end date. Format YYYY-MM-DD.","examples":["2027-03-01"]},"teamStartDate":{"type":"string","format":"date","description":"The team assignment start date. Defaults to startDate when omitted. Format YYYY-MM-DD."},"teamEndDate":{"type":"string","format":"date","description":"The team assignment end date. Defaults to endDate when omitted. Format YYYY-MM-DD."},"teamLeadIds":{"type":"array","items":{"type":"number"},"description":"The numeric identifiers of the employees to assign as project and team leads. Optional. There is no endpoint for them. Each must be an Active or Planned employee.","examples":[[3845142]]},"notifyProjectLeads":{"type":"boolean","description":"Whether to notify the assigned project leads."},"category":{"enum":["Billable","Internal","NonBillable"],"description":"The project category. Accepted values: 'Billable', 'Internal', 'NonBillable'.","examples":["Billable"]},"status":{"enum":["Tentative","Planning","PlanningDraft","NotStarted","InProgress","Paused","Completed","Cancelled"],"description":"Ignored. A new project always starts with status 'NotStarted'.","examples":["NotStarted"]},"currency":{"type":"string","description":"The project's default currency. Format ISO 4217, for example 'USD'.","examples":["USD"]},"budgetAmount":{"type":"string","format":"decimal","description":"The project budget, in the project currency. 0 means no budget."},"budgetCurrency":{"type":"string","description":"Ignored. The budget is always in the project currency."},"departmentId":{"type":"number","description":"The numeric identifier of the department to allocate the project to. GET people/departments/:id takes a UUID, so the number cannot be used to fetch the department."},"entityId":{"type":"number","description":"The numeric identifier of the legal entity the project belongs to. When omitted, it defaults to the sales arrangement's entity, or without one to your own employee entity. When salesArrangementId is set, it must match the sales arrangement's entity, and a different value fails with the message 'The project's entity must match the entity of its sales arrangement'. GET base/entities lists entities by UUID, so the number cannot be used to look the entity up there. Inactive entities cannot be used."},"customerId":{"type":"number","description":"The numeric identifier of a customer to link directly to the project. When salesArrangementId is set, it must be that sales arrangement's customer, or be left out. GET accounting/customers/:id takes a UUID, so the number cannot be used to fetch the customer."},"enforceActivityDateRange":{"type":"boolean","description":"Whether time entries must fall within the project's startDate and endDate."},"invoiced":{"type":"boolean","description":"Whether to mark the project as invoiced. Defaults to false."},"notes":{"type":"string","description":"Free-form notes about the project."},"opportunityId":{"type":"number","description":"Ignored. Opportunity links cannot be set through this API."},"code":{"type":"string","description":"Ignored. The project code is generated automatically, for example 'PSA-36008'. Read it with GET psa/projects/:id."},"quoteId":{"type":"number","description":"Ignored. Quote links cannot be set through this API."},"salesArrangementId":{"type":"number","description":"The numeric identifier of a sales arrangement that links the project to billing terms. When set, the direct customerId link is not persisted. There is no endpoint for it."},"salesRepresentativeId":{"type":"number","description":"The numeric identifier of the sales representative, an employee. There is no endpoint for it. Must be an Active or Planned employee."},"projectTypeId":{"type":"number","description":"The numeric identifier of the project type. GET psa/project-types/:id takes a UUID, so the number cannot be used to fetch the project type."},"externalLink":{"type":"string","description":"A link to an external system for this project."},"projectSettings":{"type":"object","properties":{"disableTimetrackingOnHolidays":{"type":"boolean"},"disableTimetrackingOnWeekends":{"type":"boolean"},"maxHoursPerDay":{"type":"string","format":"decimal"},"maxHoursPerMonth":{"type":"string","format":"decimal"},"maxHoursPerWeek":{"type":"string","format":"decimal"},"billableHoursPerDay":{"type":"string","format":"decimal"},"notifyNewMembers":{"type":"boolean"},"requireNotes":{"type":"boolean"}},"additionalProperties":false,"description":"The timetracking settings for the project. Created only when at least one setting is provided."}},"additionalProperties":false,"required":["name","startDate","endDate","category","status","currency"]},"deleteAllocationsOutput":{"type":"object","properties":{},"additionalProperties":false},"deleteAllocationsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the allocations to delete. The call is all-or-nothing: if any identifier matches no allocation, nothing is deleted.","examples":[["3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13","b7c40e29-1af6-42d8-8e55-6d3b9c018a74"]]}},"additionalProperties":false,"required":["ids"]},"createPlaceholdersOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The identifiers of the created placeholders, in the order they were sent.","examples":[["3f2a91c7-5d84-4b1e-9c60-8a7e2d4f0b13","b7c40e29-1af6-42d8-8e55-6d3b9c018a74"]]}},"additionalProperties":false,"required":["ids"]},"createPlaceholdersInput":{"type":"object","properties":{"placeholders":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the placeholder. Required, and unique within the tenant. A blank name fails the call with NAME_REQUIRED. A name another placeholder already has fails with DUPLICATE_NAME."},"weeklyWorkingHours":{"type":"string","format":"decimal","description":"The weekly working hours used for planning, as a non-negative number of hours, for example 40.00. Omitted or zero stores no hours."}},"additionalProperties":false,"required":["name"]},"description":"The placeholders to create. Send at least one. Either all are created, or none are.","examples":[[{"name":"Unassigned Backend Engineer","weeklyWorkingHours":"40.00"},{"name":"Unassigned Designer"}]]}},"additionalProperties":false,"required":["placeholders"]},"createMilestonesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created milestone."}},"additionalProperties":false,"required":["id"]},"description":"The created milestones, in the order the request sent them. Read a record with GET psa/milestones/:id for its stored state.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"},{"id":"5e0a4c1b-8f27-4d63-a9b2-c14d7e66f031"}]]}},"additionalProperties":false,"required":["created"]},"createMilestonesInput":{"type":"object","properties":{"milestones":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string","description":"The PSA project the milestone belongs to. You need edit rights on it. See id on GET psa/projects/:id."},"name":{"type":"string","description":"The display name of the milestone. Can't be empty."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the milestone."},"dueDate":{"type":"string","format":"date","description":"The date the milestone is due. Must be within the project's start and end dates. Use format YYYY-MM-DD."},"status":{"enum":["pending","accomplished"],"description":"The status of the milestone. Defaults to 'pending'. A milestone becomes 'invoiced' only through invoicing."},"billable":{"type":"boolean","description":"Whether the milestone is billable to a customer. Defaults to true on a Billable project and false otherwise. Can't be true on an Internal or NonBillable project."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The milestone amount, in the project currency. Required and other than 0 when the milestone is billable; not negative, at most 2 decimal places. Must be absent, null or 0 when it is not billable, and is then stored as 0."},"salesOrderProductLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order product line this milestone fulfills. It must be a one-time, milestone-billed line on a sales order of the project's sales arrangement that no other project uses. Only on a billable milestone. Send null to unlink. See id in the salesOrderProductLines collection (SalesOrderListProductLinesEndpointV1).","x-foreign-key":{"packageName":"everest.fin.accounting","apiName":"SalesOrderListProductLinesEndpointV1","dataSetName":"salesOrderProductLines","fieldName":"id"}},"invoiceMilestoneId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice milestone this milestone is linked to. It must be on salesOrderProductLineId, not yet invoiced, and not linked to another milestone of the project. While linked, it sets the milestone's name and, when it has a price, its amount. Send null to unlink. See invoiceMilestoneId on GET psa/milestones/:id."}},"additionalProperties":false,"required":["projectId","name","dueDate"]},"description":"The milestones to create. If any of them can't be created, none are.","examples":[[{"projectId":"2d9e4f71-0b38-4c6a-a5d2-71e8c3f90b46","name":"Phase 1 delivery","dueDate":"2026-09-30","amount":"15000.00"},{"projectId":"2d9e4f71-0b38-4c6a-a5d2-71e8c3f90b46","name":"Go-live","description":"Production cut-over and sign-off.","dueDate":"2026-12-15","status":"pending","billable":true,"amount":"25000.00"}]]}},"additionalProperties":false,"required":["milestones"]},"projectRevenuesRow":{"type":"object","properties":{"date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the revenue falls on. Format YYYY-MM-DD."},"month":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the month the revenue is reported under. Format YYYY-MM-DD."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source of the revenue. Possible values: 'timeAndMaterial', 'milestone', 'fixedFee', 'expense'."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue amount, in the currency given by currency."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of amount. Format ISO 4217, for example 'USD'."},"planned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True for planned revenue (from allocations or schedules), false for actual revenue."},"projectId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PSA project the revenue belongs to — the id the project list publishes, so a query joins projects on it."},"projectName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the PSA project."},"psaProjectCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The category of the PSA project. Possible values: 'Billable', 'Internal', 'NonBillable'."},"psaProjectStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the PSA project."},"psaProjectInvoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the PSA project is invoiced."},"psaProjectBudgetAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The PSA project's budget, in psaProjectBudgetCurrency: the revenue the project is planned to earn — a project created from a quote starts with the quote's expected revenue (positions, milestones, fixed fees and expense budgets). Revenue draws it down, not cost; see budgetRemaining on GET psa/projects."},"psaProjectBudgetCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of psaProjectBudgetAmount. Format ISO 4217."},"departmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The department the PSA project belongs to — the id the department list publishes. Absent when the project has no department."},"salesRepresentativeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employee who is the PSA project's sales representative — the id the people list publishes. Absent when none is set."},"projectTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PSA project's type — the id the project type list publishes. Absent when the project has no type."},"psaProjectTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the PSA project's type."},"salesArrangementId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The UUID of the sales arrangement the PSA project is linked to. There is no sales arrangement list to join it to. Absent when none is linked."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer named in client — the id the customer list publishes: the linked sales arrangement's customer, or the project's direct customer when no sales arrangement is linked. Absent when the project has neither."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity of the linked sales arrangement — the id the entity list publishes. Absent when no sales arrangement is linked."},"salesArrangementEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity of the linked sales arrangement."},"client":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer: the sales arrangement's customer when one is linked, otherwise the project's direct customer."},"customerCustomerSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The segment of the customer named in client."},"customerCountry":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The country of the customer named in client."},"activityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The activity the revenue is booked against — the id the activity list publishes. Absent for rows not tied to an activity, such as fixed fees and expenses."},"projectActivityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the activity."},"projectActivityBillable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the activity is billable."},"projectActivityBillingType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billing type of the activity. Possible values: 'Hours', 'Milestone', 'FixedFee'."},"projectActivityCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billability category of the activity. Possible values: 'ClientBillable', 'NonBillable', 'Valuable', 'NonValuable'."},"projectActivityInvoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the activity is invoiced."},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employee the revenue comes from — the id the people list publishes. Group by it, with employeeDisplayName beside it: two employees can share a name, and a grouping by the name alone sums them as one. Absent for rows not tied to an employee."},"memberEmployeeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the employee the revenue comes from, as the person record holds it — often the family name alone, and not unique: two employees can share it. Group by employeeId and show employeeDisplayName."},"employeeDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full display name of the employee the revenue comes from, carried so a grouping by employeeId can show it without a join. Not unique — never the grouping key on its own."},"employeeEmploymentType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employment type of the employee."},"employeeEmploymentCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employment category of the employee."},"submissionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The submission status of the underlying time entry. Absent for rows that do not come from a time entry."}},"additionalProperties":false},"deleteActivityOutput":{"type":"object","properties":{"deletedCount":{"type":"number","description":"How many activities were deleted: the activity plus its sub-tasks.","examples":[3]}},"additionalProperties":false,"required":["deletedCount"]},"updateMilestonesOutput":{"type":"object","properties":{},"additionalProperties":false},"updateMilestonesInput":{"type":"object","properties":{"milestones":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the milestone to update. Each milestone can appear only once per request."},"name":{"type":"string","description":"A new display name. Can't be empty. Ignored while an invoice milestone is linked, which owns the name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A new free-form description. Send null to clear it."},"dueDate":{"type":"string","format":"date","description":"A new due date. Must be within the project's start and end dates. Use format YYYY-MM-DD."},"status":{"enum":["pending","accomplished"],"description":"A new status. A milestone becomes 'invoiced' only through invoicing."},"billable":{"type":"boolean","description":"Whether the milestone is billable to a customer. Can't be true on an Internal or NonBillable project. Turning it off sets the amount to 0 and removes any product or sales order link; sending a link along with billable false is rejected."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"A new amount, in the project currency. A billable milestone needs one other than 0; not negative, at most 2 decimal places. Must be null or 0 when the milestone is not billable. Ignored while a linked invoice milestone has a price."},"salesOrderProductLineId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The sales order product line this milestone fulfills. It must be a one-time, milestone-billed line on a sales order of the project's sales arrangement that no other project uses. Only on a billable milestone. Send null to unlink. Omit to keep the stored link. See id in the salesOrderProductLines collection (SalesOrderListProductLinesEndpointV1).","x-foreign-key":{"packageName":"everest.fin.accounting","apiName":"SalesOrderListProductLinesEndpointV1","dataSetName":"salesOrderProductLines","fieldName":"id"}},"invoiceMilestoneId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The invoice milestone this milestone is linked to. It must be on salesOrderProductLineId, not yet invoiced, and not linked to another milestone of the project. While linked, it sets the milestone's name and, when it has a price, its amount. When newly linked and no dueDate is sent, the due date becomes the invoice milestone's projected date. Send null to unlink. Omit to keep the stored one; moving to another sales order product line without sending one removes it. See invoiceMilestoneId on GET psa/milestones/:id."}},"additionalProperties":false,"required":["id"]},"description":"The milestones to update. If any of them can't be updated, none are.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","status":"accomplished"},{"id":"5e0a4c1b-8f27-4d63-a9b2-c14d7e66f031","name":"Go-live","description":null,"dueDate":"2027-01-15","amount":"27500.00"}]]}},"additionalProperties":false,"required":["milestones"]},"updateProjectTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"updateProjectTypeInput":{"type":"object","properties":{"name":{"type":"string","description":"A new display name for the project type. It must be unique across the tenant. A name another project type already uses fails with DUPLICATE_NAME.","examples":["Retainer (Annual)"]}},"additionalProperties":false},"teamMembersRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the team-roster row."},"psaProjectId":{"type":"number","description":"The id of the PSA project this record belongs to. It is a numeric key you can filter on here, not the UUID that GET psa/projects/:id takes."},"employeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the employee this roster record is for. It is a numeric key, not a UUID any public endpoint returns as a fetchable id."},"isTeamLead":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this team member is the team lead."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of this person's membership of the team. Format YYYY-MM-DD. Absent when not set."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of this person's membership of the team. Format YYYY-MM-DD. Absent when not set."},"allocation":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The share of the person's capacity allocated to this team, as a percentage. For example, 50 means 50%."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full name of the team member. It is returned but cannot be filtered or sorted on, and there is no endpoint to find a member by name."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The preferred display name of the team member. Like name, it cannot be filtered or sorted on."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time this roster row last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"projectTypesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the project type.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]},"name":{"type":"string","description":"The display name of the project type.","examples":["Retainer"]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the project type record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false},"allocationsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the allocation."},"startDate":{"type":"string","format":"date","description":"The first day of the allocation period, inclusive. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"The last day of the allocation period, inclusive. Format YYYY-MM-DD."},"totalHours":{"type":"string","format":"decimal","description":"The total planned hours for the allocation period."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes about the allocation."},"method":{"enum":["totalHours","hoursPerDay","hoursPerWeek","hoursPerMonth"],"description":"The distribution method for the planned hours."},"memberId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the PSA team-member assignment the allocation is booked against. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"employeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the employee for the allocated team member. It is a numeric key, and there is no public endpoint for an employee."},"projectActivityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the project activity the allocation is against. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"projectPositionId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the project position the allocation is against. It is a numeric key, not the UUID that GET psa/positions/:id takes."},"psaProjectId":{"type":"number","description":"The id of the PSA project the allocation belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes."},"memberName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the allocated team member."},"memberPlaceholderName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the placeholder, when the allocation is to a placeholder rather than an employee."},"projectActivityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the project activity."},"projectPositionName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the project position."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the allocation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."}},"additionalProperties":false},"updateTimeEntriesOutput":{"type":"object","properties":{},"additionalProperties":false},"updateTimeEntriesInput":{"type":"object","properties":{"timeEntries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the time entry to update."},"hours":{"type":"string","format":"decimal","description":"New total hours for the entry. Omit to leave it unchanged."},"notes":{"type":"string","description":"New free-form notes. Omit to leave them unchanged, or pass an empty string to clear them."}},"additionalProperties":false,"required":["id"]},"description":"The time entries to update.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18","hours":"7.5"}]]}},"additionalProperties":false,"required":["timeEntries"]},"getExpenseBudgetsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier for the budget."},"name":{"type":"string","description":"The display name of the budget."},"budget":{"type":"string","format":"decimal","description":"The budget amount, in the currency given by currency. Absent when the budget has no amount."},"currency":{"type":"string","description":"The currency of budget. Format ISO 4217, for example 'USD'. Absent when the budget has no amount."},"isDefault":{"type":"boolean","description":"Whether this is the project's default catch-all budget."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the budget definition last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"billable":{"type":"boolean","description":"Whether expenses against this budget are billable to the customer."},"productId":{"type":"number","description":"The id of the product tied to this budget. It is a numeric key, not the UUID that GET accounting/products/:id takes. Absent when the budget is not tied to a product."},"productLineId":{"type":"number","description":"The id of the product line tied to this budget. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes. Absent when the budget is not tied to a product line."},"salesOrderId":{"type":"number","description":"The id of the sales order this budget bills against. It is a numeric key, not the UUID that GET accounting/sales-orders/:id takes."}},"additionalProperties":false,"required":["id","name","isDefault"]},"description":"The project's budgets on this page. An empty array when the project has no budgets.","examples":[[{"id":501,"name":"Travel","budget":"10000.00","currency":"USD","isDefault":false,"billable":true,"lastModifiedDate":"2026-07-02T09:14:22.000Z"},{"id":502,"name":"General","budget":"5000.00","currency":"USD","isDefault":true,"lastModifiedDate":"2026-06-18T11:02:47.000Z"}]]},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more budgets remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page.","examples":[{"hasMore":false}]}},"additionalProperties":false,"required":["items","pagination"]},"projectsRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the project."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the project last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the project."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project code, for example 'PSA-29767'. Absent when none has been set."},"category":{"anyOf":[{"enum":["Billable","Internal","NonBillable"]},{"type":"null"}],"description":"The project category."},"status":{"anyOf":[{"enum":["Tentative","Planning","PlanningDraft","NotStarted","InProgress","Paused","Completed","Cancelled"]},{"type":"null"}],"description":"The project status."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project's default currency. Format ISO 4217, for example 'USD'. It applies to revenueRecordedTimeToDate, revenueAccomplishedMilestones, revenueFixedFeeToDate, revenueToDate, and budgetRemaining."},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the project is marked as invoiced."},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The project start date. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The project end date. Format YYYY-MM-DD."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form notes about the project."},"enforceActivityDateRange":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether time entries must fall within the project's startDate and endDate."},"budgetAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The project budget amount, in budgetCurrency."},"budgetCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of budgetAmount. Format ISO 4217, for example 'USD'."},"departmentId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the department the project is allocated to. GET people/departments/:id takes a UUID, so the number cannot be used to fetch the department."},"teamId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the team assigned to this project. GET people/teams/:id takes a UUID, so the number cannot be used to fetch the team."},"teamName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the team."},"teamStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The team's start date, which may differ from startDate. Format YYYY-MM-DD."},"teamEndDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The team's end date, which may differ from endDate. Format YYYY-MM-DD."},"salesRepresentativeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the sales representative, an employee. There is no endpoint for it."},"salesRepresentativeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the sales representative."},"projectTypeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the project type. GET psa/project-types/:id takes a UUID, so the number cannot be used to fetch the project type."},"projectTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the project type."},"quoteId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the CRM quote this project was created from. GET crm/quotes/:id takes a UUID, so the number cannot be used to fetch the quote."},"quoteNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The quote number."},"opportunityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the CRM opportunity this project is linked to. GET crm/opportunities/:id takes a UUID, so the number cannot be used to fetch the opportunity."},"opportunityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the opportunity."},"opportunityCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of the opportunity. Format ISO 4217, for example 'USD'."},"salesArrangementId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the sales arrangement that links the project to billing terms. There is no endpoint for it."},"salesArrangementCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The functional currency of the sales arrangement. Format ISO 4217, for example 'USD'."},"salesArrangementCustomerId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the customer on the sales arrangement. GET accounting/customers/:id takes a UUID, so the number cannot be used to fetch the customer."},"salesArrangementCustomerName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the customer on the sales arrangement."},"salesArrangementEntityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The numeric identifier of the legal entity on the sales arrangement. There is no endpoint for it."},"salesArrangementEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the legal entity on the sales arrangement."},"revenueRecordedTimeToDate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue from recorded time up to today, in the project currency. Absent when the project has no time entries."},"revenueAccomplishedMilestones":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The revenue from accomplished and invoiced milestones, in the project currency. Absent when the project has no completed milestones."},"revenueFixedFeeToDate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The fixed-fee revenue to date, in the project currency. Absent when the project has no fixed fees."},"revenueToDate":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The total revenue to date, in the project currency: revenueRecordedTimeToDate + revenueAccomplishedMilestones + revenueFixedFeeToDate."},"budgetRemaining":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The budget remaining, in the project currency: budgetAmount - revenueToDate."}},"additionalProperties":false},"activitiesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the activity.","examples":["c4a91b07-6e52-4d38-9a1f-83b7de20c5f6"]},"name":{"type":"string","description":"The display name of the activity.","examples":["Discovery workshop"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the activity. Absent when none was set.","examples":["Two-day onsite requirements workshop."]},"hoursBudget":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The budgeted hours for this activity, as a count of hours. It is not a monetary amount.","examples":["40.00"]},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the activity is billable to a customer. Derived from category being 'ClientBillable'.","examples":[true]},"invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the activity has been invoiced.","examples":[false]},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The activity's start date. Format YYYY-MM-DD. It is within the owning project's date range when the project's enforceActivityDateRange setting is on.","examples":["2026-09-01"]},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The activity's end date. Format YYYY-MM-DD.","examples":["2026-09-02"]},"billingType":{"enum":["Hours","Milestone","FixedFee"],"description":"The activity's billing type.","examples":["Hours"]},"category":{"anyOf":[{"enum":["ClientBillable","NonBillable","NonValuable","Valuable"]},{"type":"null"}],"description":"The activity's category.","examples":["ClientBillable"]},"milestoneId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the milestone this activity is billed against. Absent unless billingType is 'Milestone'. It is a numeric key, not the UUID that GET psa/milestones/:id takes."},"fixedFeeId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the fixed fee this activity is billed against. Absent unless billingType is 'FixedFee'. It is a numeric key, not the UUID that GET psa/fixed-fees/:id takes."},"activityStatusId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the activity's progress status. Absent when no status is set. Status values are tenant-configured, and there is no endpoint that lists them. Use statusName for the label.","examples":[3]},"statusName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the activity's progress status, for example 'In progress'. Absent when no status is set.","examples":["In progress"]},"parentActivityId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the parent activity when this is a sub-task. Absent when the activity is top-level. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"psaProjectId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the PSA project that owns this activity. Absent for a timetracking project with no PSA layer. It is a numeric key you can filter on here, but not the UUID that GET psa/projects/:id takes.","examples":[32341]},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time this activity last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"getMilestoneOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the milestone.","examples":["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]},"name":{"type":"string","description":"The display name of the milestone.","examples":["Phase 1 delivery"]},"description":{"type":"string","description":"A free-form description of the milestone."},"amount":{"type":"string","format":"decimal","description":"The milestone amount, in the currency given by currency.","examples":["15000.00"]},"currency":{"type":"string","description":"The currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"dueDate":{"type":"string","format":"date","description":"The date the milestone is due for completion. Format YYYY-MM-DD.","examples":["2026-09-30"]},"status":{"type":"string","description":"The status of the milestone. Possible values: 'pending', 'accomplished', 'invoiced'.","examples":["pending"]},"billable":{"type":"boolean","description":"Whether the milestone is billable to a customer.","examples":[true]},"psaProjectId":{"type":"number","description":"The id of the PSA project this milestone belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"invoiceId":{"type":"number","description":"The id of the invoice this milestone has been billed on. Absent when the milestone has not been invoiced. It is a numeric key, not the UUID that GET accounting/invoices/:id takes."},"productId":{"type":"number","description":"The id of the product this milestone is associated with. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"type":"number","description":"The id of the product line this milestone is associated with. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the milestone record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id","psaProjectId","lastModifiedDate"]},"projectCostsRow":{"type":"object","properties":{"date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the cost falls on. Format YYYY-MM-DD."},"month":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the month the cost is reported under. Format YYYY-MM-DD."},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The source of the cost. Possible values: 'employee' (time entries and allocations at cost rate), 'expense' (expenses)."},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The cost amount, in the currency given by currency."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of amount. Format ISO 4217, for example 'USD'."},"planned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"True for planned cost (from allocations or schedules), false for actual cost."},"projectId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PSA project the cost belongs to — the id the project list publishes, so a query joins projects on it."},"projectName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the PSA project."},"psaProjectCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The category of the PSA project. Possible values: 'Billable', 'Internal', 'NonBillable'."},"psaProjectStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The status of the PSA project."},"psaProjectInvoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the PSA project is invoiced."},"psaProjectBudgetAmount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The PSA project's budget, in psaProjectBudgetCurrency: the revenue the project is planned to earn — a project created from a quote starts with the quote's expected revenue (positions, milestones, fixed fees and expense budgets). Revenue draws it down, not cost; see budgetRemaining on GET psa/projects."},"psaProjectBudgetCurrency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of psaProjectBudgetAmount. Format ISO 4217."},"departmentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The department the PSA project belongs to — the id the department list publishes. Absent when the project has no department."},"salesRepresentativeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employee who is the PSA project's sales representative — the id the people list publishes. Absent when none is set."},"projectTypeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PSA project's type — the id the project type list publishes. Absent when the project has no type."},"psaProjectTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the PSA project's type."},"salesArrangementId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The UUID of the sales arrangement the PSA project is linked to. There is no sales arrangement list to join it to. Absent when none is linked."},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The customer named in client — the id the customer list publishes: the linked sales arrangement's customer, or the project's direct customer when no sales arrangement is linked. Absent when the project has neither."},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The legal entity of the linked sales arrangement — the id the entity list publishes. Absent when no sales arrangement is linked."},"salesArrangementEntityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the legal entity of the linked sales arrangement."},"client":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the customer: the sales arrangement's customer when one is linked, otherwise the project's direct customer."},"customerCustomerSegment":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The segment of the customer named in client."},"customerCountry":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The country of the customer named in client."},"activityId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The activity the cost is booked against — the id the activity list publishes. Absent for rows not tied to an activity, such as expenses."},"projectActivityName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the activity."},"projectActivityBillable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the activity is billable."},"projectActivityBillingType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billing type of the activity. Possible values: 'Hours', 'Milestone', 'FixedFee'."},"projectActivityCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billability category of the activity. Possible values: 'ClientBillable', 'NonBillable', 'Valuable', 'NonValuable'."},"projectActivityInvoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the activity is invoiced."},"employeeId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employee the cost comes from — the id the people list publishes. Group by it, with employeeDisplayName beside it: two employees can share a name, and a grouping by the name alone sums them as one. Absent for rows not tied to an employee."},"memberEmployeeName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the employee the cost comes from, as the person record holds it — often the family name alone, and not unique: two employees can share it. Group by employeeId and show employeeDisplayName."},"employeeDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The full display name of the employee the cost comes from, carried so a grouping by employeeId can show it without a join. Not unique — never the grouping key on its own."},"employeeEmploymentType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employment type of the employee."},"employeeEmploymentCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employment category of the employee."},"submissionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The submission status of the underlying time entry. Absent for rows that do not come from a time entry."},"billableExpense":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Whether the underlying expense is billable to the customer. Absent for rows that do not come from an expense."}},"additionalProperties":false},"submitTimeEntriesOutput":{"type":"object","properties":{"submitted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the entry."}},"additionalProperties":false,"required":["id"]},"description":"The entries whose status was set to pending.","examples":[[{"id":"9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"}]]}},"additionalProperties":false,"required":["submitted"]},"submitTimeEntriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the time entries to submit for approval.","examples":[["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]]}},"additionalProperties":false,"required":["ids"]},"getTeamMemberPositionOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the position assignment.","examples":["c81b0a52-7de4-4f16-9b32-0a5e8c7d4126"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this record belongs to. It is a numeric key you can filter on here, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"projectPositionId":{"type":"number","description":"The id of the project position this assignment fills. It is a numeric key you can filter on here, not the UUID that GET psa/positions/:id takes.","examples":[7]},"positionName":{"type":"string","description":"The name of the project position, paired with projectPositionId. It is returned but cannot be filtered or sorted on, and there is no endpoint to find an assignment by position name.","examples":["Senior Consultant"]},"teamMemberId":{"type":"number","description":"The id of the assigned person's team-roster record. Absent for placeholder-only assignments. It is a numeric key, not the UUID that GET psa/team-members/:id takes.","examples":[4401]},"placeholderId":{"type":"number","description":"The id of the placeholder filling this position, when it is filled by a placeholder rather than a person. It is a numeric key, not the UUID that GET psa/placeholders/:id takes."},"invoiced":{"type":"boolean","description":"Whether this assignment's work has been invoiced. An invoiced assignment cannot be deleted.","examples":[false]},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time this assignment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-05-12T09:30:00.000Z"]}},"additionalProperties":false,"required":["id","lastModifiedDate"]},"deleteProjectTypeOutput":{"type":"object","properties":{},"additionalProperties":false},"milestonesRow":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the milestone.","examples":["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The display name of the milestone.","examples":["Phase 1 delivery"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A free-form description of the milestone.","examples":["Signed off by the customer's PMO."]},"amount":{"anyOf":[{"type":"string","format":"decimal"},{"type":"null"}],"description":"The milestone amount, in the currency given by currency.","examples":["15000.00"]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The date the milestone is due for completion. Format YYYY-MM-DD.","examples":["2026-09-30"]},"status":{"anyOf":[{"enum":["pending","accomplished","invoiced"]},{"type":"null"}],"description":"The status of the milestone.","examples":["pending"]},"billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the milestone is billable to a customer.","examples":[true]},"psaProjectId":{"type":"number","description":"The id of the PSA project this milestone belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"invoiceId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the invoice this milestone has been billed on. Absent when the milestone has not been invoiced. It is a numeric key, not the UUID that GET accounting/invoices/:id takes."},"productId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product this milestone is associated with. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The id of the product line this milestone is associated with. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"lastModifiedDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The date and time the milestone record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false},"createTimeEntriesOutput":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created time entry."}},"additionalProperties":false,"required":["id"]},"description":"The created entries, in input order. Each is an id only. Read an entry back with GET psa/time-entries/:id.","examples":[[{"id":"4f0ad2e6-8c13-4b7a-9e52-6d81b30f7ac9"}]]}},"additionalProperties":false,"required":["created"]},"createTimeEntriesInput":{"type":"object","properties":{"timeEntries":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"The date the time is logged for. Use format YYYY-MM-DD."},"hours":{"type":"string","format":"decimal","description":"The total hours for the entry."},"projectActivityId":{"type":"number","description":"The numeric key of the project activity to log time against."},"memberId":{"type":"number","description":"The numeric key of the PSA member assignment to log time for."},"psaProjectId":{"type":"number","description":"The numeric key of the PSA project the entry belongs to. If omitted, it is derived from projectActivityId."},"notes":{"type":"string","description":"Free-form notes for the entry. Required when the project's settings require notes."}},"additionalProperties":false,"required":["date","hours","projectActivityId","memberId"]},"description":"The time entries to create.","examples":[[{"date":"2026-08-04","hours":"7.5","projectActivityId":7001,"memberId":5001,"notes":"Sprint 14 backend work"}]]}},"additionalProperties":false,"required":["timeEntries"]},"deleteTimeEntriesOutput":{"type":"object","properties":{},"additionalProperties":false},"deleteTimeEntriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The unique identifiers of the time entries to delete.","examples":[["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]]}},"additionalProperties":false,"required":["ids"]},"getAllocationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the allocation.","examples":["6f3c1f0e-6a2b-4d5e-9c11-2b7a8e4d0f13"]},"startDate":{"type":"string","format":"date","description":"The first day of the allocation period, inclusive. Format YYYY-MM-DD.","examples":["2026-08-03"]},"endDate":{"type":"string","format":"date","description":"The last day of the allocation period, inclusive. Format YYYY-MM-DD.","examples":["2026-08-14"]},"totalHours":{"type":"string","format":"decimal","description":"The total planned hours for the allocation period.","examples":["40.00"]},"notes":{"type":"string","description":"Free-form notes about the allocation."},"method":{"type":"string","description":"The distribution method for the planned hours. Possible values: 'totalHours', 'hoursPerDay', 'hoursPerWeek', 'hoursPerMonth'.","examples":["totalHours"]},"memberId":{"type":"number","description":"The id of the PSA team-member assignment the allocation is booked against. It is a numeric key, not the UUID that GET psa/team-members/:id takes."},"employeeId":{"type":"number","description":"The id of the employee for the allocated team member. It is a numeric key, and there is no public endpoint for an employee."},"projectActivityId":{"type":"number","description":"The id of the project activity the allocation is against. It is a numeric key, not the UUID that GET psa/activities/:id takes."},"projectPositionId":{"type":"number","description":"The id of the project position the allocation is against. It is a numeric key, not the UUID that GET psa/positions/:id takes."},"psaProjectId":{"type":"number","description":"The id of the PSA project the allocation belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"memberName":{"type":"string","description":"The name of the allocated team member."},"memberPlaceholderName":{"type":"string","description":"The name of the placeholder, when the allocation is to a placeholder rather than an employee."},"projectActivityName":{"type":"string","description":"The name of the project activity."},"projectPositionName":{"type":"string","description":"The name of the project position."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the allocation record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T09:12:33.421Z"]}},"additionalProperties":false,"required":["id","startDate","endDate","totalHours","method","psaProjectId","lastModifiedDate"]},"getTimeEntryOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the time entry.","examples":["9b1c7f42-3d8a-4e05-b6c1-27fa5e903d18"]},"date":{"type":"string","format":"date","description":"The date the time was logged for. Format YYYY-MM-DD.","examples":["2026-08-10"]},"hours":{"type":"string","format":"decimal","description":"The total hours logged in this entry.","examples":["8"]},"billableHours":{"type":"string","format":"decimal","description":"The hours classified as billable to a customer, derived from projectActivityCategory.","examples":["8"]},"nonBillableHours":{"type":"string","format":"decimal","description":"The hours classified as non-billable to a customer, derived from projectActivityCategory."},"internalValuableHours":{"type":"string","format":"decimal","description":"The hours classified as internal valuable work, derived from projectActivityCategory."},"internalNonValuableHours":{"type":"string","format":"decimal","description":"The hours classified as internal non-valuable work, derived from projectActivityCategory."},"invoicedHours":{"type":"string","format":"decimal","description":"The hours that have been invoiced, a subset of billableHours."},"revenue":{"type":"string","format":"decimal","description":"The revenue from this time entry, in the currency given by currency.","examples":["1250.00"]},"cost":{"type":"string","format":"decimal","description":"The cost of this time entry, in the currency given by currency.","examples":["800.00"]},"currency":{"type":"string","description":"The currency of revenue and cost. Format ISO 4217, for example 'USD'. It is the currency of the project position's bill rate.","examples":["USD"]},"notes":{"type":"string","description":"Free-form notes on the time entry."},"submissionStatus":{"type":"string","description":"The submission and approval status of the entry. Possible values: 'draft', 'pending', 'approved', 'rejected', 'submittedForInvoicing', 'invoiced'.","examples":["draft"]},"submissionDate":{"type":"string","format":"date","description":"The date the entry was submitted for approval. Format YYYY-MM-DD."},"month":{"type":"string","format":"date","description":"The first day of the month the entry is reported under. Format YYYY-MM-DD.","examples":["2026-08-01"]},"memberId":{"type":"number","description":"The numeric key of the PSA member assignment the time was logged for. GET psa/team-members/:id takes the member's UUID, not this key, so it cannot fetch the member.","examples":[5001]},"memberEmployeeId":{"type":"number","description":"The numeric key of the employee who logged the time. There is no endpoint for it.","examples":[3845142]},"memberEmployeeName":{"type":"string","description":"The name of the employee who logged the time.","examples":["Alex Rivera"]},"projectActivityId":{"type":"number","description":"The numeric key of the activity the time was logged against. GET psa/activities/:id takes the activity's UUID, not this key, so it cannot fetch the activity.","examples":[7001]},"projectActivityName":{"type":"string","description":"The name of the activity the time was logged against."},"projectActivityCategory":{"type":"string","description":"The billability category of the activity the time was logged against. The billable, non-billable and internal-hour fields are derived from it. See category on GET psa/activities/:id.","examples":["ClientBillable"]},"projectPositionId":{"type":"number","description":"The numeric key of the position the time was logged against. GET psa/positions/:id takes the position's UUID, not this key, so it cannot fetch the position."},"projectPositionName":{"type":"string","description":"The name of the position the time was logged against."},"psaProjectId":{"type":"number","description":"The numeric key of the PSA project the entry belongs to. GET psa/projects/:id takes the project's UUID, not this key, so it cannot fetch the project.","examples":[32341]},"projectName":{"type":"string","description":"The name of the PSA project the entry belongs to."},"psaProjectStatus":{"type":"string","description":"The status of the PSA project this entry belongs to."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the entry last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id"]},"searchCategoriesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the category — the id getCategory, updateCategory and deleteCategory (GET, PATCH and DELETE value-accounting/categories/:id) are keyed by, and what a master-data record's categoryId points at."},"name":{"type":"string","description":"Display name of the category, e.g. 'Research & Development'. Unique across all categories — this resource's semantic key."},"description":{"type":"string","description":"Longer free-text explanation of what the category is for. Absent — not null — when it was never set or has been cleared."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the category last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the keyed read publish."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"description":"The categories on this page, one row per category, in the same shape getCategory (GET value-accounting/categories/:id) returns. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by id ascending — a unique, immutable key, so a rename never moves a row across a page boundary. The cursor is a KEYSET cursor over that order (it resumes at the last row of the page you received), so the order is stable across the pages of one walk in the strong sense: a category created after your cursor position appears on a later page, one created before it does not, and no row is ever repeated or skipped, whatever else is written while you walk."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more categories remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchCategoriesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Exact category name, matched on the stored text (case- and space-sensitive). The name is this resource's unique semantic key, so at most one category can match; a name that matches nothing yields an empty page, not an error. Use this to turn a name a caller typed in full into the id every other categories endpoint is keyed by."},"nameContains":{"type":"string","description":"Fragment the category name must contain, matched case-insensitively anywhere in the name. This is the lookup the routed list cannot do. Matching is a substring match, not a pattern language: the fragment is taken as literal text apart from the SQL wildcards % and _, which are not escaped and therefore still act as wildcards. A fragment matching nothing yields an empty page, not an error."}},"additionalProperties":false,"description":"How to narrow the search. Omit it — or send it with no members — to page through every category, which is what the categories data-set (GET value-accounting/categories) returns. Supplying both members narrows by both.","examples":[{"nameContains":"research"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one this endpoint did not issue (a cursor from another list, or one altered by hand) raises INVALID_CURSOR rather than silently restarting at the first page, which would make a paging loop repeat forever. Keep filters identical across the pages of one walk; changing it mid-walk re-interprets the cursor against a different result set. It encodes the LAST ROW of the page you received, not a position, so the walk resumes AT THAT ROW rather than at a count: a row created or removed before your position cannot make a later page repeat a row you already saw or skip one you have not."},"size":{"type":"number","description":"Maximum number of categories to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"listCustomDimensionsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"customDimensionUuid":{"type":"string","description":"The unique identifier for the custom value dimension. It is the customDimensionUuid on a 'custom' row from resolveReportingTags (POST base/reporting-tags/resolve)."},"name":{"type":"string","description":"The display name of the custom dimension."}},"additionalProperties":false,"required":["customDimensionUuid","name"]},"description":"The custom dimensions on this page, ordered by identifier. An empty array when the tenant has defined none."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more dimensions remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"listCustomDimensionValuesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension this value belongs to. Always 'custom' on this endpoint."},"modelId":{"type":"number","description":"The numeric id of the value record, stored internally on a journal entry's allocation line."},"modelUuid":{"type":"string","description":"The unique identifier for the value record. Pass it as modelUuid to resolveReportingTags (POST base/reporting-tags/resolve), paired with dimensionCode 'custom'."},"name":{"type":"string","description":"The display name of the value."},"isActive":{"type":"boolean","description":"Whether the value is currently active and can be assigned to new transactions. A value is active while it has no end date or its end date is today or later — the end date is inclusive, so a value ending in the future is active until that day has passed."},"customDimensionUuid":{"type":"string","description":"The unique identifier for the custom dimension this value belongs to. It is the same identifier given in the path."},"dimensionName":{"type":"string","description":"The display name of the parent custom dimension."}},"additionalProperties":false,"required":["dimensionCode","modelId","modelUuid","name","isActive"]},"description":"The values on this page. An empty array when the dimension holds none. A dimension identifier that matches nothing fails with NOT_FOUND instead."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor for the next page. Pass it as the cursor query parameter. Absent on the last page."},"hasMore":{"type":"boolean","description":"True when more values remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"The pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"bulkRecordDriverValuesOutput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value rows written, one per row of driverValues and in the same order — match them by index. Two rows naming the same combination and period carry the same id."}},"additionalProperties":false,"required":["ids"]},"bulkRecordDriverValuesInput":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the business driver every row records against. It must be active and not a system driver. Matched case-insensitively.","examples":["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]},"entityId":{"type":"string","description":"Id (a UUID) of the legal entity every row belongs to — one recording context for the whole batch. Matched case-insensitively.","examples":["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]},"bookId":{"type":"string","description":"Id (a UUID) of the accounting book every row belongs to. Matched case-insensitively.","examples":["c3a91e07-52d4-4f6b-8e1a-9b0d2c7f4a63"]},"driverValues":{"type":"array","items":{"type":"object","properties":{"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the accounting period this row records in. Open, not in the future, of the entity and book's fiscal calendar. Matched case-insensitively."},"value":{"type":"string","format":"decimal","description":"The quantity in the driver's unit, as a decimal number. Anything that is not a number is INVALID_VALUE. Stored with at most 12 decimal places: further digits are rounded on the write."},"members":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record — the ten codes of recordDriverValue (POST value-accounting/driver-values)."},"id":{"type":"string","description":"Id (a UUID) of the master-data record. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"]},"description":"The full dimension combination: one master-data record per declared dimension, all of them — the same rules as recordDriverValue (POST value-accounting/driver-values)."},"editValueId":{"type":"string","description":"Id (a UUID) of an existing value this row corrects in place, under the same rules as recordDriverValue (POST value-accounting/driver-values). Omit for a normal write."}},"additionalProperties":false,"required":["accountingPeriodId","value","members"]},"description":"The recordings. Their order does not matter for the outcome; the ids come back in this order.","examples":[[{"accountingPeriodId":"95dd0047-0f93-429b-af80-982416f97748","value":"42","members":[{"dimensionCode":"department","id":"7b4e2d19-8c3f-4a5e-b6d7-1e0f9a2c3b84"}]}]]},"propagate":{"type":"boolean","description":"Whether As-of corrections carry forward through the carried rows after each corrected period. Omitted means FALSE here — unlike the single record, a batch never withholds a write. Ignored by cumulative drivers.","examples":[true]}},"additionalProperties":false,"required":["driverId","entityId","bookId","driverValues"]},"resolveReportingTagsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension this value belongs to. Possible values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'."},"modelId":{"type":"number","description":"The numeric id of the dimension record, stored internally on a journal entry's allocation line. Output only. References are made by modelUuid."},"modelUuid":{"type":"string","description":"The unique identifier of the dimension record this tag references. Present on every row."},"name":{"type":"string","description":"The display name of the tag value."},"isActive":{"type":"boolean","description":"Whether the tag value counts as active today, as its dimension judges it: department, team, location, region and value center — status active or planned (a value starting later counts as active); employee — status Active only; customer and vendor — status active; custom value — no end date, or one on or after today; business unit — always true (not judged here). A deactivated value still resolves, so existing references keep working."},"customDimensionUuid":{"type":"string","description":"The unique identifier for the custom dimension this value belongs to. Present only when dimensionCode is 'custom'. Absent, not null, on the ten system dimensions."},"dimensionName":{"type":"string","description":"The display name of the parent custom dimension. Present only when dimensionCode is 'custom'. Absent, not null, on the ten system dimensions."}},"additionalProperties":false,"required":["dimensionCode","modelId","modelUuid","name","isActive"]},"description":"The resolved rows, in no guaranteed order and possibly shorter than the input, since references that did not resolve are absent. Match on the dimensionCode and modelUuid pair, never on position."},"unresolvedCount":{"type":"number","description":"How many of the requested references did not resolve. Zero when every reference resolved. Duplicates in the request are collapsed before this is counted."}},"additionalProperties":false,"required":["items","unresolvedCount"]},"resolveReportingTagsInput":{"type":"object","properties":{"reportingTags":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"The dimension the reference points into. Accepted values: 'department', 'businessUnit', 'team', 'location', 'region', 'psaProject', 'employee', 'vendor', 'customer', 'product', 'valueCenter', 'custom'. An unknown code fails the whole call with UNSUPPORTED_DIMENSION_CODE."},"modelUuid":{"type":"string","description":"The unique identifier of the dimension record the reference points at. It is unique within its dimension but not across dimensions, so dimensionCode is required with it. A value that resolves to nothing is dropped from the response, unlike an unknown dimensionCode. Obtain it from the document that carries the tag, or for custom values from listCustomDimensionValues (GET base/custom-dimensions/:customDimensionUuid/values). It is matched case-insensitively and every row carries it in canonical lowercase, so match results against the lowercased form of what you sent."}},"additionalProperties":false,"required":["dimensionCode","modelUuid"]},"description":"The references to decode, as dimensionCode and modelUuid pairs. At most 100 per call. More than 100 fails with TOO_MANY_REFERENCES. An empty array returns an empty items array rather than an error. Duplicate references are collapsed, so each distinct reference appears at most once in the response."}},"additionalProperties":false,"required":["reportingTags"]},"searchBusinessDriversOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver — the id getBusinessDriver, updateBusinessDriver and deleteBusinessDriver (GET, PATCH and DELETE value-accounting/business-drivers/:id) are keyed by."},"name":{"type":"string","description":"Display name of the driver. Unique tenant-wide, compared trimmed and case-insensitively, deactivated drivers included."},"description":{"type":"string","description":"Longer free-text explanation of what the driver measures. Absent — not null — when it was never set or has been cleared."},"calculationType":{"type":"string","description":"Exactly 'asOf' (a stock that carries forward) or 'cumulative' (a flow that resets each period)."},"isActive":{"type":"boolean","description":"False for a deactivated driver: it keeps its values and its name."},"isSystem":{"type":"boolean","description":"True for a SYSTEM driver, fed by an external metric: its name and calculation type never change and a delete leaves it untouched. See getBusinessDriver (GET value-accounting/business-drivers/:id)."},"unitId":{"type":"string","description":"Id (a UUID) of the driver unit the values are expressed in. Absent when the driver has no unit."},"dimensions":{"type":"array","items":{"type":"object","properties":{"dimensionUrn":{"type":"string","description":"Model URN of the dimension. Every custom dimension shares the CustomValueObject URN and is told apart by customValueDimensionId."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension this entry is. Present on custom entries only, and absent on one whose custom value dimension has since been deleted."}},"additionalProperties":false,"required":["dimensionUrn"]},"description":"The dimensions every value of this driver is broken down by, in the stored order; empty only for a driver recorded across entities (its Entity member is implicit)."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the driver definition last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the keyed read publish."}},"additionalProperties":false,"required":["id","name","calculationType","isActive","isSystem","dimensions","lastModifiedDate"]},"description":"The drivers on this page, in the same shape getBusinessDriver (GET value-accounting/business-drivers/:id) returns. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by id ascending — a unique, immutable key, so a rename never moves a row across a page boundary; a driver created after your cursor position appears on a later page, one created before it does not, and no row is repeated or skipped."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more drivers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchBusinessDriversInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"nameContains":{"type":"string","description":"Fragment the driver name must contain, matched case-insensitively anywhere in the name. A substring match, not a pattern language: the fragment is taken as literal text, % and _ included (they are escaped, so 50% finds '50%' and not '500'). A fragment matching nothing yields an empty page, not an error."},"isActive":{"type":"boolean","description":"True for the drivers in use only, false for the deactivated ones only. Omit for both."},"calculationType":{"type":"string","description":"Exactly 'asOf' or 'cumulative': only the drivers of that calculation type. Any other value is refused with INVALID_CALCULATION_TYPE rather than answered with an empty page."},"dimensionUrn":{"type":"string","description":"Model URN of a dimension, e.g. 'urn:evst:everest:hr/base:model/node:Department': only the drivers that declare it. Every custom dimension shares 'urn:evst:everest:valueaccounting/base:model/node:CustomValueObject', so that URN matches every driver declaring any custom dimension — read their dimensions to tell which. See getBusinessDriver (GET value-accounting/business-drivers/:id) for the list of system dimension URNs. A URN no driver declares yields an empty page."},"unitId":{"type":"string","description":"Id (a UUID) of a driver unit, as returned by the driverUnits data-set (GET value-accounting/driver-units): only the drivers measured in it. An id that names no unit yields an empty page, not an error. Matched case-insensitively."}},"additionalProperties":false,"description":"How to narrow the search; every member is optional and they combine with AND. Omit it — or send it with no members — to page through every driver, active and deactivated.","examples":[{"isActive":true,"dimensionUrn":"urn:evst:everest:hr/base:model/node:Department"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one it did not issue (a cursor from another endpoint, or one altered by hand) raises INVALID_CURSOR rather than silently restarting at the first page. Keep filters identical across the pages of one walk. It encodes the LAST ROW of the page you received, not a position, so a row created or removed before your position cannot make a later page repeat or skip a row."},"size":{"type":"number","description":"Maximum number of drivers to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"businessDriversRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the driver — the public identifier getBusinessDriver, updateBusinessDriver and deleteBusinessDriver (GET/PATCH/deleteBusinessDriver) are keyed by. Filter target: filter[id][in]=<id1>,<id2>."},"name":{"type":"string","description":"Display name of the driver, e.g. 'Headcount'. Unique tenant-wide — compared trimmed and case-insensitively, deactivated drivers included — and stored trimmed, so a name identifies exactly one driver. Filter target: filter[name][eq]=Headcount (exact stored text, case-sensitive), and sort=name for an alphabetical list."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Longer free-text explanation of what the driver measures and how it is counted. Absent when it was never set or has been cleared. Returned only: in neither filterableFields nor orderableFields, because it is free-form prose."},"calculationType":{"type":"string","description":"How the driver's values behave across accounting periods: exactly 'asOf' (a STOCK — a recorded value carries forward into later periods until changed, e.g. headcount) or 'cumulative' (a FLOW — each period stands alone, e.g. machine hours worked in it). Frozen once the driver holds a recorded value. Filter target: filter[calculationType][eq]=asOf."},"isActive":{"type":"boolean","description":"False for a deactivated driver: it keeps its recorded values and its name, but is not offered for new use. A delete of a driver that holds values deactivates it. Filter target: filter[isActive][eq]=true for the drivers in use."},"isSystem":{"type":"boolean","description":"True for a SYSTEM driver — one shipped with the product whose values are fed by an external system metric (for example Time Tracking) instead of being entered by people. Read-only: it cannot be set or changed on any route. It implies that the name, the calculation type and the unit never change (PATCH answers SYSTEM_DRIVER), that a delete leaves the driver untouched (outcome 'blocked'), and that its values are written only by its feed; its dimensions may only be ones that feed supplies (DIMENSION_NOT_FED), its description and active state stay editable, and activating it is how its feed is switched on. False for every driver a person created. Filter target: filter[isSystem][eq]=false for the user-managed drivers."},"unitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the driver unit the driver's values are expressed in, as returned by the driverUnits data-set (GET value-accounting/driver-units). Absent when the driver has no unit — its values are then bare numbers. Filter target: filter[unitId][eq]=<unit id> for the drivers measured in one unit."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the driver definition last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter and sort on this to sync incrementally: filter[lastModifiedDate][gte]=2026-09-01T00:00:00.000Z with sort=lastModifiedDate. An update that changes nothing does not move it."}},"additionalProperties":false},"bulkDeleteValueCentersOutput":{"type":"object","properties":{"deletedIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers that were hard-deleted with their mappings, in the order they were first sent. These ids no longer resolve."},"deactivated":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center that was kept."},"reason":{"type":"string","description":"Why it was kept, as a sentence — the first that applies: allocation lines are tagged to it, business drivers reference it, it is part of master-data relationships (clear them with removeRelationship (POST value-accounting/associations/remove), then delete again; the sentence names the application-API action for the same removal), or other value centers' mappings name it as their record (remove those mappings with updateValueCenter (PATCH value-accounting/value-centers/:id) deleteMappings on their value centers, then delete again; the other value centers' mappings still open end with it)."},"deletedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when the deactivation DELETED mappings: ids (UUIDs) of the mappings — the value center's own and other value centers' mappings naming it as their record — that would only have started after the day it ends on (today, its own start when it has not started yet, or the end it already had). Such a mapping is never in effect inside the value center's life, so it is deleted rather than ended before its own start; none is left canceled. These ids no longer resolve. The reason sentence only counts them (it names no id); this field is the contract."}},"additionalProperties":false,"required":["id","reason"]},"description":"The value centers that were in use and therefore kept and end-dated to today (or to its own startDate, when that is later) with every mapping still open (a mapping that would only start after that day is deleted), in the order they were first sent. Their ids still resolve; each reads status 'active' for the rest of that day and 'inactive' from the next. One that already ended keeps its own end date and is listed here again; its mappings still open end on that same day."},"skipped":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center that was left untouched."},"reason":{"type":"string","description":"How many active or planned children blocked it, as a sentence."}},"additionalProperties":false,"required":["id","reason"]},"description":"The value centers that had a direct child reading 'active' or 'planned' and were therefore left untouched, in the order they were first sent. Deal with the children, then send them again."}},"additionalProperties":false,"required":["deletedIds","deactivated","skipped"]},"bulkDeleteValueCentersInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers to delete, as returned by the valueCenters data-set (GET value-accounting/value-centers). Every id must exist, or the whole batch is rejected with NOT_FOUND. Duplicates are collapsed. The order never changes an outcome. An empty array is a valid no-op that deletes nothing and returns three empty lists. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2","0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeleteCustomValueObjectsOutput":{"type":"object","properties":{"deletedIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the values that were hard-deleted, with their shadow value objects and mappings, in the order they were first sent. These ids no longer resolve."},"deactivated":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value that was kept."},"reason":{"type":"string","description":"Why it was kept, as a sentence — the first that applies: its shadow carries postings, it is tagged somewhere, it is part of master-data relationships (clear them with removeRelationship (POST value-accounting/associations/remove), then delete again; the sentence names the application-API action for the same removal), or a HAND-MADE value object still stands for it one-to-one — a duplicate from before the one-open-one-to-one rule, which refuses it at creation since; this reason is its safety net (the sentence names it by its quoted name with its object number in brackets, never by an id; remove that value object's mapping to the value, or delete that value object, then delete again)."},"retiredClusterValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Present only when this value's retire cut a CLUSTER back to fewer than two records (one, or none): ids (UUIDs) of the cluster value objects retired with it — the id of getValueObject (GET value-accounting/value-objects/:id). Each would otherwise stand for its last record alone beside that record's own one-to-one value object, so its remaining open mappings and the value object itself end on the value's day. reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate) brings a cluster back when its members are re-opened together."},"deletedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when this value's retire DELETED mapping rows: ids (UUIDs) of its own planned links and of a collapsing cluster's rows of other records that would only have started after the value's end day — never in effect, so deleted rather than left canceled. These ids no longer resolve. The reason sentence only counts them (it names no id); this field is the contract."}},"additionalProperties":false,"required":["id","reason"]},"description":"The values that were in use and therefore kept and end-dated instead of deleted, in the order they were first sent. Their ids still resolve. Because the end date is inclusive, the value stays active — and offered for tagging — for the rest of that day, and reads isActive false from the next day on. A value that already ended keeps its own end date and is listed here again; its legs still open end on that same day."},"retiredClusterValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Present only when a HARD delete of this call cut a CLUSTER back to fewer than two records (one, or none) and that cluster was in use: ids (UUIDs) of those cluster value objects, retired today instead of deleted — each would otherwise stand for its last record alone beside that record's own one-to-one value object (or for nothing). The same usage rule as deleteValueObject (DELETE value-accounting/value-objects/:id) decides retired versus deleted."},"deletedClusterValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Present only when a HARD delete of this call cut a CLUSTER back to fewer than two records and that cluster was unused: ids (UUIDs) of those cluster value objects, hard-deleted with their mappings. These ids no longer resolve."},"deletedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when retiring a cluster that a HARD delete of this call cut back DELETED mapping rows: ids (UUIDs) of the cluster's rows of other records that would only have started after the cluster's end day — never in effect, so deleted rather than left canceled. These ids no longer resolve."}},"additionalProperties":false,"required":["deletedIds","deactivated"]},"bulkDeleteCustomValueObjectsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects to delete, as returned by the customValueObjects data-set (GET value-accounting/custom-value-objects). Every id must exist, or the whole batch is rejected with NOT_FOUND. Duplicates are collapsed. An empty array is a valid no-op that deletes nothing and returns two empty lists. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2","0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]]}},"additionalProperties":false,"required":["ids"]},"updateCustomValueDimensionOutput":{"type":"object","properties":{},"additionalProperties":false},"updateCustomValueDimensionInput":{"type":"object","properties":{"name":{"type":"string","description":"New display name. OMIT TO LEAVE THE NAME UNCHANGED — an omitted field is not cleared, and this field cannot be cleared at all, because a dimension with no name is not a meaningful record. Must not collide with another dimension's name, which is this resource's unique semantic key; re-sending the name this dimension already holds is accepted as a no-op. When sent it must not be empty or whitespace only (NAME_REQUIRED). Stored verbatim, untrimmed, and matched on the exact stored text.","examples":["Sales Region"]}},"additionalProperties":false},"updateCustomValueObjectOutput":{"type":"object","properties":{"removedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when this request moved the value's end date EARLIER and that DELETED mappings: the ids (UUIDs) of the value object mappings naming this value — its shadow's, its other links — or belonging to a cluster value object retired with it, that would only have started after the new end date. Such a mapping is never in effect inside the value's life, so it is deleted rather than ended before its own start (never left canceled); every other leg still open after that day ends on it. The ids no longer exist. Absent when nothing was deleted (the body is then empty, as before)."}},"additionalProperties":false},"updateCustomValueObjectInput":{"type":"object","properties":{"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension to move the value to, from the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). OMIT TO LEAVE IT on its current dimension; it cannot be cleared. Moving re-files the value on another reporting axis, so do it only when the value was created on the wrong one: once the value is IN USE — tagged anywhere, or a value object mapping it (its shadow, a cluster it belongs to, a hand-made one linked to it) carrying allocation lines — the move is refused with DIMENSION_LOCKED and nothing is written. Re-sending the dimension it is already on is not a change and always passes. An id that names no dimension is rejected with CUSTOM_VALUE_DIMENSION_NOT_FOUND."},"name":{"type":"string","description":"New display name. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. When sent it must not be empty or whitespace only (NAME_REQUIRED) and must be unused on the dimension the value ends up on (NAME_TAKEN); re-sending the name it already has is a valid no-op. Stored exactly as sent, untrimmed. The shadow value object is renamed with it; a hand-made value object linked to the value (a duplicate from before the one-open-one-to-one rule, which refuses a second open one-to-one value object with ONE_TO_ONE_EXISTS since) is not.","examples":["North-East"]},"startDate":{"type":"string","format":"date","description":"New first valid day, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED. Must not fall after the endDate the value will have — the one sent in this call, or the stored one (END_BEFORE_START). The shadow value object and its mapping move to the same startDate — on a LATER start only the shadow's mappings still running on the new day, and a shadow mapping that ended before it refuses the move (START_AFTER_MAPPING_HISTORY); a hand-made value object linked to the value (a duplicate from before the one-open-one-to-one rule, which refuses a second open one-to-one value object with ONE_TO_ONE_EXISTS since) is never re-dated."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"New last valid day, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED. Setting it on an open value — or an earlier date than stored — retires the value by hand with its legs, the set deleteCustomValueObject (DELETE value-accounting/custom-value-objects/:id) closes on a value in use: the shadow value object, their mapping and the value's other mapping rows still open after that day end on the same day (rows that ended earlier keep their day), and a cluster value object cut back to one record is retired with it. A LATER date on a value that already ended moves every row its retire closed with it — the shadow value object, their mapping and its other mapping rows ending on the previous day; a row ended on another day stays. Must not fall before the startDate the value will have (END_BEFORE_START). null CLEARS an end of TODAY OR LATER — a schedule that never took effect: the shadow value object, their mapping and the value's other rows ending with it follow to no end. ⛔ On a value whose end date is BEFORE today null is REFUSED with REACTIVATE_VIA_FLOW and nothing is written — re-open a retired value with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate) instead. A null on a value WITHOUT an end date repairs a legacy half-state: an end its shadow value object carries on its own, of today or later (it never took effect), is cleared on the shadow, their mapping and the rows ending with it; a past one is left to reactivateCustomValueObjects."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the category to file the value under, from the categories data-set (GET value-accounting/categories). OMIT TO LEAVE IT UNCHANGED; send null to clear it back to uncategorised. An id that names no category is rejected with CATEGORY_NOT_FOUND; null is a clear, not a reference, and is never rejected."}},"additionalProperties":false},"searchValueAllocationsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value allocation — the id getValueAllocation, updateValueAllocation and deleteValueAllocation (GET, PATCH and DELETE value-accounting/value-allocations/:id) are keyed by."},"documentType":{"type":"string","description":"Kind of financial document the allocation was recorded for — one of the 37 kinds. A label, not a reference."},"allocationDate":{"type":"string","format":"date","description":"Day the allocation was recorded. Format YYYY-MM-DD. Not the day reporting buckets by."},"draftAllocation":{"type":"boolean","description":"True while the source document is still a draft; such an allocation is excluded from all value-accounting reporting."},"isOffset":{"type":"boolean","description":"True for an offset-account allocation, excluded from all value-accounting reporting."},"lineCount":{"type":"number","description":"How many lines the allocation carries — the length of lines."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the allocation's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the keyed read publish."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the line itself — what updateLines and deleteLines on updateValueAllocation (PATCH value-accounting/value-allocations/:id) are keyed by."},"allocationLineType":{"type":"string","description":"Whether reporting counts the line's amount as revenue, cost or neither: 'profit' → revenue (the journal line's signed amount negated, as amounts are stored debit-positive), 'cost' → cost, 'value' → excluded from every revenue, cost and margin figure, 'metric' → a NON-MONETARY quantity (the hours of a time record), excluded the same way."},"allocationType":{"type":"string","description":"Origin of the attribution: 'primary' (the source document's own main value object or value center) or 'secondary' (added by tagging). Documentation — no report filters on it."},"valueStatus":{"type":"string","description":"Workflow state of the attribution: 'assigned' (assigned, e.g. as overhead, not yet allocated onward), 'allocated' or 'split' (split off another line). Documentation — no report filters on it."},"allocationDate":{"type":"string","format":"date","description":"Day recorded on the line itself. Format YYYY-MM-DD. Documentation — reporting buckets by the journal entry line's posting date, never by this date."},"valueCenterId":{"type":"string","description":"Id (a UUID) of the value center the amount is attributed to, as getValueCenter (GET value-accounting/value-centers/:id) reads it. Absent — not null — on a line that attributes to a value object, or to a record with no value object yet."},"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object the amount is attributed to, as getValueObject (GET value-accounting/value-objects/:id) reads it. Absent — not null — on a line that attributes to a value center, and on a line written for a master-data record that had no value object yet; record then says what it attributes to."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to: one of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' (a custom value object)."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record the line was tagged for, as the pair ensureRelationship (POST value-accounting/associations) and resolveReportingTags (POST base/reporting-tags/resolve) use — for a value-object line the one record that value object represents, for a value-center line the value center itself (dimensionCode 'valueCenter'). Every tagging flow writes it, and it is the only statement of attribution on a line whose record had no value object yet. Absent on a line tagged with a CLUSTER value object (it stands for several records, so no single one can be named), on a line written by hand, and when the record no longer resolves."},"allocationRule":{"type":"object","properties":{"path":{"type":"string","description":"Model URN naming the kind of record the rule is: 'urn:evst:everest:valueaccounting/base:model/node:ValueCenterAssociation' (a value-center rule) or 'urn:evst:everest:valueaccounting/base:model/node:ValueObjectAssociation' (a value-object rule). Published exactly as stored."},"id":{"type":"string","description":"Id (a UUID) of the rule record in the node path names. Absent when the stored rule no longer resolves to a record there — the package layer stores the pair without checking it."}},"additionalProperties":false,"required":["path"],"description":"The allocation rule that produced the line — one reference in two parts, set and cleared together. Automatic allocation rules are not implemented yet, so it is normally absent. Absent — not null — when unset."},"splitParentId":{"type":"string","description":"Id (a UUID) of the line this one was split from — it may belong to another allocation. Absent — not null — for an ordinary line."}},"additionalProperties":false,"required":["id","allocationLineType","allocationType","valueStatus","allocationDate"]},"description":"The allocation's lines, oldest first — the same entries getValueAllocation (GET value-accounting/value-allocations/:id) returns, ALL of the allocation's lines, not only the ones that matched the filter."}},"additionalProperties":false,"required":["id","documentType","allocationDate","draftAllocation","isOffset","lineCount","lastModifiedDate","lines"]},"description":"The allocations on this page, one row per allocation with all of its lines, in the same shape getValueAllocation (GET value-accounting/value-allocations/:id) returns. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by id ascending — a unique, immutable key. The cursor is a KEYSET cursor over that order, so an allocation created after your cursor position appears on a later page, one created before it does not, and no row is ever repeated or skipped, whatever else is written while you walk."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more allocations remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchValueAllocationsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object). An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"A master-data record: only allocations with at least one line tagged for it match. The same pair ensureRelationship (POST value-accounting/associations) takes. The tag identity is what every tagging flow writes on a line: for a value-object line the one record the value object represents, for a value-center line the value center itself (dimensionCode 'valueCenter'). A record that does not exist is RECORD_NOT_FOUND and an unknown dimension code UNSUPPORTED_DIMENSION_CODE; a record that exists but nothing is allocated to yields an empty page."},"valueObjectId":{"type":"string","description":"Id (a UUID) of a value object, from the valueObjects data-set (GET value-accounting/value-objects): only allocations with at least one line attributing to it match. An id that names no value object is VALUE_OBJECT_NOT_FOUND. Matched case-insensitively."},"valueCenterId":{"type":"string","description":"Id (a UUID) of a value center, from the valueCenters data-set (GET value-accounting/value-centers): only allocations with at least one line attributing to it match. An id that names no value center is VALUE_CENTER_NOT_FOUND. Matched case-insensitively."},"documentType":{"enum":["VendorBill","Invoice","JournalEntry","Revenue","Expense","BankEntry","OutboundPayment","Reversal","Revaluation","CustomerPayment","CreditMemo","DebitMemo","Payroll","VendorCredit","CreditCardEntry","RevaluationReversal","Allocation","Depreciation","AccruedLiability","AmortizationSchedule","RevaluationClose","NetZeroImpact","FundTransfer","SalesOrder","DeferredRevenueReclass","UnbilledARAdjustment","ShortAndLongTermDeferredRevenueReclass","ManualTaxableDocument","IntercompanyBill","InventoryIncrease","InventoryDecrease","InventoryRevaluation","PurchaseRequest","PurchaseOrder","FixedAsset","EmployeeAdvanceRequest","TimeRecord"],"description":"Kind of financial document to keep — one of the 37 kinds. Omit for every kind."},"allocationDate":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"First day to keep, inclusive. Format YYYY-MM-DD."},"to":{"type":"string","format":"date","description":"Last day to keep, inclusive. Format YYYY-MM-DD."}},"additionalProperties":false,"description":"Inclusive window on allocationDate (the day the allocation was recorded, not the journal entry line's posting date). Either bound may be omitted. A window whose from is after its to matches nothing — an empty page, not an error."},"draftAllocation":{"type":"boolean","description":"true keeps only allocations of documents still in draft, false only the others (a stored null counts as false). Omit for both."},"isOffset":{"type":"boolean","description":"true keeps only offset-account allocations, false only the others (a stored null counts as false). Omit for both. false together with draftAllocation false keeps exactly what value-accounting reporting counts."}},"additionalProperties":false,"description":"How to narrow the search. An allocation must match every member you send. Omit it — or send it with no members — to page through every allocation.","examples":[{"record":{"dimensionCode":"department","id":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"},"isOffset":false,"draftAllocation":false}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one this endpoint did not issue (a cursor from another list, or one altered by hand) raises INVALID_CURSOR rather than silently restarting at the first page, which would make a paging loop repeat forever. Keep filters identical across the pages of one walk; changing it mid-walk re-interprets the cursor against a different result set. It encodes the LAST ROW of the page you received, not a position, so the walk resumes AT THAT ROW rather than at a count: a row created or removed before your position cannot make a later page repeat a row you already saw or skip one you have not."},"size":{"type":"number","description":"Maximum number of allocations to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"valueAllocationsRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the value allocation — the public identifier getValueAllocation, updateValueAllocation and deleteValueAllocation (GET/PATCH/deleteValueAllocation) are keyed by. Filter target: filter[id][in]=<id1>,<id2>."},"documentType":{"type":"string","description":"Kind of financial document the allocation was recorded for. One of 'VendorBill', 'Invoice', 'JournalEntry', 'Revenue', 'Expense', 'BankEntry', 'OutboundPayment', 'Reversal', 'Revaluation', 'CustomerPayment', 'CreditMemo', 'DebitMemo', 'Payroll', 'VendorCredit', 'CreditCardEntry', 'RevaluationReversal', 'Allocation', 'Depreciation', 'AccruedLiability', 'AmortizationSchedule', 'RevaluationClose', 'NetZeroImpact', 'FundTransfer', 'SalesOrder', 'DeferredRevenueReclass', 'UnbilledARAdjustment', 'ShortAndLongTermDeferredRevenueReclass', 'ManualTaxableDocument', 'IntercompanyBill', 'InventoryIncrease', 'InventoryDecrease', 'InventoryRevaluation', 'PurchaseRequest', 'PurchaseOrder', 'FixedAsset', 'EmployeeAdvanceRequest', 'TimeRecord' (37 kinds). A label written by the flow that created the allocation, not a reference: it names no document. Filter target: filter[documentType][eq]=VendorBill."},"allocationDate":{"type":"string","format":"date","description":"Day the allocation was recorded, normally the source document's own date. Format YYYY-MM-DD. NOT the day value-accounting reporting buckets by: reports bucket by the journal entry line's posting date and posting period. Filter target: filter[allocationDate][between]=2026-01-01,2026-03-31."},"draftAllocation":{"type":"boolean","description":"True while the source document is still a draft. A draft allocation's journal lines are excluded from all value-accounting reporting; the flag is the document's business and no route writes it. False for a posted document (a stored null reads as false). Filter target: filter[draftAllocation][eq]=false."},"isOffset":{"type":"boolean","description":"True for the allocation of an OFFSET-account line: it may carry tags, but every journal line of it is deliberately excluded from all value-accounting reporting while the general ledger keeps the amount. False for a normal allocation (a stored null reads as false). Change it with isOffset on updateValueAllocation (PATCH value-accounting/value-allocations/:id). Filter target: filter[isOffset][eq]=false."},"lineCount":{"type":"number","description":"How many lines the allocation carries — each line one attribution of the journal line's amount to a value object or value center. 0 is possible for an allocation whose lines were all removed; it then attributes nothing. The lines themselves are on getValueAllocation (GET value-accounting/value-allocations/:id). Returned only."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the allocation's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter and sort on this to sync incrementally: filter[lastModifiedDate][gte]=2026-09-01T00:00:00.000Z with sort=lastModifiedDate. An update that changes nothing does not move it, and neither does an edit of the lines alone."}},"additionalProperties":false},"deleteCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"getCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the category — the id that was passed in, echoed so a response stands on its own."},"name":{"type":"string","description":"Display name of the category, e.g. 'Research & Development'. Unique across all categories — this resource's semantic key — so a name identifies exactly one category."},"description":{"type":"string","description":"Longer free-text explanation of what the category is for. Absent — not null — when it was never set or has been cleared."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the category last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and search targets publish, so the three reads can be used interchangeably."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"bulkDeleteCategoriesOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteCategoriesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the categories to delete, as returned by the categories data-set (GET value-accounting/categories). Every id must exist (else NOT_FOUND) and none may still be referenced by master data (else IN_USE) — either rejection deletes nothing. Duplicates are collapsed. An empty array is a valid no-op that deletes nothing and returns success. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]}},"additionalProperties":false,"required":["ids"]},"valueObjectsRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the value object — the public identifier getValueObject, updateValueObject and deleteValueObject (GET/PATCH/deleteValueObject) are keyed by. Filter target: filter[id][in]=<id1>,<id2>."},"name":{"type":"string","description":"Display name of the value object — for a mirror of a master-data record, the record's name, kept in step by the system. Names are NOT unique. Returned only: search by name fragment with searchValueObjects (POST value-accounting/value-objects/search)."},"objectNumber":{"type":"string","description":"Business number of the value object, unique tenant-wide: the mapped record's own number or code for a 1:1 value object, a generated 'VO-n' otherwise. Returned only: look one up with filters.objectNumber on searchValueObjects (POST value-accounting/value-objects/search)."},"startDate":{"type":"string","format":"date","description":"First day the value object is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day the value object is valid, inclusive. Format YYYY-MM-DD. Absent when it is open-ended, the normal state. A delete that finds it in use sets it (the value object and its mappings are deactivated rather than deleted); reactivateValueObjects (POST value-accounting/value-objects/reactivate) clears it again."},"status":{"type":"string","description":"Lifecycle state, derived from the dates on every read and never stored: 'active' (started, and no endDate or one on or after today, UTC — the end date is inclusive), 'planned' (startDate after today), 'inactive' (endDate before today) or 'canceled' (endDate before startDate). Filter target: filter[status][eq]=active."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the category the value object is filed under, as listed by the categories data-set (GET value-accounting/categories). Absent when it is uncategorised. Filter target: filter[categoryId][eq]=<id>."},"mappingCount":{"type":"number","description":"How many master-data mappings the value object carries: 1 for a value object standing for one record, more for a cluster. Every value object created today has at least one; 0 appears only on rows older than that rule. The mappings themselves, with each record's {dimensionCode, id}, are on getValueObject (GET value-accounting/value-objects/:id) and searchValueObjects (POST value-accounting/value-objects/search). Returned only."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value object's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter and sort on this to sync incrementally: filter[lastModifiedDate][gte]=2026-09-01T00:00:00.000Z with sort=lastModifiedDate. An update that changes nothing does not move it, and neither does an edit of the mappings alone."}},"additionalProperties":false},"deleteCustomValueObjectOutput":{"type":"object","properties":{"outcome":{"enum":["deleted","deactivated"],"description":"What happened to the value: 'deleted' — it was not in use and is gone, together with its shadow value object and mapping, so its id no longer resolves; 'deactivated' — it is in use, so it was kept and end-dated (value, shadow and mapping together) and its id still resolves. Because the end date is inclusive, the value stays active — and offered for tagging — for the rest of that day, and reads isActive false from the next day on. A value that already ended keeps its own end date and is reported 'deactivated' again; its legs still open — shadow, mapping and its other mapping rows — end on that same day, so reactivating re-opens them with it."},"reason":{"type":"string","description":"Why the value was kept rather than deleted, as a sentence — the first that applies: its shadow carries postings, it is tagged somewhere, it is part of master-data relationships (clear them with removeRelationship (POST value-accounting/associations/remove), then delete again; the sentence names the application-API action for the same removal), or a HAND-MADE value object still stands for it one-to-one — a duplicate from before the one-open-one-to-one rule, which refuses it at creation since; this reason is its safety net (the sentence names it by its quoted name with its object number in brackets, never by an id; remove that value object's mapping to the value, or delete that value object, then delete again). Present exactly when outcome is 'deactivated'."},"retiredClusterValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Present only when the delete cut a CLUSTER back to fewer than two records (one, or none): ids (UUIDs) of the cluster value objects retired because of it — the id of getValueObject (GET value-accounting/value-objects/:id). Each would otherwise stand for its last record alone beside that record's own one-to-one value object (or for nothing). On 'deactivated' its remaining open mappings and the value object itself end on the value's day, and reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate) brings a cluster back when its members are re-opened together. On 'deleted' the cluster was in use, so it was retired today instead of deleted (the same usage rule as deleteValueObject (DELETE value-accounting/value-objects/:id))."},"deletedClusterValueObjectIds":{"type":"array","items":{"type":"string"},"description":"Present only on 'deleted' when the delete cut a CLUSTER back to fewer than two records and that cluster was unused: ids (UUIDs) of those cluster value objects, hard-deleted with their mappings. These ids no longer resolve."},"deletedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when the call DELETED mapping rows that would only have started after the day their owner ends on (never in effect, so deleted rather than left canceled): ids (UUIDs) of the mappings. On 'deactivated', the value's own planned links and a collapsing cluster's rows of other records; on 'deleted', the rows of other records on a cluster this delete retired. These ids no longer resolve. The reason sentence only counts them (it names no id); this field is the contract."}},"additionalProperties":false,"required":["outcome"]},"deleteCustomValueDimensionOutput":{"type":"object","properties":{},"additionalProperties":false},"searchCustomValueObjectsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the custom value object — the id getCustomValueObject, updateCustomValueObject and deleteCustomValueObject (GET, PATCH and DELETE value-accounting/custom-value-objects/:id) are keyed by."},"name":{"type":"string","description":"Display name of the value, e.g. 'North'. Unique within its dimension only."},"customObjectNumber":{"type":"string","description":"System-generated business number of the value, e.g. 'CVO-202360' — unique tenant-wide, never editable. Declared optional on the record, so a reader must tolerate its absence."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension this value belongs to."},"categoryId":{"type":"string","description":"Id (a UUID) of the category the value is filed under. Absent — not null — when the value is uncategorised."},"startDate":{"type":"string","format":"date","description":"First day the value is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"Last day the value is valid, inclusive. Format YYYY-MM-DD. Absent — not null — when the value is open-ended."},"isActive":{"type":"boolean","description":"Whether the value is active today: true when it has no endDate, or an endDate on or after today (UTC)."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the keyed read publish."}},"additionalProperties":false,"required":["id","name","customValueDimensionId","startDate","isActive","lastModifiedDate"]},"description":"The values on this page, one row per custom value object, in the same shape getCustomValueObject (GET value-accounting/custom-value-objects/:id) returns. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by id ascending — a unique, immutable key, so a rename never moves a row across a page boundary. The cursor is a KEYSET cursor over that order, so a value created after your cursor position appears on a later page, one created before it does not, and no row is ever repeated or skipped, whatever else is written while you walk."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more values remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchCustomValueObjectsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"name":{"type":"string","description":"Exact name, matched on the stored text (case- and space-sensitive). Names are unique within a dimension only, so send customValueDimensionId with it to resolve at most one value. A name matching nothing yields an empty page, not an error."},"nameContains":{"type":"string","description":"Fragment the name must contain, matched case-insensitively anywhere in the name — the lookup for a type-ahead. A substring match, not a pattern language: the fragment is taken as literal text apart from the SQL wildcards % and _, which are not escaped and therefore still act as wildcards. A fragment matching nothing yields an empty page, not an error."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of a custom value dimension, from the customValueDimensions data-set (GET value-accounting/custom-value-dimensions): only that axis's values match. An id that names no dimension matches nothing — an empty page, not an error. Matched case-insensitively."},"categoryId":{"type":"string","description":"Id (a UUID) of a category, from the categories data-set (GET value-accounting/categories): only values filed under it match. An id that names no category matches nothing — an empty page, not an error. Matched case-insensitively. There is no way to ask for uncategorised values here; the list's filter on categoryId answers that."},"isActive":{"type":"boolean","description":"true for values active today (no endDate, or one on or after today, UTC), false for values whose endDate has passed. Omit for both. The same rule every read publishes as isActive."}},"additionalProperties":false,"description":"How to narrow the search. A value must match every member you send. Omit it — or send it with no members — to page through every value, which is what the customValueObjects data-set (GET value-accounting/custom-value-objects) returns.","examples":[{"nameContains":"north","customValueDimensionId":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","isActive":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one this endpoint did not issue (a cursor from another list, or one altered by hand) raises INVALID_CURSOR rather than silently restarting at the first page, which would make a paging loop repeat forever. Keep filters identical across the pages of one walk; changing it mid-walk re-interprets the cursor against a different result set. It encodes the LAST ROW of the page you received, not a position, so the walk resumes AT THAT ROW rather than at a count: a row created or removed before your position cannot make a later page repeat a row you already saw or skip one you have not."},"size":{"type":"number","description":"Maximum number of values to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"reactivateCustomValueObjectsOutput":{"type":"object","properties":{"keptClosedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when a link of a re-opened value's OWN stayed closed: ids (UUIDs) of the value object mappings — the value object's mappings[].id of getValueObject (GET value-accounting/value-objects/:id) — that its retire closed on the value's day and that would have come back as a second one-to-one link next to the shadow. The shadow has priority, so they stay ended. Absent (an empty body) otherwise."},"reactivateTogetherIds":{"type":"array","items":{"type":"string"},"description":"Present only with keptClosedMappingIds, when a CLUSTER among them waits for other members: ids (UUIDs) of the retired custom value objects whose rows the cluster needs back. A cluster value object that a member's retire cut back to one record was retired with it (deleteCustomValueObject, DELETE value-accounting/custom-value-objects/:id — retiredClusterValueObjectIds); it comes back only as a cluster, when its returning rows name two or more records. Reactivate these ids in the SAME call as the value; the value is open now, so reactivating them afterwards still brings the cluster back when they were retired on the cluster's day (retired together, the usual case)."},"keptClosedHint":{"type":"string","description":"Present only with keptClosedMappingIds: one sentence per value saying which mappings stayed closed, why, and — for a cluster — which values to reactivate together."}},"additionalProperties":false},"reactivateCustomValueObjectsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the custom value objects to re-open, as returned by the customValueObjects data-set (GET value-accounting/custom-value-objects) (filter[isActive][eq]=false lists the ones whose end date has passed; a value the delete deactivated today still reads active until tomorrow, so keep the id the delete was sent). Every id must exist and be retired, or the whole batch is rejected. Duplicates are collapsed. An empty array is a valid no-op. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]}},"additionalProperties":false,"required":["ids"]},"recordDriverValueOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value row written. Absent exactly when needsPropagationDecision is true — then nothing was written."},"needsPropagationDecision":{"type":"boolean","description":"True when the write was WITHHELD: correcting this period of an As-of driver would change the carried rows after it and propagate was omitted. Nothing was written. Re-send the identical request with propagate true or false. Absent on a write."}},"additionalProperties":false},"recordDriverValueInput":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the business driver, as returned by the businessDrivers data-set (GET value-accounting/business-drivers). It must be active and not a system driver. Matched case-insensitively.","examples":["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]},"entityId":{"type":"string","description":"Id (a UUID) of the legal entity the value belongs to, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns it in entityId. With bookId it selects the recording context: a driver holds a separate value set per entity and book. Matched case-insensitively.","examples":["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]},"bookId":{"type":"string","description":"Id (a UUID) of the accounting book, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns it in bookId. The book must carry a fiscal calendar for the entity (BOOK_HAS_NO_CALENDAR otherwise). Matched case-insensitively.","examples":["c3a91e07-52d4-4f6b-8e1a-9b0d2c7f4a63"]},"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the accounting period the value is recorded in, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns it in accountingPeriodId. It must belong to the fiscal calendar of the entity and book and be open, and not in the future. Matched case-insensitively.","examples":["95dd0047-0f93-429b-af80-982416f97748"]},"value":{"type":"string","format":"decimal","description":"The measured quantity in the driver's unit, as a decimal number (42 or '12.5'); zero and negatives are accepted. Anything that is not a number is INVALID_VALUE. For an As-of driver it is the level from this period on; for a cumulative driver the amount of this period alone. Stored with at most 12 decimal places: further digits are rounded on the write.","examples":["42"]},"members":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record: one of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object of the driver's custom dimension). An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id naming no record of that dimension raises MEMBER_NOT_FOUND. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"]},"description":"The full dimension combination: exactly one master-data record per dimension the driver declares, all of them (MEMBERS_INCOMPLETE, MEMBER_DIMENSION_MISMATCH, MEMBER_DUPLICATE_DIMENSION otherwise). Read the driver's dimensions with getBusinessDriver (GET value-accounting/business-drivers/:id).","examples":[[{"dimensionCode":"department","id":"7b4e2d19-8c3f-4a5e-b6d7-1e0f9a2c3b84"}]]},"editValueId":{"type":"string","description":"Id (a UUID) of an existing value to correct in place — the id of a row searchDriverValues (POST value-accounting/driver-values/search) returned. It must be a value of this driver, entity, book and accountingPeriodId. With other members than the row holds, the value moves to that combination and the one it left is repaired. Omit for a normal write, which overwrites the slot's value anyway. Matched case-insensitively."},"propagate":{"type":"boolean","description":"The As-of propagation decision, deliberately three-valued. Omitted: when the correction would change the carried rows after this period, nothing is written and needsPropagationDecision comes back true. True: the correction is carried through those rows (derived data, so this crosses locked periods and writes no history). False: only this period changes. Ignored by cumulative drivers and by a new combination, which has no later rows."}},"additionalProperties":false,"required":["driverId","entityId","bookId","accountingPeriodId","value","members"]},"customValueDimensionsRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the dimension — the public identifier getCustomValueDimension, updateCustomValueDimension and deleteCustomValueDimension (GET/PATCH/deleteCustomValueDimension) are keyed by. It is the same UUID the older listCustomDimensions (GET base/custom-dimensions) route reports as customDimensionUuid. Filter target: filter[id][in]=<id1>,<id2>."},"name":{"type":"string","description":"Display name of the dimension, e.g. 'Region'. Unique across all custom value dimensions — it is this resource's semantic key — so a name identifies exactly one dimension and is safe to resolve to an id with. Note the contrast with custom value OBJECTS, whose names are unique only within their dimension. Filter target: filter[name][eq]=Region, and sort=name for an alphabetical catalog."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the dimension last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter and sort on this to sync incrementally: filter[lastModifiedDate][gte]=2026-09-01T00:00:00.000Z with sort=lastModifiedDate."}},"additionalProperties":false},"getValueObjectOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object — the id that was passed in, in canonical lowercase."},"name":{"type":"string","description":"Display name of the value object — for a mirror of a master-data record, the record's name, kept in step by the system. Names are not unique."},"objectNumber":{"type":"string","description":"Business number of the value object, unique tenant-wide: the mapped record's own number or code for a 1:1 value object, a generated 'VO-n' otherwise."},"startDate":{"type":"string","format":"date","description":"First day the value object is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"Last day the value object is valid, inclusive. Format YYYY-MM-DD. Absent — not null — when it is open-ended."},"status":{"type":"string","description":"Lifecycle state, derived from the dates: 'active', 'planned' (startDate after today), 'inactive' (endDate before today, UTC — the end date is inclusive) or 'canceled' (endDate before startDate). The same rule the list and the search apply."},"categoryId":{"type":"string","description":"Id (a UUID) of the category the value object is filed under, as listed by the categories data-set (GET value-accounting/categories). Absent — not null — when it is uncategorised."},"isSystemManaged":{"type":"boolean","description":"True when the system maintains this value object as the MIRROR of one master-data record: its mappings open today or later name exactly one record (ended history rows do not count; with none running, the ones that ended last decide) and it still carries one of the names the automation gives that record. A mirror's name, objectNumber, startDate, categoryId and mappings follow the record and are refused on PATCH with SYSTEM_MANAGED (the objectNumber is how the system recognises it); its endDate stays editable. A rendering hint derived on this read — the write decides for itself from what is stored when it runs."},"mappingCount":{"type":"number","description":"How many mappings the value object carries — the length of mappings, the same number the list publishes."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value object's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list publishes; an edit of the mappings alone does not move it."},"mappings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the mapping itself — what updateMappings and deleteMappings on updateValueObject (PATCH value-accounting/value-objects/:id) are keyed by. Not the record's id."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to: one of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' (a custom value object)."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record this mapping names, as the pair ensureRelationship (POST value-accounting/associations) and resolveReportingTags (POST base/reporting-tags/resolve) use. Absent when the record no longer resolves — it was deleted, or the mapping names a record outside the ten tag dimensions — so the row can still be removed by its id."},"inCluster":{"type":"boolean","description":"Stored cluster flag: true when the value object's mappings open on the day of the last write to them named more than one distinct record; false for a 1:1 mapping. It describes that day only — nothing re-settles it when a mapping starts or ends later — so it is informational: which value object a record resolves to, and every other one-to-one decision, is judged from the mappings open on the day asked, never from this flag."},"startDate":{"type":"string","format":"date","description":"First day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent on rows written without one."},"endDate":{"type":"string","format":"date","description":"Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent when open-ended. A delete that deactivates the value object end-dates every mapping with it."}},"additionalProperties":false,"required":["id","inCluster"]},"description":"The master-data records the value object stands for, one entry per mapping, oldest first. One entry for a 1:1 value object, several for a cluster. Edit them with createMappings / updateMappings / deleteMappings on updateValueObject (PATCH value-accounting/value-objects/:id)."}},"additionalProperties":false,"required":["id","name","objectNumber","startDate","status","isSystemManaged","mappingCount","lastModifiedDate","mappings"]},"createCustomValueObjectOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) the platform assigned to the new custom value object. This is the whole of the response: it is the one thing the caller did not already send, and it is what getCustomValueObject, updateCustomValueObject and deleteCustomValueObject (GET, PATCH and DELETE value-accounting/custom-value-objects/:id) are keyed by."}},"additionalProperties":false,"required":["id"]},"createCustomValueObjectInput":{"type":"object","properties":{"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension the new value belongs to — the axis it is a value OF — as listed by the customValueDimensions data-set (GET value-accounting/custom-value-dimensions) or returned by createCustomValueDimension (POST value-accounting/custom-value-dimensions). Required. An id that names no dimension is rejected with CUSTOM_VALUE_DIMENSION_NOT_FOUND and nothing is written. Matched case-insensitively.","examples":["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]},"name":{"type":"string","description":"Display name of the new value, e.g. 'North'. Required and must not be empty or whitespace only (NAME_REQUIRED). Must be unused on the given dimension (NAME_TAKEN); the same name on another dimension is allowed. Stored exactly as sent, untrimmed — leading or trailing spaces make a distinct name — and the shadow value object gets the same text.","examples":["North"]},"startDate":{"type":"string","format":"date","description":"First day the value is valid, inclusive. Format YYYY-MM-DD. Required — there is no default. The shadow value object and its mapping start on the same day.","examples":["2026-01-01"]},"endDate":{"type":"string","format":"date","description":"Last day the value is valid, inclusive. Format YYYY-MM-DD. Omit for an open-ended value, the normal case. Must be on or after startDate (END_BEFORE_START otherwise); the same day is a valid one-day value. The shadow value object and its mapping end with the value on the same day, so reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate) re-opens the three together."},"categoryId":{"type":"string","description":"Id (a UUID) of the category to file the value under, as listed by the categories data-set (GET value-accounting/categories). Omit to leave the value uncategorised. An id that names no category is rejected with CATEGORY_NOT_FOUND and nothing is written. Matched case-insensitively."}},"additionalProperties":false,"required":["customValueDimensionId","name","startDate"]},"reactivateValueCentersOutput":{"type":"object","properties":{},"additionalProperties":false},"reactivateValueCentersInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value centers to re-open, as returned by the valueCenters data-set (GET value-accounting/value-centers) (filter[status][eq]=inactive lists the ones whose end date has passed; one the delete deactivated today still reads 'active' until tomorrow, so keep the id the delete was sent). Every id must exist and be retired, or the whole batch is rejected. Name a retired parent here too to re-open a subtree in one call. Duplicates are collapsed. An empty array is a valid no-op. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]}},"additionalProperties":false,"required":["ids"]},"endDriverCombinationOutput":{"type":"object","properties":{},"additionalProperties":false},"endDriverCombinationInput":{"type":"object","properties":{"combinationId":{"type":"string","description":"Id (a UUID) of the combination to end — the combinationId of a row of searchDriverValues (POST value-accounting/driver-values/search). Matched case-insensitively.","examples":["5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d"]},"fromPeriodId":{"type":"string","description":"Id (a UUID) of the accounting period the combination stops existing FROM, that period included. It must be open for the entity and book and not in the future. Matched case-insensitively.","examples":["d8b3b2a3-89b1-4040-99f5-8f550f28f23c"]}},"additionalProperties":false,"required":["combinationId","fromPeriodId"]},"bulkDeleteDriverValuesOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteDriverValuesInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the values to delete, from searchDriverValues (POST value-accounting/driver-values/search). Leave carried rows (isCarried true) out — one refuses the call. Duplicates are collapsed; an empty array is a valid no-op. Matched case-insensitively.","examples":[["3c1d9e4f-7a2b-4c6d-8e0f-1a2b3c4d5e6f","9f8e7d6c-5b4a-4392-8170-6f5e4d3c2b1a"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeleteValueObjectsOutput":{"type":"object","properties":{"deletedIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects that were hard-deleted with their mappings, in the order they were first sent. These ids no longer resolve."},"deactivated":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object that was kept."},"reason":{"type":"string","description":"Why it was kept, as a sentence — the first that applies: allocation lines point at it, one of its records is referenced as a tag (business drivers), or it is part of master-data relationships (the only one a caller can clear: remove them with removeRelationship (POST value-accounting/associations/remove), then delete again; the sentence names the application-API action for the same removal)."},"deletedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when the deactivation DELETED mappings: ids (UUIDs) of the value object's mappings that would only have started after the day it ends on (today, its own start when it has not started yet, or the end it already had). Such a mapping is never in effect inside the value object's life, so it is deleted rather than ended before its own start; none is left canceled. These ids no longer resolve. The reason sentence only counts them (it names no id); this field is the contract."}},"additionalProperties":false,"required":["id","reason"]},"description":"The value objects that were in use and therefore kept and end-dated to today (or to its own startDate, when that is later) with every mapping still open (a mapping that would only start after that day is deleted), in the order they were first sent. Their ids still resolve; each reads status 'active' for the rest of that day and 'inactive' from the next. One that already ended keeps its own end date and is listed here again; its mappings still open end on that same day."},"skipped":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the shadow value object that was left untouched."},"reason":{"type":"string","description":"Which custom value object owns it and the route that deletes it, as a sentence."},"customValueObjectId":{"type":"string","description":"Id (a UUID) of the owning custom value object — the record to send to deleteCustomValueObject (DELETE value-accounting/custom-value-objects/:id)."}},"additionalProperties":false,"required":["id","reason","customValueObjectId"]},"description":"The value objects that are a custom value object's shadow and were therefore left untouched, in the order they were first sent. Delete or retire each through its owner."}},"additionalProperties":false,"required":["deletedIds","deactivated","skipped"]},"bulkDeleteValueObjectsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects to delete, as returned by the valueObjects data-set (GET value-accounting/value-objects). Every id must exist, or the whole batch is rejected with NOT_FOUND. Duplicates are collapsed. An empty array is a valid no-op that deletes nothing and returns three empty lists. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2","0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]]}},"additionalProperties":false,"required":["ids"]},"updateCategoryOutput":{"type":"object","properties":{},"additionalProperties":false},"updateCategoryInput":{"type":"object","properties":{"name":{"type":"string","description":"New display name. OMIT TO LEAVE THE NAME UNCHANGED — an omitted field is not cleared. When sent it must not be empty or whitespace only (NAME_REQUIRED); it is stored exactly as sent, untrimmed. Must not collide with another category's name, which is this resource's unique semantic key; re-sending the name the category already holds is accepted as a no-op."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New free-text explanation of what the category is for. OMIT TO LEAVE IT UNCHANGED; send an explicit null to clear it back to unset.","examples":["Everything booked against the R&D programme, including prototypes."]}},"additionalProperties":false},"searchDriverValuesOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value — the id deleteDriverValue (DELETE value-accounting/driver-values/:id) and the editValueId of recordDriverValue (POST value-accounting/driver-values) take. A system-carried row has an id too, but cannot be deleted on its own."},"combinationId":{"type":"string","description":"Id (a UUID) of the combination the value belongs to: the persistent anchor of one full member set within one recording context, and the combinationId the end and reactivate routes take. Group by it to follow one combination across periods."},"driverId":{"type":"string","description":"Id (a UUID) of the business driver."},"entityId":{"type":"string","description":"Id (a UUID) of the legal entity of the recording context."},"bookId":{"type":"string","description":"Id (a UUID) of the accounting book of the recording context."},"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the accounting period the value is in force in."},"value":{"type":"string","format":"decimal","description":"The quantity, in the driver's unit. For a cumulative driver the amount of this period alone; for an As-of driver the level in force in this period."},"isCarried":{"type":"boolean","description":"True for a SYSTEM-CARRIED row: nobody entered it, it is the As-of value carried forward from the last recorded value before it. It cannot be deleted on its own; change or delete the recorded value it derives from. False for a recorded value."},"calculationType":{"type":"string","description":"The driver's calculation type, 'asOf' or 'cumulative', repeated on every row because it decides how values aggregate: sum a cumulative driver across periods, take the last period of an As-of one."},"members":{"type":"array","items":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record, in the codes the member filter takes."},"id":{"type":"string","description":"Id (a UUID) of the master-data record. Absent when the record no longer resolves in the tagging catalog — a deleted record, or a value center while the tenant's Value Center dimension is switched off."},"name":{"type":"string","description":"Display name of the record as the tagging catalog shows it (a coded department reads '<code> <name>'). Absent exactly when id is."}},"additionalProperties":false,"required":["dimensionCode"]},"description":"The full dimension combination, one entry per dimension the driver declares."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value row last changed — a recorded correction, a propagated or reverted carried value — as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ)."}},"additionalProperties":false,"required":["id","combinationId","driverId","entityId","bookId","accountingPeriodId","value","isCarried","calculationType","members","lastModifiedDate"]},"description":"The values on this page. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by the start date of their period, then by id; a value recorded after your cursor position appears on a later page, one recorded before it does not, and no row is repeated or skipped."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more values remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchDriverValuesInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the business driver, as returned by the businessDrivers data-set (GET value-accounting/business-drivers). Required unless combinationIds is given. An id naming no driver yields an empty page. Matched case-insensitively."},"entityId":{"type":"string","description":"Id (a UUID) of the legal entity of the recording context, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns it in entityId. A driver holds a separate value set per entity and book; omit to read every entity. Matched case-insensitively."},"bookId":{"type":"string","description":"Id (a UUID) of the accounting book of the recording context, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns it in bookId. Omit to read every book. Matched case-insensitively."},"accountingPeriodIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the accounting periods to read, as the accountingPeriods data-set of everest.fin.accounting (GET accounting/accounting-periods) returns them in accountingPeriodId. Omit for every period the driver holds values in. Ids naming no period match nothing. Matched case-insensitively. At most 100 ids (TOO_MANY_REFERENCES otherwise)."},"combinationIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of combinations to read — the combinationId of earlier rows. Enough on its own to name the values to read. Ids naming no combination match nothing. Matched case-insensitively. At most 100 ids (TOO_MANY_REFERENCES otherwise)."},"member":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension of the record: one of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object). An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id naming no record of that dimension yields an empty page. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"Only the combinations containing this one master-data record. Both halves are required: a UUID is unique within its dimension, not across dimensions."},"includeCarried":{"type":"boolean","description":"True (the default) includes the system-carried rows an As-of driver holds in the periods after a recorded value — the value in force there. False returns only the explicitly recorded values, e.g. to audit what was entered."}},"additionalProperties":false,"description":"Which values to read; members combine with AND. driverId or combinationIds must be present: omitting filters, or sending neither, raises INVALID_FILTER.","examples":[{"driverId":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","entityId":"6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2","bookId":"c3a91e07-52d4-4f6b-8e1a-9b0d2c7f4a63","accountingPeriodIds":["95dd0047-0f93-429b-af80-982416f97748"],"member":{"dimensionCode":"department","id":"7b4e2d19-8c3f-4a5e-b6d7-1e0f9a2c3b84"},"includeCarried":true}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one it did not issue raises INVALID_CURSOR rather than silently restarting at the first page. Keep filters identical across the pages of one walk. It encodes the LAST ROW of the page you received, not a position, so a value recorded or deleted before your position cannot make a later page repeat or skip a row."},"size":{"type":"number","description":"Maximum number of values to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"createValueObjectOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object that now stands for the records — newly created, or the existing 1:1 value object that was returned (re-opened when it had been retired; a retired one this call does not re-open is VALUE_OBJECT_RETIRED instead). This is the whole of the response; it is what getValueObject, updateValueObject and deleteValueObject (GET, PATCH and DELETE value-accounting/value-objects/:id) are keyed by."}},"additionalProperties":false,"required":["id"]},"createValueObjectInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name — normally the record's own name, or a descriptive name for a cluster. Required and must not be empty or whitespace only (NAME_REQUIRED), judged even when an existing value object is returned and the name is then ignored. Stored exactly as sent, untrimmed. Names are NOT unique. A 1:1 value object named exactly as the system names the record's mirror is recognised as that mirror (isSystemManaged) and its name, dates, category and mappings then follow the record.","examples":["Sales"]},"startDate":{"type":"string","format":"date","description":"First day the value object is valid, inclusive. Format YYYY-MM-DD. Required. Ignored when an existing value object is returned.","examples":["2026-01-01"]},"objectNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Business number of a NEW 1:1 value object, unique tenant-wide (OBJECT_NUMBER_TAKEN otherwise). Omit it to take the record's own business number (a department's code, a customer's number) when the record has one and no value object holds it yet, and a generated VO-n otherwise — when the record has none, or another value object already holds it (business numbers are unique only within their dimension; the value object that the record's link moved away from, for one) — so the new value object's number can differ from the record's; send null, or an empty string, to always generate VO-n. A number you send is written as sent, never replaced. Ignored for a cluster, which is always numbered VO-n, and when an existing value object is returned. A generated number is one above the highest numeric VO- number (VO-<digits>; other VO- numbers are ignored) that no value object holds — not gap-free."},"categoryId":{"type":"string","description":"Id (a UUID) of the category to file a NEW value object under, as listed by the categories data-set (GET value-accounting/categories). Omit to leave it uncategorised. An id that names no category is rejected with CATEGORY_NOT_FOUND and nothing is written — also when an existing value object would be returned, which then keeps its own category. Matched case-insensitively."},"mappings":{"type":"array","items":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object, which already has its own value object — the call then returns it). An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND; a record is never created implicitly. Inactive records resolve. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record, as the pair ensureRelationship (POST value-accounting/associations) takes. Both halves are required, because a UUID is unique within its dimension but not across dimensions."},"startDate":{"type":"string","format":"date","description":"First day the mapping is valid, inclusive. Format YYYY-MM-DD. Defaults to TODAY, or to the value object's startDate when that is later; send the day the relationship really began when it began earlier — never before the value object's startDate (MAPPING_STARTS_BEFORE_OWNER, judged also when an existing value object is returned). Otherwise ignored when an existing value object is returned."},"endDate":{"type":"string","format":"date","description":"Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Omit for an open-ended mapping, the normal case. Ignored when an existing value object is returned."}},"additionalProperties":false,"required":["record"]},"description":"The master-data records the value object stands for — a plain array of full mappings (the update edits them with createMappings / updateMappings / deleteMappings). At least one (MAPPING_REQUIRED). Entries naming the same record with the same dates are collapsed, the first kept; the same record with different dates is refused with DUPLICATE_MAPPING_ROW. ONE distinct record = a 1:1 value object with resolve-or-create semantics; MORE than one = a new cluster — which still stands for a record ALONE on the days only that record's mapping is open, and is then refused with ONE_TO_ONE_EXISTS when another value object holds that record's open one-to-one link.","examples":[[{"record":{"dimensionCode":"department","id":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}}]]}},"additionalProperties":false,"required":["name","startDate","mappings"]},"updateValueCenterOutput":{"type":"object","properties":{"removedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when this request moved the value center's end date EARLIER and that DELETED mappings it did not name itself: the ids (UUIDs) of the value center's mappings that would only have started after the new end date. Such a mapping is never in effect inside the value center's life, so it is deleted rather than ended before its own start (a mapping never outlives its value center and is never left canceled); every other mapping still open after that day ends on it. The request is judged on what it leaves: a mapping this same request removes through deleteMappings is removed by it (before the end date is written) and is not listed here, and an updateMappings row is written before an earlier end date so the end judges its new dates. The ids no longer exist. Absent when nothing was deleted (the body is then empty, as before). Also the mappings (UUIDs) of OTHER value centers that name this value center as their record and would only have started after the new end date: a record is never represented past its own end, so they are deleted too, while the ones still open after that day end on it — the closing a deactivation applies."},"healedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when the request HEALED mappings: the ids (UUIDs, mappings[].id of getValueCenter) of updateMappings rows sent with a startDate but no endDate while the stored mapping was OPEN, or ended after the value center's endDate (a legacy row), which were therefore written with the value center's endDate as the request leaves it — a mapping never outlives its value center. An end the request did not send was written for them; read the value center back for the stored dates. A healed row the same request's earlier end then deleted is not listed (it is in removedMappingIds)."}},"additionalProperties":false},"updateValueCenterInput":{"type":"object","properties":{"name":{"type":"string","description":"New display name. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. When sent it must not be empty or whitespace only (NAME_REQUIRED). Stored exactly as sent, untrimmed. Refused with SYSTEM_MANAGED on a value center the system maintains, whose name follows its record — rename the record instead."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New free-text explanation. OMIT TO LEAVE IT UNCHANGED; send null to clear it. Editable on a value center the system maintains too, but there it can only be REPLACED: null is refused with DESCRIPTION_NOT_CLEARABLE."},"centerCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New tenant-assigned code. OMIT TO LEAVE IT UNCHANGED; send null, or an empty string, to clear it. Must be unused by any other value center (CENTER_CODE_TAKEN); re-sending the code it already has is a valid no-op. Refused with SYSTEM_MANAGED on a value center the system maintains."},"startDate":{"type":"string","format":"date","description":"New first valid day, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED. Refused with SYSTEM_MANAGED on a value center the system maintains. Must not fall after the endDate the value center will have (END_BEFORE_START). Moved LATER, every mapping still running on the new day (open-ended, or ending on or after it) moves its startDate to it — a mapping never starts before its value center — and a mapping that ENDED before the new day refuses the move (START_AFTER_MAPPING_HISTORY); moved earlier, the mappings keep their own start dates (move them with updateMappings)."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"New last valid day, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED. Setting it ends the value center by hand together with its mappings: every mapping still open after that day ends on the same day (one that ended earlier keeps its own date; one that would only start after it is DELETED and listed in removedMappingIds; other value centers' mappings naming this one follow the same closing) — the set deleteValueCenter (DELETE value-accounting/value-centers/:id) closes on a value center in use — so reactivateValueCenters re-opens them with it; a later date on a value center that already ended moves the mappings ending on its previous day with it. A child that reads active or planned still blocks its parent's delete. Editable on a value center the system maintains too. null CLEARS an end of TODAY OR LATER — a schedule that never took effect: the mappings ending with it follow to no end. ⛔ On a value center whose end date is BEFORE today null is REFUSED with REACTIVATE_VIA_FLOW and nothing is written — re-open with reactivateValueCenters (POST value-accounting/value-centers/reactivate), which re-opens the mappings with it and checks the parent."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the category to file the value center under, from the categories data-set (GET value-accounting/categories). OMIT TO LEAVE IT UNCHANGED; send null to clear it back to uncategorised. An id that names no category is rejected with CATEGORY_NOT_FOUND; null is a clear, never rejected. Refused with SYSTEM_MANAGED on a value center the system maintains."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the value center to hang this one under, from the valueCenters data-set (GET value-accounting/value-centers). OMIT TO LEAVE IT WHERE IT IS; send null to make it a ROOT — it stays in the tree, with no parent. An id that names no value center is rejected with PARENT_NOT_FOUND; the value center itself or one of its own descendants with CYCLE, because a loop would silently remove every value center in it from the tree — move the descendant out first. Its children move with it. Editable on a value center the system maintains too: no Department/Team hook places one in the tree.","examples":["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]},"createMappings":{"type":"array","items":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'. The product's own screens map departments and teams; the tenant's VALUE_CENTER_MAPPING_REFERENCE setting governs which ones the automation creates value centers for and does not limit what is mapped here."},"id":{"type":"string","description":"Id (a UUID) of the master-data record. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record to map, as the pair ensureRelationship (POST value-accounting/associations) takes. An unknown dimension code is UNSUPPORTED_DIMENSION_CODE, a record that does not exist RECORD_NOT_FOUND."},"startDate":{"type":"string","format":"date","description":"First day the mapping is valid, inclusive. Format YYYY-MM-DD. Defaults to TODAY, or to the value center's own startDate when that is later; send the day the relationship really began when it began earlier."},"endDate":{"type":"string","format":"date","description":"Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Omit and the mapping ends with the value center: it inherits the value center's endDate as this request leaves it (an endDate sent in the same request included), and is open-ended only when the value center has none — a mapping never outlives its value center. A date later than that endDate is refused with MAPPING_OUTLIVES_END."}},"additionalProperties":false,"required":["record"]},"description":"Mappings to ADD, one per master-data record — full rows with no id. Entries naming the same record with the same dates are collapsed; the same record with different dates is refused with DUPLICATE_MAPPING_ROW. A record this value center maps with an OPEN mapping is refused with MAPPING_EXISTS, unless deleteMappings of the same request removes that mapping or updateMappings of it ends that mapping before today (judged on the end dates as the request leaves them); a mapping that already ended is history, so naming its record again adds a new mapping. Refused with SYSTEM_MANAGED on a value center the system maintains, which the automation finds through its mapping. Omit for no additions.","examples":[[{"record":{"dimensionCode":"team","id":"3c4d5e6f-1a2b-4c3d-8e9f-0a1b2c3d4e5f"}}]]},"updateMappings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the mapping — mappings[].id of getValueCenter (GET value-accounting/value-centers/:id). An id that matches no mapping is MAPPING_NOT_FOUND; one of another value center MAPPING_MISMATCH."},"startDate":{"type":"string","format":"date","description":"New first valid day of the mapping, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"New last valid day of the mapping, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED; a date ends the mapping. ⛔ null is REFUSED with REACTIVATE_VIA_FLOW — a mapping is re-opened with its value center by reactivateValueCenters (POST value-accounting/value-centers/reactivate). On a value center that has ended, a date today or later that would leave the mapping open after the value center's own end date is refused the same way; any other date later than the value center's endDate as the request leaves it is refused with MAPPING_OUTLIVES_END."}},"additionalProperties":false,"required":["id"]},"description":"Existing mappings to RE-DATE, each keyed by its mapping id. Only the dates can change: a mapping names its record once, so pointing at another record is deleteMappings plus createMappings. A row whose dates equal the stored ones is not written. Refused with SYSTEM_MANAGED on a value center the system maintains when a date would change — such a mapping ends with its value center, so send endDate on the value center instead. Omit for no changes."},"deleteMappings":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of mappings to REMOVE — mappings[].id of getValueCenter (GET value-accounting/value-centers/:id). Each must belong to this value center (MAPPING_NOT_FOUND, MAPPING_MISMATCH). Removing the last one is allowed: a value center need not stand for any record. When the open mappings left name one record they become a 1:1 mapping again (inCluster false). Refused with SYSTEM_MANAGED on a value center the system maintains. Omit for no removals."}},"additionalProperties":false},"getCustomValueObjectOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the custom value object — the id that was passed in, in canonical lowercase."},"name":{"type":"string","description":"Display name of the value, e.g. 'North'. Unique within its dimension only."},"customObjectNumber":{"type":"string","description":"System-generated business number of the value, e.g. 'CVO-202360' — unique tenant-wide, never editable, the handle to quote to a human. Declared optional on the record, so a reader must tolerate its absence."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension this value belongs to, as listed by the customValueDimensions data-set (GET value-accounting/custom-value-dimensions)."},"categoryId":{"type":"string","description":"Id (a UUID) of the category the value is filed under, as listed by the categories data-set (GET value-accounting/categories). Absent — not null — when the value is uncategorised."},"startDate":{"type":"string","format":"date","description":"First day the value is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"Last day the value is valid, inclusive. Format YYYY-MM-DD. Absent — not null — when the value is open-ended."},"isActive":{"type":"boolean","description":"Whether the value is active today: true when it has no endDate, or an endDate on or after today (UTC). The same rule the list and the search apply."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the search publish."}},"additionalProperties":false,"required":["id","name","customValueDimensionId","startDate","isActive","lastModifiedDate"]},"createCustomValueDimensionOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) the platform assigned to the new dimension. This is the whole of the response: it is the one thing the caller did not already send, and it is what getCustomValueDimension, updateCustomValueDimension and deleteCustomValueDimension (GET, PATCH and DELETE value-accounting/custom-value-dimensions/:id) are keyed by, and what identifies the dimension a custom value object belongs to."}},"additionalProperties":false,"required":["id"]},"createCustomValueDimensionInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the new dimension, e.g. 'Region'. Required, must not be empty or whitespace only (NAME_REQUIRED), and must not already be in use — the name is this resource's unique semantic key. It is stored VERBATIM, so leading or trailing spaces are preserved and make a distinct name; matching is on the exact stored text. Resolve whether a name is free with filter[name][eq]= on the customValueDimensions data-set (GET value-accounting/custom-value-dimensions).","examples":["Region"]}},"additionalProperties":false,"required":["name"]},"createValueCenterOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the new value center, or of the record's existing one when the 1:1 resolve applied. This is the whole of the response; it is what getValueCenter, updateValueCenter and deleteValueCenter (GET, PATCH and DELETE value-accounting/value-centers/:id) are keyed by, and what another value center's parentId names."}},"additionalProperties":false,"required":["id"]},"createValueCenterInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the value center, e.g. 'Development Value Center'. Required and must not be empty or whitespace only (NAME_REQUIRED), judged even when an existing value center is returned and the name is then ignored. Stored exactly as sent, untrimmed. Names are NOT unique.","examples":["Platform Engineering"]},"startDate":{"type":"string","format":"date","description":"First day the value center is valid, inclusive. Format YYYY-MM-DD. Required. A date in the future makes it read status 'planned' until then.","examples":["2026-01-01"]},"endDate":{"type":"string","format":"date","description":"Last day the value center is valid, inclusive. Format YYYY-MM-DD. Omit for an open-ended value center, the usual case. Must be on or after startDate (END_BEFORE_START otherwise, nothing written); the same day is a valid one-day value center."},"description":{"type":"string","description":"Longer free-text explanation of what the value center is for. Omit to leave it unset."},"centerCode":{"type":"string","description":"Tenant-assigned code identifying the value center, e.g. 'DEV-01'. Must be unused by any other value center (CENTER_CODE_TAKEN). Omit it, or send an empty string, for no code — a blank code is stored as 'no code', so any number of value centers may have none."},"categoryId":{"type":"string","description":"Id (a UUID) of the category to file the value center under, as listed by the categories data-set (GET value-accounting/categories). Omit to leave it uncategorised. An id that names no category is rejected with CATEGORY_NOT_FOUND and nothing is written. Matched case-insensitively."},"parentId":{"type":"string","description":"Id (a UUID) of the value center to hang this one under, from the valueCenters data-set (GET value-accounting/value-centers). Omit to create a ROOT. An id that names no value center is rejected with PARENT_NOT_FOUND and nothing is written. Matched case-insensitively.","examples":["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]},"mappings":{"type":"array","items":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'. The value centers the system maintains stand for departments and teams, and those are what the product's own screens map; the tenant's VALUE_CENTER_MAPPING_REFERENCE setting decides which of the two the automation creates value centers for and does not limit what is mapped here. An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND; a record is never created implicitly. Inactive records resolve. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record, as the pair ensureRelationship (POST value-accounting/associations) takes. Both halves are required, because a UUID is unique within its dimension but not across dimensions."},"startDate":{"type":"string","format":"date","description":"First day the mapping is valid, inclusive. Format YYYY-MM-DD. Defaults to TODAY, or to the value center's startDate when that is later; send the day the relationship really began when it began earlier — never before the value center's startDate (MAPPING_STARTS_BEFORE_OWNER)."},"endDate":{"type":"string","format":"date","description":"Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Omit and the mapping ends with the value center: it inherits the value center's endDate, and is open-ended only when the value center has none — a mapping never outlives its value center. A date later than the value center's endDate is refused with MAPPING_OUTLIVES_END."}},"additionalProperties":false,"required":["record"]},"description":"The master-data records the value center stands for — a plain array of full mappings (the update edits them with createMappings / updateMappings / deleteMappings). OPTIONAL, and an empty array is valid: a value center need not stand for any record. Entries naming the same record with the same dates are collapsed, the first kept; the same record with different dates is refused with DUPLICATE_MAPPING_ROW. One distinct record makes a 1:1 mapping — and when that record already has its own value center, that one is returned instead of a new one — more than one a cluster.","examples":[[{"record":{"dimensionCode":"team","id":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}}]]}},"additionalProperties":false,"required":["name","startDate"]},"getCustomValueDimensionOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the dimension — the id that was passed in, echoed so a response stands on its own."},"name":{"type":"string","description":"Display name of the dimension, e.g. 'Region'. Unique across all custom value dimensions — this resource's semantic key."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the dimension last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list target publishes, so the two reads can be used interchangeably."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"deleteDriverValueOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteCustomValueDimensionsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteCustomValueDimensionsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the dimensions to delete, as returned by the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). Every id must exist and none may still hold custom value objects, or the whole batch is rejected. Duplicates are collapsed. An empty array is a valid no-op that deletes nothing and returns success. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]}},"additionalProperties":false,"required":["ids"]},"bulkDeleteValueAllocationsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteValueAllocationsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value allocations to delete, as returned by the valueAllocations data-set (GET value-accounting/value-allocations) or the search. Every id must exist (else NOT_FOUND), none may be held by a document (a journal entry line or any other document line or record that stores an allocation id) or own the split parent of a line under another allocation (else IN_USE) — any rejection deletes nothing. Duplicates are collapsed. An empty array is a valid no-op that deletes nothing and returns success. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]}},"additionalProperties":false,"required":["ids"]},"removeRelationshipOutput":{"type":"object","properties":{},"additionalProperties":false},"removeRelationshipInput":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'. An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. Ids are matched case-insensitively and returned in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"One end of the relationship, as the (dimensionCode, id) pair. Either order works — the relationship is removed whichever side created it.","examples":[{"dimensionCode":"department","id":"9a5e1c77-3b2d-4f10-8c6e-1d40a7b93c58"}]},"relatedRecord":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the related record belongs to. Same ten codes as `record.dimensionCode`."},"id":{"type":"string","description":"Id (a UUID) of the related master-data record. Ids are matched case-insensitively and returned in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The other end of the relationship, as the same (dimensionCode, id) pair.","examples":[{"dimensionCode":"valueCenter","id":"f91ecda5-2912-4624-b8b2-b6d28e1d64e1"}]}},"additionalProperties":false,"required":["record","relatedRecord"]},"getValueCenterHierarchyOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center — the id getValueCenter (GET value-accounting/value-centers/:id) is keyed by."},"name":{"type":"string","description":"Display name of the value center."},"parentId":{"type":"string","description":"Id (a UUID) of this row's own direct parent. On a descendants walk it is always present — the value center in the path or another row. On an ancestors walk it is absent — not null — on the root, the last row."},"depth":{"type":"number","description":"How many levels this value center is away from the value center in the path: 1 for a direct child (descendants) or the direct parent (ancestors), 2 for a grandchild or grandparent, and so on."}},"additionalProperties":false,"required":["id","name","depth"]},"description":"The value centers on the walk, the value center in the path excluded. For descendants: level by level, nearest first, each level by name. For ancestors: the direct parent first, the root last. Empty for a leaf (descendants) or a root (ancestors)."}},"additionalProperties":false,"required":["items"]},"ensureRelationshipOutput":{"type":"object","properties":{},"additionalProperties":false},"ensureRelationshipInput":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object). An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record. This is the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid for the record. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND — it is not silently created. Ids are matched case-insensitively and returned in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The INITIATING record — the one whose journey is doing the tagging. Its edge is written explicit. Identified by the (dimensionCode, id) pair; both halves are required, because a UUID is unique within its dimension but not across dimensions.","examples":[{"dimensionCode":"department","id":"9a5e1c77-3b2d-4f10-8c6e-1d40a7b93c58"}]},"relatedRecord":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the related record belongs to. Same ten codes as `record.dimensionCode`. The two records may be of the same dimension (two departments, say) as long as they are different records."},"id":{"type":"string","description":"Id (a UUID) of the related master-data record. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND. Ids are matched case-insensitively and returned in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The TARGET record. Its edge is written implicit, unless it already exists as explicit — in which case it stays explicit. Identified by the same (dimensionCode, id) pair. Must not be the same record as `record`.","examples":[{"dimensionCode":"valueCenter","id":"f91ecda5-2912-4624-b8b2-b6d28e1d64e1"}]},"startDate":{"type":"string","format":"date","description":"Date the relationship starts, as YYYY-MM-DD. Written on BOTH directed edges. On a NEW pair, omit it to start the relationship TODAY — but a system-managed caller (a sync mirroring an employee's job or a department move) MUST pass the real start date, because the relationship began when the source record did, not when the sync ran. On an EXISTING pair, omit it to keep the stored start date; send a date to correct it on both edges.","examples":["2026-01-01"]},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Date the relationship ends, as YYYY-MM-DD. The package convention, as on every PATCH: omit to leave the stored end date UNCHANGED (a new pair without one is open-ended), pass null to CLEAR it back to open-ended, send a date to set or move it. Written on both edges. Omitting it on a re-run never clears anything."}},"additionalProperties":false,"required":["record","relatedRecord"]},"createCategoryOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) the platform assigned to the new category. This is the whole of the response: it is the one thing the caller did not already send, and it is what getCategory, updateCategory and deleteCategory (GET, PATCH and DELETE value-accounting/categories/:id) are keyed by, and what a master-data record's categoryId points at."}},"additionalProperties":false,"required":["id"]},"createCategoryInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the new category, e.g. 'Research & Development'. Required, must not be empty or whitespace only (NAME_REQUIRED), and must not already be in use — the name is this resource's unique semantic key and is matched on the exact stored text. Stored exactly as sent: leading and trailing spaces are kept, not trimmed. Resolve whether a name is free with filter[name][eq]= on the categories data-set (GET value-accounting/categories).","examples":["Research & Development"]},"description":{"type":"string","description":"Longer free-text explanation of what the category is for. Omit to leave it unset; it can later be changed — or cleared with an explicit null — through updateCategory (PATCH value-accounting/categories/:id).","examples":["Everything booked against the R&D programme."]}},"additionalProperties":false,"required":["name"]},"customValueObjectsRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the custom value object — the public identifier getCustomValueObject, updateCustomValueObject and deleteCustomValueObject (GET/PATCH/deleteCustomValueObject) are keyed by. Filter target: filter[id][in]=<id1>,<id2>."},"name":{"type":"string","description":"Display name of the value, e.g. 'North'. Unique WITHIN its dimension only — the same name can appear on several dimensions, so never match on name without also matching customValueDimensionId. Returned only: it cannot be filtered or sorted on here; search by name with searchCustomValueObjects (POST value-accounting/custom-value-objects/search)."},"customObjectNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-generated business number of the value, e.g. 'CVO-202360'. Assigned from a number range on create, unique tenant-wide and never editable — the stable handle to quote to a human. Returned only. Declared optional on the record, so a reader must tolerate its absence."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension this value belongs to — the axis it is a value OF, as listed by the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). Together with name it is this resource's semantic key. Filter target: filter[customValueDimensionId][eq]=<id>."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the category the value is filed under, as listed by the categories data-set (GET value-accounting/categories). Absent when the value is uncategorised. Filter target: filter[categoryId][eq]=<id>."},"startDate":{"type":"string","format":"date","description":"First day the value is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day the value is valid, inclusive. Format YYYY-MM-DD. Absent when the value is open-ended, which is the normal state. A delete that finds the value in use sets it (the value is deactivated rather than deleted); reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate) clears it again."},"isActive":{"type":"boolean","description":"Whether the value is active today: true when it has no endDate, or an endDate on or after today (UTC) — the end date is inclusive, and a future one is a planned retirement, not a retired value. Inactive values stay resolvable and keep their history; they are only withdrawn from tagging pick-lists. Filter target: filter[isActive][eq]=true."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter and sort on this to sync incrementally: filter[lastModifiedDate][gte]=2026-09-01T00:00:00.000Z with sort=lastModifiedDate. An update that changes nothing does not move it."}},"additionalProperties":false},"deleteValueAllocationOutput":{"type":"object","properties":{},"additionalProperties":false},"searchValueCentersOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center — the id getValueCenter, updateValueCenter and deleteValueCenter (GET, PATCH and DELETE value-accounting/value-centers/:id) are keyed by."},"name":{"type":"string","description":"Display name of the value center. Names are not unique."},"centerNumber":{"type":"string","description":"System-assigned business number, e.g. 'VC-461358' — unique and never caller-supplied."},"description":{"type":"string","description":"Longer free-text explanation. Absent — not null — when unset."},"centerCode":{"type":"string","description":"Tenant-assigned code, unique among the value centers that have one. Absent — not null — when it has none."},"startDate":{"type":"string","format":"date","description":"First day the value center is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"Last day the value center is valid, inclusive. Format YYYY-MM-DD. Absent — not null — when it is open-ended."},"status":{"type":"string","description":"Lifecycle state, derived from the dates: 'active', 'planned' (startDate after today), 'inactive' (endDate before today, UTC — the end date is inclusive) or 'canceled' (endDate before startDate)."},"categoryId":{"type":"string","description":"Id (a UUID) of the category the value center is filed under. Absent — not null — when it is uncategorised."},"parentId":{"type":"string","description":"Id (a UUID) of the value center's direct parent. Absent — not null — for a root."},"isSystemManaged":{"type":"boolean","description":"True when the system maintains this value center as the mirror of a department or team: its name, centerCode, startDate, categoryId and mappings are then refused on PATCH with SYSTEM_MANAGED; its parentId stays editable (no Department/Team hook places it in the tree). Derived, never an input."},"mappingCount":{"type":"number","description":"How many mappings the value center carries — the length of mappings; 0 is valid."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value center's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the keyed read publish."},"mappings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the mapping itself — what updateMappings and deleteMappings on updateValueCenter (PATCH value-accounting/value-centers/:id) are keyed by. Not the record's id."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to: one of the ten codes filters.record accepts."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record this mapping names, as the pair ensureRelationship (POST value-accounting/associations) uses. Absent when the record no longer resolves, so the row can still be removed by its id."},"inCluster":{"type":"boolean","description":"Stored cluster flag: true when the value center's mappings open on the day of the last write to them named more than one distinct record; false for a 1:1 mapping. It describes that day only — nothing re-settles it when a mapping starts or ends later — so it is informational: which value center a record resolves to, and every other one-to-one decision, is judged from the mappings open on the day asked, never from this flag."},"startDate":{"type":"string","format":"date","description":"First day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent on rows written without one."},"endDate":{"type":"string","format":"date","description":"Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent when open-ended."}},"additionalProperties":false,"required":["id","inCluster"]},"description":"The master-data records the value center stands for, one entry per mapping, oldest first — the same entries getValueCenter (GET value-accounting/value-centers/:id) returns."}},"additionalProperties":false,"required":["id","name","startDate","status","isSystemManaged","mappingCount","lastModifiedDate","mappings"]},"description":"The value centers on this page, one row per value center with its mappings, in the same shape getValueCenter (GET value-accounting/value-centers/:id) returns without the children. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by id ascending — a unique, immutable key, so a rename never moves a row across a page boundary. The cursor is a KEYSET cursor over that order, so a value center created after your cursor position appears on a later page, one created before it does not, and no row is ever repeated or skipped, whatever else is written while you walk."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more value centers remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchValueCentersInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"nameContains":{"type":"string","description":"Fragment the name must contain, matched case-insensitively anywhere in the name — the lookup for a type-ahead. A substring match, not a pattern language: the fragment is taken as literal text apart from the SQL wildcards % and _, which are not escaped and therefore still act as wildcards. A fragment matching nothing yields an empty page, not an error."},"centerCode":{"type":"string","description":"Exact center code, matched on the stored text (case-sensitive) — at most one value center, since codes are unique among the value centers that have one. A code matching nothing yields an empty page, not an error."},"status":{"enum":["active","inactive","planned","canceled"],"description":"Lifecycle state to keep: 'active', 'planned', 'inactive' or 'canceled' — the same derived status every read publishes. Omit for all four."},"categoryId":{"type":"string","description":"Id (a UUID) of a category, from the categories data-set (GET value-accounting/categories): only value centers filed under it match. An id that names no category matches nothing — an empty page, not an error. Matched case-insensitively."},"parentId":{"type":"string","description":"Id (a UUID) of a value center: only the value centers hanging DIRECTLY under it match — one level of the tree. An id that names no value center, or a leaf, matches nothing — an empty page, not an error. For every level below, use getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy?direction=descendants). Matched case-insensitively."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object). The system itself maps departments and teams. An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"A master-data record: only value centers with a mapping to it match, ended history rows included — its 1:1 value center, every cluster it belongs to, and a value center its link moved away from (the mappings' dates and the other records they name tell them apart; the stored inCluster flag describes only the day of the last write). The same pair ensureRelationship (POST value-accounting/associations) takes. A record that does not exist is RECORD_NOT_FOUND and an unknown dimension code UNSUPPORTED_DIMENSION_CODE; a record that exists but has no value center yields an empty page."}},"additionalProperties":false,"description":"How to narrow the search. A value center must match every member you send. Omit it — or send it with no members — to page through every value center.","examples":[{"record":{"dimensionCode":"department","id":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one this endpoint did not issue (a cursor from another list, or one altered by hand) raises INVALID_CURSOR rather than silently restarting at the first page, which would make a paging loop repeat forever. Keep filters identical across the pages of one walk; changing it mid-walk re-interprets the cursor against a different result set. It encodes the LAST ROW of the page you received, not a position, so the walk resumes AT THAT ROW rather than at a count: a row created or removed before your position cannot make a later page repeat a row you already saw or skip one you have not."},"size":{"type":"number","description":"Maximum number of value centers to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"updateValueAllocationOutput":{"type":"object","properties":{},"additionalProperties":false},"updateValueAllocationInput":{"type":"object","properties":{"documentType":{"enum":["VendorBill","Invoice","JournalEntry","Revenue","Expense","BankEntry","OutboundPayment","Reversal","Revaluation","CustomerPayment","CreditMemo","DebitMemo","Payroll","VendorCredit","CreditCardEntry","RevaluationReversal","Allocation","Depreciation","AccruedLiability","AmortizationSchedule","RevaluationClose","NetZeroImpact","FundTransfer","SalesOrder","DeferredRevenueReclass","UnbilledARAdjustment","ShortAndLongTermDeferredRevenueReclass","ManualTaxableDocument","IntercompanyBill","InventoryIncrease","InventoryDecrease","InventoryRevaluation","PurchaseRequest","PurchaseOrder","FixedAsset","EmployeeAdvanceRequest","TimeRecord"],"description":"New kind of financial document — one of the 37 kinds the valueAllocations data-set (GET value-accounting/value-allocations) lists. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. A label, not a reference: nothing is checked against a real document, so correct it only to the kind the allocation genuinely belongs to."},"allocationDate":{"type":"string","format":"date","description":"New day the allocation was recorded. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. It cannot move an amount into another fiscal period — reporting buckets by the journal entry line's posting date."},"isOffset":{"type":"boolean","description":"New offset flag. OMIT TO LEAVE IT UNCHANGED. ⚠️ true removes every journal line of this allocation from all value-accounting reporting (the dashboard, its drill-downs, the AI assistant, every analytics read) while the general ledger keeps the amount; false re-includes them. A stored null counts as false, so sending false then changes nothing."},"updateLines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the line — lines[].id of getValueAllocation (GET value-accounting/value-allocations/:id). An id that matches no line is LINE_NOT_FOUND; a line of another allocation LINE_MISMATCH."},"valueCenterId":{"type":"string","description":"Id (a UUID) of the value center to attribute the amount to, from the valueCenters data-set (GET value-accounting/value-centers). OMIT TO LEAVE IT UNCHANGED; it cannot be cleared — a line is never un-attributed here. ⚠️ Re-attributes the amount; a line that already names a value object then names both. The line's record (what searchValueAllocations matches on record and what usage counts read) follows: a value-center line's record becomes the new value center. An id that names no value center is VALUE_CENTER_NOT_FOUND."},"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object to attribute the amount to, from the valueObjects data-set (GET value-accounting/value-objects). OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. ⚠️ Re-attributes the amount in every value-object report. The line's record (the master-data record it is tagged for) follows: it becomes the record the new value object's CURRENT link names — its mappings open today, else the ones sharing the latest end date (a deactivated value object); an ended row of a link that moved to another record is history and does not count — and a cluster value object (several records in that set), or one with no mappings at all, leaves it with none; unless the line is tagged to its value center, which then stays its record. An id that names no value object is VALUE_OBJECT_NOT_FOUND."},"allocationRule":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","description":"Model URN naming the kind of rule: 'urn:evst:everest:valueaccounting/base:model/node:ValueCenterAssociation' (a value-center rule) or 'urn:evst:everest:valueaccounting/base:model/node:ValueObjectAssociation' (a value-object rule). Matched exactly."},"id":{"type":"string","description":"Id (a UUID) of the rule record in the node path names. Matched case-insensitively."}},"additionalProperties":false,"required":["path","id"]},{"type":"null"}],"description":"The allocation rule that produced the line, as {path, id} — both parts always together. OMIT TO LEAVE IT UNCHANGED; send null to clear it. ⛔ While a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references this allocation the rule is FROZEN: a change or a clear is refused with RULE_LOCKED, because allocations have occurred under it (re-sending the stored rule is not a change). A path that is not one of the two rule kinds, or an id that is no record of that kind, is ALLOCATION_RULE_NOT_FOUND. Automatic allocation rules are not implemented yet; the rule is documentation."},"valueStatus":{"enum":["assigned","allocated","split"],"description":"New workflow state: 'assigned', 'allocated' or 'split'. OMIT TO LEAVE IT UNCHANGED. Documentation — moves no money."},"allocationType":{"enum":["primary","secondary"],"description":"New origin: 'primary' or 'secondary'. OMIT TO LEAVE IT UNCHANGED. Documentation — moves no money."},"allocationLineType":{"enum":["cost","profit","value","metric"],"description":"New reporting role. OMIT TO LEAVE IT UNCHANGED. ⚠️ This is the field that moves money: 'profit' reports the amount as revenue, 'cost' as cost, 'value' removes it from every revenue, cost and margin figure, and 'metric' marks a NON-MONETARY quantity (the hours of a time record), excluded the same way. Change it only to correct a genuinely mis-classified line; the general ledger is untouched either way."},"allocationDate":{"type":"string","format":"date","description":"New day recorded on the line. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED. Documentation — it cannot move the amount into another fiscal period."},"splitParentId":{"type":"string","description":"Id (a UUID) of the line this one was split from — any line, of this allocation or another. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared — un-splitting a line is not offered. The line itself, a line deleteLines removes in the same request, or a line that descends from this one through the split parents (as the request leaves them) is INVALID_SPLIT_PARENT; an id that matches no line PARENT_LINE_NOT_FOUND."}},"additionalProperties":false,"required":["id"]},"description":"Existing lines to PATCH, each keyed by its line id. Only the fields sent change; a row whose fields all equal the stored ones is not written. A line named in deleteLines as well is removed and its row here is skipped. Omit for no line changes.","examples":[[{"id":"3c4d5e6f-1a2b-4c3d-8e9f-0a1b2c3d4e5f","valueObjectId":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","allocationLineType":"cost"}]]},"deleteLines":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of lines to REMOVE — lines[].id of getValueAllocation (GET value-accounting/value-allocations/:id). Each must belong to this allocation (LINE_NOT_FOUND, LINE_MISMATCH). Refused with IN_USE while a document (a journal entry line or any other document line or record that stores an allocation id, drafts included) references this allocation — removing a line would destroy the document's attribution; re-tag the financial document instead — and while a line split from one of them is not removed in the same request (judged on the lines as stored before this request). Removing the last line is allowed; the allocation then attributes nothing. Omit for no removals."}},"additionalProperties":false},"deleteValueObjectOutput":{"type":"object","properties":{"outcome":{"enum":["deleted","deactivated","skipped"],"description":"What happened: 'deleted' — it was not in use and is gone with its mappings, so its id no longer resolves; 'deactivated' — it is in use, so it and every mapping still open were end-dated to today, or to its own startDate when that is later (a mapping that had already ended keeps its date, so reactivating re-opens exactly these; one that would only start after that day was deleted — deletedMappingIds) and its id still resolves (the end date is inclusive, so it reads status 'active' for the rest of that day and 'inactive' from the next); one that already ended keeps its own end date and is reported 'deactivated' again, and its mappings still open end on that same day; 'skipped' — it is a custom value object's shadow, so nothing was written; address customValueObjectId instead."},"reason":{"type":"string","description":"Why the value object was kept, as a sentence. For 'deactivated' the first that applies: allocation lines point at it, one of its records is referenced as a tag (business drivers), or it is part of master-data relationships (the only one a caller can clear: remove them with removeRelationship (POST value-accounting/associations/remove), then delete again; the sentence names the application-API action for the same removal). For 'skipped', which custom value object owns the shadow and the route that deletes it. Absent for 'deleted'."},"deletedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only on 'deactivated' when the deactivation DELETED mappings: ids (UUIDs) of the value object's mappings that would only have started after the day it ends on (today, its own start when it has not started yet, or the end it already had). Such a mapping is never in effect inside the value object's life, so it is deleted rather than ended before its own start; none is left canceled. These ids no longer resolve. The reason sentence only counts them (it names no id); this field is the contract."},"customValueObjectId":{"type":"string","description":"Id (a UUID) of the custom value object that owns this shadow — the record to send to deleteCustomValueObject (DELETE value-accounting/custom-value-objects/:id). Present exactly when outcome is 'skipped'."}},"additionalProperties":false,"required":["outcome"]},"deleteBusinessDriverOutput":{"type":"object","properties":{"outcome":{"enum":["deleted","deactivated","blocked"],"description":"What happened to the driver: 'deleted' — it held no recorded value and is gone, so its id no longer resolves; 'deactivated' — it holds recorded values, so it was kept and now reads isActive false; 'blocked' — it is a system driver and was left exactly as it was."}},"additionalProperties":false,"required":["outcome"]},"updateValueObjectOutput":{"type":"object","properties":{"removedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when this request moved the value object's end date EARLIER and that DELETED mappings it did not name itself: the ids (UUIDs) of the value object's mappings that would only have started after the new end date. Such a mapping is never in effect inside the value object's life, so it is deleted rather than ended before its own start (a mapping never outlives its value object and is never left canceled); every other mapping still open after that day ends on it. The request is judged on what it leaves: a mapping this same request removes through deleteMappings is removed by it (before the end date is written) and is not listed here, and an updateMappings row is written before an earlier end date so the end judges its new dates. The ids no longer exist. Absent when nothing was deleted (the body is then empty, as before)."},"healedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only when the request HEALED mappings: the ids (UUIDs, mappings[].id of getValueObject) of updateMappings rows sent with a startDate but no endDate while the stored mapping was OPEN, or ended after the value object's endDate (a legacy row), which were therefore written with the value object's endDate as the request leaves it — a mapping never outlives its value object. An end the request did not send was written for them; read the value object back for the stored dates. A healed row the same request's earlier end then deleted is not listed (it is in removedMappingIds)."}},"additionalProperties":false},"updateValueObjectInput":{"type":"object","properties":{"name":{"type":"string","description":"New display name. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared. When sent it must not be empty or whitespace only (NAME_REQUIRED). Stored exactly as sent, untrimmed. Refused with SYSTEM_MANAGED on a system-maintained mirror, whose name follows its record — rename the record instead.","examples":["Sales and Marketing"]},"startDate":{"type":"string","format":"date","description":"New first valid day, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED. Refused with SYSTEM_MANAGED on a system-maintained mirror. Must not fall after the endDate the value object will have (END_BEFORE_START). Moved LATER, every mapping still running on the new day (open-ended, or ending on or after it) moves its startDate to it — a mapping never starts before its value object — and a mapping that ENDED before the new day refuses the move (START_AFTER_MAPPING_HISTORY); moved earlier, the mappings keep their own start dates (move them with updateMappings)."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"New last valid day, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED. Setting it ends the value object by hand together with its mappings: every mapping still open after that day ends on the same day (one that ended earlier keeps its own date; one that would only start after it is DELETED and listed in removedMappingIds) — the set deleteValueObject (DELETE value-accounting/value-objects/:id) closes on a value object in use — so reactivateValueObjects re-opens them with it; a later date on a value object that already ended moves the mappings ending on its previous day with it. Editable on a mirror too. null CLEARS an end of TODAY OR LATER — a schedule that never took effect: the mappings ending with it follow to no end. ⛔ On a value object whose end date is BEFORE today null is REFUSED with REACTIVATE_VIA_FLOW and nothing is written — re-open it with reactivateValueObjects (POST value-accounting/value-objects/reactivate), which re-opens the mappings with it. On the SHADOW of a custom value object every end written here — set, moved earlier or later, cleared — goes THROUGH THAT RECORD (as PATCH value-accounting/custom-value-objects/:id writes it): the custom value object, its shadow and their mapping take it together, the record's other rows following as on that action, and that move is screened as there (MAPPING_EXISTS, ONE_TO_ONE_EXISTS) — a shadow never ends on its own. A shadow end that has already PASSED is not moved later or cleared here (REACTIVATE_VIA_FLOW): re-open the trio with reactivateCustomValueObjects (POST value-accounting/custom-value-objects/reactivate)."},"objectNumber":{"type":"string","description":"New business number. OMIT TO LEAVE IT UNCHANGED; it cannot be cleared — an empty or whitespace-only number is refused with OBJECT_NUMBER_REQUIRED. Must be unused by any other value object (OBJECT_NUMBER_TAKEN); re-sending the number it already has is a valid no-op. NOT editable on a system-managed value object (a mirror, or a custom value object's shadow): the number is adopted from the source record and is how a shadow is recognised, so a new one is refused with SYSTEM_MANAGED."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the category to file the value object under, from the categories data-set (GET value-accounting/categories). OMIT TO LEAVE IT UNCHANGED; send null to clear it back to uncategorised. An id that names no category is rejected with CATEGORY_NOT_FOUND; null is a clear, never rejected. Refused with SYSTEM_MANAGED on a system-maintained mirror."},"createMappings":{"type":"array","items":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom'."},"id":{"type":"string","description":"Id (a UUID) of the master-data record. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record to map, as the pair ensureRelationship (POST value-accounting/associations) takes. An unknown dimension code is UNSUPPORTED_DIMENSION_CODE, a record that does not exist RECORD_NOT_FOUND."},"startDate":{"type":"string","format":"date","description":"First day the mapping is valid, inclusive. Format YYYY-MM-DD. Defaults to TODAY, or to the value object's own startDate when that is later; send the day the relationship really began when it began earlier."},"endDate":{"type":"string","format":"date","description":"Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Omit and the mapping ends with the value object: it inherits the value object's endDate as this request leaves it (an endDate sent in the same request included), and is open-ended only when the value object has none — a mapping never outlives its value object. A date later than that endDate is refused with MAPPING_OUTLIVES_END."}},"additionalProperties":false,"required":["record"]},"description":"Mappings to ADD, one per master-data record — full rows with no id. Entries naming the same record with the same dates are collapsed; the same record with different dates is refused with DUPLICATE_MAPPING_ROW. A record this value object maps with an OPEN mapping is refused with MAPPING_EXISTS, unless deleteMappings of the same request removes that mapping or updateMappings of it ends that mapping before today (judged on the end dates as the request leaves them); a mapping that already ended is history, so naming its record again adds a new mapping. Refused with SYSTEM_MANAGED on a mirror, which stands for exactly one record. Omit for no additions.","examples":[[{"record":{"dimensionCode":"team","id":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}}]]},"updateMappings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the mapping — mappings[].id of getValueObject (GET value-accounting/value-objects/:id). An id that matches no mapping is MAPPING_NOT_FOUND; one of another value object MAPPING_MISMATCH."},"startDate":{"type":"string","format":"date","description":"New first valid day of the mapping, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"New last valid day of the mapping, inclusive. Format YYYY-MM-DD. OMIT TO LEAVE IT UNCHANGED; a date ends the mapping. ⛔ null is REFUSED with REACTIVATE_VIA_FLOW — a mapping is re-opened with its value object by reactivateValueObjects (POST value-accounting/value-objects/reactivate). On a value object that has ended, a date today or later that would leave the mapping open after the value object's own end date is refused the same way; any other date later than the value object's endDate as the request leaves it is refused with MAPPING_OUTLIVES_END."}},"additionalProperties":false,"required":["id"]},"description":"Existing mappings to RE-DATE, each keyed by its mapping id. Only the dates can change: a mapping names its record once, so pointing at another record is deleteMappings plus createMappings. A row whose dates equal the stored ones is not written. Refused with SYSTEM_MANAGED on a mirror when a date would change. Omit for no changes."},"deleteMappings":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of mappings to REMOVE — mappings[].id of getValueObject (GET value-accounting/value-objects/:id). Each must belong to this value object (MAPPING_NOT_FOUND, MAPPING_MISMATCH). The value object must keep at least one mapping after the whole request (MAPPING_REQUIRED); when the open mappings left name one record they become a 1:1 mapping again (inCluster false). Refused with SYSTEM_MANAGED on a mirror. Omit for no removals."}},"additionalProperties":false},"getValueAllocationOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value allocation — the id that was passed in, in canonical lowercase."},"documentType":{"type":"string","description":"Kind of financial document the allocation was recorded for — one of the 37 kinds the valueAllocations data-set (GET value-accounting/value-allocations) lists, e.g. 'VendorBill', 'Invoice', 'JournalEntry', 'Payroll', 'TimeRecord'. A label written by the flow that created the allocation, not a reference: it names no document."},"allocationDate":{"type":"string","format":"date","description":"Day the allocation was recorded, normally the source document's date. Format YYYY-MM-DD. Not the day reporting buckets by — that is the journal entry line's posting date and posting period."},"draftAllocation":{"type":"boolean","description":"True while the source document is still a draft: no value-accounting report counts the allocation's journal lines. The document's business — no route writes it. A stored null reads as false."},"isOffset":{"type":"boolean","description":"True for the allocation of an offset-account line: it may carry tags, but no value-accounting report counts its journal lines, while the general ledger keeps the amount. A stored null reads as false. Change it with isOffset on updateValueAllocation (PATCH value-accounting/value-allocations/:id)."},"lineCount":{"type":"number","description":"How many lines the allocation carries — the length of lines, the same number the list publishes."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the allocation's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list publishes; an edit of the lines alone does not move it."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the line itself — what updateLines and deleteLines on updateValueAllocation (PATCH value-accounting/value-allocations/:id) are keyed by."},"allocationLineType":{"type":"string","description":"Whether reporting counts the line's amount as revenue, cost or neither: 'profit' → revenue (the journal line's signed amount negated, as amounts are stored debit-positive), 'cost' → cost, 'value' → excluded from every revenue, cost and margin figure, 'metric' → a NON-MONETARY quantity (the hours of a time record), excluded the same way."},"allocationType":{"type":"string","description":"Origin of the attribution: 'primary' (the source document's own main value object or value center) or 'secondary' (added by tagging). Documentation — no report filters on it."},"valueStatus":{"type":"string","description":"Workflow state of the attribution: 'assigned' (assigned, e.g. as overhead, not yet allocated onward), 'allocated' or 'split' (split off another line). Documentation — no report filters on it."},"allocationDate":{"type":"string","format":"date","description":"Day recorded on the line itself. Format YYYY-MM-DD. Documentation — reporting buckets by the journal entry line's posting date, never by this date."},"valueCenterId":{"type":"string","description":"Id (a UUID) of the value center the amount is attributed to, as getValueCenter (GET value-accounting/value-centers/:id) reads it. Absent — not null — on a line that attributes to a value object, or to a record with no value object yet."},"valueObjectId":{"type":"string","description":"Id (a UUID) of the value object the amount is attributed to, as getValueObject (GET value-accounting/value-objects/:id) reads it. Absent — not null — on a line that attributes to a value center, and on a line written for a master-data record that had no value object yet; record then says what it attributes to."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to: one of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' (a custom value object)."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record the line was tagged for, as the pair ensureRelationship (POST value-accounting/associations) and resolveReportingTags (POST base/reporting-tags/resolve) use — for a value-object line the one record that value object represents, for a value-center line the value center itself (dimensionCode 'valueCenter'). Every tagging flow writes it, and it is the only statement of attribution on a line whose record had no value object yet. Absent on a line tagged with a CLUSTER value object (it stands for several records, so no single one can be named), on a line written by hand, and when the record no longer resolves."},"allocationRule":{"type":"object","properties":{"path":{"type":"string","description":"Model URN naming the kind of record the rule is: 'urn:evst:everest:valueaccounting/base:model/node:ValueCenterAssociation' (a value-center rule) or 'urn:evst:everest:valueaccounting/base:model/node:ValueObjectAssociation' (a value-object rule). Published exactly as stored."},"id":{"type":"string","description":"Id (a UUID) of the rule record in the node path names. Absent when the stored rule no longer resolves to a record there — the package layer stores the pair without checking it."}},"additionalProperties":false,"required":["path"],"description":"The allocation rule that produced the line — one reference in two parts, set and cleared together. Automatic allocation rules are not implemented yet, so it is normally absent. Absent — not null — when unset."},"splitParentId":{"type":"string","description":"Id (a UUID) of the line this one was split from — it may belong to another allocation. Absent — not null — for an ordinary line."}},"additionalProperties":false,"required":["id","allocationLineType","allocationType","valueStatus","allocationDate"]},"description":"The allocation's lines, oldest first — each one attribution of the journal line's amount. Edit them with updateLines / deleteLines on updateValueAllocation (PATCH value-accounting/value-allocations/:id); lines are created only by tagging the document."}},"additionalProperties":false,"required":["id","documentType","allocationDate","draftAllocation","isOffset","lineCount","lastModifiedDate","lines"]},"searchValueObjectsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value object — the id getValueObject, updateValueObject and deleteValueObject (GET, PATCH and DELETE value-accounting/value-objects/:id) are keyed by."},"name":{"type":"string","description":"Display name of the value object — for a mirror of a master-data record, the record's name, kept in step by the system. Names are not unique."},"objectNumber":{"type":"string","description":"Business number of the value object, unique tenant-wide: the mapped record's own number or code for a 1:1 value object, a generated 'VO-n' otherwise."},"startDate":{"type":"string","format":"date","description":"First day the value object is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"Last day the value object is valid, inclusive. Format YYYY-MM-DD. Absent — not null — when it is open-ended."},"status":{"type":"string","description":"Lifecycle state, derived from the dates: 'active', 'planned' (startDate after today), 'inactive' (endDate before today, UTC — the end date is inclusive) or 'canceled' (endDate before startDate)."},"categoryId":{"type":"string","description":"Id (a UUID) of the category the value object is filed under. Absent — not null — when it is uncategorised."},"isSystemManaged":{"type":"boolean","description":"True when the system maintains this value object as the MIRROR of one master-data record (its mappings open today or later name exactly one record — ended history rows do not count — and it still carries one of the names the automation gives that record): its name, startDate, categoryId and mappings are then refused on PATCH with SYSTEM_MANAGED. A rendering hint derived on this read — the write decides for itself."},"mappingCount":{"type":"number","description":"How many mappings the value object carries — the length of mappings."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value object's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the keyed read publish."},"mappings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the mapping itself — what updateMappings and deleteMappings on updateValueObject (PATCH value-accounting/value-objects/:id) are keyed by. Not the record's id."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to: one of the ten codes filters.record accepts."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record this mapping names, as the pair ensureRelationship (POST value-accounting/associations) uses. Absent when the record no longer resolves, so the row can still be removed by its id."},"inCluster":{"type":"boolean","description":"Stored cluster flag: true when the value object's mappings open on the day of the last write to them named more than one distinct record; false for a 1:1 mapping. It describes that day only — nothing re-settles it when a mapping starts or ends later — so it is informational: which value object a record resolves to, and every other one-to-one decision, is judged from the mappings open on the day asked, never from this flag."},"startDate":{"type":"string","format":"date","description":"First day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent on rows written without one."},"endDate":{"type":"string","format":"date","description":"Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent when open-ended."}},"additionalProperties":false,"required":["id","inCluster"]},"description":"The master-data records the value object stands for, one entry per mapping, oldest first — the same entries getValueObject (GET value-accounting/value-objects/:id) returns."}},"additionalProperties":false,"required":["id","name","objectNumber","startDate","status","isSystemManaged","mappingCount","lastModifiedDate","mappings"]},"description":"The value objects on this page, one row per value object with its mappings, in the same shape getValueObject (GET value-accounting/value-objects/:id) returns. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by id ascending — a unique, immutable key, so a rename never moves a row across a page boundary. The cursor is a KEYSET cursor over that order, so a value object created after your cursor position appears on a later page, one created before it does not, and no row is ever repeated or skipped, whatever else is written while you walk."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more value objects remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchValueObjectsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"nameContains":{"type":"string","description":"Fragment the name must contain, matched case-insensitively anywhere in the name — the lookup for a type-ahead. A substring match, not a pattern language: the fragment is taken as literal text apart from the SQL wildcards % and _, which are not escaped and therefore still act as wildcards. A fragment matching nothing yields an empty page, not an error."},"objectNumber":{"type":"string","description":"Exact object number, matched on the stored text (case-sensitive) — at most one value object, since numbers are unique tenant-wide. A number matching nothing yields an empty page, not an error."},"status":{"enum":["active","inactive","planned","canceled"],"description":"Lifecycle state to keep: 'active', 'planned', 'inactive' or 'canceled' — the same derived status every read publishes. Omit for all four."},"categoryId":{"type":"string","description":"Id (a UUID) of a category, from the categories data-set (GET value-accounting/categories): only value objects filed under it match. An id that names no category matches nothing — an empty page, not an error. Matched case-insensitively."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object). An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"A master-data record: only value objects with a mapping to it match, ended history rows included — its 1:1 value object, every cluster it belongs to, and a value object its link moved away from (the mappings' dates and the other records they name tell them apart; the stored inCluster flag describes only the day of the last write). The same pair ensureRelationship (POST value-accounting/associations) takes. A record that does not exist is RECORD_NOT_FOUND and an unknown dimension code UNSUPPORTED_DIMENSION_CODE; a record that exists but has no value object yields an empty page — the normal answer before createValueObject (POST value-accounting/value-objects) has been called for it."}},"additionalProperties":false,"description":"How to narrow the search. A value object must match every member you send. Omit it — or send it with no members — to page through every value object.","examples":[{"record":{"dimensionCode":"department","id":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one this endpoint did not issue (a cursor from another list, or one altered by hand) raises INVALID_CURSOR rather than silently restarting at the first page, which would make a paging loop repeat forever. Keep filters identical across the pages of one walk; changing it mid-walk re-interprets the cursor against a different result set. It encodes the LAST ROW of the page you received, not a position, so the walk resumes AT THAT ROW rather than at a count: a row created or removed before your position cannot make a later page repeat a row you already saw or skip one you have not."},"size":{"type":"number","description":"Maximum number of value objects to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"getValueCenterOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value center — the id that was passed in, in canonical lowercase."},"name":{"type":"string","description":"Display name of the value center — for one the system maintains for a department or team, derived from that record and kept in step. Names are not unique."},"centerNumber":{"type":"string","description":"System-assigned business number, e.g. 'VC-461358' — unique and never caller-supplied."},"description":{"type":"string","description":"Longer free-text explanation of what the value center is for. Absent — not null — when unset."},"centerCode":{"type":"string","description":"Tenant-assigned code identifying the value center, unique among the value centers that have one. Absent — not null — when it has none."},"startDate":{"type":"string","format":"date","description":"First day the value center is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"type":"string","format":"date","description":"Last day the value center is valid, inclusive. Format YYYY-MM-DD. Absent — not null — when it is open-ended."},"status":{"type":"string","description":"Lifecycle state, derived from the dates: 'active', 'planned' (startDate after today), 'inactive' (endDate before today, UTC — the end date is inclusive) or 'canceled' (endDate before startDate). The same rule the list and the search apply."},"categoryId":{"type":"string","description":"Id (a UUID) of the category the value center is filed under, as listed by the categories data-set (GET value-accounting/categories). Absent — not null — when it is uncategorised."},"parentId":{"type":"string","description":"Id (a UUID) of the value center this one hangs under — its direct parent. Absent — not null — for a root. Move it with parentId on updateValueCenter (PATCH value-accounting/value-centers/:id)."},"isSystemManaged":{"type":"boolean","description":"True when the system maintains this value center as the mirror of a department or team (it was created by the Department/Team automation or by a value-center import, which are the only writers of that mark). Its name, centerCode, startDate, categoryId and mappings then follow the record and are refused on PATCH with SYSTEM_MANAGED; endDate, parentId (no Department/Team hook places it in the tree) and description stay editable, and the description can be replaced but not cleared. Derived from how the value center was created, never an input."},"mappingCount":{"type":"number","description":"How many mappings the value center carries — the length of mappings, the same number the list publishes. 0 is valid: a value center need not stand for any record."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value center's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list publishes; an edit of the mappings alone does not move it."},"mappings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the mapping itself — what updateMappings and deleteMappings on updateValueCenter (PATCH value-accounting/value-centers/:id) are keyed by. Not the record's id."},"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to: one of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' (a custom value object). The system itself maps departments and teams."},"id":{"type":"string","description":"Id (a UUID) of the master-data record, in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record this mapping names, as the pair ensureRelationship (POST value-accounting/associations) and resolveReportingTags (POST base/reporting-tags/resolve) use. Absent when the record no longer resolves — it was deleted, or the mapping names a record outside the ten tag dimensions — so the row can still be removed by its id."},"inCluster":{"type":"boolean","description":"Stored cluster flag: true when the value center's mappings open on the day of the last write to them named more than one distinct record; false for a 1:1 mapping. It describes that day only — nothing re-settles it when a mapping starts or ends later — so it is informational: which value center a record resolves to, and every other one-to-one decision, is judged from the mappings open on the day asked, never from this flag."},"startDate":{"type":"string","format":"date","description":"First day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent on rows written without one."},"endDate":{"type":"string","format":"date","description":"Last day the mapping is valid, inclusive. Format YYYY-MM-DD. Absent when open-ended. A delete that deactivates the value center end-dates every mapping with it."}},"additionalProperties":false,"required":["id","inCluster"]},"description":"The master-data records the value center stands for, one entry per mapping, oldest first. Empty for a value center that stands for no record, one entry for a 1:1 value center, several for a cluster. Edit them with createMappings / updateMappings / deleteMappings on updateValueCenter (PATCH value-accounting/value-centers/:id)."},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the child value center — the id GET value-accounting/value-centers/:id is keyed by."},"name":{"type":"string","description":"Display name of the child value center."}},"additionalProperties":false,"required":["id","name"]},"description":"The value centers hanging DIRECTLY under this one, ordered by name — one level of the tree, whatever their status. Empty for a leaf. For every level below, use getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy?direction=descendants)."}},"additionalProperties":false,"required":["id","name","startDate","status","isSystemManaged","mappingCount","lastModifiedDate","mappings","children"]},"reactivateValueObjectsOutput":{"type":"object","properties":{},"additionalProperties":false},"reactivateValueObjectsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the value objects to re-open, as returned by the valueObjects data-set (GET value-accounting/value-objects) (filter[status][eq]=inactive lists the ones whose end date has passed; one the delete deactivated today still reads 'active' until tomorrow, so keep the id the delete was sent). Every id must exist and be retired, or the whole batch is rejected. Duplicates are collapsed. An empty array is a valid no-op. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]}},"additionalProperties":false,"required":["ids"]},"getRelationshipsForMasterDataOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"relatedRecord":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the far-side record belongs to. One of the ten dimension codes."},"id":{"type":"string","description":"Id (a UUID) of the far-side master-data record."},"name":{"type":"string","description":"Display name of the far-side record, as it appears in tagging UIs and on reports. Resolved for convenience so a table need not make a second call; it is not part of the record's identity."}},"additionalProperties":false,"required":["dimensionCode","id","name"],"description":"The record on the FAR side of the relationship, in the same (dimensionCode, id) shape the write endpoints take — pass it straight back to removeRelationship (POST value-accounting/associations/remove) to undo the relationship."},"isImplicit":{"type":"boolean","description":"False when THIS record asserted the relationship — its own edge is explicit. True when the edge exists because the far side tagged this record. When both records tagged each other, both sides read false. It never changes what is reported; it records who claimed the relationship."},"startDate":{"type":"string","format":"date","description":"Date the relationship starts, as YYYY-MM-DD. Absent only for a row written before dates were required."},"endDate":{"type":"string","format":"date","description":"Date the relationship ends, as YYYY-MM-DD. Absent — not null — for an open-ended relationship."},"status":{"type":"string","description":"Consistency status of the association anchor holding this edge, 'consistent' or 'inconsistent'. Documentation only: no reporting figure depends on it, and an inconsistent anchor still tags normally."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant this relationship last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). It is the edge's own last change, not the far-side record's. Sync incrementally by keeping the highest value you have seen and re-reading the subject's relationships when it moves."}},"additionalProperties":false,"required":["relatedRecord","isImplicit","lastModifiedDate"]},"description":"The relationships on this page, one row per relationship. Empty when the record has none — an empty page with HTTP 200, never a 404. Ordered by the far side's dimension then id — a unique composite key per row. The cursor is a KEYSET cursor over that order (it resumes at the last row of the page you received): a relationship added after your cursor position appears on a later page, one added before it does not, and no row is ever repeated or skipped while you walk."},"unresolvedCount":{"type":"number","description":"How many relationships on this page could not be published because their far side no longer resolves to a master-data record — a custom dimension removed, or the far-side record no longer existing. Zero normally. Those rows are absent from items rather than returned half-built, so this is the only way to tell an incomplete page from a complete one."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more relationships remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","unresolvedCount","pagination"]},"getRelationshipsForMasterDataInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"record":{"type":"object","properties":{"dimensionCode":{"type":"string","description":"Dimension the record belongs to. One of 'department', 'businessUnit', 'team', 'location', 'region', 'employee', 'vendor', 'customer', 'valueCenter', 'custom' ('custom' being a custom value object). An unknown code raises UNSUPPORTED_DIMENSION_CODE."},"id":{"type":"string","description":"Id (a UUID) of the master-data record — the same value resolveReportingTags (POST base/reporting-tags/resolve) returns as modelUuid. An id that resolves to no record of that dimension raises RECORD_NOT_FOUND, which is deliberately different from the record existing with no relationships (an empty page). Ids are matched case-insensitively and returned in canonical lowercase."}},"additionalProperties":false,"required":["dimensionCode","id"],"description":"The master-data record whose relationships you want, as the (dimensionCode, id) pair. Both halves are required: a UUID is unique within its dimension, not across dimensions."}},"additionalProperties":false,"required":["record"],"description":"Which relationships to read. Required, unlike the other searches' filters: there is no unfiltered collection of associations, because reading every association in the tenant is not a question anyone asks.","examples":[{"record":{"dimensionCode":"department","id":"9a5e1c77-3b2d-4f10-8c6e-1d40a7b93c58"}}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint and to the subject record it was issued for, so one from another endpoint, from another record's walk, or altered by hand raises INVALID_CURSOR rather than silently restarting at the first page, which would make a paging loop repeat forever. It encodes the LAST ROW of the page you received, not a position, so the walk resumes AT THAT ROW rather than at a count: a row created or removed before your position cannot make a later page repeat a row you already saw or skip one you have not."},"size":{"type":"number","description":"Maximum number of relationships to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false,"required":["filters"]},"getFixedFeeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the fixed fee.","examples":["7c2e1b90-4a53-4f16-8de2-9b1035c7ef42"]},"amount":{"type":"string","format":"decimal","description":"The fixed fee amount, in the currency given by currency.","examples":["5000.00"]},"currency":{"type":"string","description":"The currency of amount. Format ISO 4217, for example 'USD'.","examples":["USD"]},"frequency":{"type":"string","description":"The billing frequency of the fixed fee. Possible values: 'Monthly', 'BiMonthly', 'Quarterly', 'SemiAnnually', 'Annually', 'Once'.","examples":["Monthly"]},"startDate":{"type":"string","format":"date","description":"The first day of the fixed fee's billing period, inclusive. Format YYYY-MM-DD.","examples":["2026-01-01"]},"endDate":{"type":"string","format":"date","description":"The last day of the fixed fee's billing period, inclusive. Format YYYY-MM-DD.","examples":["2026-12-01"]},"psaProjectId":{"type":"number","description":"The id of the PSA project this fixed fee belongs to. It is a numeric key, not the UUID that GET psa/projects/:id takes.","examples":[32341]},"salesOrderProductLineId":{"type":"number","description":"The id of the sales order product line this fixed fee fulfills. It is a numeric key. There is no endpoint for it."},"productId":{"type":"number","description":"The id of the product this fixed fee is associated with. It is a numeric key, not the UUID that GET accounting/products/:id takes."},"productLineId":{"type":"number","description":"The id of the product line this fixed fee is associated with. It is a numeric key, not the UUID that GET accounting/product-lines/:id takes."},"lastModifiedDate":{"type":"string","format":"date-time","description":"The date and time the fixed fee record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.","examples":["2026-08-14T11:20:31.004Z"]}},"additionalProperties":false,"required":["id","psaProjectId","lastModifiedDate"]},"deleteValueCenterOutput":{"type":"object","properties":{"outcome":{"enum":["deleted","deactivated","skipped"],"description":"What happened: 'deleted' — it was not in use and had no live child, so it is gone with its mappings and its id no longer resolves; any ended children moved up to its parent. 'deactivated' — it is in use, so it and every mapping still open were end-dated to today, or to its own startDate when that is later (a mapping that had already ended keeps its date, so reactivating re-opens exactly these; one that would only start after that day was deleted — deletedMappingIds) and its id still resolves (the end date is inclusive, so it reads status 'active' for the rest of that day and 'inactive' from the next); one that already ended keeps its own end date and is reported 'deactivated' again, and its mappings still open end on that same day, so reactivating re-opens them with it. 'skipped' — it has a direct child reading 'active' or 'planned', so nothing was written."},"reason":{"type":"string","description":"Why the value center was kept, as a sentence. For 'skipped', how many active or planned children blocked it. For 'deactivated' the first that applies: allocation lines are tagged to it ('used in financial transactions'), business drivers reference it, it is part of master-data relationships (clear them with removeRelationship (POST value-accounting/associations/remove), then delete again; the sentence names the application-API action for the same removal), or other value centers' mappings name it as their record (remove those mappings with updateValueCenter (PATCH value-accounting/value-centers/:id) deleteMappings on their value centers, then delete again). Absent for 'deleted'."},"deletedMappingIds":{"type":"array","items":{"type":"string"},"description":"Present only on 'deactivated' when the deactivation DELETED mappings: ids (UUIDs) of the mappings — the value center's own and other value centers' mappings naming it as their record — that would only have started after the day it ends on (today, its own start when it has not started yet, or the end it already had). Such a mapping is never in effect inside the value center's life, so it is deleted rather than ended before its own start; none is left canceled. These ids no longer resolve. The reason sentence only counts them (it names no id); this field is the contract."}},"additionalProperties":false,"required":["outcome"]},"valueCentersRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the value center — the public identifier getValueCenter, updateValueCenter and deleteValueCenter (GET/PATCH/deleteValueCenter) are keyed by. Filter target: filter[id][in]=<id1>,<id2>."},"name":{"type":"string","description":"Display name of the value center, e.g. 'Development Value Center' — for one the system maintains for a department or team, derived from that record and kept in step. Names are NOT unique. Returned only: search by name fragment with searchValueCenters (POST value-accounting/value-centers/search)."},"centerNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System-assigned business number, e.g. 'VC-461358' — unique, never caller-supplied, and the stable handle to quote to a person. Returned only."},"centerCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tenant-assigned code identifying the value center, e.g. 'DEV-01'. Unique among the value centers that have one; absent when it has none. Returned only: look one up with filters.centerCode on searchValueCenters (POST value-accounting/value-centers/search)."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Longer free-text explanation of what the value center is for. Absent when unset. Returned only."},"startDate":{"type":"string","format":"date","description":"First day the value center is valid, inclusive. Format YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day the value center is valid, inclusive. Format YYYY-MM-DD. Absent when it is open-ended, the normal state. A delete that finds it in use sets it (the value center and its mappings are deactivated rather than deleted); reactivateValueCenters (POST value-accounting/value-centers/reactivate) clears it again."},"status":{"type":"string","description":"Lifecycle state, derived from the dates on every read and never stored: 'active' (started, and no endDate or one on or after today, UTC — the end date is inclusive), 'planned' (startDate after today), 'inactive' (endDate before today) or 'canceled' (endDate before startDate). Filter target: filter[status][eq]=active."},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the category the value center is filed under, as listed by the categories data-set (GET value-accounting/categories). Absent when it is uncategorised. Filter target: filter[categoryId][eq]=<id>."},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the value center this one hangs under in the tree — its direct parent. Absent for a root: every value center is part of the tree, a root being one with no parent. Filter target: filter[parentId][eq]=<id> lists the direct children of that value center; the whole subtree is getValueCenterHierarchy (GET value-accounting/value-centers/:id/hierarchy?direction=descendants)."},"isSystemManaged":{"type":"boolean","description":"True when the system maintains this value center as the mirror of a department or team (it was created by the Department/Team automation or by a value-center import, which are the only writers of that mark): its name, centerCode, startDate, categoryId and mappings then follow the record and are refused on PATCH with SYSTEM_MANAGED; endDate, parentId (no Department/Team hook places it in the tree) and description stay editable. Derived from how the value center was created, never an input. Returned only."},"mappingCount":{"type":"number","description":"How many master-data mappings the value center carries: 0 for one that stands for no record — valid for a value center — 1 for one standing for one department or team, more for a cluster. The mappings themselves, with each record's {dimensionCode, id}, are on getValueCenter (GET value-accounting/value-centers/:id) and searchValueCenters (POST value-accounting/value-centers/search). Returned only."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the value center's own fields last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter and sort on this to sync incrementally: filter[lastModifiedDate][gte]=2026-09-01T00:00:00.000Z with sort=lastModifiedDate. An update that changes nothing does not move it, and neither does an edit of the mappings alone."}},"additionalProperties":false},"createProjectTypeOutput":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the created project type.","examples":["3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45"]}},"additionalProperties":false,"required":["id"]},"createProjectTypeInput":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the project type. It must be unique across the tenant. A name another project type already uses fails with DUPLICATE_NAME.","examples":["Retainer"]}},"additionalProperties":false,"required":["name"]},"createDriverUnitOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) the platform assigned to the new unit, in canonical lowercase. This is the whole of the response: it is the one thing the caller did not already send, and it is what getDriverUnit, updateDriverUnit and deleteDriverUnit (GET, PATCH and DELETE value-accounting/driver-units/:id) are keyed by."}},"additionalProperties":false,"required":["id"]},"createDriverUnitInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the new unit, e.g. 'Machine hours'. Required, must not be empty or whitespace only (NAME_REQUIRED), and must not already be in use — matching is trimmed and case-insensitive (NAME_TAKEN). Stored trimmed. Check whether a name is free with searchDriverUnits (POST value-accounting/driver-units/search).","examples":["Machine hours"]},"description":{"type":"string","description":"Longer free-text explanation of what the unit measures, e.g. how it is counted. Omit to leave it unset; it can later be changed — or cleared with an explicit null — through updateDriverUnit (PATCH value-accounting/driver-units/:id).","examples":["Hours a production machine ran, from the shop-floor log."]}},"additionalProperties":false,"required":["name"]},"categoriesRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the category — the public identifier other value accounting contracts reference a category by. Filter target: filter[id][in]=<id1>,<id2>."},"name":{"type":"string","description":"Display name of the category, e.g. 'Research & Development'. Unique across all categories — it is this resource's semantic key — so a name identifies exactly one category and is safe to resolve to an id with. Filter target: filter[name][eq]=Research%20%26%20Development, and sort=name for an alphabetical catalog."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Longer free-text explanation of what the category is for. Absent when it was never set. Returned only: in neither filterableFields nor orderableFields, because it is free-form prose."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the category last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter and sort on this to sync incrementally: filter[lastModifiedDate][gte]=2026-08-01T00:00:00.000Z with sort=lastModifiedDate."}},"additionalProperties":false},"updateBusinessDriverOutput":{"type":"object","properties":{},"additionalProperties":false},"updateBusinessDriverInput":{"type":"object","properties":{"name":{"type":"string","description":"New display name. OMIT TO LEAVE THE NAME UNCHANGED — it cannot be cleared. When sent it must not be empty or whitespace only (NAME_REQUIRED) and must not be held by another driver, active or deactivated, compared trimmed and case-insensitively (NAME_TAKEN, NAME_TAKEN_DEACTIVATED); re-sending the name the driver already holds is a no-op. Refused with SYSTEM_DRIVER when it differs on a system driver. Stored trimmed."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New free-text explanation of what the driver measures. OMIT TO LEAVE IT UNCHANGED; send an explicit null to clear it back to unset.","examples":["Hours a production machine ran, from the shop-floor log."]},"calculationType":{"type":"string","description":"New calculation type, exactly 'asOf' or 'cumulative' (else INVALID_CALCULATION_TYPE). OMIT TO LEAVE IT UNCHANGED. A different value is refused with SYSTEM_DRIVER on a system driver and with CALC_TYPE_LOCKED while the driver holds any recorded value; the stored value is always accepted."},"unitId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Id (a UUID) of the new driver unit, from the driverUnits data-set (GET value-accounting/driver-units); an id naming no unit is UNIT_NOT_FOUND. OMIT TO LEAVE IT UNCHANGED. NOT CLEARABLE: an explicit null is refused with UNIT_NOT_CLEARABLE, because the recorded values are read in this unit. Re-pointing relabels how the existing values are read WITHOUT converting any number, so only switch between units that mean the same quantity. A SYSTEM driver's unit cannot be re-pointed (SYSTEM_DRIVER, lockedField 'unitId'); re-sending its stored unit passes."},"dimensions":{"type":"array","items":{"type":"object","properties":{"dimensionUrn":{"type":"string","description":"Model URN of the dimension — see createBusinessDriver (POST value-accounting/business-drivers) for the accepted list. Every custom dimension shares the CustomValueObject URN and needs its customValueDimensionId."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension, from the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). Required on a CustomValueObject entry and refused on a system one. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionUrn"]},"description":"The COMPLETE replacement dimension set — a replacement, not a merge, so include every dimension you want to keep; an empty array is refused for a driver recorded per entity (every driver this route manages), which must keep at least one dimension. OMIT TO LEAVE IT UNCHANGED. Each entry is checked as on create (INVALID_DIMENSION, CUSTOM_VALUE_DIMENSION_NOT_FOUND). Refused with DIMENSIONS_LOCKED if it differs from the stored set at all while the driver holds any recorded value. ADDING Value Center needs the tenant setting (VALUE_CENTER_DISABLED); a driver that already declares it may keep it. On a SYSTEM driver the set must be one its metric feed supplies, and must not be empty (DIMENSION_NOT_FED). Send the entries GET returns to keep the set as it is.","examples":[[{"dimensionUrn":"urn:evst:everest:hr/base:model/node:Department"},{"dimensionUrn":"urn:evst:everest:valueaccounting/base:model/node:CustomValueObject","customValueDimensionId":"0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"}]]}},"additionalProperties":false},"bulkDeleteBusinessDriversOutput":{"type":"object","properties":{"deletedIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the drivers that were hard-deleted — they held no recorded value — in the order they were first sent. These ids no longer resolve."},"deactivatedIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the drivers that hold recorded values and were therefore kept and DEACTIVATED instead of deleted, in the order they were first sent. They still exist with every value and their names; never treat one as removed."},"blockedIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the SYSTEM drivers the call left completely untouched — neither deleted nor deactivated — in the order they were first sent. A system driver cannot be removed; switch its feed off with setBusinessDriversActive (POST value-accounting/business-drivers/set-active) instead."}},"additionalProperties":false,"required":["deletedIds","deactivatedIds","blockedIds"]},"bulkDeleteBusinessDriversInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the drivers to delete, as returned by the businessDrivers data-set (GET value-accounting/business-drivers). Every id must exist, or the whole batch is rejected with NOT_FOUND. Duplicates are collapsed. An empty array is a valid no-op that deletes nothing and returns three empty lists. Ids are matched case-insensitively and returned in canonical lowercase.","examples":[["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]}},"additionalProperties":false,"required":["ids"]},"reactivateDriverCombinationOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the value row that resumes the combination."}},"additionalProperties":false,"required":["id"]},"reactivateDriverCombinationInput":{"type":"object","properties":{"combinationId":{"type":"string","description":"Id (a UUID) of the ENDED combination to re-enable — the combinationId of a row of searchDriverValues (POST value-accounting/driver-values/search). Matched case-insensitively.","examples":["5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d"]},"accountingPeriodId":{"type":"string","description":"Id (a UUID) of the accounting period the combination resumes in. Open, not in the future, and at or after the period it was ended from. Matched case-insensitively.","examples":["d8b3b2a3-89b1-4040-99f5-8f550f28f23c"]},"value":{"type":"string","format":"decimal","description":"The value the combination resumes with, in the driver's unit, as a decimal number. For an As-of driver it carries forward from there. Stored with at most 12 decimal places: further digits are rounded on the write.","examples":["43"]},"onlyThisPeriod":{"type":"boolean","description":"True re-opens the combination for this period only: the value is written and the combination is ended again from the next period. Omit or false to resume indefinitely. On the calendar's last period the combination simply stays open."}},"additionalProperties":false,"required":["combinationId","accountingPeriodId","value"]},"getDriverUnitOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the unit, in canonical lowercase — the id that was passed in, echoed so a response stands on its own."},"name":{"type":"string","description":"Display name of the unit, e.g. 'Machine hours'. Unique tenant-wide, compared trimmed and case-insensitively; stored trimmed."},"description":{"type":"string","description":"Longer free-text explanation of what the unit measures. Absent — not null — when it was never set or has been cleared."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the unit last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and search targets publish."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"searchDriverUnitsOutput":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the unit — the id getDriverUnit, updateDriverUnit and deleteDriverUnit (GET, PATCH and DELETE value-accounting/driver-units/:id) are keyed by."},"name":{"type":"string","description":"Display name of the unit, e.g. 'Machine hours'. Unique tenant-wide, compared trimmed and case-insensitively."},"description":{"type":"string","description":"Longer free-text explanation of what the unit measures. Absent — not null — when it was never set or has been cleared."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the unit last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and the keyed read publish."}},"additionalProperties":false,"required":["id","name","lastModifiedDate"]},"description":"The units on this page, in the same shape getDriverUnit (GET value-accounting/driver-units/:id) returns. Empty when nothing matched — an empty page with HTTP 200, never a 404. Ordered by id ascending — a unique, immutable key, so a rename never moves a row across a page boundary; a unit created after your cursor position appears on a later page, one created before it does not, and no row is repeated or skipped."},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"Opaque cursor to pass as `page.cursor` for the next page; absent on the last page."},"hasMore":{"type":"boolean","description":"True when more units remain beyond this page."}},"additionalProperties":false,"required":["hasMore"],"description":"Pagination cursor for this page."}},"additionalProperties":false,"required":["items","pagination"]},"searchDriverUnitsInput":{"type":"object","properties":{"filters":{"type":"object","properties":{"nameContains":{"type":"string","description":"Fragment the unit name must contain, matched case-insensitively anywhere in the name. A substring match, not a pattern language: the fragment is taken as literal text, % and _ included (they are escaped, so 50% finds '50%' and not '500'). A fragment matching nothing yields an empty page, not an error."}},"additionalProperties":false,"description":"How to narrow the search. Omit it — or send it with no members — to page through every unit, which is what the driverUnits data-set (GET value-accounting/driver-units) returns.","examples":[{"nameContains":"hours"}]},"page":{"type":"object","properties":{"cursor":{"type":"string","description":"Opaque forward cursor from a previous response's pagination.nextCursor; omit for the first page. Do not construct or decode it — a token is bound to this endpoint, so one it did not issue (a cursor from another endpoint, or one altered by hand) raises INVALID_CURSOR rather than silently restarting at the first page. Keep filters identical across the pages of one walk. It encodes the LAST ROW of the page you received, not a position, so a row created or removed before your position cannot make a later page repeat or skip a row."},"size":{"type":"number","description":"Maximum number of units to return. Defaults to 50, capped at 200; a larger value is clamped rather than rejected, so the server may return fewer but never more."}},"additionalProperties":false,"description":"Cursor and page size. Omit for the first page at the default size.","examples":[{"size":50}]}},"additionalProperties":false},"deleteDriverUnitOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteDriverUnitsOutput":{"type":"object","properties":{},"additionalProperties":false},"bulkDeleteDriverUnitsInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the units to delete, as returned by the driverUnits data-set (GET value-accounting/driver-units). Every id must exist (else NOT_FOUND) and none may still be used by a business driver (else IN_USE) — either rejection deletes nothing. Duplicates are collapsed. An empty array is a valid no-op that deletes nothing and returns success. Ids are matched case-insensitively.","examples":[["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]}},"additionalProperties":false,"required":["ids"]},"driverUnitsRow":{"type":"object","properties":{"id":{"type":"string","description":"Stable, platform-assigned id (a UUID) of the unit — the public identifier getDriverUnit, updateDriverUnit and deleteDriverUnit (GET/PATCH/deleteDriverUnit) are keyed by. Filter target: filter[id][in]=<id1>,<id2>."},"name":{"type":"string","description":"Display name of the unit, e.g. 'Machine hours'. Unique tenant-wide — compared trimmed and case-insensitively — and stored trimmed, so a name identifies exactly one unit. Filter target: filter[name][eq]=Machine%20hours (exact stored text, case-sensitive), and sort=name for an alphabetical list."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Longer free-text explanation of what the unit measures, e.g. how it is counted. Absent when it was never set or has been cleared. Returned only: in neither filterableFields nor orderableFields, because it is free-form prose."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the unit last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). Filter and sort on this to sync incrementally: filter[lastModifiedDate][gte]=2026-09-01T00:00:00.000Z with sort=lastModifiedDate. An update that changes nothing does not move it."}},"additionalProperties":false},"materializeDriverValuesOutput":{"type":"object","properties":{"createdCount":{"type":"number","description":"How many carried rows THIS call created; a row a concurrent writer stored first is not counted. 0 means everything already existed (or a concurrent writer filled it), the driver is cumulative, or the periods lie outside every combination's live stretch — none of which is an error. After overlapping calls, repeat the call to be sure the span is complete: it creates 0 when nothing is missing."}},"additionalProperties":false,"required":["createdCount"]},"materializeDriverValuesInput":{"type":"object","properties":{"driverId":{"type":"string","description":"Id (a UUID) of the business driver whose carried rows to fill in. Matched case-insensitively.","examples":["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]},"entityId":{"type":"string","description":"Id (a UUID) of the legal entity of the recording context. Matched case-insensitively.","examples":["6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]},"bookId":{"type":"string","description":"Id (a UUID) of the accounting book of the recording context. Matched case-insensitively.","examples":["c3a91e07-52d4-4f6b-8e1a-9b0d2c7f4a63"]},"accountingPeriodIds":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the accounting periods to fill — the latest of them bounds the span, and the gap periods before it are filled too. Locked periods are filled as well: the rows are derived data. An empty array creates nothing. Matched case-insensitively.","examples":[["7d446073-dfc2-4258-947c-a34aa0ea4c2b"]]}},"additionalProperties":false,"required":["driverId","entityId","bookId","accountingPeriodIds"]},"createBusinessDriverOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) the platform assigned to the new driver, in canonical lowercase. This is the whole of the response: it is the one thing the caller did not already send, and it is what getBusinessDriver, updateBusinessDriver and deleteBusinessDriver (GET, PATCH and DELETE value-accounting/business-drivers/:id) are keyed by."}},"additionalProperties":false,"required":["id"]},"createBusinessDriverInput":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the new driver, e.g. 'Headcount'. Required, must not be empty or whitespace only (NAME_REQUIRED), and must not be held by any driver, active or deactivated — matching is trimmed and case-insensitive (NAME_TAKEN, NAME_TAKEN_DEACTIVATED). Stored trimmed. Check whether a name is free with searchBusinessDrivers (POST value-accounting/business-drivers/search).","examples":["Machine hours"]},"description":{"type":"string","description":"Longer free-text explanation of what the driver measures and how it is counted. Omit to leave it unset; it can later be changed — or cleared with an explicit null — through updateBusinessDriver (PATCH value-accounting/business-drivers/:id).","examples":["Hours a production machine ran, from the shop-floor log."]},"calculationType":{"type":"string","description":"Exactly 'asOf' or 'cumulative'; anything else is rejected with INVALID_CALCULATION_TYPE. 'asOf' is a STOCK: a recorded value carries forward into every later period until changed, and an allocation takes the snapshot of its last period. 'cumulative' is a FLOW: each period stands alone, and an allocation sums the periods. FROZEN once the driver holds any recorded value.","examples":["cumulative"]},"isActive":{"type":"boolean","description":"Whether the driver starts active. True for a driver meant to be used now; false creates it already deactivated. Activate or deactivate it later with setBusinessDriversActive (POST value-accounting/business-drivers/set-active).","examples":[true]},"unitId":{"type":"string","description":"Id (a UUID) of the driver unit the driver's values are expressed in, from the driverUnits data-set (GET value-accounting/driver-units). An id naming no unit is rejected with UNIT_NOT_FOUND. Omit only to leave the values as bare numbers; once set, a unit can be replaced but never cleared.","examples":["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10"]},"dimensions":{"type":"array","items":{"type":"object","properties":{"dimensionUrn":{"type":"string","description":"Model URN of the dimension. System dimensions: 'urn:evst:everest:hr/base:model/node:Department', ':Team', ':Location', ':Region', ':Employee', 'urn:evst:everest:base:model/node:BusinessUnit', 'urn:evst:everest:fin/expense:model/node:Vendor', 'urn:evst:everest:fin/accounting:model/node:Customer', 'urn:evst:everest:valueaccounting/base:model/node:ValueCenter' (tenant-gated — VALUE_CENTER_DISABLED). For a custom dimension send 'urn:evst:everest:valueaccounting/base:model/node:CustomValueObject' AND its customValueDimensionId. Any other URN is INVALID_DIMENSION with reason UNKNOWN_DIMENSION_URN."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension, from the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). Required on a CustomValueObject entry (reason MISSING_DIMENSION_ID without it) and refused on a system one (reason UNEXPECTED_DIMENSION_ID); an id naming no custom value dimension is CUSTOM_VALUE_DIMENSION_NOT_FOUND. Matched case-insensitively."}},"additionalProperties":false,"required":["dimensionUrn"]},"description":"The dimensions every recorded value of this driver must populate — with two declared, values only ever exist for a full (member, member) pair. Each dimension may appear once. FROZEN (neither added to nor reduced) once the driver holds any recorded value, so declare everything you will need. At least one is required: every driver this route creates is recorded per entity, and only a driver recorded across entities may declare none (its Entity member is implicit) — an empty array is refused.","examples":[[{"dimensionUrn":"urn:evst:everest:hr/base:model/node:Department"}]]}},"additionalProperties":false,"required":["name","calculationType","isActive","dimensions"]},"setBusinessDriversActiveOutput":{"type":"object","properties":{},"additionalProperties":false},"setBusinessDriversActiveInput":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Ids (UUIDs) of the drivers to switch, as returned by the businessDrivers data-set (GET value-accounting/business-drivers) (filter[isActive][eq]=false lists the deactivated ones). Every id must exist, or the whole batch is rejected with NOT_FOUND. Duplicates are collapsed. An empty array is a valid no-op. Ids are matched case-insensitively.","examples":[["0f1e4b9a-6a71-4a2c-8a0d-2f9c5d3b7e10","6d2c8f31-b4a7-4e19-9f2b-77c0a1d4e5b2"]]},"isActive":{"type":"boolean","description":"True to activate every listed driver, false to deactivate every one. The same flag applies to the whole batch.","examples":[false]}},"additionalProperties":false,"required":["ids","isActive"]},"updateDriverUnitOutput":{"type":"object","properties":{},"additionalProperties":false},"updateDriverUnitInput":{"type":"object","properties":{"name":{"type":"string","description":"New display name. OMIT TO LEAVE THE NAME UNCHANGED — it cannot be cleared. When sent it must not be empty or whitespace only (NAME_REQUIRED) and must not belong to another unit, compared trimmed and case-insensitively (NAME_TAKEN); re-sending the name the unit already holds is a no-op. Stored trimmed.","examples":["Machine hours (run time)"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New free-text explanation of what the unit measures. OMIT TO LEAVE IT UNCHANGED; send an explicit null to clear it back to unset."}},"additionalProperties":false},"getBusinessDriverOutput":{"type":"object","properties":{"id":{"type":"string","description":"Id (a UUID) of the driver, in canonical lowercase — the id that was passed in, echoed so a response stands on its own."},"name":{"type":"string","description":"Display name of the driver, e.g. 'Headcount'. Unique tenant-wide, compared trimmed and case-insensitively, deactivated drivers included; stored trimmed."},"description":{"type":"string","description":"Longer free-text explanation of what the driver measures. Absent — not null — when it was never set or has been cleared."},"calculationType":{"type":"string","description":"Exactly 'asOf' (a stock: a recorded value carries forward into later periods until changed) or 'cumulative' (a flow: each period stands alone). Frozen once the driver holds a recorded value."},"isActive":{"type":"boolean","description":"False for a deactivated driver: it keeps its recorded values and its name, but is not offered for new use."},"isSystem":{"type":"boolean","description":"True for a SYSTEM driver — shipped with the product and fed by an external system metric (for example Time Tracking) instead of by people. Read-only. It implies that the name, the calculation type and the unit never change (PATCH answers SYSTEM_DRIVER), that a delete leaves the driver untouched (outcome 'blocked'), and that its values are written only by its feed; its dimensions may only be ones that feed supplies (DIMENSION_NOT_FED), and the description and active state stay editable. False for every driver a person created."},"unitId":{"type":"string","description":"Id (a UUID) of the driver unit the driver's values are expressed in, as returned by the driverUnits data-set (GET value-accounting/driver-units). Absent when the driver has no unit."},"dimensions":{"type":"array","items":{"type":"object","properties":{"dimensionUrn":{"type":"string","description":"Model URN of the dimension. System dimensions each have their own: 'urn:evst:everest:hr/base:model/node:Department', ':Team', ':Location', ':Region', ':Employee', 'urn:evst:everest:base:model/node:BusinessUnit', 'urn:evst:everest:fin/expense:model/node:Vendor', 'urn:evst:everest:fin/accounting:model/node:Customer', 'urn:evst:everest:valueaccounting/base:model/node:ValueCenter'. EVERY custom dimension of the tenant shares 'urn:evst:everest:valueaccounting/base:model/node:CustomValueObject' and is told apart by customValueDimensionId — never treat that URN alone as one dimension."},"customValueDimensionId":{"type":"string","description":"Id (a UUID) of the custom value dimension this entry is, as returned by the customValueDimensions data-set (GET value-accounting/custom-value-dimensions). Present on every CustomValueObject entry and on no system one — except a custom entry whose custom value dimension has since been deleted, which is read without it and must be dropped from the set before it is sent back."}},"additionalProperties":false,"required":["dimensionUrn"]},"description":"The dimensions every value of this driver is broken down by, in the stored order. EVERY recorded combination populates ALL of them: a driver declaring Department and Team only holds values for a (department, team) pair. Empty only for a driver recorded across entities, whose Entity member is implicit; a driver recorded per entity always declares at least one. The set is frozen once the driver holds a recorded value."},"lastModifiedDate":{"type":"string","format":"date-time","description":"Instant the driver definition last changed, as ISO 8601 UTC (YYYY-MM-DDTHH:mm:ss.sssZ). The same value the list and search targets publish."}},"additionalProperties":false,"required":["id","name","calculationType","isActive","isSystem","dimensions","lastModifiedDate"]},"LineAllowance":{"type":"object","properties":{"allowance":{"type":"string","format":"decimal","description":"Committed quantity per allowance term, in the catalog Allowance's unit of measure.","examples":["1000"]},"allowanceTerm":{"type":"string","description":"The period the allowance covers: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually` or `orderTerm`. Defaults to the product catalog's Allowance term.","examples":["monthly"]},"maximumRolloverLimit":{"type":"string","format":"decimal","description":"Cap on the quantity that may roll over. Accepted only when the catalog Allowance has rollover enabled, and defaults to its setting.","examples":["500"]},"overage":{"$ref":"#/components/schemas/LineOverage","description":"Discount and invoicing overrides for the line's overage. Omit it to take everything from the catalog Overage and its price-book entry."},"rolloverDuration":{"type":"string","format":"decimal","description":"How many allowance terms unused allowance rolls over for. Accepted only when the catalog Allowance has rollover enabled, and defaults to its setting.","examples":["2"]}},"additionalProperties":false,"required":["allowance"],"description":"The Allowance & Overage terms of a Commit with Overage line — required for that line type and rejected on any other. `allowance` is the committed quantity per allowance term. The remaining fields are overrides, mirroring what the Sales Order screen lets a user change: allowanceTerm (annually/semiAnnually/quarterly/biMonthly/monthly/orderTerm), and the rollover configuration (rolloverDuration in allowance terms, maximumRolloverLimit) — accepted only when the product's catalog Allowance has rollover enabled. Unit of measure, usage component and the rollover flag itself always come from the catalog and cannot be overridden here, exactly as on the screen. `overage` carries the overage discount and invoicing overrides."},"LineOverage":{"type":"object","properties":{"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off the overage price, in the order currency. Takes precedence over `discountPercentage` when both are sent; omit both to price the overage exactly as its price-book entry has it.","examples":["1.50"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off the overage price on a 0–100 scale, so `10` means ten percent. Used only when `discountAmount` is not given.","examples":["10"]},"invoiceTiming":{"type":"string","description":"Whether the overage invoices `advance` (at the start of its period) or `arrears` (after it). Defaults from the entity's active invoice policy for overage lines, then from the parent line.","examples":["arrears"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the overage invoices on: `anniversary`, `first`, `last` or `specific`. Defaults from the entity's active invoice policy for overage lines, then from the parent line.","examples":["anniversary"]}},"additionalProperties":false,"description":"Overage overrides for a Commit with Overage line, mirroring what the Sales Order screen lets a user change: the discount (discountAmount, or discountPercentage on a 0–100 scale) and the invoicing schedule (invoiceTiming, lineInvoiceDay). Price model, invoice frequency and the overage prices always come from the product's catalog Overage and its price-book entry — they cannot be overridden here, exactly as on the screen. A tier-priced overage takes its tiers from the price book."},"InlineCustomer":{"type":"object","properties":{"additionalContactEmail":{"type":"string","description":"Secondary address copied on customer correspondence.","examples":["finance@contoso.example"]},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAddress"},"description":"The customer's addresses, each naming the slot it fills. Both a `billTo` and a `soldTo` address are needed before an order can be raised, so supply both here."},"billableTravelExpenseInvoiceDetail":{"type":"string","description":"How billable travel expenses appear on the invoice: `detailed` line by line, or `consolidated` into one figure.","examples":["detailed"]},"businessIdentificationNumber":{"type":"string","description":"The customer's business registration number.","examples":["HRB 123456"]},"businessType":{"type":"string","description":"Whether the customer is a `company` or an `individual`.","examples":["company"]},"customerType":{"type":"string","description":"A CustomerPartnerResellerType member: `default` or `partner`. `endCustomer` is rejected here, because it requires a partner link this contract does not carry.","examples":["default"]},"defaultCurrency":{"type":"string","description":"ISO 4217 code the customer is billed in unless an order says otherwise.","examples":["EUR"]},"entityId":{"type":"string","description":"UUID of the legal Entity that owns the customer. It can be moved later with PATCH accounting/customers/:id; existing sales orders keep their own entity.","examples":["1c9e5f38-7b04-4a26-8d31-5f60e2ab7c95"]},"exemptionNumber":{"type":"string","description":"The exemption certificate number. Only accepted while `taxExempt` is true.","examples":["EX-2026-0042"]},"externalIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdentifier"},"description":"Identifiers the customer carries in other systems, upserted by `fieldName`. A `fieldName` may appear only once."},"invoiceConsolidation":{"type":"string","description":"What invoices are grouped by: `customer`, `purchaseOrderNumber` or `salesArrangement`.","examples":["customer"]},"invoiceDeliveryMode":{"type":"string","description":"Whether invoices go out `automated` or are sent `manual`ly.","examples":["automated"]},"invoiceEmail":{"type":"string","description":"Address invoices are sent to.","examples":["ap@contoso.example"]},"isExemptFromCreditCardFee":{"type":"boolean","description":"Whether credit-card surcharges are waived for this customer."},"mainContactName":{"type":"string","description":"Name of the primary contact person.","examples":["A. Meyer"]},"mainEmail":{"type":"string","description":"Primary contact address for the customer.","examples":["hello@contoso.example"]},"name":{"type":"string","description":"Legal or trading name of the customer.","examples":["Contoso GmbH"]},"parentId":{"type":"string","description":"UUID of the customer above this one in the business-partner hierarchy. One that names no customer fails the request with UNKNOWN_REFERENCE.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]},"partnerId":{"type":"string","description":"UUID of the partner this customer buys through. One that names no customer fails the request with UNKNOWN_REFERENCE.","examples":["4d2b8e70-91a3-4c6f-b5d8-1e7a03f9c284"]},"partnerType":{"type":"string","description":"How a `partner` customer acts: `reseller` or `thirdPartyPayer`.","examples":["reseller"]},"payment":{"$ref":"#/components/schemas/CustomerPayment","description":"Payment-provider link registered for the customer once it has been created."},"paymentTermCode":{"type":"string","description":"The customer's payment term, named by its code as configured for `entityId`. A code that entity does not have fails the request with UNKNOWN_REFERENCE, and no order is created.","examples":["net30"]},"preferredLanguage":{"type":"string","description":"A PreferredLanguage member, such as `english`, `german`, `french` or `spanish`.","examples":["english"]},"salesChannel":{"type":"string","description":"A SalesChannel member: `salesAssisted` or `selfServe`.","examples":["salesAssisted"]},"segment":{"type":"string","description":"A CustomerSegment member: `SMB`, `MidMarket` or `Enterprise`.","examples":["Enterprise"]},"status":{"type":"string","description":"Whether the customer is `active` or `inactive`.","examples":["active"]},"taxExempt":{"type":"boolean","description":"Whether the customer is exempt from tax. Must be true before `exemptionNumber` is accepted."},"taxExemptCode":{"type":"string","description":"The code behind the exemption — the reason category the authority uses.","examples":["RESALE"]},"taxRegistrations":{"type":"array","items":{"$ref":"#/components/schemas/TaxRegistration"},"description":"Tax registrations to record, upserted by (`country`, `type`)."}},"additionalProperties":false,"required":["entityId","name"],"description":"A new customer created alongside the order, mirroring the Customer create API. `name`, `entityId` (a UUID) are required; addresses are a single list with a `type` of billTo/soldTo. Created through the shared customer core-write path."},"CustomerPayment":{"type":"object","properties":{"externalCustomerId":{"type":"string","description":"The customer's id in the provider's system.","examples":["cus_NffrFeUfNV2Hib"]},"externalPaymentMethodId":{"type":"string","description":"The payment method's id in the provider's system. Requires `externalCustomerId` — a method with no customer to hang it on is rejected.","examples":["pm_1NGY3s2eZvKYlo2CQmRz9k4T"]},"provider":{"type":"string","description":"The payment provider, named exactly as the tenant's provider configuration spells it. Required as soon as either external id is supplied, and an unconfigured name is rejected.","examples":["Stripe"]}},"additionalProperties":false,"description":"Payment-provider integration for an inline customer: provider (e.g. Stripe, BillDotCom) plus the customer/payment-method ids in that provider's system. provider is required when either external id is supplied."},"TaxRegistration":{"type":"object","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 code of the jurisdiction the customer is registered in. Together with `type` it is what a registration is upserted by.","examples":["DE"]},"effectiveDate":{"type":"string","format":"date","description":"Day the registration takes effect.","examples":["2026-01-01"]},"isActive":{"type":"boolean","description":"Whether the registration is currently in force."},"note":{"type":"string","description":"Free-text note kept with the registration.","examples":["Filed with the Munich tax office"]},"taxNumber":{"type":"string","description":"The registration number as the authority issues it.","examples":["DE123456789"]},"type":{"type":"string","description":"A TaxRegistrationType member: `tax`, `salesTax`, `VAT`, `GST`, `EIN` or `TIN`. Together with `country` it is what a registration is upserted by.","examples":["VAT"]}},"additionalProperties":false,"required":["country","taxNumber","type"],"description":"A customer tax registration in a jurisdiction. country (ISO 3166-1 alpha-2), taxNumber and type (`tax`/`salesTax`/`VAT`/`GST`/`EIN`/`TIN`) are required; effectiveDate (YYYY-MM-DD), isActive and note are optional."},"CustomerAddress":{"type":"object","properties":{"attention":{"type":"string","description":"Person or department correspondence to this address is directed to.","examples":["Accounts Payable"]},"city":{"type":"string","description":"City.","examples":["München"]},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","examples":["DE"]},"isDefault":{"type":"boolean","description":"Marks this entry as the default for its `type`. At most one address per type may set it; when no entry of a type is marked, the first one of that type becomes its default."},"line1":{"type":"string","description":"Street and number.","examples":["Prinzregentenstraße 22"]},"line2":{"type":"string","description":"Second address line, where the address needs one.","examples":["4. OG"]},"stateProvince":{"type":"string","description":"State, province or region, where the country uses one.","examples":["Bayern"]},"type":{"type":"string","description":"Which slot this address fills: `billTo` for the address invoices go to, `soldTo` for the contracting party. An order can only be raised once the customer has one of each.","examples":["billTo"]},"zipCode":{"type":"string","description":"Postal code.","examples":["80538"]}},"additionalProperties":false,"required":["city","country","line1","type","zipCode"],"description":"A customer address. `type` is `billTo` or `soldTo`. At most one address per type may set isDefault."},"ExternalIdentifier":{"type":"object","properties":{"externalUrl":{"type":"string","description":"Deep link to the record in the owning system, shown beside the id.","examples":["https://netsuite.example.com/app/accounting/transactions/salesord.nl?id=10042"]},"fieldName":{"type":"string","description":"Names the ExternalIdentifierConfiguration this id belongs to, as that configuration spells it. It must already be configured for the tenant; an unknown name is rejected. Identifiers are upserted by this name, so sending it again overwrites the stored value.","examples":["netsuiteInternalId"]},"value":{"type":"string","description":"The identifier as the owning system spells it.","examples":["SO-10042"]}},"additionalProperties":false,"required":["fieldName","value"],"description":"An external identifier owned by another system (e.g. NetSuite, Salesforce): `fieldName` must match an ExternalIdentifierConfiguration, `value` is the id in that system, and `externalUrl` optionally links to the record there. Upserted by fieldName."},"Subscription":{"type":"object","properties":{"autoRenew":{"type":"boolean","description":"Whether the subscription renews itself at the end of its term."},"externalSubscriptionId":{"type":"string","description":"The subscription's id in the system that owns it, kept for reconciliation.","examples":["sub_1NGY3s2eZvKYlo2C"]},"products":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionProductLine"},"description":"The recurring product lines of this subscription. Every one must be a subscription-based product line — a one-time line placed here is rejected with `INVALID_SUBSCRIPTION_PRODUCT` and belongs in the order's `nonSubscriptionProducts` instead."},"serviceEndDate":{"type":"string","format":"date","description":"Last day the subscription is in service. Omit it on an evergreen subscription.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day the subscription is in service.","examples":["2026-01-01"]},"term":{"type":"string","format":"decimal","description":"Intended length of a `termed` subscription in months. What actually bounds the subscription is `serviceStartDate` and `serviceEndDate`, so supply the end date to fix when it ends.","examples":["12"]},"termType":{"type":"string","description":"`termed` for a subscription of fixed length, `evergreen` for an open-ended one that keeps renewing. A single evergreen subscription makes the whole order evergreen, which leaves the order's service end date open.","examples":["termed"]}},"additionalProperties":false,"required":["products","serviceStartDate","termType"],"description":"A subscription grouping recurring product lines. `termType` is `termed` (fixed end date; `term` in months required) or `evergreen` (open-ended, auto-renewing); autoRenew toggles renewal; serviceStartDate is required and serviceEndDate is derived from term when omitted; `products` are its SubscriptionProductLines. externalSubscriptionId links an external system's subscription."},"SubscriptionProductLine":{"type":"object","properties":{"allowance":{"$ref":"#/components/schemas/LineAllowance","description":"The Allowance & Overage terms of a Commit with Overage line. Required for that line type and rejected on any other; omitted fields default from the product catalog."},"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice`, in the order currency. Used when no `unitPrice` is given, and then drives the other two.","examples":["120.00"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice` on a 0–100 scale, so `10` means ten percent. Stored as a 0–1 fraction. The lowest precedence of the three — used only when neither `unitPrice` nor `discountAmount` is given.","examples":["10"]},"externalIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdentifier"},"description":"Identifiers this line carries in other systems, upserted by `fieldName`."},"invoiceFrequency":{"type":"string","description":"How often the line invoices — an InvoiceFrequency member: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually`, `once`, `custom`, `template`, `milestone`, `allAtOnce` or `termEnd`. Defaults to the product line's own setting.","examples":["monthly"]},"invoiceFrequencyTemplateId":{"type":"string","description":"UUID of the invoice frequency template","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"invoiceTiming":{"type":"string","description":"Whether the line invoices `advance` (at the start of the service period) or `arrears` (after it). Defaults from the entity's active invoice policy for this line type.","examples":["advance"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the line invoices on: `anniversary`, `first`, `last` or `specific`. Defaults from the entity's active invoice policy.","examples":["anniversary"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price per unit, in the order currency. Defaults to the list price the order's price book holds for this product line, and is the figure the other pricing fields are reconciled against.","examples":["1200.00"]},"prepaidConfiguration":{"$ref":"#/components/schemas/LinePrepaidConfiguration","description":"The prepaid balance settings of a Prepaid line. Rejected on any other line type; omit it to take the defaults."},"priceModel":{"type":"string","description":"How the line is priced: `flat`, `perUnit`, `tiered`, `volume`, `stairstep` or `rateCard`. Defaults to the product line's own model. `tiered`, `volume` and `stairstep` take their prices from `tiers` and `rateCard` from `rateCardEntries`, so for those the line-level discount fields are not reconciled. `thresholdBased` is rejected: it needs a base line plus a metered usage child, which this endpoint does not build.","examples":["perUnit"]},"pricingTerm":{"type":"string","description":"The period the price is quoted for: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually` or `once`. Defaults to the product line's own term.","examples":["annually"]},"productLineId":{"type":"string","description":"UUID of the ProductLine being ordered. It settles the product, the line type and the billing rules every omitted field defaults from. It must exist, and it must not be threshold-based. A Prepaid line is ordered with its credits as `quantity`; its usage line is added to the same product from the catalog, unless the subscription also lists that usage line (to set its `rateCardEntries`), in which case that one is used. A usage line of a prepaid product is accepted only next to its Prepaid line, and an order holds at most one Prepaid line.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]},"quantity":{"type":"string","format":"decimal","description":"Number of units ordered. Required unless the line takes its quantity from somewhere else: usage-metered line types (PayAsYouGo, Usage, Billable*) meter it from usage records, so for those it must be omitted or 0 (a non-zero value is rejected, matching the Sales Order screen); tier-priced models (`tiered`, `volume`, `stairstep`, `thresholdBased`) derive it from the tier structure, so for those it defaults to zero. Anywhere else, omitting it fails the request.","examples":["10"]},"rampDeal":{"$ref":"#/components/schemas/RampDeal","description":"Scheduled changes to quantity and price across the line's life. Subscription lines only."},"rateCardEntries":{"type":"array","items":{"$ref":"#/components/schemas/RateCardEntry"},"description":"Per-unit rates for a `rateCard`-priced line. Supplying any entry moves pricing onto the rate card, so the line-level discount fields stop being reconciled."},"serviceEndDate":{"type":"string","format":"date","description":"Last day of the line's service period. The order's own service end is the latest across all its lines, and is left open on an evergreen order.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the line's service period. The order's own service start is the earliest across all its lines.","examples":["2026-01-01"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/LineTag"},"description":"Value-accounting tags to allocate this line by. Requires value-allocation tagging to be enabled for sales orders."},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/LineTier"},"description":"The pricing tiers of a `tiered`, `volume` or `stairstep` line. The ranges must be contiguous, and the last tier is left open-ended by omitting its `toQuantity`."},"totalPrice":{"type":"string","format":"decimal","description":"Total for the line, in the order currency. Persisted exactly as supplied rather than recomputed — omit it and the line's own pricing drives the total. Rejected unless omitted or 0 on usage-metered line types (PayAsYouGo, Usage, Billable*), which have no fixed contract value.","examples":["12960.00"]},"unitOfMeasure":{"type":"string","description":"The unit the line is priced and metered in. Defaults to the product line's own unit.","examples":["seat"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price per unit, in the order currency. The highest precedence of the three pricing inputs — supply it and `discountAmount` and `discountPercentage` are recomputed from it (discountAmount = listPrice − unitPrice).","examples":["1080.00"]}},"additionalProperties":false,"required":["productLineId"],"description":"A ProductLine within a subscription, plus an optional `rampDeal` for scheduled quantity/price changes over the line's life. All ProductLine pricing/defaulting rules apply, including `allowance` for Commit with Overage lines and `prepaidConfiguration` for Prepaid lines."},"RampDeal":{"type":"object","properties":{"interval":{"type":"string","description":"The granularity the deal steps at: `monthly`, `quarterly` or `annually`.","examples":["annually"]},"invoiceTiming":{"type":"string","description":"Whether each segment invoices `advance` (at the start of its period) or `arrears` (after it).","examples":["advance"]},"ramps":{"type":"array","items":{"$ref":"#/components/schemas/Ramp"},"description":"The segments of the deal in order, earliest first. Together they span the subscription line's service period."}},"additionalProperties":false,"required":["interval","ramps"],"description":"A ramp deal: scheduled changes to quantity/price over a subscription line's life. `interval` is the granularity (`monthly`/`quarterly`/`annually`), invoiceTiming is `advance`/`arrears`, and `ramps` are the ordered segments. Subscription lines only."},"Ramp":{"type":"object","properties":{"invoiceFrequency":{"type":"string","description":"How often this segment invoices. Defaults to the subscription line's own setting.","examples":["monthly"]},"invoiceFrequencyTemplateId":{"type":"string","description":"UUID of the invoice frequency template.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price per unit for this segment, in the order currency. Defaults to `unitPrice`.","examples":["120.00"]},"quantity":{"type":"string","format":"decimal","description":"Number of units in force for this segment.","examples":["25"]},"serviceEndDate":{"type":"string","format":"date","description":"Last day of this segment. Defaults so that the segments run contiguously up to the next one.","examples":["2026-06-30"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of this segment. Defaults so that the segments run contiguously from the subscription line's own start.","examples":["2026-01-01"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price per unit for this segment, in the order currency.","examples":["99.00"]}},"additionalProperties":false,"required":["quantity","unitPrice"],"description":"One ramp segment of a ramp deal across a subscription line's service period: quantity and per-unit unitPrice (listPrice defaults to unitPrice) for the segment; serviceStartDate/serviceEndDate bound it (defaulting contiguously); invoiceFrequency defaults to the line setting. Dates are YYYY-MM-DD."},"RateCardEntry":{"type":"object","properties":{"billableComponentId":{"type":"string","description":"UUID of the BillableComponent this row meters. Optional — a row may price a unit of measure without naming a component — but a UUID that does not resolve rejects the whole request.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"conversion":{"type":"string","format":"decimal","description":"Factor converting the billable unit into the reporting unit — 1000 when usage is metered per call but reported per thousand.","examples":["1000"]},"description":{"type":"string","description":"Free-text label for the row, carried through to the stored rate-card entry.","examples":["API calls beyond the included volume"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted rate per `unitOfMeasure`, in the order currency. Honoured only while the product line's `enforceListPrice` is false; otherwise the product line's own list price wins.","examples":["0.005"]},"unitOfMeasure":{"type":"string","description":"The unit this row is priced in.","examples":["record"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated rate per `unitOfMeasure`, in the order currency.","examples":["0.004"]},"usageType":{"type":"string","description":"Which usage the row prices on a prepaid product's usage line: `consumption` (usage drawn from the prepaid balance) or `overage` (usage beyond it, invoiced when the over-consumption behavior is `overage`). A prepaid usage line needs a `consumption` row, and an `overage` row when its behavior is `overage`; omit it on other lines.","examples":["consumption"]}},"additionalProperties":false,"required":["unitOfMeasure","unitPrice"],"description":"A rate-card row for a rateCard-priced line. `billableComponentId` is the BillableComponent id (a UUID) this row meters; unitPrice is the negotiated per-unit rate in the order currency; unitOfMeasure is how it is priced; listPrice is honoured only when the product line's enforceListPrice is false; conversion is the billable-to-reporting unit factor."},"LinePrepaidConfiguration":{"type":"object","properties":{"overConsumptionBehavior":{"type":"string","description":"What happens when usage exceeds the prepaid balance: `allowNegative` (the balance goes negative, and the shortfall is taken from the new prepaid amount when the subscription renews) or `overage` (the balance stops at zero, and usage beyond it is invoiced at the line's overage rate). Defaults to `overage` when the usage line has an overage rate, otherwise `allowNegative`.","examples":["overage"]}},"additionalProperties":false,"description":"The prepaid balance settings of a Prepaid line, the same settings the Sales Order screen's prepaid configuration offers. Accepted only on a Prepaid line; omit it to take the defaults."},"LineTag":{"type":"object","properties":{"dimension":{"type":"string","description":"Name of the value-accounting dimension, as configured for the tenant. Resolved by name, not by id.","examples":["Department"]},"value":{"type":"string","description":"Name of the value within that dimension. The pair must resolve to an existing tag and the dimension must be enabled for sales orders; an unknown pair rejects the whole request.","examples":["Engineering"]}},"additionalProperties":false,"required":["dimension","value"],"description":"A value-accounting tag as a friendly `{ dimension, value }` name pair (e.g. { \"dimension\": \"Department\", \"value\": \"Engineering\" }). Both are the human-readable names; resolved against the tenant's value-accounting dimensions (an unknown dimension or value is rejected). Requires value-allocation tagging to be enabled."},"LineTier":{"type":"object","properties":{"fromQuantity":{"type":"string","format":"decimal","description":"Lower bound of the tier's quantity range, inclusive.","examples":["0"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price for this tier, in the order currency. Defaults to `unitPrice`, i.e. no discount on the tier.","examples":["15.00"]},"priceModel":{"type":"string","description":"How `unitPrice` applies within the tier: `perUnit` (the default) charges it for every unit in the range, `flat` charges it once for the whole tier.","examples":["perUnit"]},"toQuantity":{"type":"string","format":"decimal","description":"Upper bound of the tier's quantity range. Omit it on the last tier to leave the range open-ended.","examples":["100"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price for this tier, in the order currency. Charged per unit in the range when `priceModel` is `perUnit`, or once for the whole tier when it is `flat`.","examples":["12.50"]}},"additionalProperties":false,"required":["fromQuantity","unitPrice"],"description":"A pricing tier for tiered/volume/stairstep price models. Covers the quantity range [fromQuantity, toQuantity] (omit toQuantity on the open-ended last tier) at unitPrice; listPrice defaults to unitPrice; priceModel is `flat` or `perUnit` (defaults perUnit). Tiers are per-order and must cover contiguous ranges."},"ProductLine":{"type":"object","properties":{"allowance":{"$ref":"#/components/schemas/LineAllowance","description":"The Allowance & Overage terms of a Commit with Overage line. Required for that line type and rejected on any other; omitted fields default from the product catalog."},"discountAmount":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice`, in the order currency. Used when no `unitPrice` is given, and then drives the other two.","examples":["120.00"]},"discountPercentage":{"type":"string","format":"decimal","description":"Discount per unit off `listPrice` on a 0–100 scale, so `10` means ten percent. Stored as a 0–1 fraction. The lowest precedence of the three — used only when neither `unitPrice` nor `discountAmount` is given.","examples":["10"]},"externalIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/ExternalIdentifier"},"description":"Identifiers this line carries in other systems, upserted by `fieldName`."},"invoiceFrequency":{"type":"string","description":"How often the line invoices — an InvoiceFrequency member: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually`, `once`, `custom`, `template`, `milestone`, `allAtOnce` or `termEnd`. Defaults to the product line's own setting.","examples":["monthly"]},"invoiceFrequencyTemplateId":{"type":"string","description":"UUID of the invoice frequency template.","examples":["9f1c2d34-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]},"invoiceTiming":{"type":"string","description":"Whether the line invoices `advance` (at the start of the service period) or `arrears` (after it). Defaults from the entity's active invoice policy for this line type.","examples":["advance"]},"lineInvoiceDay":{"type":"string","description":"Which day of the period the line invoices on: `anniversary`, `first`, `last` or `specific`. Defaults from the entity's active invoice policy.","examples":["anniversary"]},"listPrice":{"type":"string","format":"decimal","description":"Undiscounted price per unit, in the order currency. Defaults to the list price the order's price book holds for this product line, and is the figure the other pricing fields are reconciled against.","examples":["1200.00"]},"priceModel":{"type":"string","description":"How the line is priced: `flat`, `perUnit`, `tiered`, `volume`, `stairstep` or `rateCard`. Defaults to the product line's own model. `tiered`, `volume` and `stairstep` take their prices from `tiers` and `rateCard` from `rateCardEntries`, so for those the line-level discount fields are not reconciled. `thresholdBased` is rejected: it needs a base line plus a metered usage child, which this endpoint does not build.","examples":["perUnit"]},"pricingTerm":{"type":"string","description":"The period the price is quoted for: `monthly`, `biMonthly`, `quarterly`, `semiAnnually`, `annually` or `once`. Defaults to the product line's own term.","examples":["annually"]},"productLineId":{"type":"string","description":"UUID of the ProductLine being ordered. It settles the product, the line type and the billing rules every omitted field defaults from. It must exist, and it must not be threshold-based or prepaid: those need a base line plus a metered usage child under one product, which this endpoint does not build.","examples":["6a1f2c94-3d58-4b17-9e02-7c8ab4d5f610"]},"quantity":{"type":"string","format":"decimal","description":"Number of units ordered. Required unless the line takes its quantity from somewhere else: usage-metered line types (PayAsYouGo, Usage, Billable*) meter it from usage records, so for those it must be omitted or 0 (a non-zero value is rejected, matching the Sales Order screen); tier-priced models (`tiered`, `volume`, `stairstep`, `thresholdBased`) derive it from the tier structure, so for those it defaults to zero. Anywhere else, omitting it fails the request.","examples":["10"]},"rateCardEntries":{"type":"array","items":{"$ref":"#/components/schemas/RateCardEntry"},"description":"Per-unit rates for a `rateCard`-priced line. Supplying any entry moves pricing onto the rate card, so the line-level discount fields stop being reconciled."},"serviceEndDate":{"type":"string","format":"date","description":"Last day of the line's service period. The order's own service end is the latest across all its lines, and is left open on an evergreen order.","examples":["2026-12-31"]},"serviceStartDate":{"type":"string","format":"date","description":"First day of the line's service period. The order's own service start is the earliest across all its lines.","examples":["2026-01-01"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/LineTag"},"description":"Value-accounting tags to allocate this line by. Requires value-allocation tagging to be enabled for sales orders."},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/LineTier"},"description":"The pricing tiers of a `tiered`, `volume` or `stairstep` line. The ranges must be contiguous, and the last tier is left open-ended by omitting its `toQuantity`."},"totalPrice":{"type":"string","format":"decimal","description":"Total for the line, in the order currency. Persisted exactly as supplied rather than recomputed — omit it and the line's own pricing drives the total. Rejected unless omitted or 0 on usage-metered line types (PayAsYouGo, Usage, Billable*), which have no fixed contract value.","examples":["12960.00"]},"unitOfMeasure":{"type":"string","description":"The unit the line is priced and metered in. Defaults to the product line's own unit.","examples":["seat"]},"unitPrice":{"type":"string","format":"decimal","description":"Negotiated price per unit, in the order currency. The highest precedence of the three pricing inputs — supply it and `discountAmount` and `discountPercentage` are recomputed from it (discountAmount = listPrice − unitPrice).","examples":["1080.00"]}},"additionalProperties":false,"required":["productLineId"],"description":"A product line to add to an order. `productLineId` (a UUID) defines the product and its billing rules. Pricing is reconciled from listPrice: supply `unitPrice`, or `discountAmount` (order currency), or `discountPercentage` (0-100 scale) — precedence unitPrice > discountAmount > discountPercentage; the rest are derived (unitPrice = listPrice − discountAmount). Tiered/volume/stairstep/rateCard lines carry prices on `tiers`/`rateCardEntries` instead. `quantity` is required except for usage-metered (PayAsYouGo, Usage, Billable*) or tier-priced lines. Dates are YYYY-MM-DD; invoiceFrequency/invoiceTiming/priceModel/pricingTerm/unitOfMeasure default to the product-line setting; `tags` and `externalIdentifiers` attach to the line; `totalPrice` is persisted as-is when supplied. A Commit with Overage line requires `allowance` (its Allowance & Overage terms); other line types reject it."}},"parameters":{"ApiVersion":{"name":"Api-Version","in":"header","required":true,"description":"The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`.","schema":{"type":"string","const":"v1","default":"v1"}}},"securitySchemes":{"systemAccessToken":{"type":"http","scheme":"bearer","description":"Bearer authentication with a system access token. Create a system access token, grant it the required permissions, and send its value in the `Authorization: Bearer <token>` header."},"webhookSignature":{"type":"apiKey","in":"header","name":"webhook-signature","description":"Signature of a webhook delivery, following the [Standard Webhooks](https://www.standardwebhooks.com) specification. Every delivery carries `webhook-id`, `webhook-timestamp` (Unix seconds) and `webhook-signature`, which holds one or more space-separated `v1,<base64>` signatures: normally one, two while a rolled secret is still valid.\n\nTo verify a delivery, compute the HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{raw body}`, keyed with the destination's secret without its `whsec_` prefix and base64-decoded, and base64-encode the result. Accept the delivery if the result equals any `v1` signature, compared in constant time, and reject a `webhook-timestamp` more than five minutes from your clock. Use the body exactly as received: parsing and re-serializing it changes the bytes."}}},"security":[{"systemAccessToken":[]}],"tags":[{"name":"CRM","kind":"nav","description":"The CRM surface: prospects, opportunities, opportunity stages and quotes.\n\nA prospect is a lead not yet qualified into an opportunity. An opportunity tracks a potential deal through its sales stages before it becomes a quote or a sales order. The opportunity stages of a legal entity are the ordered steps its opportunities move through. A quote is the offer made to a customer before a sales order, scoped to one opportunity.","x-displayName":"CRM"},{"name":"PSA","kind":"nav","description":"Records for professional services automation (PSA): PSA projects with their activities, positions, team members, allocations, time entries, milestones, fixed fees, and expenses, read-only project cost and revenue figures, plus the project types and placeholders shared across projects.","x-displayName":"PSA"},{"name":"accounting","kind":"nav","description":"Accounting covers the general ledger and its setup, financial reports, customer sales and billing, revenue recognition, vendors and purchasing, expenses and payroll, and fixed assets.","x-displayName":"Accounting"},{"name":"accounting/products","kind":"nav","parent":"accounting","description":"Products are the goods and services a legal entity sells to customers through sales orders and quotes.","x-displayName":"Products"},{"name":"accounting/products/productLines","kind":"nav","parent":"accounting/products","description":"A product line is one way a product is sold and invoiced, with its own line type, price model, invoice frequency, and pricing.\n\nA product can have several product lines. The endpoints that add, change, or delete a product line or its pricing are under its product, at accounting/products/:id/product-lines.","x-displayName":"Product Lines"},{"name":"accounting/reports","kind":"nav","parent":"accounting","description":"Reports show the general ledger, the trial balance, and financial statements, built from journal entries.","x-displayName":"Reports"},{"name":"accounting/reports/generalLedger","kind":"nav","parent":"accounting/reports","description":"The general ledger is every journal entry line posted to it, plus the calculated lines that make the financial statements balance.","x-displayName":"General Ledger"},{"name":"accounting/reports/trialBalances","kind":"nav","parent":"accounting/reports","description":"A trial balance lists each account's opening balance, debits, credits, and closing balance for one legal entity and accounting book over a date range.\n\nA trial balance is calculated from the journal entries in the general ledger each time you request it, so there is nothing to create, update, or delete. All amounts are in the one currency that reportingCurrency names.","x-displayName":"Trial Balances"},{"name":"accountingAccountingPeriodStatuses","kind":"nav","parent":"accounting","description":"An accounting period status is the open or closed state of one accounting period for one legal entity and accounting book.\n\nThe same period can be open for one legal entity and closed for another, so each legal entity and accounting book has its own status for it.\n\npostable says whether journal entries can be posted to the general ledger in the period. It is true when the status is open or reopened. It doesn't reflect locks that apply only to some types of journal entry.","x-displayName":"Accounting Period Status"},{"name":"accountingAccountingPeriods","kind":"nav","parent":"accounting","description":"An accounting period is one period of a fiscal calendar for one legal entity and accounting book, with its own status.\n\nThe same period can be open for one legal entity and closed for another, because each legal entity and accounting book has its own status for it.\n\npostable says whether journal entries can be posted to the general ledger in the period. It is true when the status is open or reopened. It doesn't reflect locks that apply only to some types of journal entry.\n\nTo change a period's status, use POST accounting/period-status/:id/execute-task.","x-displayName":"Accounting Periods"},{"name":"accountingAccounts","kind":"nav","parent":"accounting","description":"Accounts are the general ledger accounts in a chart of accounts, each classified by type and subtype.","x-displayName":"Accounts"},{"name":"accountingAdvancePaymentCategories","kind":"nav","parent":"accounting","description":"An advance payment category sets the accounts that employee advances use: the bank account an advance is paid from, and the offset account that records the advance until an expense report settles it.\n\nEach legal entity has at most one advance payment category, and employee advance requests refer to it.\n\nThe category's bank and offset accounts are set for each chart of accounts, and no endpoint reads or sets them.","x-displayName":"Advance Payment Categories"},{"name":"accountingAmortizationScheduleLines","kind":"nav","parent":"accounting","description":"An amortization schedule line is one period's amount of an amortization schedule.\n\nThe amortization schedule has the method, the term, and the source document. There is no endpoint to change a line. An installment's journal entry is posted to the general ledger through the amortization schedule.\n\noutstanding is true when an installment's journal entry hasn't been posted and the installment isn't confirmed as zero. Filter on outstanding rather than working it out from isJournalEntryPosted and isConfirmedZero. isConfirmedZero can be unset, and if you treat unset as false you miss outstanding lines.\n\nTo find out whether amortization blocks a period close, filter by legal entity, accounting book, and the period end date, not by the period id. An installment scheduled in an earlier period whose journal entry was never posted also blocks the close, and a scheduledPeriodId filter misses it.\n\nA line has no legal entity of its own. Its entityId comes from the source journal entry line of the schedule, so a line whose schedule or source document was deleted has no entityId. Those lines are still returned but don't match an entity filter, so check for lines with no entityId when you reconcile to zero.","x-displayName":"Amortization Schedule Lines"},{"name":"accountingBooks","kind":"nav","parent":"accounting","description":"An accounting book is a self-contained ledger within the tenant, to which journal entries, accounts, and legal entities are assigned.","x-displayName":"Books"},{"name":"accountingChartsOfAccounts","kind":"nav","parent":"accounting","description":"A chart of accounts is the numbering scheme that organizes a legal entity's general ledger accounts.","x-displayName":"Charts of Accounts"},{"name":"accountingCreditMemos","kind":"nav","parent":"accounting","description":"Credit memos are amounts a legal entity has credited back to a customer.","x-displayName":"Credit Memos"},{"name":"accountingCustomers","kind":"nav","parent":"accounting","description":"The customer directory of accounting: who the entity bills and is billed by. Sits under Accounting, beside the other domains of that module.","x-displayName":"Customers"},{"name":"accountingDebitMemos","kind":"nav","parent":"accounting","description":"A debit memo is an additional charge to a customer that settles a credit memo.","x-displayName":"Debit Memos"},{"name":"accountingEmployeeAdvances","kind":"nav","parent":"accounting","description":"An employee advance is money paid to an employee in advance. The money is requested by the employee and paid once the request is approved.\n\nEach request belongs to the employee who created it and to that employee's legal entity.\n\nA request goes through your tenant's approval policy, from 'pendingApproval' to 'approved' or 'rejected'. Issuing an approved request creates the outbound payment and its journal entry and sets the status to 'issued'. An expense report can later settle the advance.","x-displayName":"Employee Advances"},{"name":"accountingEntities","kind":"nav","parent":"accounting","description":"An entity is a legal entity or non-legal reporting entity of the company, arranged in one hierarchy. These endpoints read, search, create and update entities, activate and deactivate them, and list the external-identifier fields configured for them. The plain entity collection (GET base/entities) is published by everest.base in its own group.","x-displayName":"Entities"},{"name":"accountingExpenseCategories","kind":"nav","parent":"accounting","description":"An expense category classifies expense items and sets which general ledger accounts their journal entries use.\n\nEach category is available in a set of legal entities and is linked to a set of general ledger accounts. Expense items refer to a category.\n\nTo stop using a category that expense items refer to, set its status to 'inactive'.","x-displayName":"Expense Categories"},{"name":"accountingExpenseReports","kind":"nav","parent":"accounting","description":"An expense report is a set of expense items that an employee submits for approval and reimbursement.\n\nA report belongs to one employee, and every expense item on it belongs to that employee. The report is reimbursable unless one of its items sets reimbursable to false. The report totals are in reimbursementCurrency, and each item's amount is in the item's own currency.\n\nA submitted report starts in 'pendingApproval' and goes through your tenant's approval policy. An approved, reimbursable report is paid with an outbound payment.","x-displayName":"Expense Reports"},{"name":"accountingFiscalCalendars","kind":"nav","parent":"accounting","description":"Fiscal calendars define how a year is divided into accounting periods.\n\nA fiscal calendar sets whether the year is divided into months or quarters, and when the year starts.\n\nEach period of a calendar, for each legal entity and accounting book, is an accounting period. To list them, use GET accounting/accounting-periods?filter[fiscalCalendarId][eq]=<id>.\n\nNo endpoint finds a calendar by name. List the calendars and match the name in your own code.","x-displayName":"Fiscal Calendars"},{"name":"accountingIntercompanyBills","kind":"nav","parent":"accounting","description":"An intercompany bill records a charge from one legal entity to another in the same tenant, such as a parent legal entity charging a subsidiary for shared services.\n\nEach bill has an issuing legal entity, a receiving legal entity, one currency for all its amounts, and an optional markup. The markup is a percentage of each line or a flat fee split across the lines. Each line has an amount and the general ledger accounts that each legal entity's side of the journal entry uses.\n\nThe bill's intercompany process supplies the intercompany accounts that balance each legal entity's side of the journal entry.\n\nThere is no endpoint to create, publish, or void an intercompany bill.","x-displayName":"Intercompany Bills"},{"name":"accountingInvoiceFrequencyTemplates","kind":"nav","parent":"accounting","description":"An invoice frequency template is a reusable invoicing schedule, written as an RFC 5545 recurrence rule, that a sales order product line can use instead of a fixed invoice frequency.","x-displayName":"Invoice Frequency Templates"},{"name":"accountingInvoiceMilestones","kind":"nav","parent":"accounting","description":"An invoice milestone bills a share of a sales order's Milestone-invoiced product lines. It is created open, released for invoicing on a planned invoice date, and invoiced from then on by the invoice run or the sales order.","x-displayName":"Invoice Milestones"},{"name":"accountingInvoiceRuns","kind":"nav","parent":"accounting","description":"An invoice run invoices the pending lines of one sales order, customer, or legal entity, and records the invoices it created and the lines that failed.","x-displayName":"Invoice Runs"},{"name":"accountingInvoices","kind":"nav","parent":"accounting","description":"Invoices are what a legal entity has billed a customer for, and what is still owed on each one.","x-displayName":"Invoices"},{"name":"accountingJournalEntries","kind":"nav","parent":"accounting","description":"A journal entry is a set of debit and credit lines for the general ledger.","x-displayName":"Journal Entries"},{"name":"accountingOutboundPayments","kind":"nav","parent":"accounting","description":"An outbound payment is money paid to a vendor or employee for their vendor bills or expense reports.\n\nA payment has one or more payment items, and each item pays one vendor bill or expense report. GET and search return the items in lines.\n\nA payment that hasn't been executed can be changed or deleted. A payment that is 'successful', 'partiallySuccessful', or 'processing' can only be voided. Deleting or voiding a payment makes the documents it paid open again.\n\nPayroll payments and standalone payments are outbound payments too, with their own endpoints.","x-displayName":"Outbound Payments"},{"name":"accountingPaymentTerms","kind":"nav","parent":"accounting","description":"The payment terms of accounting: the agreed schedules on which an invoice becomes due, and the early-payment discounts attached to them. These are the tenant-wide catalogue: a term can be used on a record only once it is assigned to that record's legal entity, so a listed code can still be refused by a write such as POST accounting/customers. Sits under Accounting, beside the other domains of that module.","x-displayName":"Payment Terms"},{"name":"accountingPayments","kind":"nav","parent":"accounting","description":"A payment is money received from a customer and applied to the customer's invoices, with any unapplied balance left on the payment.","x-displayName":"Payments"},{"name":"accountingPayrollDetails","kind":"nav","parent":"accounting","description":"A payroll detail is a set of payroll lines recorded in a journal entry for one legal entity, one line per employee or department.\n\nEach payroll detail uses a payroll template, which sets its categories, the rule for its journal entry date, and its clearing account. Across all lines, gross pay equals deductions plus net pay.\n\nPayroll payments pay a payroll detail, in full or in part.","x-displayName":"Payroll Details"},{"name":"accountingPayrollPayments","kind":"nav","parent":"accounting","description":"A payroll payment is an outbound payment that pays one or more payroll details.\n\nEach application ties part of the payment to one payroll detail and one payee. A payment can't overpay a payroll detail, for one payee or in total.\n\nA payroll payment is also an outbound payment, with the same id.","x-displayName":"Payroll Payments"},{"name":"accountingPayrollTemplates","kind":"nav","parent":"accounting","description":"A payroll template maps an imported payroll file to the journal entry of a payroll detail, with a debit account and a credit account for each payroll category.\n\nA template serves one or more legal entities, and each of its categories covers one kind of payroll amount, such as gross pay or net pay. Each payroll detail uses one template.\n\nWhen a template is created or updated through these endpoints, its status is set to 'active' if it has an active netPay category and an active grossPay category, and to 'inactive' otherwise. No endpoint sets the status directly.","x-displayName":"Payroll Templates"},{"name":"accountingPerformanceObligations","kind":"nav","parent":"accounting","description":"A performance obligation is something a legal entity has promised to deliver, and the basis for allocating and scheduling its revenue.","x-displayName":"Performance Obligations"},{"name":"accountingPriceBooks","kind":"nav","parent":"accounting","description":"A price book is a named set of list prices that sales orders use.","x-displayName":"Price Books"},{"name":"accountingPurchaseOrders","kind":"nav","parent":"accounting","description":"A purchase order records the goods or services a legal entity orders from a vendor.\n\nAn order can be created from purchase requests, and goods receipts and vendor bills are matched to the order's lines. Each order goes through your tenant's approval policy, and approvalStatus shows the result.","x-displayName":"Purchase Orders"},{"name":"accountingPurchaseRequests","kind":"nav","parent":"accounting","description":"A purchase request asks for internal approval to buy goods or services before you commit to a vendor. A purchase order can then be created from the approved request.\n\nEach request goes through your tenant's approval policy. There is no endpoint to delete a purchase request. Rejecting a request stops it.","x-displayName":"Purchase Requests"},{"name":"accountingPurchaseTypes","kind":"nav","parent":"accounting","description":"A purchase type classifies purchase orders, for example 'New purchase' or 'Additional licence'.\n\nA purchase order can carry one purchase type, and approval policies can use it as a criterion. To stop offering a type for new orders, set its status to 'inactive'. Orders that already carry it keep it.","x-displayName":"Purchase Types"},{"name":"accountingRefunds","kind":"nav","parent":"accounting","description":"A refund returns part or all of a customer's payment to the customer.\n\nYou can create, read, and update refunds, but there is no endpoint to delete one.","x-displayName":"Refunds"},{"name":"accountingReportsFinancialStatement","kind":"nav","parent":"accounting/reports","description":"A financial statement, such as an income statement, balance sheet, or cash flow statement, is a report built from a configured template.","x-displayName":"Financial Statement"},{"name":"accountingRevenueContracts","kind":"nav","parent":"accounting","description":"A revenue contract sets how the obligations of a sales order are recognized as revenue over the life of the contract.","x-displayName":"Revenue Contracts"},{"name":"accountingRevenueSchedulingTemplates","kind":"nav","parent":"accounting","description":"A revenue scheduling template sets how revenue is recognized and amortized, and which event starts a revenue plan.","x-displayName":"Revenue Scheduling Templates"},{"name":"accountingSalesOrderShipments","kind":"nav","parent":"accounting","description":"A sales order shipment records goods sent to a customer for a sales order, with the sales order product items it covers.\n\nEach shipment is a document in inventory. The record these endpoints return is its copy in accounting, linked by inventoryShipmentId. A shipment can't exist in accounting alone.","x-displayName":"Sales Order Shipments"},{"name":"accountingSalesOrders","kind":"nav","parent":"accounting","description":"The sales orders of accounting: what the entity has agreed to deliver and bill for. Sits under Accounting, beside the other domains of that module.","x-displayName":"Sales Orders"},{"name":"accountingSalesReturns","kind":"nav","parent":"accounting","description":"A sales return is a return against a sales order, for credit or for a replacement, with its own lines and an approval workflow.","x-displayName":"Sales Returns"},{"name":"accountingStandalonePayments","kind":"nav","parent":"accounting","description":"A standalone payment is an outbound payment to a vendor or employee that names no source document when it is recorded, and is applied later to vendor bills, expense reports, or withholding tax entries.\n\nA standalone payment is created as an outbound payment whose lines name no source document. There is no separate endpoint to create one.","x-displayName":"Standalone Payments"},{"name":"accountingSubscription","kind":"nav","description":"A subscription is a customer's **recurring service**, tracked by its lines, term type, and lifecycle status.\n\n## Finding subscriptions\n\n[subscriptions](#operation/subscriptions) is the collection header; [searchSubscription](#operation/searchSubscription) returns the full record, including the customer/entity references and cancellation/suspension notes List omits.\n\n## Changing one\n\n[modifySubscription](#operation/modifySubscription) applies line-level changes (add, change quantity, cancel, or replace products) effective on a modification date, or — via `modificationType: renew`, or `earlyRenew` from a given date — renews the whole subscription for another term. Every modification type except a cancellation-only payload materializes a sales order.\n\n## Ending one\n\n[cancelSubscription](#operation/cancelSubscription) fully cancels a subscription: every line ends on the cancellation date. For a partial cancellation, or one combined with other changes, use modifySubscription's cancelLines/replaceGroups instead.\n","x-displayName":"Subscription","summary":"Recurring service a customer has bought from a legal entity: renewal terms, service dates, and cancellation/suspension state.","x-whenToUse":"Modifying, renewing, cancelling, listing or searching a subscription, or anything carrying a subscription id.","parent":"accountingSubscriptions"},{"name":"accountingSubscriptions","kind":"nav","parent":"accounting","description":"A subscription is a recurring purchase by a customer, with its renewal terms, service dates, cancellation, and suspension status, and recurring revenue.","x-displayName":"Subscriptions"},{"name":"accountingTaxConfigurations","kind":"nav","parent":"accounting","description":"A tax configuration is a legal entity's set of tax codes and the general ledger accounts each tax code uses.","x-displayName":"Tax Configurations"},{"name":"accountingUsages","kind":"nav","parent":"accounting","description":"A usage record measures how much a customer used, so that it can be invoiced.","x-displayName":"Usage"},{"name":"accountingVendorBills","kind":"nav","parent":"accounting","description":"A vendor bill is an invoice that a legal entity receives from a vendor.\n\nA bill starts in 'pendingApproval' and goes through your tenant's approval policy. Approval makes the bill payable and creates its journal entry in the general ledger, unless the bill's total is zero or a line has no accountId. A rejected bill has no journal entry.\n\nOutbound payments pay a bill, and vendor credits can be applied to a bill.","x-displayName":"Vendor Bills"},{"name":"accountingVendorCredits","kind":"nav","parent":"accounting","description":"A vendor credit is a credit memo from a vendor that can be applied against that vendor's bills.\n\nA credit's available balance goes down as the credit is applied to vendor bills and goes back up when an application is undone.","x-displayName":"Vendor Credits"},{"name":"accountingVendors","kind":"nav","parent":"accounting","description":"A vendor is someone a legal entity buys from and pays.\n\nEach vendor has a business partner with the same name, created with the vendor. Journal entries record the business partner, not the vendor.\n\nA vendor with history can't be deleted. Deactivate it instead.","x-displayName":"Vendors"},{"name":"assetManagement","kind":"nav","parent":"accounting","description":"Asset management covers fixed assets, how they are depreciated, and construction in progress: capital projects and the costs collected for them.\n\nA fixed asset is the accounting record of an asset, such as a forklift, in one accounting book. Every fixed asset has a fixed asset type, such as machinery or vehicles.\n\nA depreciation policy sets how fixed assets of each type are depreciated. It sets the useful life, the default depreciation method and period length, and the accounts that depreciation and disposal journal entries post to.\n\nSaving a fixed asset creates its depreciation schedule. The schedule is the plan for depreciating the fixed asset over its useful life, with a line for each period. Recording depreciation for the lines creates the journal entries. You can record depreciation through the API.","x-displayName":"Asset Management"},{"name":"bankReconciliations","kind":"nav","parent":"banking","description":"Bank and credit-card account reconciliations: start one for an account, adjust its statement figures, submit it once it is done (submit does not check that it balances), and reopen it when it has to be revisited.\n\nA reconciliation ties one bank or credit-card account to one accounting period, and its job is to prove that what the bank says happened and what the ledger says happened are the same thing. It is the resource here, addressed by its own `id`; the `(account, period)` pair that identifies it internally is not part of the contract.\n\nThe lifecycle is four routes. `POST banking/reconciliations` starts one for an account — the period is derived, so a caller does not pick it. That call resumes rather than duplicates: if the account already has a reconciliation that is not complete, its `id` is returned and nothing is created. `PATCH banking/reconciliations/{id}` sets the statement figures the bank sends. `POST banking/reconciliations/{id}/submit` closes it and stamps who reconciled it and when. `POST banking/reconciliations/{id}/reopen` reverses that.\n\nTwo routes read. `GET banking/reconciliations` is the worklist, with filters, ordering and cursor pagination in the query string. `GET banking/reconciliations/{id}` is one reconciliation, and it carries a nested `balances` object the worklist cannot — the balance roll-forward that shows how the statement and the ledger reach their respective ending balances, and what remains between them. The scalar fields are named and typed identically in both.\n\nSubmit is ordered: a period cannot be submitted while the account's previous period is still open. Reopen cascades forward — reopening a period also reopens every later completed one for that account, because their beginning balances descend from it.\n\nOne thing to know before writing error handling: a business failure such as `NOT_FOUND` arrives under HTTP 400, not 404, because a route cannot yet declare a status per diagnostic code. Branch on the `code` in the error body.","x-displayName":"Reconciliations"},{"name":"banking","kind":"nav","description":"Banking covers bank accounts, bank entries, credit card entries, fund transfers, the transactions a bank reports, and the bank rules that create bank entries or credit card entries from those transactions.","x-displayName":"Banking"},{"name":"bankingBankAccounts","kind":"nav","parent":"banking","description":"A bank account is a legal entity's account at a bank, linked to a general ledger account and used for payments and reconciliation.","x-displayName":"Bank Accounts"},{"name":"bankingBankEntries","kind":"nav","parent":"banking","description":"A bank entry records money moving into or out of a bank account, and posts a journal entry to the general ledger from its lines.","x-displayName":"Bank Entries"},{"name":"bankingBankRules","kind":"nav","parent":"banking","description":"A bank rule creates a bank entry or credit card entry for each bank transaction on its bank accounts that meets its criteria, and matches the transaction to it.","x-displayName":"Bank Rules"},{"name":"bankingBankTransactions","kind":"nav","parent":"banking","description":"Bank transactions are the movements a bank reports for an account, the raw side of reconciliation.","x-displayName":"Bank Transactions"},{"name":"bankingCreditCardEntries","kind":"nav","parent":"banking","description":"A credit card entry records a charge or credit on a credit card account, and posts a journal entry to the general ledger from its lines.","x-displayName":"Credit Card Entries"},{"name":"bankingFundTransfers","kind":"nav","parent":"banking","description":"A fund transfer moves money between two accounts of the same legal entity, or between two legal entities.","x-displayName":"Fund Transfers"},{"name":"base","kind":"nav","description":"The base module's shared master data: the legal entities every other module's records belong to, and the reference data that joins them.","x-displayName":"Base"},{"name":"baseApprovalPolicies","kind":"nav","parent":"base","description":"An approval policy is the set of rules that decides who must approve a document, for which legal entity and which document type.","x-displayName":"Approval Policies"},{"name":"baseEntities","kind":"nav","parent":"base","description":"Legal entities are the organizations a tenant keeps its accounts for, including non-legal reporting entities.","x-displayName":"Entities"},{"name":"basePermissions","kind":"nav","parent":"base","description":"A permission role or task is a set of access rights that you can assign to users and positions.","x-displayName":"Permissions"},{"name":"baseReportingTags","kind":"nav","parent":"base","description":"Reporting tags are the dimensions a transaction can be tagged with: the ten system dimensions (department, business unit, team, location, region, PSA project, employee, vendor, customer, value center) and the tenant-defined custom ones. This surface decodes stored tag references into their display names, and lists the tenant's custom dimensions and the values within them.","x-displayName":"Reporting Tags"},{"name":"baseSlackWorkspaces","kind":"nav","parent":"base","description":"Slack workspaces a tenant admin connected through the Lensing Slack app.","x-displayName":"Slack Workspaces"},{"name":"crm-prospects","kind":"nav","parent":"CRM","description":"A prospect is an organization an entity is selling to before it becomes a customer, in the CRM alongside its opportunities and quotes.\n\nThree read endpoints share one item schema: GET crm/prospects/:id, GET crm/prospects and POST crm/prospects/search. GET crm/prospects omits contacts[], every contact of the prospect, which the other two return. POST crm/prospects and PATCH crm/prospects/:id create and change one prospect by the rules of the prospect form in the app; POST crm/prospects/bulk and PATCH crm/prospects/bulk do the same for up to 100 at once, all-or-nothing. A prospect converted to a customer can no longer be changed. Prospects cannot be deleted, as in the app.","x-displayName":"Prospects"},{"name":"crm-quotes","kind":"nav","parent":"CRM","description":"A quote is a priced offer a legal entity puts in front of a customer before a sales order exists.\n\nA quote is read three ways. GET crm/quotes lists quote headers, GET crm/quotes/:id reads one quote in full, and POST crm/quotes/search finds quotes by criteria a query string cannot carry and returns each match in full. The full quote adds subscriptions[] and nonRecurringProducts[], the priced lines, which GET crm/quotes omits. A quote has two identifiers: id, which every endpoint takes, and quoteNumber, the business number assigned by a number range, which may be absent on a quote read right after creation. A quote is written two ways. POST crm/quotes creates one with its whole line tree, and PATCH crm/quotes/:id changes its header fields and adds, changes or removes its subscriptions, products and lines. Both save through the same process as the quote page: a new quote starts in status 'created', an edit to a quote whose approval has started sends it back for approval, and a quote that is under signing, signed or completed can no longer be changed.","x-displayName":"Quotes"},{"name":"crmOpportunities","kind":"nav","parent":"CRM","description":"An opportunity is a prospective deal in the sales pipeline, tied to a customer or prospect and its quotes.","x-displayName":"Opportunities"},{"name":"crmOpportunityStages","kind":"nav","parent":"CRM","description":"The opportunity stages of a legal entity are the ordered steps its opportunities move through. Every opportunity sits in exactly one stage of its entity.","x-displayName":"Opportunity Stages"},{"name":"fixedAssets","kind":"nav","parent":"accounting","description":"Fixed assets are the assets a business capitalizes and depreciates. Depreciation policies set how they're depreciated, and depreciation schedules record each asset's depreciation. Recording depreciation creates journal entries in the general ledger.","x-displayName":"Fixed Assets"},{"name":"hrAbsenceTypes","kind":"nav","parent":"peopleManagement","description":"An absence type is a kind of leave, such as vacation, sick leave, or overtime.","x-displayName":"Absence Types"},{"name":"hrAbsences","kind":"nav","parent":"peopleManagement","description":"An absence is an employee's leave request over a date range.\n\nEach absence has an absence type. An absence's status shows where the leave request is in the approval process. Possible values: 'requested', 'approved', 'rejected', 'canceled'.","x-displayName":"Absences"},{"name":"hrApplicants","kind":"nav","parent":"peopleManagement","description":"An applicant is a person who applies to a recruitment.\n\nWhen you create an applicant with POST people/applicants, you also create their first application, so the request must include one.","x-displayName":"Applicants"},{"name":"hrApplications","kind":"nav","parent":"peopleManagement","description":"An application records that one person has applied to one recruitment.","x-displayName":"Applications"},{"name":"hrDepartments","kind":"nav","parent":"peopleManagement","description":"A department is a unit in the organization, and it can sit under a parent department in a hierarchy.","x-displayName":"Departments"},{"name":"hrDocumentCategories","kind":"nav","parent":"peopleManagement","description":"A document category is a kind of employee document, such as a work permit or an enrollment certificate.\n\nDocument categories are set up for the whole tenant and contain no personal data.","x-displayName":"Document Categories"},{"name":"hrDocuments","kind":"nav","parent":"peopleManagement","description":"An employee document is a file that belongs to one employee and is filed under one document category.\n\nYou have access only to your own documents and the documents of people you manage. An HR administrator has access to the documents of active employees in the legal entities they administer.","x-displayName":"Documents"},{"name":"hrEmployeeSkillAssignments","kind":"nav","parent":"peopleManagement","description":"An employee skill assignment states that an employee has a skill at a level, with an approval status.\n\nAn employee can hold several assignments of one skill over time. The current one is approved and has recordStatus Active; approving an assignment makes the employee's older approved assignment of that skill Inactive. Assignments are deleted permanently.","x-displayName":"Employee Skill Assignments"},{"name":"hrPeople","kind":"nav","parent":"peopleManagement","description":"The people in the People Management (HR) directory.\n\nEach person has an id and an employee number.","x-displayName":"People"},{"name":"hrPlanningPlanningContexts","kind":"nav","parent":"peopleManagement","description":"Reference data and caller capabilities for headcount planning.\n\nStart here before working with headcount plans. getPlanningContext returns, for one entity and fiscal year, the departments, positions, locations, employment categories, currencies and hiring managers a plan can reference, and what the caller's headcount planning role lets it do. searchPlanningReferences finds the identifiers other headcount planning endpoints take, one kind of reference at a time. Every identifier is a UUID.","x-displayName":"Headcount Planning Context"},{"name":"hrPositionSeniorities","kind":"nav","parent":"peopleManagement","description":"A position seniority is one step on the career ladder, for example Junior or Senior.\n\nLevel names are unique; levelOrder ranks the steps. A deleted level is deprecated, not removed, and can be reactivated.","x-displayName":"Position Seniorities"},{"name":"hrPositionSkillRequirements","kind":"nav","parent":"peopleManagement","description":"A position skill requirement states that a position needs a skill at a level, optionally from a minimum seniority and only in some SBO contexts.\n\nA position has at most one active requirement per skill. Requirements are deleted permanently.","x-displayName":"Position Skill Requirements"},{"name":"hrPositions","kind":"nav","parent":"peopleManagement","description":"A position is a role in the organization that people are hired into.\n\nEach position is tied to a job profile and a region.","x-displayName":"Positions"},{"name":"hrSboContextTypes","kind":"nav","parent":"peopleManagement","description":"An SBO context type is a dimension that scopes a skill requirement, for example 'department'.\n\nContext type names are unique. A type links to context values; deleting a type deletes its links and fails while a position skill requirement or team staffing requirement uses one. Values are managed on people/sbo-context-values.","x-displayName":"SBO Context Types"},{"name":"hrSboContextValues","kind":"nav","parent":"peopleManagement","description":"An SBO context value is one value a context type can take, for example 'Engineering'.\n\nContext values are unique. Link a value to a type through contextValueIds on people/sbo-context-types. Deleting a value deletes its links and fails while a position skill requirement or team staffing requirement uses one.","x-displayName":"SBO Context Values"},{"name":"hrSboContexts","kind":"nav","parent":"peopleManagement","description":"An SBO context links one context type to one context value.\n\nAn SBO context is one link of a context type to a context value. Position skill requirements reference it through sboContextIds. Read only: change links through contextValueIds on people/sbo-context-types.","x-displayName":"SBO Contexts"},{"name":"hrSkillCategories","kind":"nav","parent":"peopleManagement","description":"A skill category groups related skills. A skill can sit in many categories.\n\nCategory names are unique. A deleted category is deprecated, not removed, and can be reactivated. Skills join categories through categoryIds on people/skills.","x-displayName":"Skill Categories"},{"name":"hrSkillLevels","kind":"nav","parent":"peopleManagement","description":"A skill level is one step of proficiency in a skill, for example Beginner or Expert.\n\nLevel names are unique; skillLevelOrder ranks the steps. Skill levels are read-only over the API: they are configured on the Skill Levels page.","x-displayName":"Skill Levels"},{"name":"hrSkills","kind":"nav","parent":"peopleManagement","description":"A skill is one entry in the skill catalogue that employees hold and positions require.\n\nSkill names are unique. A deleted skill is deprecated, not removed, and can be reactivated.","x-displayName":"Skills"},{"name":"invDepreciationPolicies","kind":"nav","parent":"assetManagement","description":"A depreciation policy sets how fixed assets are depreciated in one accounting book.\n\nA policy covers one or more fixed asset types, such as machinery or vehicles. For each type, the policy has a depreciation rule. The rule sets the useful life for fixed assets of that type. The policy also sets a default depreciation method and period length. It sets the accounts that depreciation and disposal journal entries post to. These are the asset, accumulated depreciation, depreciation expense, gain, and loss accounts.\n\nEach book needs its own policies. A policy can be set up for several legal entities. For each fixed asset type, legal entity, and book, only one policy can be active.","x-displayName":"Depreciation Policies"},{"name":"invDepreciationSchedules","kind":"nav","parent":"fixedAssets","description":"A depreciation schedule is the plan for depreciating one fixed asset over its useful life.\n\nA schedule is created when a fixed asset is saved. It uses the useful life from the depreciation rule in the fixed asset's policy. A schedule has a line for each depreciation period, such as each month. Each line has the amount to depreciate and its date. Recording depreciation for the lines creates their journal entries and marks the lines as recorded.\n\nA fixed asset has one schedule or none. A fixed asset whose `depreciationMethod` is 'Bypassed' has no schedule.\n\nThe API returns schedules, not their lines. A schedule's `fixedAssetId` is a different kind of id from the `id` that the fixed asset endpoints use.\n\nIf an asset is recorded in more than one book, each of its fixed assets has its own schedule.","x-displayName":"Depreciation Schedules"},{"name":"invFixedAssetTypes","kind":"nav","parent":"assetManagement","description":"Fixed asset types: the master data a fixed asset is created from, carrying the depreciation defaults it inherits — read one, walk the collection with structured filters, create one, or change one.\n\nA fixed asset type is master data: the template a fixed asset is created from. It carries the depreciation defaults — above all `defaultUsefulLife` — that a new asset inherits, and it is what `typeId` on a fixed asset points at.\n\n**Two read routes, one item schema.** `GET fixed-asset-types/{id}` reads one type and `GET fixed-asset-types` walks the collection with filters in the query string. Both return the same fields — except `bookIds`, an array the collection cannot carry, which is on `GET fixed-asset-types/{id}` only — so a caller can move between them without remapping anything. There is no `POST .../search` on this resource: every field it publishes is a URL-safe scalar, so the collection route can already express every query, and adding a search body would duplicate the contract in two places.\n\n**Two write routes.** `POST fixed-asset-types` creates a type and returns its id; `PATCH fixed-asset-types/{id}` changes the fields you send. Every write input has the name and type `GET fixed-asset-types/{id}` returns, so what you read can be sent back. `bookIds` is the whole set of accounting books the type is in, at least one. Removing a book changes the depreciation policies of that book that have a rule for the type, so a PATCH that does so is refused with `BOOK_REMOVAL_AFFECTS_DEPRECIATION_POLICIES` unless it carries `confirmBookRemoval: true`. There is no delete.\n\n**`name` is filterable here, unlike on most resources.** An asset type name is a classification label chosen by whoever configures the module — 'Machinery', 'Vehicles' — not a person, a counterparty or physical property, so it is not identifying data that has to stay out of a query string. It is exact-match only; there is no free-text search on this resource.\n\n**The hierarchy is one level as published here.** `groupId` and `groupName` name the FixedAssetTypeGroup a type belongs to. That group may itself have a parent, and this API does not walk it — a caller needing the full tree reads the groups themselves.\n\n**`defaultUsefulLife` is a count of periods, not an amount and not a duration.** It is read together with the depreciation interval on the asset that inherits it; the number alone does not say whether it means months or years.\n\n**Inactive types are returned by both routes.** `active` is on every response and filterable on the collection: a type is deactivated rather than deleted once assets reference it, and an integration reconciling historical assets still has to resolve the type they point at. Filter `active` when populating a picker.\n\n**Incremental sync** is `filter[lastModifiedDate][gte]=…&sort=lastModifiedDate` on the collection. It tracks the FixedAssetType row only: renaming the group a type belongs to does not move it.\n\nEvery request carries an `Api-Version` header — `v1` — alongside the bearer token. It is required, with no default: a missing or empty header, or one naming a version this company does not have, is answered with 400; a route that exists but not in the requested version is answered with 404.\n\nOne thing to know before writing error handling: a business failure such as `NOT_FOUND` arrives under HTTP 400, not 404, because a route cannot yet declare a status per diagnostic code. Branch on the `code` in the error body.","x-displayName":"Fixed Asset Types"},{"name":"invFixedAssets","kind":"nav","parent":"assetManagement","description":"Fixed assets are the accounting records of the assets a legal entity capitalizes and depreciates.\n\nSome fields describe the asset itself rather than its accounting. They are `name`, `assetStatus`, `assetNumber`, `serialNumber`, `assetTag`, `acquisitionDate`, `departmentId`, and `businessUnitId`. The legal entity that owns the asset, `entityId`, is stored with it too.\n\nImported fixed assets can already be partly depreciated, for example when assets are moved from another system. For these, `depreciationStartValueAmount` is the value that depreciation continues from, and `initialDepreciatedAmount` is the depreciation from before the import.\n\nA company can keep more than one set of books, for example one for local accounting rules and one for group reporting. Each fixed asset belongs to one book, because each book can depreciate the same asset differently. So an asset recorded in both books has two fixed asset records, one in each. For example, a forklift might be depreciated over eight years in the local book and over five years in the group book. Its two fixed assets have different depreciation, but the same `companyAssetId`, name, serial number, and the other fields that describe the asset itself. To find all the fixed assets for one asset, filter `GET fixed-assets` on `companyAssetId`. In Lensing, the fixed assets list shows one book at a time. The API returns the fixed assets of every book together, unless you filter on `bookId`.\n\nA fixed asset is registered from what recorded its acquisition. GET unscheduled-fixed-assets lists what can be registered for a legal entity and book: posted journal entry lines on asset accounts that no fixed asset holds yet, and draft fixed assets saved in Lensing. POST fixed-assets registers one of them, and the fixed asset's `sources` name the journal entry lines it came from. There is no way to create a fixed asset without a source.","x-displayName":"Fixed Assets"},{"name":"invUnscheduledFixedAssets","kind":"nav","parent":"assetManagement","description":"Unscheduled fixed assets are what a fixed asset can be registered from: posted journal entry lines on asset accounts that no fixed asset holds yet, and draft fixed assets.\n\nThe unscheduled fixed assets are what the Unscheduled tab of the fixed assets page shows in Lensing. Each one is a row that POST fixed-assets can register a fixed asset from, and it leaves this collection once a fixed asset is registered from it.\n\nThere are two kinds of row. A row of kind 'journalEntryLine' is a posted, approved, not reversed line of a Bank Entry, Credit Card Entry, Expense, Manual journal entry or Vendor Bill, on an asset account of a depreciation policy of its book, that no fixed asset holds in that book and that was not rejected or part of a disposed asset. A row of kind 'draft' is a draft fixed asset, saved, split or combined on the tab and not yet published.\n\nThe collection exists per legal entity and accounting book: filter `entityId` and `bookId` on GET unscheduled-fixed-assets, or scope POST unscheduled-fixed-assets/search with them.\n\n`allowedTypeCount` and `defaultTypeId` say whether POST fixed-assets needs a typeId: when defaultTypeId is present you can leave typeId out. The types themselves, with their policy terms, are in `allowedTypes` on GET unscheduled-fixed-assets/:id and POST unscheduled-fixed-assets/search. A draft also carries the values saved on it (typeId, inServiceDate, the depreciation terms, serialNumber, assetTag, departmentId, businessUnitId), which registering it keeps unless you send others.\n\n`lastModifiedDate` is when the row last changed: the journal entry line's, or for a draft the later of its fixed asset's and its asset's. Edits made to a draft on the Unscheduled tab move it.\n\nEvery request carries an `Api-Version` header, `v1`, alongside the bearer token. It is required, with no default: a missing or empty header, or one that names no published version, is answered with 400; a route that does not exist in the version it names is answered with 404. A business failure such as `NOT_FOUND` arrives under HTTP 400; branch on the `code` in the error body.","x-displayName":"Unscheduled Fixed Assets"},{"name":"inventory","kind":"nav","description":"Inventory: items and the units, warehouses, documents and stock movements that make up inventory management.\n\nItems are the master data. Warehouses, bins and stock levels record where inventory sits, the receipt, shipment and transfer documents move it, and the increase, decrease, transaction and revaluation records account for every change.","x-displayName":"Inventory"},{"name":"inventoryAccountDeterminationRules","kind":"nav","parent":"inventory","description":"An account determination rule tells an inventory document's journal entry which general ledger accounts to use.\n\nWhen an inventory document such as a receipt, shipment, or inventory increase is committed, a journal entry is created for it. Account determination rules decide which general ledger accounts that journal entry uses. Each rule has two parts: the situations it applies to, and the accounts to use in them.\n\nThe situations are described by dimensions. A dimension is something a rule can check about the line being recorded: its legal entity, the accounting book the journal entry is for, the item's type and category, the warehouse location, and the transaction type. Every new rule must have a legal entity and an accounting book. If a rule has no value for one of the other dimensions, it applies to every value of that dimension. For example, a rule with no warehouse location applies to every location.\n\nA line that has no value for a dimension matches only rules that leave that dimension empty. For example, a vendor bill line has no location, so only rules with no location apply to it.\n\nWithin a legal entity, no two rules (including inactive ones) can have the same combination of transaction type, item type, item category, and location.\n\nLeaving dimensions empty lets you start with general rules and add more specific ones where you need different accounts. When several rules match, the most specific one is used. The dimensions count in this order, from most to least:\n\n1. Item type\n2. Item category. A rule for a parent category also matches items in the categories below it, but a rule for the item's own category counts for more.\n3. Warehouse location\n4. Accounting book\n5. Transaction type\n\nWhen two matching rules are equally specific, the one with the lower priority number wins.\n\nFor example, a general rule for 'SHIPMENT' uses cost of goods sold account 5010, and a beverages rule for 'SHIPMENT' and the item category Beverages uses account 5010-BEV. A shipment of a beverage uses the beverages rule, because it is more specific. Every other shipment uses the general rule.\n\nHave a general rule for each combination of legal entity and accounting book: a rule with no item type, item category, or location. Some lines depend on it. For example, a receipt line with no item, such as a service entered only as a description, takes its services-received-not-invoiced account from the general rule. If there is no general rule with that account, the journal entry for the receipt cannot be created.\n\nSome documents can name their own account for part of the journal entry. That account is then used instead of the rule's account:\n\n- An inventory increase or decrease created by manufacturing can have its own offset account, which is used instead of the inventory adjustment gain or loss account.\n- A receipt line for a service or expense entered in the application can have its own account, which is used instead of the expense account.\n- An inventory revaluation with the `costingValuationType` 'directCostCapitalisation' uses its `capitalisationExpenseAccountId` instead of the revaluation gain or loss account.\n\nSix of the accounts can be replaced by a different account when the document line has a reason code: inventory adjustment gain and loss, sales return, goods returned not credited, and purchase return variance gain and loss. These are the rule's reason-code overrides. For example, stock written off as damaged can go to a separate loss account. Reason codes themselves are created and changed with the inventory/reason-codes endpoints.","x-displayName":"Account Determination Rules"},{"name":"inventoryBatchNumbers","kind":"nav","parent":"inventory","description":"A batch number identifies stock of one item that shares an expiry date, a cost, and a quality-control status.\n\nA batch is a quantity of one item, in one warehouse, that shares one batch number. The same batch number on another item or in another warehouse is a separate batch.\n\nBatches are created by these documents:\n\n- A receipt or inventory increase, when it is saved with a batch number that the item does not yet have in that warehouse. The batch's `quantity` stays 0 until the document is committed. A later receipt or inventory increase with the same batch number, item, and warehouse adds to the same batch.\n- An inventory count, when it is saved with a batch number that the item does not yet have in that warehouse. The batch's `quantity` stays 0 until the inventory increase that the count creates for a surplus is committed.\n- A production order, for what it produces, when the order is released.\n- A warehouse transfer, when it is committed, if the receiving warehouse does not already have a batch with that number for the item. The new batch has the same number. Between legal entities, the new batch's cost is the transfer price, not the cost the stock had in the sending warehouse. The transfer price is the transfer line's total in the receiving legal entity's functional currency, divided by the line's quantity in the item's stocking unit.\n\nBatches cannot be deleted. To take a batch out of use, change its `batchStatus` or set `active` to false with PATCH inventory/batch-numbers/:id. You cannot change a batch's `quantity`, `inStock`, `cost`, `originalCost`, or `locationId` with PATCH. Documents that move or revalue stock, such as receipts, shipments, warehouse transfers, and inventory revaluations, change these fields.\n\nA batch is blocked while any of these apply:\n\n- Its `batchStatus` is 'QUARANTINED', 'EXPIRED', or 'DISPOSED'.\n- Its `qcStatus` has a value other than 'PASS'.\n- Its `temperatureBreach` is true.\n\nThe application does not offer a blocked batch for picking, or a batch whose `active` is false. Committing a shipment with POST inventory/shipments/:id/commit fails if a line names a blocked batch. Inventory decreases, warehouse transfers, and purchase returns do not check these values. The stock stays in inventory either way, and a past `expirationDate` alone does not block a batch.","x-displayName":"Batch Numbers"},{"name":"inventoryBatchTransactions","kind":"nav","parent":"inventory","description":"A batch transaction records a quantity of one batch moving into or out of stock, or a change to the batch's cost.\n\nDocuments that change the stock or cost of a batch create batch transactions. To record a stock movement, create and commit the document that moves the stock. To undo a stock movement, cancel the document that recorded it.\n\nEach batch transaction belongs to an inventory transaction, which has the item, warehouse, date, and type of document line. An inventory transaction can have several batch transactions.\n\nA batch transaction records one of these:\n\n- Stock of the batch coming in or going out.\n- An inventory revaluation, which changes the batch's cost without moving stock.\n- A change to the cost of units of the batch that were already sold. This kind has no `inQuantity`, `outQuantity`, `cost`, `valueDelta`, or `currency`.\n\nBatch transactions do not include a breakdown by bin.","x-displayName":"Batch Transactions"},{"name":"inventoryBins","kind":"nav","parent":"inventory","description":"A bin is a place inside a warehouse where stock is kept, such as an aisle, a rack, or a shelf level.\n\nReceipts, shipments, and put-aways record which bin each movement used.\n\nbinCode and barcode are unique within the tenant, not only within one warehouse. A weight or volume limit must be sent with its unit.","x-displayName":"Bins"},{"name":"inventoryInventoryDecreases","kind":"nav","parent":"inventory","description":"An inventory decrease is an adjustment document that removes stock without a sale, such as after breakage, shrinkage, a write-off, or a count that found less stock.\n\nAn inventory decrease is created as a draft and moves no stock until it's committed. A draft can be changed or deleted. A committed inventory decrease can't, and no endpoint cancels it.\n\nOne warehouse location applies to the whole document, and every line takes its stock from that location.\n\nA line can name only batch numbers and serial numbers that its item already has. Name each one by its number or its id. A number is matched against the batch numbers or serial numbers of the line's item. On an updateLines item, a number is matched only when the item also sends itemId, so otherwise name the batch or serial by its id. An unknown number or id returns UNKNOWN_TRACKING_NUMBER.","x-displayName":"Inventory Decreases"},{"name":"inventoryInventoryIncreases","kind":"nav","parent":"inventory","description":"An inventory increase is an adjustment document that adds stock without a purchase, such as a found pallet, an opening balance, or a count that found more stock.\n\nAn inventory increase is created as a draft and adds no stock until it's committed. A draft can be changed or deleted. A committed inventory increase can't, and no endpoint cancels it.\n\nOne warehouse applies to every line of an inventory increase. A line for a batch-tracked item needs batches that add up to the line's quantity. A line for a serialized item needs one serials item per unit, and a line in a bin-tracked warehouse needs binLocations.\n\nbinLocations is one list per line, and each of its items can name the batchNumber or serialNumber it belongs to. A batch number or serial number that the item doesn't have yet is created. Every amount is in the legal entity's functional currency.","x-displayName":"Inventory Increases"},{"name":"inventoryInventoryLevels","kind":"nav","parent":"inventory","description":"An inventory level is the stock of one item at one location. It shows the quantities in stock, available, reserved, and in transit, and their value.\n\nStock movements such as receipts, shipments, counts, and adjustments update each inventory level, and allocations and reservations update its allocated and reserved quantities. There is no endpoint to create, change, or delete a level. To change the stock in a level, commit the document that moves the stock.\n\nA level can exist before any stock has moved, for example when replenishment settings are saved for the item at that location. No level means nothing has been recorded for that item at that location.","x-displayName":"Inventory Levels"},{"name":"inventoryInventoryRevaluations","kind":"nav","parent":"inventory","description":"An inventory revaluation changes the value of stock without changing its quantity.\n\nA revaluation can also add a cost to stock after the stock was received.\n\nA revaluation is created as a draft and changes no value until it's committed. Only a draft can be changed or deleted.\n\nEvery amount on a revaluation is in the legal entity's functional currency.","x-displayName":"Inventory Revaluations"},{"name":"inventoryInventoryTransactions","kind":"nav","parent":"inventory","description":"An inventory transaction records stock of one item coming into or going out of a warehouse. It can also record a change in the value of that stock without any stock moving, such as an inventory revaluation or a landed cost.\n\nDocuments create inventory transactions when they move stock or change the value of stock. These documents include receipts, shipments, sales returns, purchase returns, warehouse transfers, inventory increases, inventory decreases, and inventory revaluations. To record a stock movement, create and commit the document that moves the stock.\n\nTo undo a stock movement, cancel the document that recorded it. Canceling does not delete the document's inventory transactions. Instead, the cancellation creates a new inventory transaction for each one, moving the same quantity in the opposite direction, with `inQuantity` and `outQuantity` swapped. The new inventory transactions are dated with the cancellation date, so the original ones keep their dates.\n\nEach batch transaction and serial transaction belongs to one inventory transaction, and its `transactionId` is the `id` of that inventory transaction. One inventory transaction can have several batch transactions or serial transactions.\n\nTo see how much of an item is in stock now, use GET inventory/inventory-levels.","x-displayName":"Inventory Transactions"},{"name":"inventoryItemAttributeDefinitions","kind":"nav","parent":"inventory","description":"An item attribute definition is a descriptive property a tenant defines for itself — Colour, Size, Material — together with the values it allows.\n\nAn attribute definition names something you want to describe items by, and owns the values it permits. 'Colour' with Red, Green and Blue is one definition and three values.\n\nThis is what inventory/item-attributes assigns. An item cannot be tagged with an attribute that does not exist, so a tenant setting Everest up by API creates its attributes here first and assigns them afterwards.\n\nvalueType is TEXT or NUMBER and it is a promise about the values: a NUMBER attribute refuses a value that is not a number, because the node stores every value as text and nothing further down would notice.\n\nName is unique within the tenant. Creating or renaming onto a name that already exists fails with DUPLICATE_NAME rather than producing a second attribute nothing can tell apart.\n\nDeleting an attribute that items still carry fails with IN_USE — its assignments would be left pointing at nothing. Remove those first.","x-displayName":"Item Attribute Definitions"},{"name":"inventoryItemAttributes","kind":"nav","parent":"inventory","description":"An item attribute is one descriptive tag on an item — the attribute that was chosen, such as Colour, and the value it was given, such as Red.\n\nItem attributes describe an item in terms a tenant defines for itself. An attribute definition names the thing being described ('Colour') and owns the values it allows ('Red', 'Green'); an item attribute is one item carrying one of those values.\n\nThis is a resource of its own rather than a field on the item. An item is a flat record of scalars and every scalar GET inventory/items/:id returns is also on its list row, so a nested collection there would be the first exception to that shape. inventory/inventory-levels is the same arrangement: a child of an item, published flat and scoped with an itemId filter.\n\nA value belongs to exactly one attribute. Assigning Colour's 'Red' under a Size attribute fails with VALUE_MISMATCH rather than storing a link nothing can render.\n\nNothing constrains an item to one value per attribute, so reading an item's attributes may legitimately return the same attribute more than once. Changing an assignment is a delete followed by a create — an assignment is only the item, the attribute and the value, so there is nothing else in it to patch.","x-displayName":"Item Attributes"},{"name":"inventoryItemCategories","kind":"nav","parent":"inventory","description":"An item category is a group of similar items. Categories can contain other categories.\n\nItem categories are used for reporting, replenishment, and analytics.\n\nEvery item belongs to exactly one item category.\n\nparentId places a category under its parent. Moving a category with PATCH inventory/item-categories/:id can't make the tree deeper than 6 levels. Filtering items by a category with POST inventory/items/search includes every category beneath it. Moving a category to a new parent also moves every category beneath it, and no item changes.\n\nNo endpoint searches categories by free text.","x-displayName":"Item Categories"},{"name":"inventoryItemTypes","kind":"nav","parent":"inventory","description":"An item type classifies items and decides whether items of that type may be kept in stock.\n\nstockable decides whether items of the type may be kept in stock. Under a non-stockable type, an item must have isInventory set to false. procurable records whether items of the type are meant to be bought, and purchase documents don't check it. Every item has one item type and can't change it.\n\nThere is no endpoint to create, change, or delete an item type.","x-displayName":"Item Types"},{"name":"inventoryItems","kind":"nav","parent":"inventory","description":"An item is something you stock, sell, or buy.\n\nInventory documents refer to items. A receipt brings items in, a shipment sends them out, an inventory level is the stock of one item at one location, and a landed cost spreads a charge over the items on a receipt.\n\nitemCode is unique within the tenant. An item's valuation method must match its tracking: 'batch' requires isBatch, and 'serials' requires isSerial.","x-displayName":"Items"},{"name":"inventoryLandedCostItems","kind":"nav","parent":"inventory","description":"A landed cost item decides which vendor bill charges, such as freight, duty, insurance, and handling, can be added to the value of received stock (capitalized), and how each charge is spread over the receipt lines.\n\nA landed cost item is a setting, not a line of a landed cost or an item in your stock. It decides which vendor bill charges count as landed costs and how they are handled. You set it up once, not for each shipment. To stop a landed cost item from matching vendor bill lines, set its `active` to false or delete it.\n\nEach landed cost item says:\n\n- Which vendor bill lines it covers: lines whose item matches its `itemId`, such as a freight service item, or whose general ledger account matches its `accountId`, such as a freight expense account.\n- How to spread (allocate) the charges over the receipt lines, in `allocationMode`.\n- Which costing element type the inventory revaluations get when a landed cost is committed, in `costingElementTypeId`.\n\n`allocationMode` can be:\n\n- 'Equal': evenly per line.\n- 'Quantity': by the quantity received.\n- 'LineTotal': by what the goods cost.\n- 'Weight': by weight. Every selected receipt line's item needs a gross weight, weight, or net weight. When an item has more than one, the gross weight is used, then the weight, then the net weight.\n- 'Volume': by volume. Every selected receipt line's item needs a volume per unit, or every one needs a length, width, and height.\n\nCreating or updating a landed cost fails when a selected receipt line's item is missing what its allocation mode needs. A value of zero or less counts as missing. 'Volume' uses one kind of volume for all the items: either every item has a volume per unit, or every item has a length, width, and height. For example, the request fails when one item records only a volume per unit and another records only its length, width, and height. Before the charge is spread, weights and volumes are converted to one unit. Each item's weight is converted to kilograms with its `weightUnit`, and each volume per unit to cubic metres with its `volumeUnit`. So an item weighed in pounds and an item weighed in kilograms are compared by their real weight. If an item's `weightUnit` is empty, its weight is read as kilograms. If its `volumeUnit` is empty, its volume per unit is read as cubic metres. Length, width, and height have no unit field, so they are multiplied as recorded. Record them in the same unit, such as centimetres, on every item, or the charge is spread incorrectly. See `weightUnit` and `volumeUnit` on GET inventory/items/:id (getItem).\n\nFor example, a landed cost item for freight covers the freight expense account and spreads by 'Weight'. When a freight bill is approved, its line appears on GET inventory/landed-costs/vendor-bill-lines with 'Weight' as its `allocationMode`. You add the line to a landed cost. When you commit the landed cost, its inventory revaluation gets the freight costing element type.\n\nA charge sent to POST inventory/landed-costs without `allocationMode` also uses the mode set here. When both a landed cost item for the line's item and one for its account match, the one for the item wins. Only a line that no active landed cost item matches falls back to the item's own default allocation mode, or 'Equal'. On PATCH inventory/landed-costs/:id, a charge already on the landed cost keeps its stored mode.","x-displayName":"Landed Cost Items"},{"name":"inventoryLandedCosts","kind":"nav","parent":"inventory","description":"A landed cost adds the extra costs of getting stock to you, such as freight, customs duty, insurance, and handling, to the value of that stock. The charges come from approved vendor bills, and the stock from committed receipts.\n\nStock comes in on a receipt at its purchase price, and the extra costs are often billed later, on separate vendor bills. A landed cost spreads (allocates) those charges over the lines of committed receipts, so the stock's value includes them. The quantity of the stock does not change. Landed cost items decide which vendor bill lines a landed cost can use.\n\nA landed cost is created as a draft. A draft can be changed or deleted, and its allocation shows how the charges are spread. Committing the landed cost raises the cost of the units still in stock by their share of the charges. For units already sold, their share goes to their after-sale cost instead. The commit does this through inventory revaluations, which it creates and commits. A committed landed cost cannot be changed or deleted, and it has no cancel action.\n\nEvery amount on a landed cost is in the functional currency of its legal entity, and is not converted.","x-displayName":"Landed Costs"},{"name":"inventoryPurchaseReturns","kind":"nav","parent":"inventory","description":"A purchase return sends goods you received back to the vendor, for example because they were damaged, wrong, or more than you ordered. It is the opposite of a sales return.\n\nA purchase return records goods you received that you send back to the vendor. Each line takes a quantity of one item out of one warehouse. A line can name the receipt line or the purchase order line it draws on: the line the goods were originally received or ordered on. The returned quantity counts against what is still returnable on that line. You can create a purchase return from scratch, or from a purchase order with POST inventory/purchase-returns/from-purchase-order.\n\nA purchase return goes through these steps:\n\n- It is created with the `documentStatus` 'DRAFT'. Stock does not change.\n- Approving it sets 'APPROVED'. Stock does not change.\n- Shipping it sets 'COMMITTED'. The stock leaves the warehouse, the returned quantity is recorded on the receipt lines, and a journal entry is created in the general ledger. Shipping a purchase return does not create a shipment.\n- Canceling it sets 'CANCELLED' and puts the stock back in the warehouse.\n\nThe statuses 'PREPARED', 'SHIPPED', 'VENDOR_ACKNOWLEDGED', 'CREDITED', and 'COMPLETED' are set in the application.\n\nA purchase return does not create batches or serial numbers. A line for a batch-tracked or serialized item names the batches or serialized units that already exist. Purchase returns do not check a batch's `batchStatus`, `qcStatus`, or `temperatureBreach`.","x-displayName":"Purchase Returns"},{"name":"inventoryReasonCodes","kind":"nav","parent":"inventory","description":"A reason code explains why a manual inventory adjustment or return happened.\n\nInventory increases, inventory decreases, inventory revaluations, purchase returns, and sales returns name a reason code. Each reason code is linked to the document types it can be selected on: 'InventoryIncrease', 'InventoryDecrease', 'SalesReturn', 'PurchaseReturn', and 'Disposal'.","x-displayName":"Reason Codes"},{"name":"inventoryReceipts","kind":"nav","parent":"inventory","description":"A receipt records goods or services that arrive from a vendor.\n\nThe vendor bill is matched against the receipt later. The Reference API has no endpoint for that matching.\n\nEach line has a lineType: Inventory, Service, or Expense. An Inventory line needs an item, a unit, a warehouse, and a quantity. A Service or Expense line needs a description, an amount, and a general ledger account, and has no item or warehouse.\n\nEvery amount is in the vendor's currency, which can differ from the legal entity's functional currency. Each line also has functionalUnitPrice and functionalLineTotal in the functional currency.","x-displayName":"Receipts"},{"name":"inventorySalesReturns","kind":"nav","parent":"inventory","description":"A sales return records goods that a customer sends back.\n\nA sales return is created as a draft. Committing it brings the goods back into stock and sets documentStatus to 'RECEIVED'. No other step of a return's workflow has an endpoint, and documentStatus can't be set directly.\n\nEach line says what came back and where it goes. condition and disposition describe the goods. sourceDocumentLineId is the shipment line the goods went out on, from a line's id on GET inventory/shipments/:id. With it, the commit values the return at the original shipment cost.\n\nA return is valued in the currency it was sold in, which can differ from the legal entity's functional currency.","x-displayName":"Sales Returns"},{"name":"inventorySerialNumbers","kind":"nav","parent":"inventory","description":"A serial number identifies one physical unit of an item and records its stock and cost.\n\nA serial number record is one unit of an item, identified by its serial number.\n\nSerial number records are created by these documents:\n\n- A receipt or inventory increase, when it is saved with a new serial number. The serial number record's `inStock` is 0 until the document is committed.\n- An inventory count, when it records a unit that has no serial number record.\n- A production order, for the units it produces, when the order is released.\n- A warehouse transfer between legal entities, in the receiving legal entity. The serial number record in the sending legal entity is kept. The unit comes into the receiving legal entity at the transfer price. The transfer price is the transfer line's total in the receiving legal entity's functional currency, divided by the line's quantity in the item's stocking unit.\n\nA serial number record is not deleted when its unit leaves stock. After a shipment, for example, the serial number record has `inStock` 0 and `isSold` true.\n\nIf the unit comes back later, the same serial number record is used again. What happens to its cost depends on how the unit comes back:\n\n- Returned: a customer sends the unit back on a sales return, or you cancel the shipment. The unit's `originalCost` does not change. A sales return also sets `isSold` back to false.\n- Received as new stock: you buy the unit back on a receipt, for example as a trade-in, or you find a unit you wrote off and add it back with an inventory increase. The unit's `originalCost` is set to the cost on that document, `afterSaleCost` is cleared, and `isSold` becomes false.\n\nSerial number records cannot be deleted. To take a unit out of use, set `active` to false with PATCH inventory/serial-numbers/:id. You cannot change a unit's `cost`, `originalCost`, `afterSaleCost`, `inStock`, `isSold`, or `locationId` with PATCH. Documents that move or revalue stock, such as receipts, shipments, warehouse transfers, and inventory revaluations, change these fields.\n\nIn the application, a unit whose `active` is false is not offered for picking. Documents created through the API do not check `active`, so check it yourself before you name a unit on a shipment or other outbound document.\n\nA unit has its own `cost` and `originalCost` only when its item's `valuationMethod` is 'serials'. See `valuationMethod` on GET inventory/items/:id (getItem).","x-displayName":"Serial Numbers"},{"name":"inventorySerialTransactions","kind":"nav","parent":"inventory","description":"A serial transaction records one serialized unit moving into or out of stock, or a change to the unit's cost.\n\nDocuments that change the stock or cost of a serialized unit create serial transactions. To record a stock movement, create and commit the document that moves the stock. To undo a stock movement, cancel the document that recorded it.\n\nEach serial transaction belongs to an inventory transaction, which has the item, warehouse, date, and type of document line. An inventory transaction can have several serial transactions, one for each unit.\n\nA serial transaction records one of these:\n\n- The unit coming into stock or going out.\n- A change to the unit's cost without stock moving, such as an inventory revaluation.\n\nThe item, warehouse, and date are those of the inventory transaction. They do not show where the unit is now. To see where a unit is now, use GET inventory/serial-numbers/:id.","x-displayName":"Serial Transactions"},{"name":"inventoryShipmentCarriers","kind":"nav","parent":"inventory","description":"A shipment carrier is the freight or delivery company named on an outbound shipment.\n\nCarrier names aren't unique, so use id to identify a carrier.","x-displayName":"Shipment Carriers"},{"name":"inventoryShipments","kind":"nav","parent":"inventory","description":"A shipment records goods going out to a customer. You create it as a draft, then commit it to send the goods and record the cost of sale in a journal entry.\n\nThrough this API, a shipment is 'DRAFT' until it's committed, and 'DELIVERED' after. The packing process can set it to 'PACKED' before it's committed.\n\nOther parts of the application, such as invoicing, sales returns, and cancellation, can set documentStatus to 'SHIPPED', 'PARTIALLY_SHIPPED', 'COMMITTED', 'COMPLETED', 'CANCELLED', 'INVOICED', 'PARTIALLY_INVOICED', 'RETURNED', or 'PARTIALLY_RETURNED'. No endpoint on this page sets these statuses.","x-displayName":"Shipments"},{"name":"inventoryUnitOfMeasureGroups","kind":"nav","parent":"inventory","description":"A unit of measure group is a set of units of measure that convert to one base unit of measure.\n\nA group has a conversion line for each of its units of measure, giving the number of base units in one of that unit. The base unit's own line has a factor of 1. For example, a group based on 'EA' might have 'BOX' at 12 and 'PALLET' at 480.\n\nItems are assigned to a group, and an item's inventory, sales, and purchase units must be units in that group.","x-displayName":"Unit of Measure Groups"},{"name":"inventoryUnitOfMeasures","kind":"nav","parent":"inventory","description":"A unit of measure is a unit that items are stocked, purchased, and sold in, with a code and a display name, such as 'KG' for 'Kilogram'.\n\nItems and the lines of unit of measure groups refer to units of measure. A unit of measure group converts between the units of measure in it.","x-displayName":"Units of Measure"},{"name":"inventoryWarehouseTransferOrders","kind":"nav","parent":"inventory","description":"A warehouse transfer order is a request to move a quantity of items from one warehouse to another.\n\nA transfer order moves nothing itself. Converting the order creates a draft warehouse transfer, and the stock moves when that transfer is committed. On this resource, commit means converting the order.\n\nAn order's status comes from its lines, and no endpoint sets it directly. 'DRAFT' is a new order, 'IN_TRANSFER' has an uncommitted transfer, 'PARTIALLY_PROCESSED' still has open quantity after a transfer, and 'PROCESSED' has nothing open. Canceling a transfer in Lensing returns its quantity to the order and reopens the order. This API has no endpoint to cancel a transfer.\n\nAn order has quantities but no amounts. The warehouse transfer values the stock.","x-displayName":"Warehouse Transfer Orders"},{"name":"inventoryWarehouseTransfers","kind":"nav","parent":"inventory","description":"A warehouse transfer is a document that moves stock from one warehouse to another, within one legal entity or between two.\n\nA transfer starts as a draft, which moves nothing and can be changed or deleted. Committing the transfer moves the goods from the source warehouse to the target warehouse and creates a journal entry. A committed transfer can't be changed or deleted, and there is no endpoint to cancel one.\n\nAn intercompany transfer, with transferType 'INTERCOMPANY', sells the goods from one legal entity to another. The intercompany bill is created separately, after the commit, and billing can't be undone. billingStatus shows whether a transfer has been billed.\n\nOn each line, a batch-tracked item needs batches that add up to the line's quantity, and a serialized item needs one serial number per unit. Each bin location on a line names both the source bin and the target bin, and the batch or serial number the bin location belongs to, when there is one.","x-displayName":"Warehouse Transfers"},{"name":"inventoryWarehouses","kind":"nav","parent":"inventory","description":"A warehouse is a stocking location where a legal entity keeps inventory.\n\nStock records, bins, inventory transactions, inventory counts, and allocations each belong to a warehouse. A warehouse's locationCode is unique within the tenant.\n\nTo retire a warehouse, set isActive to false. Inventory transactions and other records that refer to a retired warehouse are kept.","x-displayName":"Warehouses"},{"name":"peopleManagement","kind":"nav","description":"Records for managing the workforce: people and their teams, positions, absences and absence types, employee documents and their categories, and the hiring pipeline of recruitments, applicants, and applications.","x-displayName":"People Management"},{"name":"peopleRecruitments","kind":"nav","parent":"peopleManagement","description":"A recruitment is one job opening.\n\nA recruitment belongs to a department, a position, or both. A recruitment can also name a team, a work location, an employment category, and the legal entity that will employ the hire. A hiring manager and a recruitment owner run each recruitment.\n\nThree fields are set for you, and a request can't change them. status comes from the deadline, published changes when the recruitment is published externally, and recruitmentNumber comes from a number range.","x-displayName":"Recruitments"},{"name":"peopleTeams","kind":"nav","parent":"peopleManagement","description":"A team is a named group in the organization, placed in a hierarchy of parent and child teams.\n\nA team has a name, a type, a lifespan, and an optional parent team. Its status comes from its start and end dates, and no endpoint sets it directly. A new team's name must be unique.\n\nA team's members are separate records. There is no endpoint to add or remove a team's members.","x-displayName":"Teams"},{"name":"psa-activities","kind":"nav","parent":"PSA","description":"An activity is a task on a PSA project.\n\nEach activity has its own billing, budget, dates, and status. You can create, change, and delete activities, and assign or unassign their members. Every write checks only the activities in the request, before anything is written, and reports each problem with its own error code. Copying activities between projects is not available.","x-displayName":"Activities"},{"name":"psa-allocations","kind":"nav","parent":"PSA","description":"An allocation is planned hours for a team member or placeholder on an activity over a date range.\n\nEach allocation's planned hours are spread over its working days as daily entries. Some errors from creating, updating, or deleting allocations are generic errors without a named code.","x-displayName":"Allocations"},{"name":"psa-expenses","kind":"nav","parent":"PSA","description":"An expense is a cost recorded on a PSA project and can be assigned to one of the project's expense budgets.\n\nYou can read expenses but not change them: there is no endpoint to create, change, or delete an expense or an expense budget, or to assign an expense to an expense budget.","x-displayName":"Expenses"},{"name":"psa-fixed-fees","kind":"nav","parent":"PSA","description":"A fixed fee is a billable amount on a PSA project, billed once or on a recurring schedule.\n\nYou can list, get, create and update fixed fees. There is no endpoint to delete a fixed fee.","x-displayName":"Fixed Fees"},{"name":"psa-milestones","kind":"nav","parent":"PSA","description":"A milestone is a billable checkpoint on a PSA project, with its own amount, due date, and status.\n\nYou can read, create, and update milestones. You can't delete or invoice a milestone, or set its status to invoiced: invoicing sets that status. An invoiced milestone can't be changed. Create and update apply the same rules as the project's Milestones tab, and each broken rule is reported with its own error code.","x-displayName":"Milestones"},{"name":"psa-placeholders","kind":"nav","parent":"PSA","description":"A placeholder is a stand-in for a person, used to plan the staffing of PSA projects before a real person is assigned.\n\nPlaceholder names are unique within the tenant. A placeholder is not tied to one PSA project. Add a placeholder to a project's team with POST psa/team-members/bulk, and replace it with a person with POST psa/team-members/assign-placeholder.","x-displayName":"Placeholders"},{"name":"psa-positions","kind":"nav","parent":"PSA","description":"A position is a billable role on a PSA project, with its own bill rate, cost rate, and budgeted hours.\n\nA position can refer to a People Management position, which is a separate record. Positions can be created and updated; there is no endpoint to delete or copy a position. Create and update check every request against the same rules as the Roles tab and report each problem with its own error code.","x-displayName":"Positions"},{"name":"psa-project-costs","kind":"nav","parent":"PSA","description":"A project cost is one dated cost amount on a PSA project: employee time at cost rate (actual from time entries, planned from allocations) or an expense.\n\nProject Costs are read-only and computed: each row is derived from time entries, allocations and other PSA records, so a row has no identifier of its own and there is no endpoint to fetch, create, change or delete one. Every identifier on a row is the referenced record's UUID.","x-displayName":"Project Costs"},{"name":"psa-project-revenues","kind":"nav","parent":"PSA","description":"A project revenue is one dated revenue amount on a PSA project: time-and-materials hours, milestones, fixed fees or rebilled expenses, actual or planned.\n\nProject Revenues are read-only and computed: each row is derived from time entries, allocations and other PSA records, so a row has no identifier of its own and there is no endpoint to fetch, create, change or delete one. Every identifier on a row is the referenced record's UUID.","x-displayName":"Project Revenues"},{"name":"psa-project-types","kind":"nav","parent":"PSA","description":"A project type is a label that categorizes PSA projects.\n\nProject type names are unique within the tenant.","x-displayName":"Project Types"},{"name":"psa-projects","kind":"nav","parent":"PSA","description":"A PSA project is a professional services engagement that a team plans, staffs, and budgets.\n\n","x-displayName":"Projects"},{"name":"psa-team-members","kind":"nav","parent":"PSA","description":"A team member is a person on a PSA project's team, and a position assignment links a person or placeholder to one of the project's positions.\n\nA person can be a team member without a position assignment. A placeholder on a project's team appears only as a position assignment, never as a team member.","x-displayName":"Team Members"},{"name":"psa-time-entries","kind":"nav","parent":"PSA","description":"A time entry is the hours a team member records for an activity on one date.\n\nEach request changes only the time entries you name. There is no endpoint that saves a whole timesheet week. To save an edited week, create the new time entries, update the changed ones, and delete the removed ones.\n\nA time entry's submissionStatus starts at 'draft' and moves to 'pending' when you submit it, then to 'approved' or 'rejected'. An approved time entry becomes 'submittedForInvoicing' and then 'invoiced' as it is billed. No endpoint sets submissionStatus directly.","x-displayName":"Time Entries"},{"name":"taxDocumentAdHocDocuments","kind":"nav","parent":"accounting","description":"Ad hoc documents: the invoices and credits an entity records by hand for tax compliance, each posted to the ledger when it is created and reversed only by voiding. Sits under Accounting, beside the other domains of that module. Being a group it carries no targets, no catalog entry and no path segment of its own — the routes stay at accounting/ad-hoc-documents. The group tag is qualified with the package stem because a tag shares one company-wide namespace with every endpoint identifier (R13.9b), and the bare noun adHocDocuments belongs to the collection data-set.","x-displayName":"Ad Hoc Documents"},{"name":"taxDocumentManualTaxableDocuments","kind":"nav","parent":"taxDocuments","description":"The manual taxable documents of the tax document package: the invoices and credits an entity records by hand for tax compliance, and what is still open on them. Also known as ad hoc documents. Sits under Tax Documents. Being a group it carries no targets, no catalog entry and no path segment of its own — the routes stay at tax-documents/manual-taxable-documents.","x-displayName":"Manual Taxable Documents"},{"name":"taxDocuments","kind":"nav","parent":"accounting","description":"Everything the tax document package exposes over the public API: the manual taxable documents an entity records for tax compliance. Sits under Accounting, beside the other domains of that module. Being a group it carries no targets, no catalog entry and no path segment of its own.","x-displayName":"Tax Documents"},{"name":"valueAccounting","kind":"nav","description":"Everything value accounting exposes over the public API: the reporting tag dimensions transactions are tagged with, and the tenant-defined custom dimensions that extend them.","x-displayName":"Value Accounting"},{"name":"valueAccountingAssociations","kind":"nav","parent":"valueAccounting","description":"Master-data associations: the relationships that tag one master-data record to another — a department to a value center, an employee to a customer, a custom value object to a team. An association carries no amounts; it records that two records belong together, with a validity period, so value accounting can report one dimension through the other. A relationship is stored as two directed edges, one anchored on each record, so each side reads its own relationships once and either side can remove them. Sits under Value Accounting, beside the categories master data is filed under and the reporting tag dimensions the same records are tagged with.","x-displayName":"Master Data Associations"},{"name":"valueAccountingBusinessDrivers","kind":"nav","parent":"valueAccountingDrivers","description":"Business driver definitions: the named, non-financial measures value accounting allocates by — headcount, machine hours, floor space. A driver carries a name, an optional description, a calculation type (asOf, a stock that carries forward; cumulative, a per-period flow), the unit of measure its values are read in, and the dimensions every recorded value is broken down by. Names are unique tenant-wide, compared trimmed and case-insensitively, and a deactivated driver keeps its name. The calculation type and the dimension set freeze once the driver holds a recorded value. System drivers are shipped with the product and fed by an external metric: their name and calculation type never change and they are never deleted. The recorded values themselves are not part of this group. Sits under Business Drivers, beside the units the drivers are measured in.","x-displayName":"Business Driver Definitions"},{"name":"valueAccountingCategories","kind":"nav","parent":"valueAccounting","description":"Value accounting categories: the grouping labels that value objects, custom value objects and value centers are filed under. A category carries no amounts, no dates and no hierarchy — it exists to classify master data, and it is the axis reports group that master data by. Sits under Value Accounting, beside the reporting tag dimensions the same records are tagged with.","x-displayName":"Categories"},{"name":"valueAccountingCustomValueDimensions","kind":"nav","parent":"valueAccounting","description":"Tenant-defined custom value dimensions: the tagging axes that extend reporting tags beyond the platform's built-in dimensions. A dimension is an AXIS ('Region', 'Product Line') whose VALUES are custom value objects ('North', 'South'); it carries no amounts, no dates, no hierarchy and no lifecycle, only a name. Every custom value object belongs to exactly one of them, so this is where a custom tagging journey starts. Sits under Value Accounting, beside the categories master data is filed under and the master-data associations the same records are related through.","x-displayName":"Custom Value Dimensions"},{"name":"valueAccountingCustomValueObjects","kind":"nav","parent":"valueAccounting","description":"Tenant-defined custom value objects: the VALUES of a custom value dimension ('North', 'South' on the axis 'Region'). A custom value object is a tag value, so every one carries a shadow value object that value allocations tag against, tied to it by a 1:1 mapping; the endpoints here create, change, retire, re-open and delete that trio as one record, and the shadow never appears on the wire. Each value belongs to exactly one custom value dimension and is validity-dated, so it is active until its end date has passed. Sits under Value Accounting, beside the custom value dimensions its values belong to, the categories master data is filed under and the master-data associations the same records are related through.","x-displayName":"Custom Value Objects"},{"name":"valueAccountingDriverUnits","kind":"nav","parent":"valueAccountingDrivers","description":"Driver units: the units of measure business drivers are expressed in — headcount, machine hours, square metres, transactions. A unit carries a name and an optional description and nothing else: no values, no periods, no lifecycle dates. Every business driver references exactly one unit, and every value recorded against the driver is read in it. Names are unique tenant-wide, compared trimmed and case-insensitively. A unit is deleted or refused, never deactivated: one still used by a business driver cannot be deleted. Not the units of measure of items and inventory, which are a different resource. Sits under Business Drivers, beside the drivers that use the units.","x-displayName":"Driver Units"},{"name":"valueAccountingDriverValues","kind":"nav","parent":"valueAccountingDrivers","description":"Recorded business driver values: the per-period numbers a driver holds for one legal entity and book, each tagged to one full combination of dimension members (a department, a team and so on). Values are written through composite flows that enforce the period locks, keep an audit history and, for an As-of driver, carry each value forward into the following periods as system-carried rows. A combination is the persistent anchor of one member set and can be ended from a period and re-enabled later. System drivers' values belong to their metric feed and are refused on every write. The driver definitions and their units are not part of this group. Sits under Business Drivers, beside the definitions the values are recorded against.","x-displayName":"Driver Values"},{"name":"valueAccountingDrivers","kind":"nav","parent":"valueAccounting","description":"Business drivers: the non-financial quantities value accounting allocates by — headcount, machine hours, floor space and the like — the units they are measured in, and the per-period values recorded against a driver's tagged combinations. Sits under Value Accounting, beside the master data those values are allocated onto.","x-displayName":"Business Drivers"},{"name":"valueAccountingValueAllocations","kind":"nav","parent":"valueAccounting","description":"Value allocations: the link records between posted accounting and value accounting. A financial document's journal entry line points at exactly one value allocation, and the allocation's lines say which value objects and value centers that line's amount is attributed to and whether it counts as cost, profit or neither. The allocation holds no amount and does not know its document: the reference runs from the journal entry line to the allocation, so a document's allocation is found from the document's side. Allocations and their lines are CREATED by tagging a financial document — the in-process tagging workflows of value accounting, run as part of creating or editing the document — and no route here creates one. The routes read them, correct the attribution of existing lines, and delete allocations no journal entry line references any more. Sits under Value Accounting, beside the value objects and value centers the lines attribute to and the master-data associations those records are related through.","x-displayName":"Value Allocations"},{"name":"valueAccountingValueCenters","kind":"nav","parent":"valueAccounting","description":"Value centers: the responsibility units of value accounting — cost and profit centres — that journal entry lines are tagged to and that figures roll up through. Unlike value objects they form a TREE: every value center hangs under at most one parent and is always part of the tree, a root when it has none, and the tree is read in either direction from any value center. A value center may stand for master data through its mappings — most often the department or team it was created for — but it does not have to: a value center with no mapping is valid. The mappings are part of the value center: created with it, edited through its update, removed with it, and each record appears on the wire as the pair {dimensionCode, id} the associations resource speaks. Many value centers are created and renamed by the system as mirrors of a department or team; the endpoints here refuse edits of what the system owns on those. Validity-dated: a value center is active from its start date until its end date has passed; retiring, re-opening and deleting follow the tree. Sits under Value Accounting, beside the categories value centers are filed under, the value objects that play the same role for other master data, and the master-data associations the same records are related through.","x-displayName":"Value Centers"},{"name":"valueAccountingValueObjects","kind":"nav","parent":"valueAccounting","description":"Value objects: the value-accounting records that journal entry lines are allocated to, each standing for the master data it represents — one department, customer or employee (1:1), or a cluster of several records. Every value object carries at least one mapping to a master-data record, and the mappings are part of the value object: they are created with it, edited through its update and removed with it, and each record appears on the wire as the pair {dimensionCode, id} the associations resource speaks. Most value objects are created and renamed by the system as mirrors of their record; the endpoints here create value objects the same way the product does, resolving an existing 1:1 value object instead of duplicating it, and retire, re-open and delete them with their mappings. Validity-dated: a value object is active from its start date until its end date has passed. Sits under Value Accounting, beside the categories value objects are filed under, the value centers that play the same role for departments and teams, and the master-data associations the same records are related through.","x-displayName":"Value Objects"}]}